aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortruckman <truckman@FreeBSD.org>2015-03-17 23:04:43 +0800
committertruckman <truckman@FreeBSD.org>2015-03-17 23:04:43 +0800
commitd39899ead46f581fbcbdd651bf1dc7ad4cb0fd74 (patch)
tree01102dc7ffc4e25faffc54231b82c56ee1ecb93e
parent6060e8f26620c96cd16fe1b8c486f803054b3de3 (diff)
downloadfreebsd-ports-graphics-d39899ead46f581fbcbdd651bf1dc7ad4cb0fd74.tar.gz
freebsd-ports-graphics-d39899ead46f581fbcbdd651bf1dc7ad4cb0fd74.tar.zst
freebsd-ports-graphics-d39899ead46f581fbcbdd651bf1dc7ad4cb0fd74.zip
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)
-rw-r--r--editors/openoffice-4/Makefile74
-rw-r--r--editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_except.cxx33
-rw-r--r--editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_share.hxx67
-rw-r--r--editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_uno2cpp.cxx14
-rw-r--r--editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_except.cxx11
-rw-r--r--editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_share.hxx67
-rw-r--r--editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_uno2cpp.cxx14
-rw-r--r--editors/openoffice-4/files/patch-freebsd.mk14
-rw-r--r--editors/openoffice-4/files/patch-shell_source_unix_sysshell_recently__used__file__handler.cxx10
-rw-r--r--editors/openoffice-4/files/patch-unxfbsd.mk33
-rw-r--r--editors/openoffice-4/files/pkg-message.in8
-rw-r--r--editors/openoffice-devel/Makefile76
-rw-r--r--editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_except.cxx11
-rw-r--r--editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_share.hxx67
-rw-r--r--editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_uno2cpp.cxx14
-rw-r--r--editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_except.cxx11
-rw-r--r--editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_share.hxx67
-rw-r--r--editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_uno2cpp.cxx14
-rw-r--r--editors/openoffice-devel/files/patch-freebsd.mk14
-rw-r--r--editors/openoffice-devel/files/patch-shell_source_unix_sysshell_recently__used__file__handler.cxx10
-rw-r--r--editors/openoffice-devel/files/patch-unxfbsd.mk33
-rw-r--r--editors/openoffice-devel/files/pkg-message.in8
22 files changed, 581 insertions, 89 deletions
diff --git a/editors/openoffice-4/Makefile b/editors/openoffice-4/Makefile
index 5abcd74a608..648f7c9eb47 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}
diff --git a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_except.cxx b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_except.cxx
new file mode 100644
index 00000000000..5a0f4506493
--- /dev/null
+++ b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_except.cxx
@@ -0,0 +1,33 @@
+--- bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx.orig 2014-02-25 08:29:00 UTC
++++ bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx
+@@ -24,7 +24,12 @@
+ // MARKER(update_precomp.py): autogen include statement, do not remove
+ #include "precompiled_bridges.hxx"
+
++#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || defined(__clang__)
++#include <exception>
++#endif
++
+ #include <stdio.h>
++#include <string.h>
+ #include <dlfcn.h>
+ #include <cxxabi.h>
+ #include <hash_map>
+@@ -233,7 +238,7 @@ void raiseException( uno_Any * pUnoExc,
+ OUStringToOString(
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
+ RTL_TEXTENCODING_ASCII_US ) );
+- fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
++ fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
+ #endif
+ void * pCppExc;
+ type_info * rtti;
+@@ -307,7 +312,7 @@ void fillUnoException( __cxa_exception *
+ OUString unoName( toUNOname( header->exceptionType->name() ) );
+ #if OSL_DEBUG_LEVEL > 1
+ OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
+- fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
++ fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
+ #endif
+ typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
+ if (0 == pExcTypeDescr)
diff --git a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_share.hxx b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_share.hxx
new file mode 100644
index 00000000000..534898c4061
--- /dev/null
+++ b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_share.hxx
@@ -0,0 +1,67 @@
+--- bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx.orig 2014-09-19 17:51:12 UTC
++++ bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx
+@@ -26,6 +26,11 @@
+ #include <typeinfo>
+ #include <exception>
+ #include <cstddef>
++#ifndef __GLIBCXX__
++#include <cxxabi.h>
++
++using namespace ::__cxxabiv1;
++#endif /* ! __GLIBCXX__ */
+
+ namespace CPPU_CURRENT_NAMESPACE
+ {
+@@ -34,6 +39,7 @@ void dummy_can_throw_anything( char cons
+
+ // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
+
++#ifdef __GLIBCXX__
+ struct _Unwind_Exception
+ {
+ unsigned exception_class __attribute__((__mode__(__DI__)));
+@@ -63,11 +69,13 @@ struct __cxa_exception
+ _Unwind_Exception unwindHeader;
+ };
+
++#endif /* __GLIBCXX__ */
+ extern "C" void *__cxa_allocate_exception(
+ std::size_t thrown_size ) throw();
+ extern "C" void __cxa_throw (
+ void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
+
++#ifdef __GLIBCXX__
+ struct __cxa_eh_globals
+ {
+ __cxa_exception *caughtExceptions;
+@@ -75,6 +83,7 @@ struct __cxa_eh_globals
+ };
+ extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
+
++#endif /* __GLIBCXX__ */
+ // -----
+
+ //==================================================================================================
+@@ -84,3 +93,22 @@ void raiseException(
+ void fillUnoException(
+ __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
+ }
++#ifndef __GLIBCXX__
++
++class __class_type_info : public std::type_info
++{
++public:
++ explicit __class_type_info( const char* pRttiName)
++ : std::type_info( pRttiName)
++ {}
++};
++
++class __si_class_type_info : public __class_type_info
++{
++ const __class_type_info* mpBaseType;
++public:
++ explicit __si_class_type_info( const char* pRttiName, __class_type_info* pBaseType)
++ : __class_type_info( pRttiName), mpBaseType( pBaseType)
++ {}
++};
++#endif /* ! __GLIBCXX__ */
diff --git a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_uno2cpp.cxx b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_uno2cpp.cxx
new file mode 100644
index 00000000000..289424d7bbc
--- /dev/null
+++ b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_uno2cpp.cxx
@@ -0,0 +1,14 @@
+--- bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx.orig 2014-09-19 17:51:13 UTC
++++ bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx
+@@ -305,7 +305,11 @@ static void cpp_call(
+ catch (...)
+ {
+ // fill uno exception
++#ifndef __GLIBCXX__
++ CPPU_CURRENT_NAMESPACE::fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
++#else /* __GLIBCXX__ */
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
++#endif /* __GLIBCXX__ */
+
+ // temporary params
+ for ( ; nTempIndizes--; )
diff --git a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_except.cxx b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_except.cxx
new file mode 100644
index 00000000000..b463e756b8a
--- /dev/null
+++ b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_except.cxx
@@ -0,0 +1,11 @@
+--- bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx.orig 2014-09-19 17:51:13 UTC
++++ bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx
+@@ -24,7 +24,7 @@
+ // MARKER(update_precomp.py): autogen include statement, do not remove
+ #include "precompiled_bridges.hxx"
+
+-#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))
++#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || defined(__clang__)
+ #include <exception>
+ #endif
+
diff --git a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_share.hxx b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_share.hxx
new file mode 100644
index 00000000000..a1e9fa3855f
--- /dev/null
+++ b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_share.hxx
@@ -0,0 +1,67 @@
+--- bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx.orig 2014-09-19 10:51:12.000000000 -0700
++++ bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx 2015-03-13 09:58:02.000000000 -0700
+@@ -26,6 +26,11 @@
+ #include <typeinfo>
+ #include <exception>
+ #include <cstddef>
++#ifndef __GLIBCXX__
++#include <cxxabi.h>
++
++using namespace ::__cxxabiv1;
++#endif /* ! __GLIBCXX__ */
+
+ namespace CPPU_CURRENT_NAMESPACE
+ {
+@@ -34,6 +39,7 @@
+
+ // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
+
++#ifdef __GLIBCXX__
+ struct _Unwind_Exception
+ {
+ unsigned exception_class __attribute__((__mode__(__DI__)));
+@@ -63,11 +69,13 @@
+ _Unwind_Exception unwindHeader;
+ };
+
++#endif /* __GLIBCXX__ */
+ extern "C" void *__cxa_allocate_exception(
+ std::size_t thrown_size ) throw();
+ extern "C" void __cxa_throw (
+ void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
+
++#ifdef __GLIBCXX__
+ struct __cxa_eh_globals
+ {
+ __cxa_exception *caughtExceptions;
+@@ -75,6 +83,7 @@
+ };
+ extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
+
++#endif /* __GLIBCXX__ */
+ // -----
+
+ //==================================================================================================
+@@ -84,3 +93,22 @@
+ void fillUnoException(
+ __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
+ }
++#ifndef __GLIBCXX__
++
++class __class_type_info : public std::type_info
++{
++public:
++ explicit __class_type_info( const char* pRttiName)
++ : std::type_info( pRttiName)
++ {}
++};
++
++class __si_class_type_info : public __class_type_info
++{
++ const __class_type_info* mpBaseType;
++public:
++ explicit __si_class_type_info( const char* pRttiName, __class_type_info* pBaseType)
++ : __class_type_info( pRttiName), mpBaseType( pBaseType)
++ {}
++};
++#endif /* ! __GLIBCXX__ */
diff --git a/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_uno2cpp.cxx b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_uno2cpp.cxx
new file mode 100644
index 00000000000..736f9dc61f7
--- /dev/null
+++ b/editors/openoffice-4/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_uno2cpp.cxx
@@ -0,0 +1,14 @@
+--- bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx.orig 2014-09-19 10:51:13.000000000 -0700
++++ bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx 2015-03-13 09:48:24.000000000 -0700
+@@ -446,7 +446,11 @@
+ catch (...)
+ {
+ // fill uno exception
++#ifndef __GLIBCXX__
++ CPPU_CURRENT_NAMESPACE::fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
++#else /* __GLIBCXX__ */
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
++#endif /* __GLIBCXX__ */
+
+ // temporary params
+ for ( ; nTempIndizes--; )
diff --git a/editors/openoffice-4/files/patch-freebsd.mk b/editors/openoffice-4/files/patch-freebsd.mk
index 427de633d0a..ae9ea3630f0 100644
--- a/editors/openoffice-4/files/patch-freebsd.mk
+++ b/editors/openoffice-4/files/patch-freebsd.mk
@@ -1,6 +1,14 @@
---- solenv/gbuild/platform/freebsd.mk 2012-10-31 10:39:44.000000000 +0900
-+++ solenv/gbuild/platform/freebsd.mk 2012-10-31 17:40:48.000000000 +0900
-@@ -121,6 +121,7 @@
+--- solenv/gbuild/platform/freebsd.mk.orig 2014-09-19 18:16:41 UTC
++++ solenv/gbuild/platform/freebsd.mk
+@@ -96,6 +96,7 @@ gb_CXXFLAGS := \
+ -fvisibility-inlines-hidden \
+ -fvisibility=hidden \
+ -pipe \
++ %%HAVE_STL_INCLUDE_PATH%% \
+
+ ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
+ gb_CFLAGS_WERROR := -Werror
+@@ -121,6 +122,7 @@ gb_LinkTarget_LDFLAGS += \
-Wl,-z,combreloc \
-Wl,-z,defs \
$(subst -L../lib , ,$(SOLARLIB)) \
diff --git a/editors/openoffice-4/files/patch-shell_source_unix_sysshell_recently__used__file__handler.cxx b/editors/openoffice-4/files/patch-shell_source_unix_sysshell_recently__used__file__handler.cxx
new file mode 100644
index 00000000000..369459efe9a
--- /dev/null
+++ b/editors/openoffice-4/files/patch-shell_source_unix_sysshell_recently__used__file__handler.cxx
@@ -0,0 +1,10 @@
+--- shell/source/unix/sysshell/recently_used_file_handler.cxx.orig 2014-09-19 18:15:07 UTC
++++ shell/source/unix/sysshell/recently_used_file_handler.cxx
+@@ -40,6 +40,7 @@
+ #include <algorithm>
+ #include <functional>
+ #include <string.h>
++#include <time.h>
+
+ namespace /* private */ {
+ //########################################
diff --git a/editors/openoffice-4/files/patch-unxfbsd.mk b/editors/openoffice-4/files/patch-unxfbsd.mk
index 55a15933769..ad4194f9b1e 100644
--- a/editors/openoffice-4/files/patch-unxfbsd.mk
+++ b/editors/openoffice-4/files/patch-unxfbsd.mk
@@ -1,13 +1,32 @@
---- solenv/inc/unxfbsd.mk~ 2012-10-31 10:39:44.000000000 +0900
-+++ solenv/inc/unxfbsd.mk 2012-10-31 17:42:59.000000000 +0900
-@@ -80,14 +80,14 @@
+--- solenv/inc/unxfbsd.mk.orig 2014-09-19 18:16:56 UTC
++++ solenv/inc/unxfbsd.mk
+@@ -27,7 +27,7 @@ ASM=
+ AFLAGS=
+
+ SOLAR_JAVA*=
+-PICSWITCH*:=-fpic
++PICSWITCH*:=-fPIC
+ JAVAFLAGSDEBUG=-g
+
+ # Include arch specific makefile.
+@@ -49,7 +49,7 @@ JAVAFLAGSDEBUG=-g
+ #LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter"
+
+ # _PTHREADS is needed for the stl
+-CDEFS+=$(PTHREAD_CFLAGS) -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=450
++CDEFS+=$(PTHREAD_CFLAGS) -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 %%HAVE_STL_INCLUDE_PATH%%
+
+ # enable visibility define in "sal/types.h"
+ .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
+@@ -86,14 +86,14 @@ CFLAGSENABLESYMBOLS=-g # was temporarily
.ENDIF
# flags for the C++ Compiler
-CFLAGSCC= -pipe $(ARCH_FLAGS)
+CFLAGSCC= -pipe $(ARCH_FLAGS) %%RPATH%%
# Flags for enabling exception handling
- CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
+-CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
++CFLAGSEXCEPTIONS=-fexceptions
# Flags for disabling exception handling
CFLAGS_NO_EXCEPTIONS=-fno-exceptions
@@ -17,9 +36,9 @@
.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
CFLAGSCXX += -fvisibility-inlines-hidden
.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
-@@ -145,7 +145,7 @@
- LINKFLAGSRUNPATH_OXT=
- LINKFLAGSRUNPATH_BOXT=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN/../../../basis-link/program'\'
+@@ -156,7 +156,7 @@ LINKFLAGSRUNPATH_OXT=
+ LINKFLAGSRUNPATH_BOXT=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN'\'
+ #LINKFLAGSRUNPATH_BOXT=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN/../../../basis-link/program'\'
LINKFLAGSRUNPATH_NONE=
-LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) $(LINKFLAGS_SYSBASE)
+LINKFLAGS=-Wl,-z,combreloc %%RPATH%% $(LINKFLAGSDEFS) $(LINKFLAGS_SYSBASE)
diff --git a/editors/openoffice-4/files/pkg-message.in b/editors/openoffice-4/files/pkg-message.in
index 5d4f68bb1a3..cb3cab509d7 100644
--- a/editors/openoffice-4/files/pkg-message.in
+++ b/editors/openoffice-4/files/pkg-message.in
@@ -1,9 +1,9 @@
-Apache OpenOffice Build %%OOOTAG%% Personal Install How-To
+Apache OpenOffice Build %%AOOTAG%% Personal Install How-To
Written by: Martin Blapp <mbr@freebsd.org>
and Maho Nakata <maho@FreeBSD.org>
-Apache OpenOffice %%OOOTAG%% will soon been installed in
+Apache OpenOffice %%AOOTAG%% will soon be installed in
%%PREFIX%%/%%EXECBASE%%
1. User installation
@@ -11,7 +11,7 @@ Apache OpenOffice %%OOOTAG%% will soon been installed in
Just type "%%EXECBASE%%" after you have successfully
installed the package. If there is no installed OO.org dir
-in your homedir, the setup installs ".%%OOODIR%%" folder.
+in your homedir, the setup installs "%%AOOUDIR%%" folder.
2. Starting OO.org
------------------
@@ -35,5 +35,5 @@ OO.org does need $LANG to be set to a suitable value.
3. If you run into problems
--------------------------------------------------
If you somehow run into problems, please remove the already
-installed ".%%OOODIR%%" dir in your homedir. Redo the user
+installed "%%AOOUDIR%%" dir in your homedir. Redo the user
installation and the problems should go away.
diff --git a/editors/openoffice-devel/Makefile b/editors/openoffice-devel/Makefile
index 8a8d5c5017b..df8d7a82284 100644
--- a/editors/openoffice-devel/Makefile
+++ b/editors/openoffice-devel/Makefile
@@ -3,7 +3,7 @@
PORTNAME= apache-openoffice
PORTVERSION= ${AOOVERSION1}.${AOOVERSION2}.${SVNREVISION}
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 3
CATEGORIES= editors java
MASTER_SITES= http://ci.apache.org/projects/openoffice/milestones/${AOOVERSION}-${AOORC}-r${SVNREVISION}/source/ \
@@ -71,6 +71,8 @@ RUN_DEPENDS= \
AOOVERSION1= 4
AOOVERSION2= 2
AOOVERSION3= 0
+# From solenv/inc/minor.mk SOURCEREVISION LAST_MINOR BUILD
+AOOTAG= AOO420m1\(Build:9800\)
SVNREVISION= 1652526
#AOORC=rc3
EXTSRC= ApacheOpenOffice.ext_sources.${AOOVERSION1}.x.x.20150118.tar.gz
@@ -80,7 +82,7 @@ AOOXXX= ${AOOVERSION1}${AOOVERSION2}${AOOVERSION3}
.if defined(AOORC)
AOOSUFFIX= ${AOOVERSION}-${AOORC}
OOOSRC= apache-openoffice-${AOOVERSION}-r${SVNREVISION}-src${EXTRACT_SUFX}
-AOODISTTAG=
+AOODISTTAG=
.else
AOOSUFFIX= ${PORTVERSION}
OOOSRC= apache-openoffice-r${SVNREVISION}-src${EXTRACT_SUFX}
@@ -88,6 +90,7 @@ AOODISTTAG= :snap
.endif
OOODIR= openoffice${AOOVERSION1}
+AOOUDIR= .openoffice.org\/${AOOVERSION1}
INSTALLATION_BASEDIR?= openoffice-${AOOSUFFIX}
EXECBASE?= openoffice-${AOOSUFFIX}
DIST_SUBDIR= openoffice
@@ -96,38 +99,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:xz
+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:xz
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
@@ -154,16 +173,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
@@ -219,8 +238,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++.
@@ -259,17 +276,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:
@@ -293,7 +307,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}
diff --git a/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_except.cxx b/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_except.cxx
new file mode 100644
index 00000000000..098e7c168b0
--- /dev/null
+++ b/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_except.cxx
@@ -0,0 +1,11 @@
+--- bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx.orig 2014-09-19 17:51:13 UTC
++++ bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx
+@@ -24,7 +24,7 @@
+ // MARKER(update_precomp.py): autogen include statement, do not remove
+ #include "precompiled_bridges.hxx"
+
+-#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))
++#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || defined(__clang__)
+ #include <exception>
+ #endif
+
diff --git a/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_share.hxx b/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_share.hxx
new file mode 100644
index 00000000000..534898c4061
--- /dev/null
+++ b/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_share.hxx
@@ -0,0 +1,67 @@
+--- bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx.orig 2014-09-19 17:51:12 UTC
++++ bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx
+@@ -26,6 +26,11 @@
+ #include <typeinfo>
+ #include <exception>
+ #include <cstddef>
++#ifndef __GLIBCXX__
++#include <cxxabi.h>
++
++using namespace ::__cxxabiv1;
++#endif /* ! __GLIBCXX__ */
+
+ namespace CPPU_CURRENT_NAMESPACE
+ {
+@@ -34,6 +39,7 @@ void dummy_can_throw_anything( char cons
+
+ // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
+
++#ifdef __GLIBCXX__
+ struct _Unwind_Exception
+ {
+ unsigned exception_class __attribute__((__mode__(__DI__)));
+@@ -63,11 +69,13 @@ struct __cxa_exception
+ _Unwind_Exception unwindHeader;
+ };
+
++#endif /* __GLIBCXX__ */
+ extern "C" void *__cxa_allocate_exception(
+ std::size_t thrown_size ) throw();
+ extern "C" void __cxa_throw (
+ void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
+
++#ifdef __GLIBCXX__
+ struct __cxa_eh_globals
+ {
+ __cxa_exception *caughtExceptions;
+@@ -75,6 +83,7 @@ struct __cxa_eh_globals
+ };
+ extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
+
++#endif /* __GLIBCXX__ */
+ // -----
+
+ //==================================================================================================
+@@ -84,3 +93,22 @@ void raiseException(
+ void fillUnoException(
+ __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
+ }
++#ifndef __GLIBCXX__
++
++class __class_type_info : public std::type_info
++{
++public:
++ explicit __class_type_info( const char* pRttiName)
++ : std::type_info( pRttiName)
++ {}
++};
++
++class __si_class_type_info : public __class_type_info
++{
++ const __class_type_info* mpBaseType;
++public:
++ explicit __si_class_type_info( const char* pRttiName, __class_type_info* pBaseType)
++ : __class_type_info( pRttiName), mpBaseType( pBaseType)
++ {}
++};
++#endif /* ! __GLIBCXX__ */
diff --git a/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_uno2cpp.cxx b/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_uno2cpp.cxx
new file mode 100644
index 00000000000..289424d7bbc
--- /dev/null
+++ b/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__intel_uno2cpp.cxx
@@ -0,0 +1,14 @@
+--- bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx.orig 2014-09-19 17:51:13 UTC
++++ bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx
+@@ -305,7 +305,11 @@ static void cpp_call(
+ catch (...)
+ {
+ // fill uno exception
++#ifndef __GLIBCXX__
++ CPPU_CURRENT_NAMESPACE::fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
++#else /* __GLIBCXX__ */
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
++#endif /* __GLIBCXX__ */
+
+ // temporary params
+ for ( ; nTempIndizes--; )
diff --git a/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_except.cxx b/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_except.cxx
new file mode 100644
index 00000000000..b463e756b8a
--- /dev/null
+++ b/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_except.cxx
@@ -0,0 +1,11 @@
+--- bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx.orig 2014-09-19 17:51:13 UTC
++++ bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx
+@@ -24,7 +24,7 @@
+ // MARKER(update_precomp.py): autogen include statement, do not remove
+ #include "precompiled_bridges.hxx"
+
+-#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))
++#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || defined(__clang__)
+ #include <exception>
+ #endif
+
diff --git a/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_share.hxx b/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_share.hxx
new file mode 100644
index 00000000000..a1e9fa3855f
--- /dev/null
+++ b/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_share.hxx
@@ -0,0 +1,67 @@
+--- bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx.orig 2014-09-19 10:51:12.000000000 -0700
++++ bridges/source/cpp_uno/gcc3_freebsd_x86-64/share.hxx 2015-03-13 09:58:02.000000000 -0700
+@@ -26,6 +26,11 @@
+ #include <typeinfo>
+ #include <exception>
+ #include <cstddef>
++#ifndef __GLIBCXX__
++#include <cxxabi.h>
++
++using namespace ::__cxxabiv1;
++#endif /* ! __GLIBCXX__ */
+
+ namespace CPPU_CURRENT_NAMESPACE
+ {
+@@ -34,6 +39,7 @@
+
+ // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
+
++#ifdef __GLIBCXX__
+ struct _Unwind_Exception
+ {
+ unsigned exception_class __attribute__((__mode__(__DI__)));
+@@ -63,11 +69,13 @@
+ _Unwind_Exception unwindHeader;
+ };
+
++#endif /* __GLIBCXX__ */
+ extern "C" void *__cxa_allocate_exception(
+ std::size_t thrown_size ) throw();
+ extern "C" void __cxa_throw (
+ void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
+
++#ifdef __GLIBCXX__
+ struct __cxa_eh_globals
+ {
+ __cxa_exception *caughtExceptions;
+@@ -75,6 +83,7 @@
+ };
+ extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
+
++#endif /* __GLIBCXX__ */
+ // -----
+
+ //==================================================================================================
+@@ -84,3 +93,22 @@
+ void fillUnoException(
+ __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
+ }
++#ifndef __GLIBCXX__
++
++class __class_type_info : public std::type_info
++{
++public:
++ explicit __class_type_info( const char* pRttiName)
++ : std::type_info( pRttiName)
++ {}
++};
++
++class __si_class_type_info : public __class_type_info
++{
++ const __class_type_info* mpBaseType;
++public:
++ explicit __si_class_type_info( const char* pRttiName, __class_type_info* pBaseType)
++ : __class_type_info( pRttiName), mpBaseType( pBaseType)
++ {}
++};
++#endif /* ! __GLIBCXX__ */
diff --git a/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_uno2cpp.cxx b/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_uno2cpp.cxx
new file mode 100644
index 00000000000..736f9dc61f7
--- /dev/null
+++ b/editors/openoffice-devel/files/patch-bridges_source_cpp__uno_gcc3__freebsd__x86-64_uno2cpp.cxx
@@ -0,0 +1,14 @@
+--- bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx.orig 2014-09-19 10:51:13.000000000 -0700
++++ bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx 2015-03-13 09:48:24.000000000 -0700
+@@ -446,7 +446,11 @@
+ catch (...)
+ {
+ // fill uno exception
++#ifndef __GLIBCXX__
++ CPPU_CURRENT_NAMESPACE::fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
++#else /* __GLIBCXX__ */
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
++#endif /* __GLIBCXX__ */
+
+ // temporary params
+ for ( ; nTempIndizes--; )
diff --git a/editors/openoffice-devel/files/patch-freebsd.mk b/editors/openoffice-devel/files/patch-freebsd.mk
index 427de633d0a..ae9ea3630f0 100644
--- a/editors/openoffice-devel/files/patch-freebsd.mk
+++ b/editors/openoffice-devel/files/patch-freebsd.mk
@@ -1,6 +1,14 @@
---- solenv/gbuild/platform/freebsd.mk 2012-10-31 10:39:44.000000000 +0900
-+++ solenv/gbuild/platform/freebsd.mk 2012-10-31 17:40:48.000000000 +0900
-@@ -121,6 +121,7 @@
+--- solenv/gbuild/platform/freebsd.mk.orig 2014-09-19 18:16:41 UTC
++++ solenv/gbuild/platform/freebsd.mk
+@@ -96,6 +96,7 @@ gb_CXXFLAGS := \
+ -fvisibility-inlines-hidden \
+ -fvisibility=hidden \
+ -pipe \
++ %%HAVE_STL_INCLUDE_PATH%% \
+
+ ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
+ gb_CFLAGS_WERROR := -Werror
+@@ -121,6 +122,7 @@ gb_LinkTarget_LDFLAGS += \
-Wl,-z,combreloc \
-Wl,-z,defs \
$(subst -L../lib , ,$(SOLARLIB)) \
diff --git a/editors/openoffice-devel/files/patch-shell_source_unix_sysshell_recently__used__file__handler.cxx b/editors/openoffice-devel/files/patch-shell_source_unix_sysshell_recently__used__file__handler.cxx
new file mode 100644
index 00000000000..369459efe9a
--- /dev/null
+++ b/editors/openoffice-devel/files/patch-shell_source_unix_sysshell_recently__used__file__handler.cxx
@@ -0,0 +1,10 @@
+--- shell/source/unix/sysshell/recently_used_file_handler.cxx.orig 2014-09-19 18:15:07 UTC
++++ shell/source/unix/sysshell/recently_used_file_handler.cxx
+@@ -40,6 +40,7 @@
+ #include <algorithm>
+ #include <functional>
+ #include <string.h>
++#include <time.h>
+
+ namespace /* private */ {
+ //########################################
diff --git a/editors/openoffice-devel/files/patch-unxfbsd.mk b/editors/openoffice-devel/files/patch-unxfbsd.mk
index 55a15933769..ad4194f9b1e 100644
--- a/editors/openoffice-devel/files/patch-unxfbsd.mk
+++ b/editors/openoffice-devel/files/patch-unxfbsd.mk
@@ -1,13 +1,32 @@
---- solenv/inc/unxfbsd.mk~ 2012-10-31 10:39:44.000000000 +0900
-+++ solenv/inc/unxfbsd.mk 2012-10-31 17:42:59.000000000 +0900
-@@ -80,14 +80,14 @@
+--- solenv/inc/unxfbsd.mk.orig 2014-09-19 18:16:56 UTC
++++ solenv/inc/unxfbsd.mk
+@@ -27,7 +27,7 @@ ASM=
+ AFLAGS=
+
+ SOLAR_JAVA*=
+-PICSWITCH*:=-fpic
++PICSWITCH*:=-fPIC
+ JAVAFLAGSDEBUG=-g
+
+ # Include arch specific makefile.
+@@ -49,7 +49,7 @@ JAVAFLAGSDEBUG=-g
+ #LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter"
+
+ # _PTHREADS is needed for the stl
+-CDEFS+=$(PTHREAD_CFLAGS) -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=450
++CDEFS+=$(PTHREAD_CFLAGS) -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 %%HAVE_STL_INCLUDE_PATH%%
+
+ # enable visibility define in "sal/types.h"
+ .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
+@@ -86,14 +86,14 @@ CFLAGSENABLESYMBOLS=-g # was temporarily
.ENDIF
# flags for the C++ Compiler
-CFLAGSCC= -pipe $(ARCH_FLAGS)
+CFLAGSCC= -pipe $(ARCH_FLAGS) %%RPATH%%
# Flags for enabling exception handling
- CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
+-CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
++CFLAGSEXCEPTIONS=-fexceptions
# Flags for disabling exception handling
CFLAGS_NO_EXCEPTIONS=-fno-exceptions
@@ -17,9 +36,9 @@
.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
CFLAGSCXX += -fvisibility-inlines-hidden
.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
-@@ -145,7 +145,7 @@
- LINKFLAGSRUNPATH_OXT=
- LINKFLAGSRUNPATH_BOXT=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN/../../../basis-link/program'\'
+@@ -156,7 +156,7 @@ LINKFLAGSRUNPATH_OXT=
+ LINKFLAGSRUNPATH_BOXT=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN'\'
+ #LINKFLAGSRUNPATH_BOXT=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN/../../../basis-link/program'\'
LINKFLAGSRUNPATH_NONE=
-LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) $(LINKFLAGS_SYSBASE)
+LINKFLAGS=-Wl,-z,combreloc %%RPATH%% $(LINKFLAGSDEFS) $(LINKFLAGS_SYSBASE)
diff --git a/editors/openoffice-devel/files/pkg-message.in b/editors/openoffice-devel/files/pkg-message.in
index 5d4f68bb1a3..cb3cab509d7 100644
--- a/editors/openoffice-devel/files/pkg-message.in
+++ b/editors/openoffice-devel/files/pkg-message.in
@@ -1,9 +1,9 @@
-Apache OpenOffice Build %%OOOTAG%% Personal Install How-To
+Apache OpenOffice Build %%AOOTAG%% Personal Install How-To
Written by: Martin Blapp <mbr@freebsd.org>
and Maho Nakata <maho@FreeBSD.org>
-Apache OpenOffice %%OOOTAG%% will soon been installed in
+Apache OpenOffice %%AOOTAG%% will soon be installed in
%%PREFIX%%/%%EXECBASE%%
1. User installation
@@ -11,7 +11,7 @@ Apache OpenOffice %%OOOTAG%% will soon been installed in
Just type "%%EXECBASE%%" after you have successfully
installed the package. If there is no installed OO.org dir
-in your homedir, the setup installs ".%%OOODIR%%" folder.
+in your homedir, the setup installs "%%AOOUDIR%%" folder.
2. Starting OO.org
------------------
@@ -35,5 +35,5 @@ OO.org does need $LANG to be set to a suitable value.
3. If you run into problems
--------------------------------------------------
If you somehow run into problems, please remove the already
-installed ".%%OOODIR%%" dir in your homedir. Redo the user
+installed "%%AOOUDIR%%" dir in your homedir. Redo the user
installation and the problems should go away.