Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Sep 2012 16:41:32 +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: r304153 - in head/editors/libreoffice: . files
Message-ID:  <201209121641.q8CGfWv5007381@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Wed Sep 12 16:41:31 2012
New Revision: 304153
URL: http://svn.freebsd.org/changeset/ports/304153

Log:
  - Deprecate USE_OPENSSL.  It causes nothing but trouble at the moment.
  - Set some environment variables needed by old build system.
  - Fix build with GCC and reinstate WITH_GCC knob.
  - Tidy up some nits while I am here.

Added:
  head/editors/libreoffice/files/patch-cppunit__freebsd.patch   (contents, props changed)
  head/editors/libreoffice/files/patch-cppunit__gcc-abi-demangle.patch   (contents, props changed)
  head/editors/libreoffice/files/patch-cppunit__makefile.mk   (contents, props changed)
Modified:
  head/editors/libreoffice/Makefile
  head/editors/libreoffice/files/patch-configure

Modified: head/editors/libreoffice/Makefile
==============================================================================
--- head/editors/libreoffice/Makefile	Wed Sep 12 16:25:43 2012	(r304152)
+++ head/editors/libreoffice/Makefile	Wed Sep 12 16:41:31 2012	(r304153)
@@ -7,7 +7,7 @@
 
 .include "${.CURDIR}/Makefile.common"
 
-PORTREVISION=	0
+PORTREVISION=	1
 
 MASTER_SITE_SUBDIR=	src/${PORTVERSION}/
 MASTER_SITES+=	http://dev-www.libreoffice.org/src/:ext \
@@ -67,7 +67,6 @@ USE_XZ=	yes
 USE_PYTHON=	yes
 USE_QT4=	# empty but required
 #l10n
-INSTALL_TARGET=	distro-pack-install
 
 DIST_SUBDIR=	libreoffice
 WRKSRC=		${WRKDIR}/${PORTNAME}-core-${LOVERSION}
@@ -88,7 +87,6 @@ USE_PERL5_BUILD=	yes
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
 USE_BISON=	build
-USE_OPENSSL=	yes
 WANT_GNOME=	yes
 
 USE_XORG=	xaw xrandr
@@ -107,10 +105,8 @@ SYSTRAY_DESC=	Enable systemtray quicksta
 WEBDAV_DESC=	Enable webdav protocol
 JAVA_DESC=	Add java support (XML Filters, macros)
 
-CONFIGURE_ENV=		GPERF=${LOCALBASE}/bin/gperf \
-			DMAKE=${LOCALBASE}/bin/dmake \
-			OPENSSL_CFLAGS="-I${OPENSSLINC}" \
-			OPENSSL_LIBS="-L${OPENSSLLIB} -lssl"
+CONFIGURE_ENV=		DMAKE=${LOCALBASE}/bin/dmake \
+			GPERF=${LOCALBASE}/bin/gperf
 
 CONFIGURE_ARGS+=	--with-unix-wrapper="libreoffice" \
 			--disable-fetch-external \
@@ -204,38 +200,6 @@ MANCOMPRESSED=	yes
 
 .include <bsd.port.options.mk>
 
-#.if defined(WITH_GCC)
-#USE_GCC=	4.6+
-#DISTFILES+=	bd30e9cf5523cdfc019b94f5e1d7fd19-cppunit-1.12.1.tar.gz:ext
-#.else
-.if exists(/usr/bin/clang) && ${OSVERSION} >= 900014
-CC=	/usr/bin/clang
-CPP=	/usr/bin/clang-cpp
-CXX=	/usr/bin/clang++
-CXXCPP=	${CPP}
-.else
-# XXX Clang PR13308 (http://llvm.org/bugs/show_bug.cgi?id=13308)
-BUILD_DEPENDS+=	clang-devel>=3.2.r159895:${PORTSDIR}/lang/clang-devel
-USE_BINUTILS=	yes
-CC=	${LOCALBASE}/bin/clang
-CPP=	${CC} -E
-CXX=	${LOCALBASE}/bin/clang++
-CXXCPP=	${CXX} -E
-CONFIGURE_ARGS+=	--with-linker-hash-style=sysv
-.endif
-CONFIGURE_ENV+=		CXXCPP="${CXXCPP}"
-CONFIGURE_ARGS+=	--with-system-cppunit
-BUILD_DEPENDS+=	${LOCALBASE}/lib/libcppunit.so:${PORTSDIR}/devel/cppunit
-#.endif
-
-MAKE_ENV+=	USE_GMAKE=1 DESTDIR=${LODESTDIR}
-
-CPPFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/db${BDB_VER}
-LDFLAGS+=	-L${LOCALBASE}/lib
-
-# XXX Avoid -rpath pollution from bsd.openssl.mk.
-CONFIGURE_ENV+=	LDFLAGS="-L${LOCALBASE}/lib"
-
 .if ${PORT_OPTIONS:MPGSQL}
 USE_PGSQL=	yes
 WANT_PGSQL_VER=	90+
