[KDE/Mac] How can I change one piece of code in a MacPorts installation?

Ian Wadham iandw.au at gmail.com
Fri Jul 25 07:24:50 UTC 2014

Hi Marko,

On 25/07/2014, at 4:47 PM, Marko Käning wrote:
> you’d create your patch appropriately regarding the path depth, add it to the port’s files folder, add another line to the patchfiles list in the Portfile, increase the revision number by 1 and then you do “sudo port upgrade” and your patch will be installed.

No, I don't want to start an entirely new patch.  I currently have the patch:


with contents you sent me:

diff --git a/kdeui/util/kcrash.cpp b/kdeui/util/kcrash.cpp
index 45eb46b..9bb9f44 100644
--- a/kdeui/util/kcrash.cpp
+++ b/kdeui/util/kcrash.cpp
@@ -313,6 +313,10 @@ KCrash::defaultCrashHandler (int sig)

+#ifndef Q_OS_MAC
+    // On Apple OS X, closing all FDs now will cause a second (SIGILL) crash,
+    // ending with "Unable to start Dr. Konqi". This is because the libdispatch
+    // library, which can manage multi-threading, has some FDs of its own.
 #if !defined(Q_OS_WIN)
     if (!(s_flags & KeepFDs))
@@ -321,6 +325,7 @@ KCrash::defaultCrashHandler (int sig)
 # endif

     if (crashRecursionCounter < 3)

I was thinking of adding some fprintf(stderr, …, …); lines to kcrash.cpp to get
more information about what file paths it is using, etc. and then creating a new
version of fixCrashInKCrash.patch, to replace the above patch contents at

What do I need to do to get a new version of fixCrashInKCrash.patch
incorporated into MacPorts' kdelibs4, and to keep cycling through that process
until kcrash.cpp and its patch are providing all the info I am looking for?  IOW,
how do you develop and test a patch for MacPorts?  Assuming you don't get
it right first time every time… :-)

Cheers, Ian W.

More information about the kde-mac mailing list