[76881] trunk/dports/kde/kdelibs4/files/workaround-kdeinit4-crash.patch

snc at macports.org snc at macports.org
Fri Mar 11 11:44:05 PST 2011


Revision: 76881
          http://trac.macports.org/changeset/76881
Author:   snc at macports.org
Date:     2011-03-11 11:44:03 -0800 (Fri, 11 Mar 2011)
Log Message:
-----------
kdelibs4: updated patch

Modified Paths:
--------------
    trunk/dports/kde/kdelibs4/files/workaround-kdeinit4-crash.patch

Modified: trunk/dports/kde/kdelibs4/files/workaround-kdeinit4-crash.patch
===================================================================
--- trunk/dports/kde/kdelibs4/files/workaround-kdeinit4-crash.patch	2011-03-11 19:13:42 UTC (rev 76880)
+++ trunk/dports/kde/kdelibs4/files/workaround-kdeinit4-crash.patch	2011-03-11 19:44:03 UTC (rev 76881)
@@ -1,29 +1,19 @@
---- kdelibs-4.6.0/kinit/kinit.cpp.derp	2011-01-30 17:08:24.000000000 -0500
-+++ kdelibs-4.6.0/kinit/kinit.cpp	2011-01-30 17:08:30.000000000 -0500
-@@ -537,6 +537,14 @@
-       init_startup_info( startup_id, name, envc, envs );
+--- kdelibs-4.6.1/kinit/kinit.cpp.orig	2011-03-05 18:46:43.000000000 -0500
++++ kdelibs-4.6.1/kinit/kinit.cpp	2011-03-05 18:48:53.000000000 -0500
+@@ -543,6 +543,12 @@
+   const QString bundlepath = s_instance->dirs()->findExe(QFile::decodeName(execpath));
  #endif
  
 +  // Don't run this inside the child process, it crashes on OS/X 10.6
-+  const QByteArray docPath = QFile::encodeName(KGlobalSettings::documentPath());
 +  const QString helperpath = s_instance->dirs()->findExe(QString::fromLatin1("kdeinit4_helper"));
 +#ifdef Q_WS_MAC