@@ -367,6 +331,40 @@ CONFIGURE_ARGS+=	--enable-release-build
 
 .include <bsd.port.pre.mk>
 
+.if defined(WITH_GCC)
+USE_GCC=	4.6+
+DISTFILES+=	bd30e9cf5523cdfc019b94f5e1d7fd19-cppunit-1.12.1.tar.gz:ext
+CONFIGURE_ENV+=	CXXCPP="${CPP}"
+.else
+.if exists(/usr/bin/clang) && ${OSVERSION} >= 900014
+CC=		/usr/bin/clang
+CPP=		/usr/bin/clang-cpp
+CXX=		/usr/bin/clang++
+CONFIGURE_ENV+=	CXXCPP="${CPP}"
+.else
+# XXX Clang PR13308 (http://llvm.org/bugs/show_bug.cgi?id=13308)
+BUILD_DEPENDS+=	clang-devel>=3.2.r159895:${PORTSDIR}/lang/clang-devel
+USE_BINUTILS=	yes
+CC=		${LOCALBASE}/bin/clang
+CPP=		${CC} -E
+CXX=		${LOCALBASE}/bin/clang++
+CONFIGURE_ENV+=	CXXCPP="${CXX} -E"
+.endif
+CONFIGURE_ARGS+=	--with-system-cppunit
+BUILD_DEPENDS+=	${LOCALBASE}/lib/libcppunit.so:${PORTSDIR}/devel/cppunit
+.endif
+
+.if ${OSVERSION} < 900506
+CONFIGURE_ARGS+=	--with-linker-hash-style=sysv
+.endif
+
+CPPFLAGS=	-I${LOCALBASE}/include -I${LOCALBASE}/include/db${BDB_VER}
+LDFLAGS=	-L${LOCALBASE}/lib
+
+MAKE_ENV+=	ENVCFLAGS="${CFLAGS}" ENVCXXFLAGS="${CXXFLAGS}"
+MAKE_ENV+=	ENVLINKFLAGS="${LDFLAGS}"
+MAKE_ENV+=	USE_GMAKE=1
+
 post-extract:
 	@${MKDIR} ${WRKSRC}/clone
 	@${MKDIR} ${WRKSRC}/src
@@ -389,10 +387,6 @@ post-patch:
 			-e 's#@DB_LIB@#${BDB_LIB_NAME}#' \
 			${WRKSRC}/set_soenv.in
 	@${REINPLACE_CMD} -e 's/sha1sum/sha1/g' ${WRKSRC}/configure
-.if defined(WITH_GCC)
-	@${REINPLACE_CMD} -e "s|^LINKFLAGSDEFS:=|LINKFLAGSDEFS:=-Wl,-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS}|" \
-		${WRKSRC}/solenv/inc/unxfbsd.mk
-.endif
 .if ${CC} == /usr/bin/clang && ${OSVERSION} < 900506
 #Visibility is broken with clang
 	@${REINPLACE_CMD} -e "s|HAVE_GCC_VISIBILITY_FEATURE=TRUE|HAVE_GCC_VISIBILITY_FEATURE=|g" \
@@ -414,6 +408,10 @@ post-configure:
 	@cd ${WRKSRC} && ./bin/create_bootstrap_links
 	@${TOUCH} ${WRKSRC}/src.downloaded
 
+do-install:
+	@cd ${WRKSRC} && ${SETENV} DESTDIR="${LODESTDIR}" \
+	    ${GMAKE} distro-pack-install
+
 post-install:
 	@${RM} -f ${PLISTF} ${PLISTD}
 	# It seems that the empty directories are necessary for libreoffice keep them for now

Modified: head/editors/libreoffice/files/patch-configure
==============================================================================
--- head/editors/libreoffice/files/patch-configure	Wed Sep 12 16:25:43 2012	(r304152)
+++ head/editors/libreoffice/files/patch-configure	Wed Sep 12 16:41:31 2012	(r304153)
@@ -1,5 +1,5 @@
---- ./configure.orig	2012-07-03 07:01:28.000000000 -0400
-+++ ./configure	2012-08-17 14:41:37.000000000 -0400
+--- ./configure.orig	2012-08-08 09:05:10.000000000 -0400
++++ ./configure	2012-09-10 18:59:08.000000000 -0400
 @@ -25612,11 +25612,13 @@
                  { $as_echo "$as_me:$LINENO: checking which hash container mdds shall use" >&5
  $as_echo_n "checking which hash container mdds shall use... " >&6; }
