summaryrefslogtreecommitdiff
path: root/data/pyobjc
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-04-06 10:28:29 +0000
committerJay Freeman <saurik@saurik.com>2008-04-06 10:28:29 +0000
commitd699a01fabaa04a1aad60f6ca5777f82ee24839a (patch)
tree1eb62bad23b14a0877c5b9171f2a5f9358c8d592 /data/pyobjc
parent8a49e427447f40fdd43fc4b5f513b166dd639e2a (diff)
Drastic, sweeping modifications to support iPhone 1.2.0/2.0.
git-svn-id: http://svn.telesphoreo.org/trunk@199 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/pyobjc')
-rw-r--r--data/pyobjc/cfnetwork.diff11
-rw-r--r--data/pyobjc/make.sh12
-rw-r--r--data/pyobjc/port.diff2
3 files changed, 19 insertions, 6 deletions
diff --git a/data/pyobjc/cfnetwork.diff b/data/pyobjc/cfnetwork.diff
new file mode 100644
index 000000000..03c1de914
--- /dev/null
+++ b/data/pyobjc/cfnetwork.diff
@@ -0,0 +1,11 @@
+diff -ru pyobjc-1946/pyobjc-core/Modules/objc/pointer-support.m pyobjc-1946+iPhone/pyobjc-core/Modules/objc/pointer-support.m
+--- pyobjc-1946/pyobjc-core/Modules/objc/pointer-support.m 2007-11-01 13:04:34.000000000 +0000
++++ pyobjc-1946+iPhone/pyobjc-core/Modules/objc/pointer-support.m 2008-03-27 10:59:08.000000000 +0000
+@@ -22,6 +22,7 @@
+
+
+ #import <CoreFoundation/CoreFoundation.h>
++#import <CFNetwork/CFNetwork.h>
+
+ struct wrapper {
+ const char* signature;
diff --git a/data/pyobjc/make.sh b/data/pyobjc/make.sh
index 8342d7232..587ee450e 100644
--- a/data/pyobjc/make.sh
+++ b/data/pyobjc/make.sh
@@ -1,17 +1,19 @@
+shopt -s extglob
+
pkg:extract
cd *
pkg:patch
cd pyobjc-core
-$(arm-apple-darwin-gcc -print-prog-name=cc1obj) -print-objc-runtime-info <(echo) >Modules/objc/objc-runtime-info.h
+$("${PKG_TARG}-gcc" -print-prog-name=cc1obj) -print-objc-runtime-info <(echo) >Modules/objc/objc-runtime-info.h
-find Modules/objc -name '*.m' -print0 | while read -d $'\0' -r m; do
+find Modules/objc/!(test) -name '*.m' -print0 | while read -d $'\0' -r m; do
o=${m%.m}.o
mi=${m%.m}.mi
- arm-apple-darwin-gcc -O0 -g3 -I"${PKG_ROOT}"/usr/include/{libxml2,python2.5} -ObjC -c -o "$o" "$m" -DNO_OBJC2_RUNTIME -IModules/objc -fno-common
-done
+ ${PKG_TARG}-gcc -O2 -I"$(PKG_DEST_ libxml2)"/usr/include/libxml2 -I"$(PKG_DEST_ python)"/usr/include/python2.5 -ObjC -c -o "$o" "$m" -IModules/objc -fno-common || exit 1
+done || exit 1
-arm-apple-darwin-gcc -O0 -g3 -dynamiclib -lpython2.5 -o _objc.dylib Modules/objc/*.o -lobjc -lffi -lxml2 -framework CoreFoundation -framework Foundation
+${PKG_TARG}-gcc -O2 -dynamiclib -lpython2.5 -o _objc.dylib Modules/objc/*.o -lobjc -lffi -lxml2 -framework CoreFoundation -framework Foundation
pkg: mkdir -p /usr/lib/python2.5/lib-dynload
pkg: cp -a _objc.dylib /usr/lib/python2.5/lib-dynload
diff --git a/data/pyobjc/port.diff b/data/pyobjc/port.diff
index 53880d5fe..3403d22ab 100644
--- a/data/pyobjc/port.diff
+++ b/data/pyobjc/port.diff
@@ -118,7 +118,7 @@ Index: pyobjc/pyobjc-core/Modules/objc/objc-runtime-compat.h
#define objc_superGetReceiver(super) ((super).receiver)
-#ifdef __OBJC2__
-+#ifdef __cplusplus
++#if defined(__OBJC2__) || defined(__cplusplus)
#define objc_superSetClass(super, cls) (super).super_class = (cls)
#define objc_superGetClass(super) ((super).super_class)