[arch-commits] Commit in xulrunner/trunk (PKGBUILD fix-mozilla-launcher.patch)

Jan de Groot jgc at archlinux.org
Thu Jul 17 17:12:25 EDT 2008


    Date: Thursday, July 17, 2008 @ 17:12:25
  Author: jgc
Revision: 5515

Fix launcher stub. This fixes FS#10737.

Added:
  xulrunner/trunk/fix-mozilla-launcher.patch
Modified:
  xulrunner/trunk/PKGBUILD

----------------------------+
 PKGBUILD                   |   12 ++++++++----
 fix-mozilla-launcher.patch |   23 +++++++++++++++++++++++
 2 files changed, 31 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-07-17 16:33:04 UTC (rev 5514)
+++ PKGBUILD	2008-07-17 21:12:25 UTC (rev 5515)
@@ -16,12 +16,14 @@
         mozconfig
 	100-system-hunspell-corrections.patch
 	bzXXX_pc_honour_system_nspr_nss.patch
-	mozilla-pkgconfig.patch)
+	mozilla-pkgconfig.patch
+	fix-mozilla-launcher.patch)
 md5sums=('ec141bfca8bcc9565086e1e2f1c5a03d'
          '33e6aa4d7119977f7e2464d3de8cff2a'
          '5efd6772ed0ecf8eddec5d5650191d3c'
          '7a5151f90cb360bc1ea911e5cf7208e9'
-         'dfbfb4e35912112668ac66dae0783686')
+         'dfbfb4e35912112668ac66dae0783686'
+	 '63eee2d1da3b43c9d604f2253f242f40')
 
 build() {
   cd ${startdir}/src/mozilla
@@ -33,10 +35,12 @@
   #fix pkgconfig files when building with system nss/nspr - ubuntu
   patch -Np1 -i ${srcdir}/bzXXX_pc_honour_system_nspr_nss.patch || return 1
 
-  #fix libdir/sdkdir
+  #fix libdir/sdkdir - fedora - with local modifications
   patch -Np1 -i ${srcdir}/mozilla-pkgconfig.patch || return 1
 
-  #fix profiling
+  #Fix stub launcher - archlinux
+  patch -Np0 -i ${srcdir}/fix-mozilla-launcher.patch || return 1
+
   unset CFLAGS
   unset CXXFLAGS
   export LDFLAGS="-Wl,-rpath,/usr/lib/xulrunner-1.9"

Added: fix-mozilla-launcher.patch
===================================================================
--- fix-mozilla-launcher.patch	                        (rev 0)
+++ fix-mozilla-launcher.patch	2008-07-17 21:12:25 UTC (rev 5515)
@@ -0,0 +1,23 @@
+--- xulrunner/stub/nsXULStub.cpp	2008-07-17 21:43:11.000000000 +0200
++++ xulrunner/stub/nsXULStub.cpp	2008-07-17 21:47:04.000000000 +0200
+@@ -208,8 +208,10 @@
+   // 3) give up
+ 
+   struct stat fileStat;
++  char *testp;
+ 
+-  if (!realpath(argv[0], iniPath) || stat(iniPath, &fileStat)) {
++  testp = realpath(argv[0], iniPath);
++  if (!(testp != NULL && stat(iniPath, &fileStat) == 0 && S_ISREG(fileStat.st_mode) && fileStat.st_mode & S_IXUSR) || (testp != NULL && stat(iniPath, &fileStat))) {
+     const char *path = getenv("PATH");
+     if (!path)
+       return 1;
+@@ -222,7 +224,7 @@
+     char *token = strtok(pathdup, ":");
+     while (token) {
+       sprintf(tmpPath, "%s/%s", token, argv[0]);
+-      if (realpath(tmpPath, iniPath) && stat(iniPath, &fileStat) == 0) {
++      if (realpath(tmpPath, iniPath) && stat(iniPath, &fileStat) == 0 && S_ISREG(fileStat.st_mode) && fileStat.st_mode & S_IXUSR) {
+         found = PR_TRUE;
+         break;
+       }





More information about the arch-commits mailing list