[arch-commits] Commit in openoffice-base/trunk (5 files)

andyrtr at archlinux.org andyrtr at archlinux.org
Tue Aug 25 23:21:23 UTC 2009


    Date: Tuesday, August 25, 2009 @ 19:21:22
  Author: andyrtr
Revision: 50392

upgpkg: openoffice-base 3.1.1-1
    final 3.1.1; small fixes went to the mozilla plugin but it's still broken and digital signatures as well

Added:
  openoffice-base/trunk/no-mozilla-plug-in-option.diff
  openoffice-base/trunk/nsplugin-path.diff
Modified:
  openoffice-base/trunk/ChangeLog
  openoffice-base/trunk/PKGBUILD
Deleted:
  openoffice-base/trunk/openoffice.org-3.0.1.oooXXXXX.extensions.npapi.patch

------------------------------------------------------+
 ChangeLog                                            |    7 
 PKGBUILD                                             |   27 -
 no-mozilla-plug-in-option.diff                       |  313 +++++++++++++++++
 nsplugin-path.diff                                   |  132 +++++++
 openoffice.org-3.0.1.oooXXXXX.extensions.npapi.patch |   16 
 5 files changed, 469 insertions(+), 26 deletions(-)

Modified: ChangeLog
===================================================================
--- ChangeLog	2009-08-25 22:12:14 UTC (rev 50391)
+++ ChangeLog	2009-08-25 23:21:22 UTC (rev 50392)
@@ -1,3 +1,10 @@
+2009-08-25 Andreas Radke <andyrtr at archlinux.org>
+
+        * 3.1.1-1 :
+	- ooo310_m19 = 3.1.1RC2 = final
+	- add 2 patches to fix plugin + remove plugin option
+	- change libxul buildfix to make the plugin work
+
 2009-08-07 Andreas Radke <andyrtr at archlinux.org>
 
         * 3.1.0.91-ooo310_m18-1 :

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-08-25 22:12:14 UTC (rev 50391)
+++ PKGBUILD	2009-08-25 23:21:22 UTC (rev 50392)
@@ -2,24 +2,24 @@
 # Contributor: Hussam Al-Tayeb <ht990332 at gmail.com>
 
 pkgname=openoffice-base
-pkgver=3.1.0.99 # = 3.1.1 RC1
+pkgver=3.1.1
 pkgrel=1
 pkgdesc="OpenOffice.org - a free multiplatform and multilingual office suite"
 arch=(i686 x86_64)
-_OO_milestone=OOO310_m18  # =RC1 = final ?
+_OO_milestone=OOO310_m19  # =RC2 = final
 license=('LGPL3')
 url="http://www.openoffice.org"
 install=openoffice.install
-depends=('curl>=7.19.5' 'hunspell>=1.2.8' 'python>=2.6.2' 'libwpd' 'redland' 'libxaw' 'neon>=0.28.4'
-	 'dbus-glib' 'icu>=4.2.1' 'hsqldb-java' 'libxslt' 'hicolor-icon-theme' 'desktop-file-utils')
+depends=('curl>=7.19.6' 'hunspell>=1.2.8' 'python>=2.6.2-5' 'libwpd>=0.8.14' 'redland>=1.0.8-3' 'libxaw>=1.0.6' 'neon>=0.28.4'
+	 'dbus-glib>=0.80' 'icu>=4.2.1' ' ' 'libxslt>=1.1.24-2' 'hicolor-icon-theme' 'desktop-file-utils')
 optdepends=('java-runtime:	adds java support'
             'libcups:		adds printing support'
             'gconf:		adds additional gnome support'
             'nss:		adds support for signed files/macros'
             'pstoedit:		translates PostScript and PDF graphics into other vector formats')
 makedepends=('bison' 'svn' 'automake' 'findutils' 'flex' 'gawk' 'gcc-libs' 'libart-lgpl' 'libxtst'
-             'pam' 'sane' 'zip' 'perl-archive-zip' 'pkgconfig' 'unzip' 'xulrunner>=1.9.1-2'
-             'apache-ant>=1.7.1-3' 'cairo' 'gperf' 'libcups' 'pstoedit' 'gconf' 'openjdk6>=1.5-5')
+             'pam' 'sane' 'zip' 'perl-archive-zip' 'pkgconfig' 'unzip' 'xulrunner>=1.9.1.2'
+             'apache-ant>=1.7.1-3' 'cairo' 'gperf' 'libcups' 'pstoedit' 'gconf' 'openjdk6>=1.5.1')
 backup=(usr/lib/openoffice/program/sofficerc)
 source=(ftp://ftp.archlinux.org/other/openoffice/${pkgname}-${_OO_milestone}.tar.bz2
 	startcenter.desktop
@@ -31,9 +31,11 @@
 	openoffice.profile
 	soltools-mkdepend-getline.diff
 	buildfix-sw-printf.diff
-	openoffice.org-3.0.1.oooXXXXX.extensions.npapi.patch)
+	xulrunner-1.9.1.diff
+	nsplugin-path.diff
+	no-mozilla-plug-in-option.diff)
 options=('!distcc' '!ccache' '!makeflags')