@@ -16,3 +16,14 @@
          { $as_echo "$as_me:$LINENO: result: boost::unordered_map" >&5
  $as_echo "boost::unordered_map" >&6; }
      fi
+@@ -30882,8 +30884,8 @@
+ $as_echo "external" >&6; }
+     # Mac OS builds should get out without extra stuff is the Mac porters'
+     # wish. And pkg-config is although Xcode ships a .pc for openssl
+-    if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
+-            "$_os" = "DragonFly"; then
++    if test "$_os" = "Darwin" -o "$_os" = "FreeBSD" -o "$_os" = "NetBSD" -o \
++	    "$_os" = "OpenBSD" -o "$_os" = "DragonFly"; then
+         OPENSSL_CFLAGS=
+         OPENSSL_LIBS="-lssl -lcrypto"
+     else

Added: head/editors/libreoffice/files/patch-cppunit__freebsd.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/libreoffice/files/patch-cppunit__freebsd.patch	Wed Sep 12 16:41:31 2012	(r304153)
@@ -0,0 +1,131 @@
+--- ./cppunit/freebsd.patch.orig	2012-07-25 15:44:00.000000000 -0400
++++ ./cppunit/freebsd.patch	2012-07-25 15:46:01.000000000 -0400
+@@ -0,0 +1,128 @@
++--- misc/build/cppunit-1.12.1/configure	2008-02-20 00:59:58.000000000 -0500
+++++ misc/build/cppunit-1.12.1/configure	2012-07-25 15:06:50.000000000 -0400
++@@ -8917,7 +8917,7 @@
++       hardcode_shlibpath_var=no
++       ;;
++ 
++-    freebsd1*)
+++    freebsd1.*)
++       ld_shlibs=no
++       ;;
++ 
++@@ -9566,7 +9566,7 @@
++   shlibpath_var=LD_LIBRARY_PATH
++   ;;
++ 
++-freebsd1*)
+++freebsd1.*)
++   dynamic_linker=no
++   ;;
++ 
++@@ -9577,7 +9577,7 @@
++     objformat=`/usr/bin/objformat`
++   else
++     case $host_os in
++-    freebsd[123]*) objformat=aout ;;
+++    freebsd[123].*) objformat=aout ;;
++     *) objformat=elf ;;
++     esac
++   fi
++@@ -12005,7 +12005,7 @@
++ 	;;
++     esac
++     ;;
++-  freebsd[12]*)
+++  freebsd[12].*)
++     # C++ shared libraries reported to be fairly broken before switch to ELF
++     ld_shlibs_CXX=no
++     ;;
++@@ -13544,7 +13544,7 @@
++   shlibpath_var=LD_LIBRARY_PATH
++   ;;
++ 
++-freebsd1*)
+++freebsd1.*)
++   dynamic_linker=no
++   ;;
++ 
++@@ -13555,7 +13555,7 @@
++     objformat=`/usr/bin/objformat`
++   else
++     case $host_os in
++-    freebsd[123]*) objformat=aout ;;
+++    freebsd[123].*) objformat=aout ;;
++     *) objformat=elf ;;
++     esac
++   fi
++@@ -15581,7 +15581,7 @@
++       hardcode_shlibpath_var_F77=no
++       ;;
++ 
++-    freebsd1*)
+++    freebsd1.*)
++       ld_shlibs_F77=no
++       ;;
++ 
++@@ -16178,7 +16178,7 @@
++   shlibpath_var=LD_LIBRARY_PATH
++   ;;
++ 
++-freebsd1*)
+++freebsd1.*)
++   dynamic_linker=no
++   ;;
++ 
++@@ -16189,7 +16189,7 @@
++     objformat=`/usr/bin/objformat`
++   else
++     case $host_os in
++-    freebsd[123]*) objformat=aout ;;
+++    freebsd[123].*) objformat=aout ;;
++     *) objformat=elf ;;
++     esac
++   fi
++@@ -18215,7 +18215,7 @@
++       hardcode_shlibpath_var_GCJ=no
++       ;;
++ 
++-    freebsd1*)
+++    freebsd1.*)
++       ld_shlibs_GCJ=no
++       ;;
++ 
++@@ -18812,7 +18812,7 @@
++   shlibpath_var=LD_LIBRARY_PATH
++   ;;
++ 
++-freebsd1*)
+++freebsd1.*)
++   dynamic_linker=no
++   ;;
++ 
++@@ -18823,7 +18823,7 @@
++     objformat=`/usr/bin/objformat`
++   else
++     case $host_os in
++-    freebsd[123]*) objformat=aout ;;
+++    freebsd[123].*) objformat=aout ;;
++     *) objformat=elf ;;
++     esac
++   fi
++@@ -21068,6 +21068,7 @@
++ #include <typeinfo>
++ #include <cxxabi.h>
++ #include <string>
+++#include <cstdlib>
++ 
++ template<typename TYPE>
++ class A {};
++--- misc/build/cppunit-1.12.1/src/cppunit/TypeInfoHelper.cpp	2004-02-18 15:45:44.000000000 -0500
+++++ misc/build/cppunit-1.12.1/src/cppunit/TypeInfoHelper.cpp	2012-07-25 15:05:11.000000000 -0400
++@@ -6,6 +6,7 @@
++ #include <string>
++ 
++ #if CPPUNIT_HAVE_GCC_ABI_DEMANGLE
+++#include <cstdlib>
++ #include <cxxabi.h>
++ #endif
++ 

