Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Mar 2019 17:56:18 +0000 (UTC)
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r496956 - in head/editors/libreoffice: . files
Message-ID:  <201903271756.x2RHuIlf023611@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lwhsu
Date: Wed Mar 27 17:56:18 2019
New Revision: 496956
URL: https://svnweb.freebsd.org/changeset/ports/496956

Log:
  - Add QT5 and KDE5 options [1]
  - Fix build with gcc on !libc++ archs [2]
  - Rework patch-sal_osl_unx_thread.cxx for more portable [3]
  - Fix pkg-plist while GTK3 enabled
  
  PR:		236748 [1], 236765 [2]
  Submitted by:	VVD <vvd@unislabs.com> [1], jhibbits [2],
  		Greg Veldman <freebsd@gregv.net> [3]

Added:
  head/editors/libreoffice/files/patch-sal_osl_unx_uunxapi.cxx   (contents, props changed)
Modified:
  head/editors/libreoffice/Makefile
  head/editors/libreoffice/files/patch-powerpc
  head/editors/libreoffice/files/patch-sal_osl_unx_thread.cxx

Modified: head/editors/libreoffice/Makefile
==============================================================================
--- head/editors/libreoffice/Makefile	Wed Mar 27 17:47:36 2019	(r496955)
+++ head/editors/libreoffice/Makefile	Wed Mar 27 17:56:18 2019	(r496956)
@@ -2,6 +2,8 @@
 
 .include "${.CURDIR}/Makefile.common"
 
+PORTREVISION=	1
+
 MASTER_SITES=	https://download.documentfoundation.org/libreoffice/src/${PORTVERSION}/ \
 		https://dev-www.libreoffice.org/src/:src \
 		https://dev-www.libreoffice.org/extern/:ext
@@ -115,15 +117,17 @@ USES=		autoreconf:build bison compiler:c++14-lang cpe 
 		mysql:client \
 		perl5 pkgconfig python shebangfix shared-mime-info ssl tar:xz
 
-OPTIONS_DEFINE=	CUPS DOCS GNOME GTK2 GTK3 JAVA MMEDIA PGSQL SDK SYSTRAY \
-		TEST WEBDAV
+OPTIONS_DEFINE=	CUPS DOCS GNOME GTK2 GTK3 JAVA KDE5 MMEDIA PGSQL QT5 SDK \
+		SYSTRAY TEST WEBDAV
 OPTIONS_DEFAULT=	CUPS GTK2 MMEDIA
 
 GTK2_DESC=	GTK+ 2 GUI toolkit support
 GTK3_DESC=	GTK+ 3 GUI toolkit support (experimental)
 JAVA_DESC=	Add Java support (XML filters, macros, DB connections)
+KDE5_DESC=	KF5/Qt5 GUI toolkit support (require QT5)
 MMEDIA_DESC=	Enable multimedia backend for Impress
 PGSQL_DESC=	Build with PostgreSQL-SDBC driver
+QT5_DESC=	Qt5 GUI toolkit support
 SDK_DESC=	Build with SDK
 SYSTRAY_DESC=	Enable systemtray quickstarter
 TEST_DESC=	Run all regression tests
@@ -193,6 +197,11 @@ JAVA_DISTFILES=	17410483b5b5f267aa18b7e00b65e6e0-hsqld
 JAVA_USE=	JAVA=yes
 JAVA_VARS=	JAVA_BUILD=yes
 
+KDE5_CONFIGURE_ENABLE=	kde5
+KDE5_USE=	kde=config,coreaddons,i18n,kio,windowsystem
+KDE5_USES=	kde:5
+KDE5_IMPLIES=	QT5
+
 MMEDIA_CONFIGURE_ENABLE=	gstreamer-1-0
 MMEDIA_USE=	GSTREAMER1=yes
 
@@ -200,6 +209,10 @@ PGSQL_CONFIGURE_ENABLE=	postgresql-sdbc
 PGSQL_CONFIGURE_WITH=	gssapi krb5
 PGSQL_USES=	pgsql
 