-+  const QString bundlepath = s_instance->dirs()->findExe(QFile::decodeName(execpath));
 +  const QString argvexe = s_instance->dirs()->findExe(QString::fromLatin1(_name));
 +#endif
 +
    d.errorMsg = 0;
    d.fork = fork();
    switch(d.fork) {
-@@ -565,7 +573,6 @@
-          // on Maemo5, documentPath() is on the SD card, setting it as working directory would block
-          // USB mass storage access
- #ifndef Q_WS_MAEMO_5
--         const QByteArray docPath = QFile::encodeName(KGlobalSettings::documentPath());
-          (void)chdir(docPath.constData());
- #endif
-      }
-@@ -602,10 +609,9 @@
+@@ -607,10 +615,9 @@
       {
         int r;
         QByteArray procTitle;
@@ -35,15 +25,7 @@
         if (!argvexe.isEmpty()) {
            QByteArray cstr = argvexe.toLocal8Bit();
            kDebug(7016) << "kdeinit4: launch() setting argv: " << cstr.data();
-@@ -681,7 +687,6 @@
- 
-         QByteArray executable = execpath;
- #ifdef Q_WS_MAC
--        QString bundlepath = s_instance->dirs()->findExe(QFile::decodeName(executable));
-         if (!bundlepath.isEmpty())
-            executable = QFile::encodeName(bundlepath);
- #endif
-@@ -695,25 +700,13 @@
+@@ -699,25 +706,13 @@
          exit(255);
       }
  
@@ -74,7 +56,7 @@
       if (d.debug_wait)
       {
          fprintf(stderr, "kdeinit4: Suspending process\n"
-@@ -727,8 +720,18 @@
+@@ -731,8 +726,18 @@
          setup_tty( tty );
       }
  
@@ -94,8 +76,8 @@
       break;
    }
    default:
---- kdelibs-4.6.0/kinit/CMakeLists.txt.weee	2011-01-30 17:08:09.000000000 -0500
-+++ kdelibs-4.6.0/kinit/CMakeLists.txt	2011-01-30 17:15:54.000000000 -0500
+--- kdelibs-4.6.0/kinit/CMakeLists.txt.weee    2011-01-30 17:08:09.000000000 -0500
++++ kdelibs-4.6.0/kinit/CMakeLists.txt 2011-01-30 17:15:54.000000000 -0500
 @@ -57,6 +57,16 @@
  
  install(TARGETS kdeinit4 ${INSTALL_TARGETS_DEFAULT_ARGS} )
@@ -113,50 +95,50 @@
  ########### kwrapper4 ###############
  if (WIN32)
    set(kwrapper_SRCS kwrapper_win.cpp  )
-Index: kdelibs-4.3.2/kinit/helper.cpp
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ kdelibs-4.3.2/kinit/helper.cpp	2009-10-14 19:11:06.000000000 +0200
-@@ -0,0 +1,42 @@
-+#include <stdio.h>
-+#include <stdlib.h>
-+
-+#include <QFile>
-+#include <QLibrary>
-+
-+typedef int (*handler) (int, char *[]);
-+
-+int main(int argc, char *argv[])
-+{
-+    if (argc < 2)
-+    {
-+        fprintf(stderr, "Too few arguments\n");
-+        exit(1);
-+    }
-+
-+    QString libpath = QFile::decodeName(argv[argc-1]);
-+    QLibrary l(libpath);
-+
-+    if (!libpath.isEmpty() && (!l.load() || !l.isLoaded()))
-+    {
-+        QString ltdlError = l.errorString();
-+        fprintf(stderr, "Could not open library %s: %s\n", qPrintable(libpath), qPrintable(ltdlError) );
-+        exit(1);
-+    }
-+
-+    void * sym = l.resolve( "kdeinitmain");
-+    if (!sym)
-+    {
-+        sym = l.resolve( "kdemain" );
-+        if ( !sym )
-+        {
-+            QString ltdlError = l.errorString();
-+            fprintf(stderr, "Could not find kdemain: %s\n", qPrintable(ltdlError) );
-+            exit(1);
-+        }
-+    }
-+
-+    handler func = (int (*)(int, char *[])) sym;
-+    exit( func(argc - 1, argv)); /* Launch! */
-+}
-+
+Index: kdelibs-4.3.2/kinit/helper.cpp
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ kdelibs-4.3.2/kinit/helper.cpp 2009-10-14 19:11:06.000000000 +0200
+@@ -0,0 +1,42 @@
++#include <stdio.h>
++#include <stdlib.h>
++
++#include <QFile>
++#include <QLibrary>
++
++typedef int (*handler) (int, char *[]);
++
++int main(int argc, char *argv[])
++{
++    if (argc < 2)
++    {
++        fprintf(stderr, "Too few arguments\n");
++        exit(1);
++    }
++
++    QString libpath = QFile::decodeName(argv[argc-1]);
++    QLibrary l(libpath);
++
++    if (!libpath.isEmpty() && (!l.load() || !l.isLoaded()))
++    {
++        QString ltdlError = l.errorString();
++        fprintf(stderr, "Could not open library %s: %s\n", qPrintable(libpath), qPrintable(ltdlError) );
++        exit(1);
++    }
++
++    void * sym = l.resolve( "kdeinitmain");
++    if (!sym)
++    {
++        sym = l.resolve( "kdemain" );
++        if ( !sym )
++        {
++            QString ltdlError = l.errorString();
++            fprintf(stderr, "Could not find kdemain: %s\n", qPrintable(ltdlError) );
++            exit(1);
++        }
++    }
++
++    handler func = (int (*)(int, char *[])) sym;
++    exit( func(argc - 1, argv)); /* Launch! */
++}
++
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110311/0b4a0b31/attachment.html>


More information about the macports-changes mailing list