Added: head/editors/libreoffice/files/patch-cppunit__gcc-abi-demangle.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/libreoffice/files/patch-cppunit__gcc-abi-demangle.patch	Wed Sep 12 16:41:31 2012	(r304153)
@@ -0,0 +1,31 @@
+--- ./cppunit/gcc-abi-demangle.patch.orig	2012-07-25 15:22:00.000000000 -0400
++++ ./cppunit/gcc-abi-demangle.patch	2012-08-22 14:35:55.000000000 -0400
+@@ -0,0 +1,28 @@
++--- misc/build/cppunit-1.12.1/src/cppunit/TypeInfoHelper.cpp	2004-02-18 15:45:44.000000000 -0500
+++++ misc/build/cppunit-1.12.1/src/cppunit/TypeInfoHelper.cpp	2012-08-22 14:35:55.000000000 -0400
++@@ -21,10 +21,21 @@
++   int status = 0;
++   char* c_name = 0;
++ 
++-  c_name = abi::__cxa_demangle( info.name(), 0, 0, &status );
++-  
++-  std::string name( c_name );
++-  free( c_name );  
+++  const char* c_origName = info.name();
+++  if(c_origName[0] == '*')
+++      ++c_origName;
+++  c_name = abi::__cxa_demangle( c_origName, 0, 0, &status ); 
+++
+++  std::string name;
+++  if(c_name)
+++  {
+++      name = std::string( c_name );
+++      free( c_name );  
+++  }
+++  else
+++  {
+++      name = std::string( c_origName );
+++  }
++ 
++ #else   // CPPUNIT_HAVE_GCC_ABI_DEMANGLE
++ 

Added: head/editors/libreoffice/files/patch-cppunit__makefile.mk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/libreoffice/files/patch-cppunit__makefile.mk	Wed Sep 12 16:41:31 2012	(r304153)
@@ -0,0 +1,22 @@
+--- ./cppunit/makefile.mk.orig	2012-08-08 09:00:06.000000000 -0400
++++ ./cppunit/makefile.mk	2012-09-10 20:26:04.000000000 -0400
+@@ -34,7 +34,7 @@
+     # from <https://sourceforge.net/projects/cppunit/files/cppunit/1.12.1/
+     #  cppunit-1.12.1.tar.gz/download>
+ 
+-PATCH_FILES = solarisfinite.patch warnings.patch windows.patch ldflags.patch aix.patch avoid-synthetised-destructor.patch ios.patch
++PATCH_FILES = solarisfinite.patch warnings.patch windows.patch ldflags.patch aix.patch avoid-synthetised-destructor.patch ios.patch gcc-abi-demangle.patch
+     # solarisfinite.patch: see <https://sourceforge.net/tracker/?func=detail&;
+     #  aid=2912590&group_id=11795&atid=311795>
+     # warnings.patch: see <https://sourceforge.net/tracker/?func=detail&;
+@@ -44,6 +44,10 @@
+ PATCH_FILES += android.patch
+ .ENDIF
+ 
++.IF "$(OS)" == "FREEBSD"
++PATCH_FILES += freebsd.patch
++.ENDIF
++
+ .IF "$(OS)" == "WNT"
+ .IF "$(COM)" == "MSC"
+ 



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