diff options
author | Don Lewis <truckman@FreeBSD.org> | 2015-03-17 15:04:43 +0000 |
---|---|---|
committer | Don Lewis <truckman@FreeBSD.org> | 2015-03-17 15:04:43 +0000 |
commit | caf437c22a8616fd2a4f6512dbc9a036ad3b984b (patch) | |
tree | 01102dc7ffc4e25faffc54231b82c56ee1ecb93e /editors/openoffice-4/Makefile | |
parent | 8e417acfeab5d0b74762c75c1c5d84c43332b4d2 (diff) |
Unbreak editors/openoffice-4 and editors/openoffice-devel on systems
where clang is the base compiler. The issue was that these ports
would only successfully build with gcc and libstdc++, so they
specified USE_GCC=yes, but they linked to other C++ ports that were
compiled with clang, which brought in libc++. The conflict between
libstdc++ and libc++ caused the application to crash whenever an
operation that popped up a dialog box was attempted. Thanks to
dim@ for helping me track this down. The fix is to patch various
bits of the openoffice souce to allow it to be built with clang
on systems where the C++ dependencies are also compiled with clang. [1]
Add a CUPS option so that CUPS can be disabled [2].
Register print/cups-client as a LIB_DEPENDS when CUPS is enabled.
pkg-message claims that user settings are stored in
~/.openoffice,org4, whereas all other platforms seem to use
~/.openoffice.org/4 (or equivalent), and both openoffice-4 and
openoffice-devel actually use ~/.openoffice.org-devel/4. The
addition of -devel to the location happened with r325370.
The / appears to have been introduced in r297259. Change the
location match other platforms. Introduce a new variable
${AOOUDIR} so that the actual location and pkg-message stay in
sync.
Rename ${OOOTAG} to ${AOOTAG} and restore its value so that it
can once again be substituted into pkg-message. It has not
been set since r296269.
Various Makefile cleanups:
* Gather and sort USE_*
* Simplify use of ${REINPLACE_CMD}
* --x-includes and --x-libraries are automatically passed to configure,
which ignores them
* Get rid of unnecessary include of bsd.port.options.mk
PR: 188088 [1]
PR: 198458 [2]
Differential Revision: https://reviews.freebsd.org/D2055
Reviewed by: pfg
Approved by: mat (mentor)
Notes
Notes:
svn path=/head/; revision=381494
Diffstat (limited to 'editors/openoffice-4/Makefile')
-rw-r--r-- | editors/openoffice-4/Makefile | 74 |
1 files changed, 44 insertions, 30 deletions
diff --git a/editors/openoffice-4/Makefile b/editors/openoffice-4/Makefile index 5abcd74a6086..648f7c9eb474 100644 --- a/editors/openoffice-4/Makefile +++ b/editors/openoffice-4/Makefile @@ -3,7 +3,7 @@ PORTNAME= apache-openoffice PORTVERSION= ${AOOVERSION} -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= editors java MASTER_SITES= APACHE/openoffice/${PORTVERSION}/source \ http://tools.openoffice.org/unowinreg_prebuild/680/:unoreg \ @@ -69,6 +69,8 @@ RUN_DEPENDS= \ AOOVERSION1= 4 AOOVERSION2= 1 AOOVERSION3= 1 +# From solenv/inc/minor.mk SOURCEREVISION LAST_MINOR BUILD +AOOTAG= AOO411m6\(Build:9775\) SVNREVISION= 1617669 EXTSRC= ApacheOpenOffice.ext_sources.${AOOVERSION1}.x.x.20140918.tar.gz @@ -78,6 +80,7 @@ AOOSUFFIX= ${PORTVERSION} OOOSRC= apache-openoffice-${AOOVERSION}-r${SVNREVISION}-src${EXTRACT_SUFX} OOODIR= openoffice${AOOVERSION1} +AOOUDIR= .openoffice.org\/${AOOVERSION1} INSTALLATION_BASEDIR?= openoffice-${AOOSUFFIX} EXECBASE?= openoffice-${AOOSUFFIX} DIST_SUBDIR= openoffice @@ -86,38 +89,54 @@ NO_LATEST_LINK= yes ONLY_FOR_ARCHS= i386 amd64 -USE_GNOME= gtk20 libxslt libidl glib20 -USE_XORG= x11 ice xaw xau xext xrender xrandr \ - xi xt xcursor xdamage xcomposite xfixes +USE_AUTOTOOLS= autoconf USE_GL= gl glu +USE_GNOME= gtk20 libxslt libidl glib20 USE_GSTREAMER= yes -USE_GCC= yes -USES+= bison desktop-file-utils gmake perl5 pkgconfig python tar:bzip2 +USE_JAVA= yes +JAVA_BUILD= jdk +JAVA_VENDOR= openjdk +JAVA_VERSION= 1.6+ USE_PERL5= build +USE_XORG= x11 ice xaw xau xext xrender xrandr \ + xi xt xcursor xdamage xcomposite xfixes +USES= bison compiler desktop-file-utils gmake perl5 pkgconfig python \ + tar:bzip2 WITHOUT_CPU_CFLAGS= true MAKE_JOBS_SAFE= yes -OPTIONS_DEFINE= GCONF GNOMEVFS CCACHE -OPTIONS_DEFAULT=GCONF GNOMEVFS -GNOMEVFS_DESC= Enable GNOME Virtual File System -CCACHE_DESC= Mimimize compile time of C/C++ programs +OPTIONS_DEFINE= CUPS GCONF GNOMEVFS CCACHE +OPTIONS_DEFAULT= CUPS GCONF GNOMEVFS +GNOMEVFS_DESC= Enable GNOME Virtual File System +CCACHE_DESC= Mimimize compile time of C/C++ programs -GCONF_USE= GNOME=gconf2 -GCONF_CONFIGURE_OFF=--disable-gconf +CUPS_CONFIGURE_ENABLE= cups +CUPS_LIB_DEPENDS= libcups.so:${PORTSDIR}/print/cups-client -GNOMEVFS_USE= GNOME=gnomevfs2 -GNOMEVFS_CONFIGURE_OFF=--disable-gnome-vfs +GCONF_USE= GNOME=gconf2 +GCONF_CONFIGURE_ENABLE= gconf -.include <bsd.port.options.mk> +GNOMEVFS_USE= GNOME=gnomevfs2 +GNOMEVFS_CONFIGURE_ENABLE= gnome-vfs .include <bsd.port.pre.mk> .include <${FILESDIR}/Makefile.localized> -USE_JAVA= yes -JAVA_BUILD= jdk -JAVA_VENDOR= openjdk -JAVA_VERSION= 1.6+ +.if ${COMPILER_TYPE} == clang +. if ${COMPILER_VERSION} < 35 && ${ARCH} == amd64 +BUILD_DEPENDS+= clang35:${PORTSDIR}/lang/clang35 +CPP= ${LOCALBASE}/bin/clang-cpp35 +CC= ${LOCALBASE}/bin/clang35 +CXX= ${LOCALBASE}/bin/clang++35 +. endif +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -I${LOCALBASE}/lib +SUBST= s+%%RPATH%%++;s/%%HAVE_STL_INCLUDE_PATH%%/-DHAVE_STL_INCLUDE_PATH/;s/-fno-enforce-eh-specs// +.else +USE_GCC= yes +SUBST= s+%%RPATH%%+-Wl,-rpath=${_GCC_RUNTIME}+;s/%%HAVE_STL_INCLUDE_PATH%%// +.endif .if ${ARCH} == amd64 FREEBSD_ENV_SET= FreeBSDAMDEnv.Set.sh @@ -144,16 +163,16 @@ OOOCXX= ${CCACHE_PREFIX} ${CXX} OOOCC= ${CC} OOOCXX= ${CXX} .endif + CONFIGURE_ENV+= CC="${OOOCC}" CXX="${OOOCXX}" \ PATH=${WRKSRC}/solenv/bin:$$PATH -USE_AUTOTOOLS= autoconf GNU_CONFIGURE= yes WRKSUBDIR= ${WRKDIR}/aoo-${AOOVERSION} WRKSRC?= ${WRKSUBDIR}/main BASH?= ${PREFIX}/bin/bash SUB_FILES= pkg-message -SUB_LIST= EXECBASE=${EXECBASE} OOOTAG=${OOOTAG} OOODIR=${OOODIR} +SUB_LIST= EXECBASE=${EXECBASE} AOOTAG=${AOOTAG} AOOUDIR=${AOOUDIR} .if defined(DISABLE_MAKE_JOBS) MAKE_JOBS_NUMBER= 4 @@ -209,8 +228,6 @@ CONFIGURE_ARGS+= \ --enable-verbose \ --with-system-vigra \ --enable-wiki-publisher \ - --x-includes={LOCALBASE}/include \ - --x-libraries=${LOCALBASE}lib \ --with-system-zlib # system-graphite causes breakage when compiled with clang and linked # with libc++ because aoo is compiled with gcc and linked with libstdc++. @@ -249,17 +266,14 @@ post-extract: ${RM} -rf ${WRKSRC}/l10n post-patch: -.if defined (USE_GCC) - ${REINPLACE_CMD} -e "s+%%RPATH%%+-Wl,-rpath=${_GCC_RUNTIME}+" ${WRKSRC}/solenv/inc/unxfbsd.mk - ${REINPLACE_CMD} -e "s+%%RPATH%%+-Wl,-rpath=${_GCC_RUNTIME}+" ${WRKSRC}/solenv/gbuild/platform/freebsd.mk + ${REINPLACE_CMD} -e "${SUBST}" ${WRKSRC}/solenv/gbuild/platform/freebsd.mk + ${REINPLACE_CMD} -e "${SUBST}" ${WRKSRC}/solenv/inc/unxfbsd.mk +.if defined (USE_GCC) && ${ARCH} == i386 # g++49 -Os sometimes leaves inline class methods undefined if [ ${CXX} = g++49 ]; then \ ${REINPLACE_CMD} -e "s/ := -Os/ := -O0/" ${WRKSRC}/solenv/gbuild/platform/freebsd.mk; \ ${REINPLACE_CMD} -e "s/=-Os /=-O0 /" ${WRKSRC}/solenv/inc/unxfbsdi.mk; \ fi -.else - ${REINPLACE_CMD} -e "s+%%RPATH%%++" ${WRKSRC}/solenv/inc/unxfbsd.mk - ${REINPLACE_CMD} -e "s+%%RPATH%%++" ${WRKSRC}/solenv/gbuild/platform/freebsd.mk .endif pre-configure: @@ -283,7 +297,7 @@ do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR} cd ${WRKDIR}/tmp/*/ ; ${TAR} cf - -C . . | ${TAR} xf - -C ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR} ${REINPLACE_CMD} -e 's/^UserInstallation.*$$/USERINSTALLATION/' ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/${OOODIR}/program/bootstraprc - ${REINPLACE_CMD} -e 's/USERINSTALLATION/UserInstallation=$$SYSUSERCONFIG\/\.openoffice\.org-devel\/${AOOVERSION1}/' ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/${OOODIR}/program/bootstraprc + ${REINPLACE_CMD} -e 's/USERINSTALLATION/UserInstallation=$$SYSUSERCONFIG\/${AOOUDIR}/' ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/${OOODIR}/program/bootstraprc ${MKDIR} ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/extensions/ cd ${WRKSRC}/solver/${AOOXXX}/unxfbsd?.pro/bin/ ; ${INSTALL_DATA} ${OOOEXTENSIONS} ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/extensions/ ${FIND} ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/${OOODIR}/program -type f \( -name '*.so*' -or -name '*.bin' \) -print0 | ${XARGS} -0 -n1 ${STRIP_CMD} |