[91439] trunk/dports/games/Gridlock

jmr at macports.org jmr at macports.org
Sun Apr 1 17:16:15 PDT 2012


Revision: 91439
          https://trac.macports.org/changeset/91439
Author:   jmr at macports.org
Date:     2012-04-01 17:16:12 -0700 (Sun, 01 Apr 2012)
Log Message:
-----------
Gridlock: fix build (#29190), 32-bit only

Modified Paths:
--------------
    trunk/dports/games/Gridlock/Portfile

Added Paths:
-----------
    trunk/dports/games/Gridlock/files/
    trunk/dports/games/Gridlock/files/NSObject+Extensions.m.patch
    trunk/dports/games/Gridlock/files/nodelay.patch

Modified: trunk/dports/games/Gridlock/Portfile
===================================================================
--- trunk/dports/games/Gridlock/Portfile	2012-04-01 23:38:14 UTC (rev 91438)
+++ trunk/dports/games/Gridlock/Portfile	2012-04-02 00:16:12 UTC (rev 91439)
@@ -21,3 +21,11 @@
 checksums	md5     488d759ff0de7d5fae52c299892e3019 \
 			sha1    01d5dc011dd9ab017f06956d142bc6868d602117 \
 			rmd160  38865d400ee734458f637b4e5d818f1b997d8138
+
+supported_archs i386 ppc
+
+patchfiles  nodelay.patch
+
+if {${os.major} >= 10} {
+    patchfiles-append NSObject+Extensions.m.patch
+}

Added: trunk/dports/games/Gridlock/files/NSObject+Extensions.m.patch
===================================================================
--- trunk/dports/games/Gridlock/files/NSObject+Extensions.m.patch	                        (rev 0)
+++ trunk/dports/games/Gridlock/files/NSObject+Extensions.m.patch	2012-04-02 00:16:12 UTC (rev 91439)
@@ -0,0 +1,36 @@
+--- NSObject+Extensions.m.orig	2003-12-15 15:17:28.000000000 +1100
++++ NSObject+Extensions.m	2012-04-02 10:04:35.000000000 +1000
+@@ -89,22 +89,23 @@ IMP EDGetFirstUnusedIMPForSelector(Class
+ {
+ #ifndef GNU_RUNTIME
+     IMP						activeIMP;
+-    struct objc_method_list	*mlist;
+     void					*iterator;
+     int						i;
+-
++	Method					*methlist;
++	int						count;
++	
+     if(isClassMethod)
+         aClass = aClass->isa;
+     iterator = 0;
+     activeIMP = [aClass instanceMethodForSelector:aSelector];
+-    while((mlist = class_nextMethodList(aClass, &iterator)) != NULL)
+-        {
+-        for(i = 0; i < mlist->method_count; i++)
+-            {
+-            if((mlist->method_list[i].method_name == aSelector) && (mlist->method_list[i].method_imp != activeIMP))
+-                return mlist->method_list[i].method_imp;
+-            }
+-        }
++	methlist = class_copyMethodList(aClass, &count);
++	for (i = 0; i < count; i++) {
++		if((method_getName(methlist[i]) == aSelector) && (method_getImplementation(methlist[i]) != activeIMP)) {
++			IMP unused = method_getImplementation(methlist[i]);
++			free(methlist);
++		}
++	}
++	free(methlist);
+     return NULL;
+ #else /* GNU_RUNTIME */
+ #warning ** implementation missing for GNU runtime

Added: trunk/dports/games/Gridlock/files/nodelay.patch
===================================================================
--- trunk/dports/games/Gridlock/files/nodelay.patch	                        (rev 0)
+++ trunk/dports/games/Gridlock/files/nodelay.patch	2012-04-02 00:16:12 UTC (rev 91439)
@@ -0,0 +1,10 @@
+--- osdep.h.orig	2003-12-15 15:17:31.000000000 +1100
++++ osdep.h	2012-04-02 09:56:19.000000000 +1000
+@@ -131,6 +131,7 @@ extern int gethostname(char *name, int n
+ 
+ #import <stddef.h>
+ #import <netinet/in.h>
++#import <netinet/tcp.h>
+ #ifndef MAC_OS_X_VERSION_10_2
+ #import <netinet/ip_compat.h>
+ #endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120401/fb489d76/attachment.html>


More information about the macports-changes mailing list