-md5sums=('262d74d80c8a7e2905ae507ae88bdd8d'
+md5sums=('23370db83cc40bfbf22cedc460fd6b85'
          '90897451b6cfed490e481f06d45408aa'
          '71f136a31e296a04ab68932a31dd533e'
          '6c596129fb48316226ce3adfd3a4c86d'
@@ -43,7 +45,9 @@
          '8d68d44c941a687813ddd968383cdf27'
          '7f9012680d0e329227445925710bafe6'
          '2461119a2b7f1580f997f504a76a1c98'
-         '75c7e5dd7cf4c266f48565fb6425f8c4')
+         '94b52cefc3656013f33ccedc0392848b'
+         'b48650dbdcf72c09a15dc9dff54915f1'
+         '00d28e85d97a467c58f317a2d93d26ac')
 
 # see ftp://ftp.linux.cz/pub/localization/OpenOffice.org/devel/build/build for upstream build instructions
 
@@ -75,7 +79,7 @@
 	patch -Np0 -i ${srcdir}/buildfix-gcc43.diff || return 1
 	patch -Np0 -i ${srcdir}/buildfix-sw-printf.diff || return 1
 	patch -Np0 -i ${srcdir}/soltools-mkdepend-getline.diff || return 1
-	patch -Np1 -i ${srcdir}/openoffice.org-3.0.1.oooXXXXX.extensions.npapi.patch || return 1
+	patch -Np0 -i ${srcdir}/xulrunner-1.9.1.diff || return 1
 
 
 	# allows soffice to find the user's firefox profile so that it can read
@@ -85,6 +89,9 @@
 	# important bugfixes
 	# try to fix non-gtk integration 
 	patch -Np0 -i ${srcdir}/shell.patch || return 1
+	# fix the mozilla plugin and remove it from option menu
+	patch -Np0 -i ${srcdir}/nsplugin-path.diff || return 1	
+	patch -Np0 -i ${srcdir}/no-mozilla-plug-in-option.diff || return 1
 
 	# remove the startup wizard
 	patch -Np0 -i ${srcdir}/default-no-startup-wizard.diff || return 1

