Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jun 2017 22:55:49 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r442891 - in head/editors/libreoffice: . files
Message-ID:  <201706072255.v57Mtna5040261@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Wed Jun  7 22:55:49 2017
New Revision: 442891
URL: https://svnweb.freebsd.org/changeset/ports/442891

Log:
  - Turn off unit tests by default.  It is getting harder to maintain because
  there are too many possible combinations with current set of build options.
  Also, this significantly reduces build time.  Use TEST option to enable it.
  - Implement SAL getOSVersion() for FreeBSD.  Actually, I believe it should
  work with all supported UNIX-like OSes including Linux.
  - Install stripped binaries.  'install-strip' target was not honored because
  'distro-pack-install' target unconditionally depends on 'install' target.
  - Fix couple of minor installation issues while I am here.

Added:
  head/editors/libreoffice/files/patch-vcl_unx_generic_app_geninst.cxx   (contents, props changed)
Deleted:
  head/editors/libreoffice/files/patch-dbaccess_Module__dbaccess.mk
  head/editors/libreoffice/files/patch-filter_Module__filter.mk
  head/editors/libreoffice/files/patch-sc_Module__sc.mk
  head/editors/libreoffice/files/patch-sw_Module__sw.mk
  head/editors/libreoffice/files/patch-sysui_desktop_share_create__tree.sh
Modified:
  head/editors/libreoffice/Makefile
  head/editors/libreoffice/distinfo
  head/editors/libreoffice/files/patch-Makefile.in
  head/editors/libreoffice/files/patch-bin_distro-install-desktop-integration

Modified: head/editors/libreoffice/Makefile
==============================================================================
--- head/editors/libreoffice/Makefile	Wed Jun  7 22:28:42 2017	(r442890)
+++ head/editors/libreoffice/Makefile	Wed Jun  7 22:55:49 2017	(r442891)
@@ -2,7 +2,7 @@
 
 .include "${.CURDIR}/Makefile.common"
 
-PORTREVISION=	1
+PORTREVISION=	2
 MASTER_SITES=	http://download.documentfoundation.org/libreoffice/src/${PORTVERSION}/ \
 		http://dev-www.libreoffice.org/src/:src \
 		http://dev-www.libreoffice.org/extern/:ext
@@ -18,7 +18,6 @@ CONFLICTS_BUILD=	mdds0
 BUILD_DEPENDS=	p5-Archive-Zip>=0:archivers/p5-Archive-Zip \
 		zip:archivers/zip \
 		${LOCALBASE}/include/sqlext.h:databases/unixODBC \
-		cppunit-config:devel/cppunit \
 		dmake:devel/dmake \
 		${LOCALBASE}/bin/gperf:devel/gperf \
 		${LOCALBASE}/include/mdds-1.2/mdds/global.hpp:devel/mdds \
@@ -84,7 +83,8 @@ RUN_DEPENDS=	xdg-open:devel/xdg-utils \
 		${LOCALBASE}/share/fonts/LinLibertineG/LinLibertine_DR_G.ttf:x11-fonts/linuxlibertine-g
 
 DISTFILES+=	4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2:src \
-		86b1daaa438f5a7bea9a52d7b9799ac0-xmlsec1-1.2.23.tar.gz:src
+		86b1daaa438f5a7bea9a52d7b9799ac0-xmlsec1-1.2.23.tar.gz:src \
+		cppunit-1.13.2.tar.gz:src
 
 .if defined(PRERELEASE)
 MASTER_SITES+=	http://dev-builds.libreoffice.org/pre-releases/src/
@@ -92,7 +92,7 @@ MASTER_SITES+=	http://dev-builds.libreoffice.org/pre-r
 
 CONFLICTS_INSTALL=	libreoffice4-4.*
 
-INSTALL_TARGET=	install-strip distro-pack-install
+INSTALL_TARGET=	TMPDIR=${WRKDIR} distro-pack-install
 WRKSRC=		${WRKDIR}/${PORTNAME}-${LOVERSION}
 
 GNU_CONFIGURE=	yes
@@ -204,6 +204,7 @@ SDK_DISTFILES=	185d60944ea767075d27247c3162b3bc-unowin
 
 SYSTRAY_CONFIGURE_ENABLE=	systray
 
+TEST_ALL_TARGET_OFF=	build-nocheck
 TEST_CONFIGURE_ENABLE=	cve-tests
 
 VERBOSE_CONFIGURE_ON=	--enable-verbose
