summaryrefslogtreecommitdiff
path: root/data/pyobjc/make.sh
diff options
context:
space:
mode:
Diffstat (limited to 'data/pyobjc/make.sh')
-rw-r--r--data/pyobjc/make.sh12
1 files changed, 7 insertions, 5 deletions
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