Added: no-mozilla-plug-in-option.diff
===================================================================
--- no-mozilla-plug-in-option.diff	                        (rev 0)
+++ no-mozilla-plug-in-option.diff	2009-08-25 23:21:22 UTC (rev 50392)
@@ -0,0 +1,313 @@
+--- svx/source/dialog/optinet2.cxx-old	2007-05-04 22:59:31.000000000 +0200
++++ svx/source/dialog/optinet2.cxx	2007-05-04 22:59:56.000000000 +0200
+@@ -1813,199 +1813,6 @@
+ 	maProtectRecordsPB.SetText( sNewText );
+ }
+ 
+-//added by jmeng begin
+-MozPluginTabPage::MozPluginTabPage(Window* pParent, const SfxItemSet& rSet)
+-	: SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_INET_MOZPLUGIN ), rSet ),
+-	aMSWordGB		( this, SVX_RES( GB_MOZPLUGIN	    ) ),
+-	aWBasicCodeCB	( this, SVX_RES( CB_MOZPLUGIN_CODE ) )
+-{
+-	FreeResource();
+-}
+-
+-MozPluginTabPage::~MozPluginTabPage()
+-{
+-}
+-
+-SfxTabPage*	MozPluginTabPage::Create( Window* pParent,
+-										const SfxItemSet& rAttrSet )
+-{
+-	return new MozPluginTabPage( pParent, rAttrSet );
+-}
+-BOOL MozPluginTabPage::FillItemSet( SfxItemSet& )
+-{
+-	BOOL hasInstall = isInstalled();
+-	BOOL hasChecked = aWBasicCodeCB.IsChecked();
+-	if(hasInstall && (!hasChecked)){
+-		//try to uninstall
+-		uninstallPlugin();
+-	}
+-	else if((!hasInstall) && hasChecked){
+-		//try to install
+-		installPlugin();
+-	}
+-	else{
+-		// do nothing
+-	}
+-	return TRUE;
+-}
+-void MozPluginTabPage::Reset( const SfxItemSet& )
+-{
+-		aWBasicCodeCB.Check( isInstalled());
+-		aWBasicCodeCB.SaveValue();
+-}
+-
+-#ifdef WNT
+-extern "C" {
+-	int lc_isInstalled(const  char* realFilePath);
+-	int lc_installPlugin(const  char* realFilePath);
+-	int lc_uninstallPlugin(const  char* realFilePath);
+-}
+-#endif
+-
+-#define NPP_PATH_MAX 2048
+-inline bool getDllURL(rtl::OString * path)
+-{
+-    OSL_ASSERT(path != NULL);
+-    ::rtl::OUString dirPath/*dllPath, */;
+-    if (osl_getExecutableFile(&dirPath.pData) != osl_Process_E_None) {
+-        return false;
+-    }
+-    dirPath = dirPath.copy(0, dirPath.lastIndexOf('/'));
+-//    osl::FileBase::getAbsoluteFileURL(dirPath, libPath, dllPath);
+-    ::rtl::OUString sysDirPath;
+-	osl::FileBase::getSystemPathFromFileURL(dirPath, sysDirPath);
+-    *path = OUStringToOString(sysDirPath, RTL_TEXTENCODING_ASCII_US);
+-    return true;
+-}
+-
+-BOOL MozPluginTabPage::isInstalled()
+-{
+-#ifdef UNIX
+-    // get the real file referred by .so lnk file
+-    char lnkFilePath[NPP_PATH_MAX] = {0};
+-    char lnkReferFilePath[NPP_PATH_MAX] = {0};
+-    char* pHome = getpwuid(getuid())->pw_dir;
+-	strcat(lnkFilePath, pHome);
+-	strcat(lnkFilePath, "/.mozilla/plugins/libnpsoplugin" SAL_DLLEXTENSION);
+-
+-	struct stat sBuf;
+-	if (0 > lstat(lnkFilePath, &sBuf))
+-	    return false;
+-    if (!S_ISLNK(sBuf.st_mode))
+-		return false;
+-    if (0 >= readlink(lnkFilePath, lnkReferFilePath, NPP_PATH_MAX))
+-		return false;
+-    // If the link is relative, then we regard it as non-standard
+-    if (lnkReferFilePath[0] != '/')
+-        return false;
+-
+-    // get the real file path
+-    char realFilePath[NPP_PATH_MAX] = {0};
+-    ::rtl::OString tempString;
+-    if (!getDllURL(&tempString)) {
+-        return false;
+-    }
+-    strncpy(realFilePath, tempString.getStr(), NPP_PATH_MAX);
+-	strcat(realFilePath, "/libnpsoplugin" SAL_DLLEXTENSION);
+-
+-    if (0 != strcmp(lnkReferFilePath, realFilePath))
+-        return false;
+-    return true;
+-#endif
+-#ifdef WNT
+-	// get the value from registry
+-		BOOL ret = true;
+-	::rtl::OString tempString;
+-	char realFilePath[NPP_PATH_MAX] = {0};
+-    if (!getDllURL(&tempString)){
+-        return false;
+-    }
+-    strncpy(realFilePath, tempString.getStr(), NPP_PATH_MAX);
+-	if(! lc_isInstalled(realFilePath))
+-		ret =true;
+-	else
+-		ret = false;
+-	return ret;
+-#endif
+-}
+-
+-BOOL MozPluginTabPage::installPlugin()
+-{
+-#ifdef UNIX
+-    // get the real file referred by .so lnk file
+-    char lnkFilePath[NPP_PATH_MAX] = {0};
+-    char* pHome = getpwuid(getuid())->pw_dir;
+-	strcat(lnkFilePath, pHome);
+-    strcat(lnkFilePath, "/.mozilla/plugins/libnpsoplugin" SAL_DLLEXTENSION);
+-    remove(lnkFilePath);
+-
+-    // create the dirs if necessary
+-    struct stat buf;
+-    char tmpDir[NPP_PATH_MAX] = {0};
+-    sprintf(tmpDir, "%s/.mozilla", pHome);
+-    if (0 > stat(lnkFilePath, &buf))
+-    {
+-        mkdir(tmpDir, 0755);
+-        strcat(tmpDir, "/plugins");
+-        mkdir(tmpDir, 0755);
+-    }
+-
+-    // get the real file path
+-    char realFilePath[NPP_PATH_MAX] = {0};
+-    ::rtl::OString tempString;
+-    if (!getDllURL(&tempString)) {
+-        return false;
+-    }
+-    strncpy(realFilePath, tempString.getStr(), NPP_PATH_MAX);
+-	strcat(realFilePath, "/libnpsoplugin" SAL_DLLEXTENSION);
+-
+-    // create the link
+-    if (0 != symlink(realFilePath, lnkFilePath))
+-        return false;
+-    return true;
+-#endif
+-#ifdef WNT
+-	::rtl::OString tempString;
+-	char realFilePath[NPP_PATH_MAX] = {0};
+-    if (!getDllURL(&tempString)) {
+-        return false;
+-    }
+-    strncpy(realFilePath, tempString.getStr(), NPP_PATH_MAX);
+-	if( !lc_installPlugin(realFilePath))
+-		return true;
+-	else
+-		return false;
+-#endif
+-}
+-
+-BOOL MozPluginTabPage::uninstallPlugin()
+-{
+-#ifdef UNIX
+-    // get the real file referred by .so lnk file
+-    char lnkFilePath[NPP_PATH_MAX] = {0};
+-    char* pHome = getpwuid(getuid())->pw_dir;
+-	strcat(lnkFilePath, pHome);
+-	strcat(lnkFilePath, "/.mozilla/plugins/libnpsoplugin" SAL_DLLEXTENSION);
+-
+-	if(0 > remove(lnkFilePath))
+-	    return false;
+-	return true;
+-#endif
+-#ifdef WNT
+-	::rtl::OString tempString;
+-	char realFilePath[NPP_PATH_MAX] = {0};
+-    if (!getDllURL(&tempString)) {
+-        return false;
+-    }
+-    strncpy(realFilePath, tempString.getStr(), NPP_PATH_MAX);
+-	if(!lc_uninstallPlugin(realFilePath))
+-		return true;
+-	else
+-		return false;
+-#endif
+-}
+-//added by jmeng end
+-
+ /* -------------------------------------------------------------------------*/
+ 
+ class MailerProgramCfg_Impl : public utl::ConfigItem
+--- svx/source/dialog/optinet2.hxx	10 Apr 2008 23:34:00 -0000	1.16
++++ svx/source/dialog/optinet2.hxx	16 Jun 2008 16:09:22 -0000
+@@ -293,29 +293,6 @@
+ 	virtual	void 		Reset( const SfxItemSet& rSet );
+ };
+ 
+-//added by jmeng begin
+-class MozPluginTabPage : public SfxTabPage
+-{
+-    FixedLine       aMSWordGB;
+-	CheckBox		aWBasicCodeCB;
+-
+-	BOOL isInstalled(void);
+-	BOOL installPlugin(void);
+-	BOOL uninstallPlugin(void);
+-
+-	MozPluginTabPage( Window* pParent, const SfxItemSet& rSet );
+-	virtual ~MozPluginTabPage();
+-
+-public:
+-
+-	static SfxTabPage*	Create( Window* pParent,
+-								const SfxItemSet& rAttrSet );
+-
+-	virtual	BOOL 		FillItemSet( SfxItemSet& rSet );
+-	virtual	void 		Reset( const SfxItemSet& rSet );
+-
+-};
+-//added by jmeng end
+ #endif
+ 
+ /* -----------------------------20.06.01 16:32--------------------------------
+--- svx/source/options/optinet2.src	11 Apr 2008 02:13:50 -0000	1.97
++++ svx/source/options/optinet2.src	16 Jun 2008 16:11:20 -0000
+@@ -40,32 +40,6 @@
+ /*                                                                      */
+ /************************************************************************/
+ 
+-// added by jmeng begin
+-
+-TabPage RID_SVXPAGE_INET_MOZPLUGIN
+-{
+-	OutputSize = TRUE ;
+-	Size = MAP_APPFONT ( 260 , 185 ) ;
+-	SVLook = TRUE ;
+-	Hide = TRUE ;
+-
+-    FixedLine GB_MOZPLUGIN
+-	{
+-		Pos = MAP_APPFONT ( 6 , 3 ) ;
+-        Size = MAP_APPFONT (  248 , 8  ) ;
+-        Text[ en-US ] = "Browser Plug-in";
+-	};
+-	CheckBox CB_MOZPLUGIN_CODE
+-	{
+-		Pos = MAP_APPFONT ( 12 , 14 ) ;
+-		Size = MAP_APPFONT (  236 , 10  ) ;
+-		TabStop = TRUE ;
+-        Text [ en-US ] = "~Display documents in browser" ;
+-	};
+-};
+-
+-//added by jmeng end
+-
+ TabPage RID_SVXPAGE_INET_PROXY
+ {
+ 	HelpId = HID_OPTIONS_PROXY ;
+--- svx/source/dialog/treeopt.src	11 Apr 2008 00:17:12 -0000	1.21
++++ svx/source/dialog/treeopt.src	16 Jun 2008 16:12:27 -0000
+@@ -187,7 +187,6 @@
+ 			< "Proxy" ;  RID_SVXPAGE_INET_PROXY; > ;
+ 			< "Search" ;  RID_SVXPAGE_INET_SEARCH; > ;
+ 			< "E-mail" ;  RID_SVXPAGE_INET_MAIL; > ;
+-            < "Browser Plug-in" ;  RID_SVXPAGE_INET_MOZPLUGIN; > ;
+ 		};
+ 		//modified by jmeng end
+ 	};
+--- svx/inc/svx/dialogs.hrc	4 Jun 2008 11:21:07 -0000	1.14
++++ svx/inc/svx/dialogs.hrc	16 Jun 2008 16:14:30 -0000
+@@ -258,11 +258,6 @@
+ #define RID_SVXPAGE_INET_CACHE              (RID_SVX_START + 158)
+ #define RID_SVXPAGE_INET_TYPE               (RID_SVX_START + 159)
+ #define RID_SVXPAGE_INET_SEARCH				(RID_SVX_START + 160)
+-//added by jmeng begin
+-#define RID_SVXPAGE_INET_MOZPLUGIN			(RID_SVX_START + 2161)
+-#define GB_MOZPLUGIN	1
+-#define CB_MOZPLUGIN_CODE	2
+-//added by jmeng end
+ #define RID_SVXPAGE_INET_SECURITY	  		(RID_SVX_START + 200)
+ 
+ #define RID_SVXPAGE_BROWSER_OTHER           (RID_SVX_START + 202)
+--- svx/source/dialog/treeopt.cxx	11 Apr 2008 00:16:21 -0000	1.56
++++ svx/source/dialog/treeopt.cxx	16 Jun 2008 16:04:13 -0000
+@@ -368,9 +368,6 @@
+ 		case RID_SVXPAGE_ACCESSIBILITYCONFIG:		fnCreate = &SvxAccessibilityOptionsTabPage::Create; break;
+ 		case RID_SVXPAGE_SSO:						fnCreate = GetSSOCreator(); break;
+ 		case RID_SVXPAGE_OPTIONS_CTL:				fnCreate = &SvxCTLOptionsPage::Create ; break;
+-		//added by jmeng begin
+-		case RID_SVXPAGE_INET_MOZPLUGIN:			fnCreate = &MozPluginTabPage::Create; break;
+-		//added by jmeng end
+ 		case RID_SVXPAGE_OPTIONS_JAVA:				fnCreate = &SvxJavaOptionsPage::Create ; break;
+         case RID_SVXPAGE_ONLINEUPDATE:				fnCreate = &SvxOnlineUpdateTabPage::Create; break;
+         case RID_OPTPAGE_CHART_DEFCOLORS:			fnCreate = &SvxDefaultColorOptPage::Create; break;
+@@ -370,7 +367,6 @@
+     { "Internet",           "Proxy",                RID_SVXPAGE_INET_PROXY },
+     { "Internet",           "Search",               RID_SVXPAGE_INET_SEARCH },
+     { "Internet",           "Email",                RID_SVXPAGE_INET_MAIL },
+-    { "Internet",           "MozillaPlugin",        RID_SVXPAGE_INET_MOZPLUGIN },
+     { "LoadSave",           NULL,                   SID_FILTER_DLG },
+     { "LoadSave",           "General",              RID_SFXPAGE_SAVE },
+     { "LoadSave",           "VBAProperties",        SID_OPTFILTER_MSOFFICE },