@@ -251,7 +252,8 @@ CONFIGURE_ARGS=	--disable-dependency-tracking \
 		--with-system-zlib \
 		--with-vendor="FreeBSD ports" \
 		--without-fonts \
-		--without-myspell-dicts
+		--without-myspell-dicts \
+		--without-system-cppunit
 
 CONFIGURE_ENV=	DMAKE=${LOCALBASE}/bin/dmake \
 		GNUTAR="${TAR}" \
@@ -309,7 +311,7 @@ post-install:
 	    -exec ${ECHO_CMD} "@dir {}" \; >> ${TMPPLIST}
 	@cd ${STAGEDIR}${PREFIX} && \
 	${FIND} -s bin lib man -not -type d >> ${TMPPLIST}
-.for subdir in application-registry applications bash-completion icons mime mime-info mimelnk
+.for subdir in appdata application-registry applications bash-completion icons mime mime-info mimelnk
 	@cd ${STAGEDIR}${PREFIX} && \
 	${FIND} -s share/${subdir} -not -type d >> ${TMPPLIST}
 .endfor

Modified: head/editors/libreoffice/distinfo
==============================================================================
--- head/editors/libreoffice/distinfo	Wed Jun  7 22:28:42 2017	(r442890)
+++ head/editors/libreoffice/distinfo	Wed Jun  7 22:55:49 2017	(r442891)
@@ -1,4 +1,4 @@
-TIMESTAMP = 1495234833
+TIMESTAMP = 1496871429
 SHA256 (libreoffice/libreoffice-5.3.3.2.tar.xz) = 9632956926d9d5c9049ce5b81c2673f298ae73b873d53cce8cfaea8ee243619a
 SIZE (libreoffice/libreoffice-5.3.3.2.tar.xz) = 190216268
 SHA256 (libreoffice/libreoffice-help-5.3.3.2.tar.xz) = f9b4fef5f449cdbbcb5796908d0536576585c511173bfccf2ca049b5dcbb0dc7
