aboutsummaryrefslogtreecommitdiffstats
path: root/editors/openoffice-4
diff options
context:
space:
mode:
authortruckman <truckman@FreeBSD.org>2018-01-18 15:31:31 +0800
committertruckman <truckman@FreeBSD.org>2018-01-18 15:31:31 +0800
commit1b38f6a37f9fd8b0122266306741199796e9de65 (patch)
treee1f1f44e9a92bb7221cfbcfab2eac4e1abfc0bb1 /editors/openoffice-4
parent0812f0742e713f3bb4b6832ea790de6b0c050301 (diff)
downloadfreebsd-ports-gnome-1b38f6a37f9fd8b0122266306741199796e9de65.tar.gz
freebsd-ports-gnome-1b38f6a37f9fd8b0122266306741199796e9de65.tar.zst
freebsd-ports-gnome-1b38f6a37f9fd8b0122266306741199796e9de65.zip
Fix editors/openoffice-4 build with clang 6.0.0 by compiling with
-std=gnu++98 since that was the default for the compilers historically used for the build. It turns out that -std=c++98 does not work because the vigra headers depend on LLONG_MAX and friends, which are not defined without the GNU extensions. Compensate for a recent poudriere change by overriding $HOME and setting it to /tmp if $HOME is not writeable. Some of the test code run during the build wants to use mkstemp() to create temporary directories under $HOME, which does not work for the "nobody" user which points $HOME at /nonexistent. No PORTREVISION bump since this is a build fix and there is no change to the package. PR: 225129 Reported by: jbeich
Diffstat (limited to 'editors/openoffice-4')
-rw-r--r--editors/openoffice-4/Makefile5
-rw-r--r--editors/openoffice-4/files/patch-solenv_gbuild_platform_freebsd.mk10
-rw-r--r--editors/openoffice-4/files/patch-solenv_inc_unxfbsd.mk11
3 files changed, 25 insertions, 1 deletions
diff --git a/editors/openoffice-4/Makefile b/editors/openoffice-4/Makefile
index 7a8e523d339f..9ddb24522386 100644
--- a/editors/openoffice-4/Makefile
+++ b/editors/openoffice-4/Makefile
@@ -416,7 +416,10 @@ do-build:
fi ; \
cd ${WRKSRC}/instsetoo_native ; \
. ../${FREEBSD_ENV_SET} ; \
- build.pl --all -P$${numproc} -- -P$${dmproc}
+ if [ -n "${HOME}" -a ! -w "${HOME}" ]; then \
+ export HOME=/tmp ; \
+ fi ; \
+ HOME=/tmp build.pl --all -P$${numproc} -- -P$${dmproc}
do-install:
@${MKDIR} ${STAGEDIR}${PRINSTALLATION_BASEDIR} \
diff --git a/editors/openoffice-4/files/patch-solenv_gbuild_platform_freebsd.mk b/editors/openoffice-4/files/patch-solenv_gbuild_platform_freebsd.mk
new file mode 100644
index 000000000000..acee2d1a51ee
--- /dev/null
+++ b/editors/openoffice-4/files/patch-solenv_gbuild_platform_freebsd.mk
@@ -0,0 +1,10 @@
+--- solenv/gbuild/platform/freebsd.mk.orig 2017-11-27 13:50:25 UTC
++++ solenv/gbuild/platform/freebsd.mk
+@@ -94,6 +94,7 @@ gb_CXXFLAGS := \
+ -fno-use-cxa-atexit \
+ -fvisibility-inlines-hidden \
+ -fvisibility=hidden \
++ -std=gnu++98 \
+ -pipe
+ ifeq ($(COM),CLANG)
+ gb_CXXFLAGS += -DHAVE_STL_INCLUDE_PATH
diff --git a/editors/openoffice-4/files/patch-solenv_inc_unxfbsd.mk b/editors/openoffice-4/files/patch-solenv_inc_unxfbsd.mk
new file mode 100644
index 000000000000..f91d88004b2d
--- /dev/null
+++ b/editors/openoffice-4/files/patch-solenv_inc_unxfbsd.mk
@@ -0,0 +1,11 @@
+--- solenv/inc/unxfbsd.mk.orig 2017-11-27 13:50:28 UTC
++++ solenv/inc/unxfbsd.mk
+@@ -96,7 +96,7 @@ CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
+ CFLAGS_NO_EXCEPTIONS=-fno-exceptions
+
+ # -fpermissive should be removed as soon as possible
+-CFLAGSCXX= -pipe $(ARCH_FLAGS)
++CFLAGSCXX= -pipe $(ARCH_FLAGS) -std=gnu++98
+ .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
+ CFLAGSCXX += -fvisibility-inlines-hidden
+ .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"