Ticket #40869: patch-makeicns.diff

File patch-makeicns.diff, 2.7 KB (added by pguyot (Paul Guyot), 11 years ago)

Do not create ics8 and icl8 on 10.9, thus fixing incompatibility.

  • Portfile

     
    55
    66name                makeicns
    77version             1.4.10a
     8revision            1
    89categories          graphics
    910maintainers         mk pixilla
    1011platforms           darwin
     
    2930variant universal {
    3031}
    3132
     33platform darwin 13 {
     34    patchfiles      patch-IconFamily.m.diff
     35}
     36
    3237build.env-append    CC=${configure.cc} \
    3338                    CXX=${configure.cxx} \
    3439                    CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
  • files/patch-IconFamily.m.diff

     
     1--- makeicns/IconFamily.m       2012-01-19 22:16:19.000000000 +0100
     2+++ IconFamily.m        2013-10-29 15:51:30.000000000 +0100
     3@@ -85,7 +85,9 @@
     4 
     5 + (Handle) get32BitDataFromBitmapImageRep:(NSBitmapImageRep*)bitmapImageRep requiredPixelSize:(int)requiredPixelSize;
     6 
     7+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090
     8 + (Handle) get8BitDataFromBitmapImageRep:(NSBitmapImageRep*)bitmapImageRep requiredPixelSize:(int)requiredPixelSize;
     9+#endif
     10 
     11 + (Handle) get8BitMaskFromBitmapImageRep:(NSBitmapImageRep*)bitmapImageRep requiredPixelSize:(int)requiredPixelSize;
     12 
     13@@ -675,10 +677,12 @@
     14                hRawData = [IconFamily get1BitMaskFromBitmapImageRep:bitmapImageRep requiredPixelSize:32];
     15                break;
     16 
     17+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090
     18        // 'icl8' 32x32 8-bit indexed image data
     19        case kLarge8BitData:
     20                hRawData = [IconFamily get8BitDataFromBitmapImageRep:bitmapImageRep requiredPixelSize:32];
     21                break;
     22+#endif
     23 
     24        // 'is32' 16x16 32-bit RGB image
     25        case kSmall32BitData:
     26@@ -695,10 +699,12 @@
     27                hRawData = [IconFamily get1BitMaskFromBitmapImageRep:bitmapImageRep requiredPixelSize:16];
     28                break;
     29 
     30+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090
     31        // 'ics8' 16x16 8-bit indexed image data
     32        case kSmall8BitData:
     33                hRawData = [IconFamily get8BitDataFromBitmapImageRep:bitmapImageRep requiredPixelSize:16];
     34                break;
     35+#endif
     36 
     37        default:
     38                return NO;
     39@@ -1323,6 +1329,10 @@
     40        return hRawData;
     41 }
     42 
     43+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090
     44+// This method is based on CGPaletteCreateDefaultColorPalette which is no longer
     45+// supported on 10.9, and provided a data structure to access old MacOS's 8 bits
     46+// palette.
     47 + (Handle) get8BitDataFromBitmapImageRep:(NSBitmapImageRep*)bitmapImageRep requiredPixelSize:(int)requiredPixelSize
     48 {
     49        Handle hRawData;
     50@@ -1411,6 +1421,7 @@
     51 
     52        return hRawData;
     53 }
     54+#endif
     55 
     56 + (Handle) get8BitMaskFromBitmapImageRep:(NSBitmapImageRep*)bitmapImageRep requiredPixelSize:(int)requiredPixelSize
     57 {