Changeset 104672


Ignore:
Timestamp:
Mar 31, 2013, 8:27:25 AM (6 years ago)
Author:
ryandesign@…
Message:

launch: fix building on OS X 10.8 and later by applying upstream revision 651 to remove an obsolete error code constant (#38600) and also fix a buffer overflow; apply upstream revision 314 to handle new error codes used by OS X 10.4 and later; use unversioned docdir; rename patch file

Location:
trunk/dports/aqua/launch
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/dports/aqua/launch/Portfile

    r85390 r104672  
    66name            launch
    77version         1.1
     8revision        1
    89license         BSD
    910maintainers     nomaintainer
    10 description     command-line launcher for Mac OS X in the spirit of open
     11
     12description     command-line launcher for OS X in the spirit of open
    1113
    1214long_description \
    1315    Apple provides a simple command-line launching program called open \
    14     with Mac OS X. It offers few options - launching applications by name \
     16    with OS X. It offers few options - launching applications by name \
    1517    or by path, launching TextEdit, or opening a number of applications, \
    1618    documents, folders, or URLs. With the exception of special support for \
     
    2426                rmd160 7eba376fdedd322ecfcc4d429bf608dcd1e79c34
    2527
    26 patchfiles      patch-main.c
     28patchfiles      patch-main.c.diff
    2729
    2830xcode.destroot.path ${prefix}/bin
     
    3234        ${destroot}${prefix}/share/man/man1
    3335
    34     set docdir ${prefix}/share/doc/${name}-${version}
     36    set docdir ${prefix}/share/doc/${name}
    3537    xinstall -d ${destroot}${docdir}
    3638    xinstall -m 0644 ${worksrcpath}/README ${destroot}${docdir}
  • trunk/dports/aqua/launch/files/patch-main.c.diff

    r104657 r104672  
    1 --- main.c.orig 2006-10-30 02:56:23.000000000 -0800
    2 +++ main.c      2009-08-28 13:58:09.000000000 -0700
    3 @@ -147,7 +147,7 @@
     1--- main.c.orig 2006-10-30 04:56:23.000000000 -0600
     2+++ main.c      2013-03-31 03:17:46.000000000 -0500
     3@@ -69,10 +69,17 @@
     4 
     5 static errList ERRS = {
     6     // Launch Services errors
     7+    { kLSAppInTrashErr, "application is in the Trash" },
     8+    { kLSExecutableIncorrectFormat, "executable is unsupported on this processor architecture" },
     9     { kLSUnknownErr, "unknown Launch Services error" },
     10-    { kLSApplicationNotFoundErr, "application not found" },
     11+    { kLSNotAnApplicationErr, "item is not an application" },
     12+    { kLSDataUnavailableErr, "item metadata is unavailable" },
     13+    { kLSApplicationNotFoundErr, "application not found for document" },
     14+    { kLSUnknownTypeErr, "cannot determine item kind" },
     15     { kLSLaunchInProgressErr, "application is being opened; please try again after the application is open" },
     16-    { kLSNotRegisteredErr, "application not registered in Launch Services database" },
     17+    { kLSServerCommunicationErr, "unable to connect to Launch Services.\nAre you logged in?" },
     18+    { kLSIncompatibleSystemVersionErr, "application is incompatible with this version of Mac OS X" },
     19+    { kLSNoLaunchPermissionErr, "no permission to launch this application", },
     20     { kLSNoExecutableErr, "application package contains no executable, or an unusable executable" },
     21     { kLSNoClassicEnvironmentErr, "Classic environment required but not available" },
     22     { kLSMultipleSessionsNotSupportedErr, "unable to launch multiple instances of application" },
     23@@ -89,7 +96,6 @@
     24     { nsvErr, "the volume cannot be found (buggy filesystem?)" },
     25     { procNotFound, "unable to connect to system service.\nAre you logged in?" },
     26     { kCGErrorIllegalArgument, "window server error.\nAre you logged in?" },
     27-    { kCGErrorApplicationRequiresNewerSystem, "application requires a newer Mac OS X version" },
     28     { fnfErr, "file not found" },
     29     { 0, NULL }
     30 };
     31@@ -147,7 +153,7 @@
    432     len = strlen(errDesc) + 10 * sizeof(char);
    533     str = (char *)malloc(len);
     
    1038         str = failedStr;
    1139     return str;
    12 @@ -580,7 +580,7 @@
     40@@ -580,7 +586,7 @@
    1341     if (bigSize == 0) {
    1442         if (littleSize == 0) {
     
    1947             UInt32 adjSize = littleSize >> 10;
    2048             if (adjSize < 1024) printf("%.1f KB", DFORMAT(littleSize));
    21 @@ -594,10 +594,10 @@
     49@@ -594,10 +600,10 @@
    2250             }
    2351         }
     
    3260     }
    3361     printf(" on disk (%llu bytes used)\n", logicalSize);
    34 @@ -616,7 +616,7 @@
     62@@ -616,7 +622,7 @@
    3563        switch (fscInfo.valence) {
    3664        case 0: printf("zero items\n"); break;
     
    4169     } else {
    4270         printSizes("data fork size", fscInfo.dataLogicalSize, fscInfo.dataPhysicalSize, true);
    43 @@ -735,7 +735,7 @@
     71@@ -651,7 +657,7 @@
     72     CFStringRef typeStr = CFStringCreateWithBytes(NULL, (UInt8 *)&osType, 4, CFStringGetSystemEncoding(), false);
     73     if (typeStr == NULL) {
     74        // punt to displaying verbatim
     75-       static char tmpBuffer[4];
     76+       static char tmpBuffer[5];
     77        tmpBuffer[4] = '\0';
     78        strncpy(tmpBuffer, (const char *)&osType, 4);
     79        return tmpBuffer;
     80@@ -735,7 +741,7 @@
    4481             printf("unknown (cputype %d, subtype %d)", fat[i].cputype, fat[i].cpusubtype);
    4582             continue;
     
    5087     printf("\n");
    5188 }
    52 @@ -880,7 +880,7 @@
     89@@ -880,7 +886,7 @@
    5390 
    5491        if (version != NULL) {
Note: See TracChangeset for help on using the changeset viewer.