+QT5_CONFIGURE_ENABLE=	qt5
+QT5_USE=	qt=buildtools_build,core,gui,network,qmake_build,widgets,x11extras
+QT5_USES=	qt:5
+
 SDK_BUILD_DEPENDS=	doxygen:devel/doxygen
 SDK_CONFIGURE_ENABLE=	odk
 SDK_CONFIGURE_OFF=	--without-doxygen
@@ -264,7 +277,8 @@ CONFIGURE_ENV=	DMAKE=${LOCALBASE}/bin/dmake \
 		OPENCOLLADA_CFLAGS="${COLLADA_CFLAGS}" \
 		OPENCOLLADA_LIBS="${COLLADA_LIBS}" \
 		PYTHON_CFLAGS="`${PYTHON_VERSION}-config --cflags`" \
-		PYTHON_LIBS="`${PYTHON_VERSION}-config --libs`"
+		PYTHON_LIBS="`${PYTHON_VERSION}-config --libs`" \
+		ac_cv_path_SED=${LOCALBASE}/bin/gsed
 
 MAKE_ARGS+=	TMPDIR=${WRKDIR}
 MAKE_ENV+=	CXXFLAGS_WARN="${CXXFLAGS_WARN}"
@@ -311,6 +325,9 @@ post-install-SDK-on:
 	@cd ${STAGEDIR}${PREFIX} && \
 	${FIND} -s ${subdir}/libreoffice -not -type d >> ${TMPPLIST}
 .endfor
+
+post-install-GTK3-on:
+	@${ECHO_CMD} "share/gir-1.0/LOKDocView-0.1.gir" >> ${TMPPLIST}
 
 add-plist-gnome:
 .for subdir in gnome hicolor locolor

Modified: head/editors/libreoffice/files/patch-powerpc
==============================================================================
--- head/editors/libreoffice/files/patch-powerpc	Wed Mar 27 17:47:36 2019	(r496955)
+++ head/editors/libreoffice/files/patch-powerpc	Wed Mar 27 17:56:18 2019	(r496956)
@@ -171,24 +171,27 @@
  #include <i18nlangtag/mslangid.hxx>
  #include <sprmids.hxx>
  #include <rtl/tencinfo.h>
---- testtools/CustomTarget_uno_test.mk.orig
-+++ testtools/CustomTarget_uno_test.mk
-@@ -12,6 +12,9 @@
+--- testtools/CustomTarget_uno_test.mk.orig	2019-03-27 15:11:56.660402000 +0800
++++ testtools/CustomTarget_uno_test.mk	2019-03-27 15:11:55.757889000 +0800
+@@ -12,7 +12,10 @@
  # this target is phony to run it every time
  .PHONY : $(call gb_CustomTarget_get_target,testtools/uno_test)
  
+-$(call gb_CustomTarget_get_target,testtools/uno_test) : \
 +ifeq (($(OS)-$(CPUNAME)), FREEBSD-POWERPC64)
 +	@echo "FreeBSD PowerPC64 GCC fails this test! likely broken UNO bridge. Fix me."
 +else
- $(call gb_CustomTarget_get_target,testtools/uno_test) : \
++	$(call gb_CustomTarget_get_target,testtools/uno_test) : \
  		$(call gb_Executable_get_runtime_dependencies,uno) \
  		$(call gb_InternalUnoApi_get_target,bridgetest) \
-@@ -26,5 +29,5 @@
+ 		$(call gb_Package_get_target,instsetoo_native_setup_ure) \
+@@ -29,6 +32,7 @@
  		-env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD)) \
  		-env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services)) \
  		-env:URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb))
--
 +endif
+ endif
+ 
  # vim:set shiftwidth=4 tabstop=4 noexpandtab:
 --- vcl/headless/svpbmp.cxx.orig
 +++ vcl/headless/svpbmp.cxx