Added: nsplugin-path.diff
===================================================================
--- nsplugin-path.diff	                        (rev 0)
+++ nsplugin-path.diff	2009-08-25 23:21:22 UTC (rev 50392)
@@ -0,0 +1,132 @@
+--- extensions/source/nsplugin/source/so_env.cxx.old	2009-04-02 10:51:19.000000000 +0000
++++ extensions/source/nsplugin/source/so_env.cxx	2009-04-06 16:41:44.000000000 +0000
+@@ -34,6 +34,7 @@
+ #ifdef UNIX
+ #include <sys/types.h>
+ #include <strings.h>
++#include <dlfcn.h>
+ #include <stdarg.h>
+ // For vsnprintf()
+ #define NSP_vsnprintf vsnprintf
+@@ -122,6 +123,96 @@ restoreUTF8(char *pPath)
+     return 0;
+ }
+ 
++#ifdef UNIX
++extern int nspluginOOoModuleHook (void** aResult);
++int nspluginOOoModuleHook (void** aResult)
++{
++	void *dl_handle;
++	void *thisp;
++
++	dl_handle = dlopen(NULL, RTLD_NOW);
++	if (!dl_handle)
++	{
++		fprintf (stderr, "Can't open myself '%s'\n", dlerror());
++		return 1;
++	}
++
++	Dl_info dl_info = { 0, };
++	if(!dladdr((void *)nspluginOOoModuleHook, &dl_info))
++	{
++		fprintf (stderr, "Can't find my own address '%s'\n", dlerror());
++		return 1;
++	}
++
++	if (!dl_info.dli_fname)
++	{
++		fprintf (stderr, "Can't find my own file name\n");
++		return 1;
++	}
++
++	char cwdstr[NPP_PATH_MAX];
++	if (!getcwd (cwdstr, sizeof(cwdstr)))
++	{
++		fprintf (stderr, "Can't get cwd\n");
++		return 1;
++	}
++
++	char libFileName[NPP_PATH_MAX];
++
++	if (dl_info.dli_fname[0] != '/')
++	{
++		if ((strlen(cwdstr) + 1 + strlen(dl_info.dli_fname)) >= NPP_PATH_MAX)
++		{
++			fprintf (stderr, "Plugin path too long\n");
++			return 1;
++		}
++		strcpy (libFileName, cwdstr);
++		strcat (libFileName, "/");
++		strcat (libFileName, dl_info.dli_fname);
++	}
++	else
++	{
++		if (strlen(dl_info.dli_fname) >= NPP_PATH_MAX)
++		{
++			fprintf (stderr, "Plugin path too long\n");
++			return 1;
++		}
++		strcpy (libFileName, dl_info.dli_fname);
++	}
++
++	char *clobber;
++	static char realFileName[NPP_PATH_MAX] = {0};
++#   define SEARCH_SUFFIX "/program/libnpsoplug"
++
++	if (!(clobber = strstr (libFileName, SEARCH_SUFFIX)))
++	{
++		ssize_t len = readlink(libFileName, realFileName, NPP_PATH_MAX-1);
++		if (len == -1)
++		{
++			fprintf (stderr, "Couldn't read link '%s'\n", libFileName);
++			return 1;
++		}
++		realFileName[len] = '\0';
++		if (!(clobber = strstr (realFileName, SEARCH_SUFFIX)))
++		{
++		        fprintf (stderr, "Couldn't find suffix in '%s'\n", realFileName);
++			return 1;
++		}
++		*clobber = '\0';
++	}
++	else
++	{
++		*clobber = '\0';
++		strcpy (realFileName, libFileName);
++	}
++	*aResult = realFileName;
++
++	fprintf (stderr, "OpenOffice path is '%s'\n", realFileName);
++   
++	return 0;
++}
++#endif
++
+ // *aResult points the static string holding "/opt/staroffice8"
+ int findReadSversion(void** aResult, int /*bWnt*/, const char* /*tag*/, const char* /*entry*/)
+ {
+@@ -134,9 +225,22 @@ int findReadSversion(void** aResult, int
+     // Filename of lnk file, eg. "soffice"
+     char lnkFileName[NPP_PATH_MAX] = {0};
+     char* pTempZero = NULL;
++
++    /* try to fetch a 'self' pointer */
++	if (!nspluginOOoModuleHook (aResult))
++	  return 0;
++
++    /* .. now in $HOME */
+     sprintf(lnkFileName, "%s/.mozilla/plugins/libnpsoplugin%s", getenv("HOME"), SAL_DLLEXTENSION);
+-    if ((0 > readlink(lnkFileName, realFileName, NPP_PATH_MAX)) ||
+-       (NULL == (pTempZero = strstr(realFileName, "/program/libnpsoplugin" SAL_DLLEXTENSION))))
++	ssize_t len = readlink(lnkFileName, realFileName, NPP_PATH_MAX-1);
++	if (-1 == len)
++	{
++        *realFileName = 0;
++        return -1;
++	}
++	realFileName[len] = '\0';
++
++	if (NULL == (pTempZero = strstr(realFileName, "/program/libnpsoplugin" SAL_DLLEXTENSION)))
+     {
+         *realFileName = 0;
+         return -1;

Deleted: openoffice.org-3.0.1.oooXXXXX.extensions.npapi.patch
===================================================================
--- openoffice.org-3.0.1.oooXXXXX.extensions.npapi.patch	2009-08-25 22:12:14 UTC (rev 50391)
+++ openoffice.org-3.0.1.oooXXXXX.extensions.npapi.patch	2009-08-25 23:21:22 UTC (rev 50392)
@@ -1,16 +0,0 @@
-Index: source/plugin/inc/plugin/unx/plugcon.hxx
-===================================================================
-RCS file: /cvs/util/extensions/source/plugin/inc/plugin/unx/plugcon.hxx,v
-retrieving revision 1.13.64.2
-diff -u -r1.13.64.2 plugcon.hxx
---- openoffice.org.orig/extensions/source/plugin/inc/plugin/unx/plugcon.hxx	15 Dec 2008 10:29:47 -0000	1.13.64.2
-+++ openoffice.org/extensions/source/plugin/inc/plugin/unx/plugcon.hxx	23 Dec 2008 09:24:57 -0000
-@@ -102,7 +102,7 @@
- extern "C" {
- #include <npsdk/npupp.h>
- }
--#include <npapi.h>
-+#include <npsdk/npapi.h>
- 
- #if NP_VERSION_MINOR < 17
- // compatibility hack: compile with older NPN api header, but define




More information about the arch-commits mailing list