@@ -7,6 +7,8 @@ SHA256 (libreoffice/4b87018f7fff1d054939d19920b751a0-c
 SIZE (libreoffice/4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2) = 555291
 SHA256 (libreoffice/86b1daaa438f5a7bea9a52d7b9799ac0-xmlsec1-1.2.23.tar.gz) = 41d463d16c9894cd3317098d027c038039c6d896b9cbb9bad9c4e29959e10e9f
 SIZE (libreoffice/86b1daaa438f5a7bea9a52d7b9799ac0-xmlsec1-1.2.23.tar.gz) = 1794694
+SHA256 (libreoffice/cppunit-1.13.2.tar.gz) = 3f47d246e3346f2ba4d7c9e882db3ad9ebd3fcbd2e8b732f946e0e3eeb9f429f
+SIZE (libreoffice/cppunit-1.13.2.tar.gz) = 953596
 SHA256 (libreoffice/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip) = d30b13f4ba2e3b6a2d4f020c0dee0a9fb9fc6fbcc2d561f36b78da4bf3802370
 SIZE (libreoffice/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip) = 3519470
 SHA256 (libreoffice/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip) = 5826d1551bf599b85742545f6e01a0079b93c1b2c8434bf409eddb3a29e4726b

Modified: head/editors/libreoffice/files/patch-Makefile.in
==============================================================================
--- head/editors/libreoffice/files/patch-Makefile.in	Wed Jun  7 22:28:42 2017	(r442890)
+++ head/editors/libreoffice/files/patch-Makefile.in	Wed Jun  7 22:55:49 2017	(r442891)
@@ -9,3 +9,12 @@
  
  #
  # Build
+@@ -362,7 +362,7 @@ else
+ 	@exit 1
+ endif
+ 
+-distro-pack-install: install
++distro-pack-install: install-strip
+ 	$(SRCDIR)/bin/distro-install-clean-up
+ 	$(SRCDIR)/bin/distro-install-desktop-integration
+ 	$(SRCDIR)/bin/distro-install-sdk

Modified: head/editors/libreoffice/files/patch-bin_distro-install-desktop-integration
==============================================================================
--- head/editors/libreoffice/files/patch-bin_distro-install-desktop-integration	Wed Jun  7 22:28:42 2017	(r442890)
+++ head/editors/libreoffice/files/patch-bin_distro-install-desktop-integration	Wed Jun  7 22:55:49 2017	(r442891)
@@ -1,6 +1,6 @@
---- bin/distro-install-desktop-integration.orig	2016-10-28 14:50:26 UTC
+--- bin/distro-install-desktop-integration.orig	2017-05-03 16:46:29 UTC
 +++ bin/distro-install-desktop-integration
-@@ -99,7 +99,7 @@ cp -a workdir/CustomTarget/sysui/share/l
+@@ -99,7 +99,7 @@ cp -a workdir/CustomTarget/sysui/share/libreoffice/* "
  cp -a "${SRCDIR?}"/sysui/desktop/share/create_tree.sh "$sysui_temp"
  cd $sysui_temp
  # we want non-versioned stuff in the distro packages
@@ -34,7 +34,16 @@
      -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION_NODOT/\1/" \
      -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION/\1/" \
      -e "s/\($PRODUCTNAME\) $PRODUCTVERSION/\1/" \
-@@ -177,12 +177,12 @@ ln -sf $INSTALLDIR/program/soffice $DEST
+@@ -145,7 +145,7 @@ if test -f $DESTDIR/gid_Module_Root_Brand ; then
+                $PREFIXDIR/share/mime/packages \
+                $PREFIXDIR/share/mime-info \
+                $PREFIXDIR/share/icons ; do
+-        find "$DESTDIR$dir" \( -type f -o -type l \) -printf "$dir/%P\n" >>$DESTDIR/gid_Module_Root_Brand
++        find "$DESTDIR$dir" \( -type f -o -type l \) | sed -e "s|^$DESTDIR||" >>$DESTDIR/gid_Module_Root_Brand
+     done
+ fi
+ 
+@@ -177,12 +177,12 @@ ln -sf $INSTALLDIR/program/soffice $DESTDIR$PREFIXDIR/
  test -f $DESTDIR/gid_Module_Root_Brand && echo "$PREFIXDIR/bin/soffice" >>$DESTDIR/gid_Module_Root_Brand
  
  # create bash completion

Added: head/editors/libreoffice/files/patch-vcl_unx_generic_app_geninst.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/libreoffice/files/patch-vcl_unx_generic_app_geninst.cxx	Wed Jun  7 22:55:49 2017	(r442891)
@@ -0,0 +1,60 @@
+--- vcl/unx/generic/app/geninst.cxx.orig	2017-05-03 16:46:29 UTC
++++ vcl/unx/generic/app/geninst.cxx
+@@ -22,11 +22,8 @@
+ #include <cassert>
+ #include <string.h>
+ #include <stdlib.h>
++#include <sys/utsname.h>
+ 
+-#if defined(LINUX)
+-#  include <stdio.h>
+-#endif
+-
+ #include <osl/module.hxx>
+ #include <comphelper/solarmutex.hxx>
+ #include <config_features.h>
+@@ -139,31 +136,22 @@ SalGenericInstance::~SalGenericInstance()
+ 
+ OUString SalGenericInstance::getOSVersion()
+ {
+-    OUString aKernelVer = "unknown";
++    struct utsname stName;
+ 
+-// not so generic, but at least shared between all unix backend
+-#if defined(LINUX)
+-    FILE* pVersion = fopen( "/proc/version", "r" );
+-    if ( pVersion )
++    if ( uname( &stName ) != 0 )
++        return "unknown";
++
++    sal_Int32 nDots = 0;
++    sal_Int32 nIndex = 0;
++    OUString aVers = OUString::createFromAscii( stName.release );
++    while ( nIndex++ < aVers.getLength() )
+     {
+-        char aVerBuffer[512];
+-        if ( fgets ( aVerBuffer, 511, pVersion ) )
+-        {
+-            aKernelVer = OUString::createFromAscii( aVerBuffer );
+-            sal_Int32 nIndex = 0;
+-            // "Linux version 3.16.7-29-desktop ..."
+-            OUString aVers = aKernelVer.getToken( 2, ' ', nIndex );
+-            // "3.16.7-29-desktop ..."
+-            sal_Int32 nTooDetailed = aVers.indexOf( '.', 2);
+-            if (nTooDetailed < 1 || nTooDetailed > 8)
+-                aKernelVer = "Linux (misparsed version)";
+-            else // "3.16.7-29-desktop ..."
+-                aKernelVer = "Linux " + aVers.copy(0, nTooDetailed);
+-        }
+-        fclose( pVersion );
++        const char c = stName.release[ nIndex ];
++        if ( c == ' ' || c == '-' || ( c == '.' && nDots++ > 0 ) )
++            break;
+     }
+-#endif
+-    return aKernelVer;
++    return OUString::createFromAscii( stName.sysname ) + " " +
++        aVers.copy( 0, nIndex );
+ }
+ 
+ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */



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