Modified: head/editors/libreoffice/files/patch-sal_osl_unx_thread.cxx
==============================================================================
--- head/editors/libreoffice/files/patch-sal_osl_unx_thread.cxx	Wed Mar 27 17:47:36 2019	(r496955)
+++ head/editors/libreoffice/files/patch-sal_osl_unx_thread.cxx	Wed Mar 27 17:56:18 2019	(r496956)
@@ -1,9 +1,11 @@
 osl_thread_priority_init_Impl() tries to assign values to variables
 declared as const on platforms not excluded by NO_PTHREAD_PRIORITY.
-This includes FreeBSD.  Patch locally until fixed upstream.
+This includes FreeBSD.  This is https://gerrit.libreoffice.org/69603
+upstream, and this comment and the relevant parts of this patch can
+be removed if/when that is merged.
 
---- sal/osl/unx/thread.cxx.orig	2019-02-12 22:11:36.000000000 +0000
-+++ sal/osl/unx/thread.cxx	2019-02-18 23:03:57.933036000 +0000
+--- sal/osl/unx/thread.cxx.orig	2019-03-15 19:58:40.000000000 +0000
++++ sal/osl/unx/thread.cxx	2019-03-23 20:09:21.755731000 +0000
 @@ -46,6 +46,10 @@
  #include <sys/syscall.h>
  #endif
@@ -15,33 +17,39 @@ This includes FreeBSD.  Patch locally until fixed upst
  /****************************************************************************
   * @@@ TODO @@@
   *
-@@ -88,11 +92,11 @@
+@@ -88,11 +92,19 @@
  
  struct osl_thread_priority_st
  {
--    int const m_Highest;
--    int const m_Above_Normal;
--    int const m_Normal;
--    int const m_Below_Normal;
--    int const m_Lowest;
++#ifndef NO_PTHREAD_PRIORITY
 +    int m_Highest;
 +    int m_Above_Normal;
 +    int m_Normal;
 +    int m_Below_Normal;
 +    int m_Lowest;
++#else
+     int const m_Highest;
+     int const m_Above_Normal;
+     int const m_Normal;
+     int const m_Below_Normal;
+     int const m_Lowest;
++#endif /* NO_PTHREAD_PRIORITY */
  };
  
  #define OSL_THREAD_PRIORITY_INITIALIZER { 127, 96, 64, 32, 0 }
-@@ -110,7 +114,7 @@
+@@ -110,7 +122,11 @@
  struct osl_thread_global_st
  {
      pthread_once_t                    m_once;
--    struct osl_thread_priority_st const m_priority;
++#ifndef NO_PTHREAD_PRIORITY
 +    struct osl_thread_priority_st     m_priority;
++#else
+     struct osl_thread_priority_st const m_priority;
++#endif /* NO_PTHREAD_PRIORITY */
      struct osl_thread_textencoding_st m_textencoding;
  };
  
-@@ -545,7 +549,7 @@
+@@ -545,7 +561,7 @@
      if ( 0 != err )
          SAL_WARN("sal.osl", "pthread_setname_np failed with errno " << err);
  #elif defined __FreeBSD_kernel__

Added: head/editors/libreoffice/files/patch-sal_osl_unx_uunxapi.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/libreoffice/files/patch-sal_osl_unx_uunxapi.cxx	Wed Mar 27 17:56:18 2019	(r496956)
@@ -0,0 +1,25 @@
+--- sal/osl/unx/uunxapi.cxx.bak	2019-03-23 22:42:30.703590000 -0500
++++ sal/osl/unx/uunxapi.cxx	2019-03-23 22:46:37.905090000 -0500
+@@ -563,14 +563,22 @@
+         case EBFONT:
+             return "EBFONT";
+ #endif
++#ifdef ENOSTR
+         case ENOSTR:
+             return "ENOSTR";
++#endif
++#ifdef ENODATA
+         case ENODATA:
+             return "ENODATA";
++#endif
++#if defined(ETIME) && (!defined(ETIMEDOUT) || ETIME != ETIMEDOUT)
+         case ETIME:
+             return "ETIME";
++#endif
++#ifdef ENOSR
+         case ENOSR:
+             return "ENOSR";
++#endif
+ #ifdef ENONET
+         case ENONET:
+             return "ENONET";



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903271756.x2RHuIlf023611>