summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Lewis <truckman@FreeBSD.org>2019-12-08 22:35:51 +0000
committerDon Lewis <truckman@FreeBSD.org>2019-12-08 22:35:51 +0000
commit261a97c7e61b2d064f945c1529b8e685c1cd174a (patch)
treeb29aacb695aca32f2db5c781a6d1be6a2d31900d
parentnet/pecl-oauth2: Update to 2.0.4 (diff)
Attempt to fix gcc builds on powerpc, that were broken by a boost upgrade.
Clang builds using -std=gnu++98 can use the STL headers in /usr/include/c++/v1, but recent versions of the gcc headers forbid this. As a fallback, OpenOffice tries to use the TR1 headers supplied by boost, but recent versions of boost no longer have those headers. In theory the gcc TR1 headers should work, but I was not able to make those work. Solve this problem by doing gcc builds using the "bundled" version of boost which is much older rather that boost from ports. The headers in the ports version of vigra has some C++11 stuff that gcc also complains about, so use the "bundled" version of vigra for gcc builds as well. The icu patch may only be needed for non-default values of LOCALBASE. No PORTREVISION bump since amd64 and i386 builds should be unchanged. Tested by: Curtis Hamilton clhamilto AT gmail.com
Notes
Notes: svn path=/head/; revision=519579
-rw-r--r--editors/openoffice-devel/Makefile25
-rw-r--r--editors/openoffice-devel/distinfo4
-rw-r--r--editors/openoffice-devel/files/patch-configure.ac11
-rw-r--r--editors/openoffice-devel/files/patch-icu_makefile.mk14
4 files changed, 49 insertions, 5 deletions
diff --git a/editors/openoffice-devel/Makefile b/editors/openoffice-devel/Makefile
index 4c84bc766eec..41d4e8906311 100644
--- a/editors/openoffice-devel/Makefile
+++ b/editors/openoffice-devel/Makefile
@@ -8,7 +8,8 @@ PORTEPOCH= 4
CATEGORIES= editors java
MASTER_SITES= https://dist.apache.org/repos/dist/dev/openoffice/${AOOVERSION}-${AOORC}-${TIMESTAMP}/source/ \
http://tools.openoffice.org/unowinreg_prebuild/680/:unoreg \
- LOCAL/truckman/openoffice:snap,extsrc
+ LOCAL/truckman/openoffice:snap,extsrc \
+ SF/oooextras.mirror/:sf
.if defined(LANG_PKGNAME)
PKGNAMEPREFIX= ${LANG_PKGNAME}-
.endif
@@ -57,14 +58,12 @@ BUILD_DEPENDS= \
${LOCALBASE}/bin/unzip:archivers/unzip \
zip:archivers/zip \
ant:devel/apache-ant \
- ${LOCALBASE}/include/boost/shared_ptr.hpp:devel/boost-libs \
dmake:devel/dmake \
epm:devel/epm \
${LOCALBASE}/bin/gperf:devel/gperf \
imake:devel/imake \
gpatch:devel/patch \
${LOCALBASE}/include/sane/sane.h:graphics/sane-backends \
- ${LOCALBASE}/bin/vigra-config:graphics/vigra \
${JAVALIBDIR}/commons-lang3.jar:java/apache-commons-lang3 \
${JAVALIBDIR}/junit.jar:java/junit \
${JAVALIBDIR}/bsh.jar:lang/bsh \
@@ -241,8 +240,21 @@ CONFIGURE_ARGS+= --without-commons-logging
.include <${FILESDIR}/Makefile.localized>
+GCC_EXTRA_DISTFILES= d6eef4b4cacb2183f2bf265a5a03a354-boost_1_55_0.tar.bz2 \
+ d62650a6f908e85643e557a236ea989c-vigra1.6.0.tar.gz
+
.if ${CHOSEN_COMPILER_TYPE} == clang
CPPFLAGS+= -I${LOCALBASE}/include
+CONFIGURE_ARGS+= --with-system-boost --with-system-vigra
+BUILD_DEPENDS+= ${LOCALBASE}/include/boost/shared_ptr.hpp:devel/boost-libs \
+ ${LOCALBASE}/bin/vigra-config:graphics/vigra
+.endif
+
+# These extra distfiles are needed to use the bundled versions of
+# boost and vigra for compatiblity with gcc. Also include them
+# for the makesum target so they are included in distinfo
+.if ${CHOSEN_COMPILER_TYPE} == gcc || make(makesum) || make(distclean)
+DISTFILES+= ${GCC_EXTRA_DISTFILES:C/.*/&:sf/g}
.endif
.if ${ARCH} == amd64
@@ -278,7 +290,6 @@ CONFIGURE_ARGS+= \
--with-system-apr-util \
--with-system-beanshell \
--with-beanshell-jar=${JAVALIBDIR}/bsh.jar \
- --with-system-boost \
--enable-category-b \
--with-system-cairo --enable-cairo \
--with-system-coinmp \
@@ -321,7 +332,6 @@ CONFIGURE_ARGS+= \
--with-vendor="FreeBSD ports system" \
--with-build-version="PKGNAME: ${PKGNAME:S/,/@/g}" \
--enable-verbose \
- --with-system-vigra \
--with-system-xrender \
--with-system-zlib
@@ -352,6 +362,11 @@ do-extract-SDK-on:
post-extract:
${TAR} -C ${WRKSUBDIR} -xzf ${DISTDIR}/${DIST_SUBDIR}/${EXTSRC}
+.if ${CHOSEN_COMPILER_TYPE} == gcc
+. for f in ${GCC_EXTRA_DISTFILES}
+ ${CP} ${DISTDIR}/${DIST_SUBDIR}/${f} ${WRKSUBDIR}/ext_sources/${f}
+. endfor
+.endif
${CP} ${FILESDIR}/freebsd-aoo-intro-developer.png \
${WRKSRC}/default_images/introabout/intro.png
${CP} ${FILESDIR}/freebsd-aoo-about-developer.png \
diff --git a/editors/openoffice-devel/distinfo b/editors/openoffice-devel/distinfo
index 4d4902ad9c54..5e56b988b3e7 100644
--- a/editors/openoffice-devel/distinfo
+++ b/editors/openoffice-devel/distinfo
@@ -5,3 +5,7 @@ SHA256 (openoffice/ApacheOpenOffice.ext_sources.4.x.x.20150707.tar.gz) = 966a833
SIZE (openoffice/ApacheOpenOffice.ext_sources.4.x.x.20150707.tar.gz) = 28957004
SHA256 (openoffice/unowinreg.dll) = f563e522922133db9340b0306711c2d8767cc3481dd9e7d9b0d059906d12653c
SIZE (openoffice/unowinreg.dll) = 6144
+SHA256 (openoffice/d6eef4b4cacb2183f2bf265a5a03a354-boost_1_55_0.tar.bz2) = fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52
+SIZE (openoffice/d6eef4b4cacb2183f2bf265a5a03a354-boost_1_55_0.tar.bz2) = 58146647
+SHA256 (openoffice/d62650a6f908e85643e557a236ea989c-vigra1.6.0.tar.gz) = 1f188ac03a8aa4663223eca8c82f91a55293d066d67127082e29a7dba1a98c9f
+SIZE (openoffice/d62650a6f908e85643e557a236ea989c-vigra1.6.0.tar.gz) = 16525605
diff --git a/editors/openoffice-devel/files/patch-configure.ac b/editors/openoffice-devel/files/patch-configure.ac
new file mode 100644
index 000000000000..dc51ac969e9b
--- /dev/null
+++ b/editors/openoffice-devel/files/patch-configure.ac
@@ -0,0 +1,11 @@
+--- configure.ac.orig 2019-11-07 11:05:12 UTC
++++ configure.ac
+@@ -2291,7 +2291,7 @@ AC_SUBST(COMNAME)
+
+ if test "$_os" = "FreeBSD"; then
+ FBSD_GCC_RPATH=
+- if "$COM" = "GCC"; then
++ if test "$COM" = "GCC"; then
+ rpath=`$CC --print-file-name libstdc++.so`
+ rpath=`realpath $rpath`
+ rpath=`dirname $rpath`
diff --git a/editors/openoffice-devel/files/patch-icu_makefile.mk b/editors/openoffice-devel/files/patch-icu_makefile.mk
new file mode 100644
index 000000000000..2e4b7c014a32
--- /dev/null
+++ b/editors/openoffice-devel/files/patch-icu_makefile.mk
@@ -0,0 +1,14 @@
+--- icu/makefile.mk.orig 2019-09-17 22:55:16 UTC
++++ icu/makefile.mk
+@@ -86,6 +86,11 @@ LDFLAGSADD += -Wl,--hash-style=both
+ LDFLAGSADD += -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo
+ .ENDIF
+
++# FreeBSD with gcc from ports needs -Wl,-rpath= to find the matching libstdc++
++.IF "$(OS)"=="FREEBSD"
++LDFLAGSADD+=$(FBSD_GCC_RPATH)
++.ENDIF
++
+ CONFIGURE_DIR=source
+
+ CONFIGURE_ACTION+=sh -c 'CFLAGS="$(icu_CFLAGS)" CXXFLAGS="$(icu_CXXFLAGS)" LDFLAGS="$(icu_LDFLAGS) $(LDFLAGSADD)" ./configure --enable-layout --enable-static --enable-shared=yes $(DISABLE_64BIT)'