diff options
author | davilla <davilla@4pi.com> | 2011-10-07 20:32:42 -0400 |
---|---|---|
committer | davilla <davilla@4pi.com> | 2011-10-07 20:38:29 -0400 |
commit | fd7bea10a58fd1b81b1715e6f83f5e8bea540b32 (patch) | |
tree | 97dd5226f62694a295deda37a1918b54e8d85bdd /tools | |
parent | 62798c735e186fe334a387d3a9871e5563ddef98 (diff) |
[osx/ios] fixed build of script.module.pil, this also add the ability to cross-build any python module
Diffstat (limited to 'tools')
-rw-r--r-- | tools/darwin/depends/Makefile.in | 3 | ||||
-rw-r--r-- | tools/darwin/depends/distribute/Makefile | 32 | ||||
-rw-r--r-- | tools/darwin/depends/distutilscross/Makefile | 32 | ||||
-rw-r--r-- | tools/darwin/depends/python26/Makefile.ios | 5 | ||||
-rw-r--r-- | tools/darwin/depends/python26/Makefile.osx | 13 |
5 files changed, 81 insertions, 4 deletions
diff --git a/tools/darwin/depends/Makefile.in b/tools/darwin/depends/Makefile.in index cb2d6db14a..9109db72c0 100644 --- a/tools/darwin/depends/Makefile.in +++ b/tools/darwin/depends/Makefile.in @@ -13,7 +13,8 @@ SUBDIRS := \ libmicrohttpd libmodplug libbluray libyajl \ libgpg-error libgcrypt afpfs-ng \ libplist libshairport \ - samba python26 mysqlclient boost \ + samba python26 distribute distutilscross \ + mysqlclient boost \ ifeq ($(DARWIN), ios) EXCLUDED = libcrystalhd libGLEW libsdl libsdl_mixer libsdl_image diff --git a/tools/darwin/depends/distribute/Makefile b/tools/darwin/depends/distribute/Makefile new file mode 100644 index 0000000000..7b1b5954db --- /dev/null +++ b/tools/darwin/depends/distribute/Makefile @@ -0,0 +1,32 @@ +include ../Makefile.include + +# lib name, version +APPNAME=distribute +VERSION=0.6.21 +SOURCE=$(APPNAME)-$(VERSION) +ARCHIVE=$(SOURCE).tar.gz + +# configuration settings +export PATH:=$(TOOLCHAIN)/bin:$(PATH) + +APP=$(SOURCE)/bin/$(APPNAME) +APPBIN=$(TOOLCHAIN)/bin/$(APPNAME) + +all: $(APPBIN) + +$(TARBALLS_LOCATION)/$(ARCHIVE): + $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) + +$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) + rm -rf $(SOURCE) + $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + echo $(SOURCE) > .gitignore + +$(APPBIN): $(SOURCE) + cd $(SOURCE); $(TOOLCHAIN)/bin/python setup.py install --prefix=$(TOOLCHAIN) + +clean: + rm -rf $(SOURCE) + +distclean:: + rm -rf $(SOURCE) diff --git a/tools/darwin/depends/distutilscross/Makefile b/tools/darwin/depends/distutilscross/Makefile new file mode 100644 index 0000000000..63527081ee --- /dev/null +++ b/tools/darwin/depends/distutilscross/Makefile @@ -0,0 +1,32 @@ +include ../Makefile.include + +# lib name, version +APPNAME=distutilscross +VERSION=0.1 +SOURCE=$(APPNAME)-$(VERSION) +ARCHIVE=$(SOURCE).tar.gz + +# configuration settings +export PATH:=$(TOOLCHAIN)/bin:$(PATH) + +APP=$(SOURCE)/bin/$(APPNAME) +APPBIN=$(TOOLCHAIN)/bin/$(APPNAME) + +all: $(APPBIN) + +$(TARBALLS_LOCATION)/$(ARCHIVE): + $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) + +$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) + rm -rf $(SOURCE) + $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + echo $(SOURCE) > .gitignore + +$(APPBIN): $(SOURCE) + cd $(SOURCE); $(TOOLCHAIN)/bin/python setup.py install --prefix=$(TOOLCHAIN) + +clean: + rm -rf $(SOURCE) + +distclean:: + rm -rf $(SOURCE) diff --git a/tools/darwin/depends/python26/Makefile.ios b/tools/darwin/depends/python26/Makefile.ios index 01d1323c1a..b07b41367c 100644 --- a/tools/darwin/depends/python26/Makefile.ios +++ b/tools/darwin/depends/python26/Makefile.ios @@ -12,14 +12,14 @@ ARCHIVE=$(SOURCE).tar.bz2 # configuration settings CONFIGURE=./configure --prefix=$(PREFIX) --enable-shared \ - --disable-toolbox-glue + --disable-toolbox-glue --disable-framework CONFIGURE_NATIVE= CFLAGS="" CXXFLAGS="" LDFLAGS="" CPPFLAGS="" \ CPP="/usr/bin/cpp" \ CC="gcc-4.2" \ CXX="g++-4.2" \ LD="ld" \ - ./configure + ./configure --prefix=$(TOOLCHAIN) --enable-shared --disable-toolbox-glue --disable-framework LIBDYLIB=$(SOURCE)/libpython2.6.dylib @@ -39,6 +39,7 @@ $(LIBDYLIB): $(TARBALLS_LOCATION)/$(ARCHIVE) cd $(SOURCE); mv python.exe hostpython cd $(SOURCE); mv Parser/pgen Parser/hostpgen cd $(SOURCE); mv libpython2.6.a hostlibpython2.6.a + cd $(SOURCE); make install HOSTPYTHON=./hostpython cd $(SOURCE); make distclean cd $(SOURCE); patch -p1 <../Python-2.6.5-xcompile.patch cd $(SOURCE); $(CONFIGURE) diff --git a/tools/darwin/depends/python26/Makefile.osx b/tools/darwin/depends/python26/Makefile.osx index 51c115d7bf..f923940653 100644 --- a/tools/darwin/depends/python26/Makefile.osx +++ b/tools/darwin/depends/python26/Makefile.osx @@ -9,7 +9,14 @@ ARCHIVE=$(SOURCE).tar.bz2 # configuration settings export OPT=$(CFLAGS) CONFIGURE=./configure --prefix=$(PREFIX) \ - --enable-shared --disable-toolbox-glue --enable-unicode=ucs4 + --enable-shared --disable-toolbox-glue --disable-framework --enable-unicode=ucs4 + +CONFIGURE_NATIVE= CFLAGS="" CXXFLAGS="" LDFLAGS="" CPPFLAGS="" \ + CPP="/usr/bin/cpp" \ + CC="gcc-4.2" \ + CXX="g++-4.2" \ + LD="ld" \ + ./configure --prefix=$(TOOLCHAIN) --enable-shared --disable-toolbox-glue --disable-framework LIBDYLIB=$(SOURCE)/libpython2.6.dylib @@ -24,6 +31,10 @@ $(LIBDYLIB): $(TARBALLS_LOCATION)/$(ARCHIVE) echo $(SOURCE) > .gitignore # http://bugs.python.org/issue6869 cd $(SOURCE); patch -p1 < ../Python-2.6-ctypes.patch + cd $(SOURCE); $(CONFIGURE_NATIVE) + cd $(SOURCE); make -j $(MAKE_JOBS) + cd $(SOURCE); make install + cd $(SOURCE); make distclean cd $(SOURCE); $(CONFIGURE) # python2.6 has an issue detecting and using the same version of openssl in configure and setup.py # this forces python2.6 hashlib to be compatible with osx 10.4 boxes. |