diff options
author | maho <maho@FreeBSD.org> | 2007-01-05 12:19:23 +0800 |
---|---|---|
committer | maho <maho@FreeBSD.org> | 2007-01-05 12:19:23 +0800 |
commit | 19f5e51334ba6a660f842eae3ad7edbc33dbb982 (patch) | |
tree | 00f57be4f847b91b4972d5f8899a4de42131a812 /editors/openoffice-3 | |
parent | 981fa33f3f15f2d73a795d457618cb2f8b9e58a8 (diff) | |
download | freebsd-ports-gnome-19f5e51334ba6a660f842eae3ad7edbc33dbb982.tar.gz freebsd-ports-gnome-19f5e51334ba6a660f842eae3ad7edbc33dbb982.tar.zst freebsd-ports-gnome-19f5e51334ba6a660f842eae3ad7edbc33dbb982.zip |
The rtld behaviour of FreeBSD >=700022 is now same as Solaris, and
workaround is pushed into rtld-workaround-i66667.
Submitted by: jkim
Diffstat (limited to 'editors/openoffice-3')
-rw-r--r-- | editors/openoffice-3/Makefile | 3 | ||||
-rw-r--r-- | editors/openoffice-3/files/patch-i66667 | 182 | ||||
-rw-r--r-- | editors/openoffice-3/files/rtld-workaround-i66667 | 55 |
3 files changed, 191 insertions, 49 deletions
diff --git a/editors/openoffice-3/Makefile b/editors/openoffice-3/Makefile index 91c3f47bd9db..d109abf5093c 100644 --- a/editors/openoffice-3/Makefile +++ b/editors/openoffice-3/Makefile @@ -171,6 +171,9 @@ WITHOUT_MOZILLA= yes LIB_DEPENDS+= boost_regex:${PORTSDIR}/devel/boost CONFIGURE_ARGS+= --with-system-boost=yes #i58343# .endif +.if (${OSVERSION} <= 700021) +EXTRA_PATCHES+= ${FILESDIR}/rtld-workaround-i66667 +.endif .if (${OSVERSION} <= 492000) EXTRA_PATCHES+= ${FILESDIR}/fbsd4-workaroundpatch .endif diff --git a/editors/openoffice-3/files/patch-i66667 b/editors/openoffice-3/files/patch-i66667 index b73949eee465..f60b55f79d73 100644 --- a/editors/openoffice-3/files/patch-i66667 +++ b/editors/openoffice-3/files/patch-i66667 @@ -1,55 +1,139 @@ -Index: vcl/unx/gtk/app/gtkinst.cxx -=================================================================== -RCS file: /cvs/gsl/vcl/unx/gtk/app/gtkinst.cxx,v -retrieving revision 1.14.88.1 -diff -u -r1.14.88.1 gtkinst.cxx ---- vcl/unx/gtk/app/gtkinst.cxx 10 Aug 2006 14:53:08 -0000 1.14.88.1 -+++ vcl/unx/gtk/app/gtkinst.cxx 21 Aug 2006 05:38:21 -0000 -@@ -43,6 +43,7 @@ - #include <plugins/gtk/atkbridge.hxx> +--- bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx Tue May 2 08:01:08 2006 ++++ bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx Fri Sep 8 17:25:05 2006 +@@ -120,6 +120,9 @@ + case typelib_TypeClass_UNSIGNED_HYPER: + case typelib_TypeClass_DOUBLE: + pCppStack += sizeof(sal_Int32); // extra long ++ break; ++ default: ++ break; + } + // no longer needed + TYPELIB_DANGER_RELEASE( pParamTypeDescr ); +@@ -436,7 +439,7 @@ + unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( + void ** slots, unsigned char * code, + typelib_InterfaceTypeDescription const * type, sal_Int32 functionOffset, +- sal_Int32 functionCount, sal_Int32 vtableOffset) ++ sal_Int32 /*functionCount*/, sal_Int32 vtableOffset) + { + for (sal_Int32 i = 0; i < type->nMembers; ++i) { + typelib_TypeDescription * member = 0; +--- bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx.orig Wed Sep 7 18:20:22 2005 ++++ bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx Mon Sep 11 12:21:03 2006 +@@ -37,6 +37,7 @@ + #include <dlfcn.h> + #include <cxxabi.h> + #include <hash_map> ++#include <sys/param.h> #include <rtl/strbuf.hxx> -+#include <rtl/ustrbuf.hxx> + #include <rtl/ustrbuf.hxx> +@@ -122,7 +123,11 @@ + }; + //__________________________________________________________________________________________________ + RTTI::RTTI() SAL_THROW( () ) ++#if __FreeBSD_version < 700022 + : m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) ) ++#else ++ : m_hApp( dlopen( 0, RTLD_LAZY ) ) ++#endif + { + } + //__________________________________________________________________________________________________ +@@ -139,8 +144,8 @@ + OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName; + + MutexGuard guard( m_mutex ); +- t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) ); +- if (iFind == m_rttis.end()) ++ t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) ); ++ if (iRttiFind == m_rttis.end()) + { + // RTTI symbol + OStringBuffer buf( 64 ); +@@ -157,8 +162,11 @@ + buf.append( 'E' ); + + OString symName( buf.makeStringAndClear() ); +-//#iZ 22253 ++#if __FreeBSD_version < 700022 + rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() ); ++#else ++ rtti = (type_info *)dlsym( m_hApp, symName.getStr() ); ++#endif + + if (rtti) + { +@@ -205,7 +213,7 @@ + } + else + { +- rtti = iFind->second; ++ rtti = iRttiFind->second; + } - #if OSL_DEBUG_LEVEL > 1 - #include <stdio.h> -@@ -111,13 +112,28 @@ - GtkHookedYieldMutex *pYieldMutex = GET_YIELD_MUTEX(); - pYieldMutex->ThreadsLeave(); + return rtti; +--- bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx Mon Jun 19 19:43:09 2006 ++++ bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx Fri Sep 8 17:25:05 2006 +@@ -142,6 +142,8 @@ + case typelib_TypeClass_DOUBLE: + asm ( "fstpl %0\n\t" : : "m"(*(char *)pRegisterReturn) ); + break; ++ default: ++ break; } -- static bool hookLocks( oslModule pModule ) -+ static bool hookLocks( void ) + } + +@@ -217,6 +219,9 @@ + case typelib_TypeClass_UNSIGNED_HYPER: + case typelib_TypeClass_DOUBLE: + pCppStack += sizeof(sal_Int32); // extra long ++ break; ++ default: ++ break; + } + // no longer needed + TYPELIB_DANGER_RELEASE( pParamTypeDescr ); +@@ -329,7 +334,6 @@ + // is my surrogate + bridges::cpp_uno::shared::UnoInterfaceProxy * pThis + = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI); +- typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr; + + switch (pMemberDescr->eTypeClass) { - typedef void (*GdkLockFn) (GCallback enter_fn, GCallback leave_fn); - rtl::OUString aSymbolName( RTL_CONSTASCII_USTRINGPARAM( "gdk_threads_set_lock_functions") ); - -+ /* XXX GDK library path should be set by configure. */ -+ OUStringBuffer aModName( 128 ); -+ aModName.appendAscii( SAL_DLLPREFIX"gdk-x11-2.0" ); -+ aModName.appendAscii( SAL_DLLEXTENSION ); -+ OUString aModule = aModName.makeStringAndClear(); -+ oslModule aMod = osl_loadModule( aModule.pData, SAL_LOADMODULE_DEFAULT ); -+ -+ if ( !aMod ) -+ { -+#if OSL_DEBUG_LEVEL > 1 -+ fprintf( stderr, "Failed to load "SAL_DLLPREFIX"gdk-x11-2.0"SAL_DLLEXTENSION"\n" ); +--- bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx.orig Wed Jul 19 05:30:01 2006 ++++ bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx Mon Sep 11 12:21:25 2006 +@@ -37,6 +37,7 @@ + #include <dlfcn.h> + #include <cxxabi.h> + #include <hash_map> ++#include <sys/param.h> + + #include <rtl/strbuf.hxx> + #include <rtl/ustrbuf.hxx> +@@ -122,7 +123,11 @@ + }; + //__________________________________________________________________________________________________ + RTTI::RTTI() SAL_THROW( () ) ++#if __FreeBSD_version < 700022 + : m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) ) ++#else ++ : m_hApp( dlopen( 0, RTLD_LAZY ) ) +#endif -+ return false; -+ } -+ - GdkLockFn gdk_threads_set_lock_functions = -- (GdkLockFn) osl_getFunctionSymbol( pModule, aSymbolName.pData ); -+ (GdkLockFn) osl_getFunctionSymbol( aMod, aSymbolName.pData ); - if ( !gdk_threads_set_lock_functions ) - { - #if OSL_DEBUG_LEVEL > 1 -@@ -150,7 +166,7 @@ - if ( !g_thread_supported() ) - g_thread_init( NULL ); - -- if ( hookLocks( pModule ) ) -+ if ( hookLocks() ) - pYieldMutex = new GtkHookedYieldMutex(); - else - pYieldMutex = new GtkYieldMutex(); + { + } + //__________________________________________________________________________________________________ +@@ -157,7 +162,11 @@ + buf.append( 'E' ); + + OString symName( buf.makeStringAndClear() ); ++#if __FreeBSD_version < 700022 + rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() ); ++#else ++ rtti = (type_info *)dlsym( m_hApp, symName.getStr() ); ++#endif + + if (rtti) + { diff --git a/editors/openoffice-3/files/rtld-workaround-i66667 b/editors/openoffice-3/files/rtld-workaround-i66667 new file mode 100644 index 000000000000..b73949eee465 --- /dev/null +++ b/editors/openoffice-3/files/rtld-workaround-i66667 @@ -0,0 +1,55 @@ +Index: vcl/unx/gtk/app/gtkinst.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/gtk/app/gtkinst.cxx,v +retrieving revision 1.14.88.1 +diff -u -r1.14.88.1 gtkinst.cxx +--- vcl/unx/gtk/app/gtkinst.cxx 10 Aug 2006 14:53:08 -0000 1.14.88.1 ++++ vcl/unx/gtk/app/gtkinst.cxx 21 Aug 2006 05:38:21 -0000 +@@ -43,6 +43,7 @@ + #include <plugins/gtk/atkbridge.hxx> + + #include <rtl/strbuf.hxx> ++#include <rtl/ustrbuf.hxx> + + #if OSL_DEBUG_LEVEL > 1 + #include <stdio.h> +@@ -111,13 +112,28 @@ + GtkHookedYieldMutex *pYieldMutex = GET_YIELD_MUTEX(); + pYieldMutex->ThreadsLeave(); + } +- static bool hookLocks( oslModule pModule ) ++ static bool hookLocks( void ) + { + typedef void (*GdkLockFn) (GCallback enter_fn, GCallback leave_fn); + rtl::OUString aSymbolName( RTL_CONSTASCII_USTRINGPARAM( "gdk_threads_set_lock_functions") ); + ++ /* XXX GDK library path should be set by configure. */ ++ OUStringBuffer aModName( 128 ); ++ aModName.appendAscii( SAL_DLLPREFIX"gdk-x11-2.0" ); ++ aModName.appendAscii( SAL_DLLEXTENSION ); ++ OUString aModule = aModName.makeStringAndClear(); ++ oslModule aMod = osl_loadModule( aModule.pData, SAL_LOADMODULE_DEFAULT ); ++ ++ if ( !aMod ) ++ { ++#if OSL_DEBUG_LEVEL > 1 ++ fprintf( stderr, "Failed to load "SAL_DLLPREFIX"gdk-x11-2.0"SAL_DLLEXTENSION"\n" ); ++#endif ++ return false; ++ } ++ + GdkLockFn gdk_threads_set_lock_functions = +- (GdkLockFn) osl_getFunctionSymbol( pModule, aSymbolName.pData ); ++ (GdkLockFn) osl_getFunctionSymbol( aMod, aSymbolName.pData ); + if ( !gdk_threads_set_lock_functions ) + { + #if OSL_DEBUG_LEVEL > 1 +@@ -150,7 +166,7 @@ + if ( !g_thread_supported() ) + g_thread_init( NULL ); + +- if ( hookLocks( pModule ) ) ++ if ( hookLocks() ) + pYieldMutex = new GtkHookedYieldMutex(); + else + pYieldMutex = new GtkYieldMutex(); |