1313# - BZip2.framework-iOS - build BZip2.framework for iOS
1414# - BZip2.framework-tvOS - build BZip2.framework for tvOS
1515# - BZip2.framework-watchOS - build BZip2.framework for watchOS
16- # - XZ.framework-macOS - build XZ.framework for macOS
17- # - XZ.framework-iOS - build XZ.framework for iOS
18- # - XZ.framework-tvOS - build XZ.framework for tvOS
19- # - XZ.framework-watchOS - build XZ.framework for watchOS
2016# - Python.framework-macOS - build Python.framework for macOS
2117# - Python.framework-iOS - build Python.framework for iOS
2218# - Python.framework-tvOS - build Python.framework for tvOS
@@ -37,8 +33,6 @@ OPENSSL_VERSION=$(OPENSSL_VERSION_NUMBER)$(OPENSSL_REVISION)
3733
3834BZIP2_VERSION =1.0.6
3935
40- XZ_VERSION =5.2.2
41-
4236# Supported OS
4337OS =macOS iOS tvOS watchOS
4438
7872distclean : clean
7973 rm -rf downloads
8074
81- downloads : downloads/openssl-$(OPENSSL_VERSION ) .tgz downloads/bzip2-$(BZIP2_VERSION ) .tgz downloads/xz- $( XZ_VERSION ) .tgz downloads/ Python-$(PYTHON_VERSION ) .tgz
75+ downloads : downloads/openssl-$(OPENSSL_VERSION ) .tgz downloads/bzip2-$(BZIP2_VERSION ) .tgz downloads/Python-$(PYTHON_VERSION ) .tgz
8276
8377# ##########################################################################
8478# OpenSSL
@@ -113,20 +107,6 @@ downloads/bzip2-$(BZIP2_VERSION).tgz:
113107 mkdir -p downloads
114108 if [ ! -e downloads/bzip2-$( BZIP2_VERSION) .tgz ]; then curl --fail -L http://www.bzip.org/$( BZIP2_VERSION) /bzip2-$( BZIP2_VERSION) .tar.gz -o downloads/bzip2-$( BZIP2_VERSION) .tgz; fi
115109
116- # ##########################################################################
117- # XZ (LZMA)
118- # ##########################################################################
119-
120- # Clean the XZ project
121- clean-xz :
122- rm -rf build/* /xz-$(XZ_VERSION ) -* \
123- build/* /xz
124-
125- # Download original OpenSSL source code archive.
126- downloads/xz-$(XZ_VERSION ) .tgz :
127- mkdir -p downloads
128- if [ ! -e downloads/xz-$( XZ_VERSION) .tgz ]; then curl --fail -L http://tukaani.org/xz/xz-$( XZ_VERSION) .tar.gz -o downloads/xz-$( XZ_VERSION) .tgz; fi
129-
130110# ##########################################################################
131111# Python
132112# ##########################################################################
@@ -173,7 +153,6 @@ LDFLAGS-$1=-arch $$(ARCH-$1) -isysroot=$$(SDK_ROOT-$1)
173153
174154OPENSSL_DIR-$1=build/$2/openssl-$(OPENSSL_VERSION ) -$1
175155BZIP2_DIR-$1=build/$2/bzip2-$(BZIP2_VERSION ) -$1
176- XZ_DIR-$1=build/$2/xz-$(XZ_VERSION ) -$1
177156PYTHON_DIR-$1=build/$2/Python-$(PYTHON_VERSION ) -$1
178157pyconfig.h-$1=pyconfig-$$(ARCH-$1 ) .h
179158
@@ -229,23 +208,6 @@ $$(BZIP2_DIR-$1)/Makefile: downloads/bzip2-$(BZIP2_VERSION).tgz
229208$$(BZIP2_DIR-$1 ) /libbz2.a: $$(BZIP2_DIR-$1 ) /Makefile
230209 cd $$(BZIP2_DIR-$1 ) && make install
231210
232- # Unpack XZ
233- $$(XZ_DIR-$1 ) /Makefile: downloads/xz-$(XZ_VERSION ) .tgz
234- # Unpack sources
235- mkdir -p $$(XZ_DIR-$1 )
236- tar zxf downloads/xz-$(XZ_VERSION ) .tgz --strip-components 1 -C $$(XZ_DIR-$1 )
237- # Configure the build
238- cd $$(XZ_DIR-$1 ) && ./configure \
239- CC="$$(CC-$1 ) " \
240- LDFLAGS="$$(LDFLAGS-$1 ) " \
241- --disable-shared --enable-static \
242- --host=$$(MACHINE_SIMPLE-$1 ) -apple-darwin \
243- --prefix=$(PROJECT_DIR ) /build/$2/xz
244-
245- # Build XZ
246- $$(XZ_DIR-$1 ) /src/liblzma/.libs/liblzma.a: $$(XZ_DIR-$1 ) /Makefile
247- cd $$(XZ_DIR-$1 ) && make && make install
248-
249211# Unpack Python
250212$$(PYTHON_DIR-$1 ) /Makefile: downloads/Python-$(PYTHON_VERSION ) .tgz $(PYTHON_HOST )
251213 # Unpack target Python
273235endif
274236
275237# Build Python
276- $$(PYTHON_DIR-$1 ) /dist/lib/libpython$(PYTHON_VER ) .a: build/$2/OpenSSL.framework build/$2/BZip2.framework build/$2/XZ.framework $$(PYTHON_DIR-$1 ) /Makefile
238+ $$(PYTHON_DIR-$1 ) /dist/lib/libpython$(PYTHON_VER ) .a: build/$2/OpenSSL.framework build/$2/BZip2.framework $$(PYTHON_DIR-$1 ) /Makefile
277239 # Build target Python
278240 cd $$(PYTHON_DIR-$1 ) && PATH=$(PROJECT_DIR ) /$(PYTHON_DIR-macOS ) /dist/bin:$(PATH ) make all install
279241
@@ -306,7 +268,6 @@ $$(foreach target,$$(TARGETS-$1),$$(eval $$(call build-target,$$(target),$1)))
306268
307269OPENSSL_FRAMEWORK-$1=build/$1/OpenSSL.framework
308270BZIP2_FRAMEWORK-$1=build/$1/BZip2.framework
309- XZ_FRAMEWORK-$1=build/$1/XZ.framework
310271PYTHON_FRAMEWORK-$1=build/$1/Python.framework
311272PYTHON_RESOURCES-$1=$$(PYTHON_FRAMEWORK-$1 ) /Versions/$(PYTHON_VER ) /Resources
312273
@@ -315,7 +276,7 @@ $1: dist/Python-$(PYTHON_VERSION)-$1-support.b$(BUILD_NUMBER).tar.gz
315276clean-$1:
316277 rm -rf build/$1
317278
318- dist/Python-$(PYTHON_VERSION ) -$1-support.b$(BUILD_NUMBER ) .tar.gz: $$(OPENSSL_FRAMEWORK-$1 ) $$(PYTHON_FRAMEWORK-$1 )
279+ dist/Python-$(PYTHON_VER ) -$1-support.b$(BUILD_NUMBER ) .tar.gz: $$( BZIP2_FRAMEWORK-$1 ) $$(OPENSSL_FRAMEWORK-$1 ) $$(PYTHON_FRAMEWORK-$1 )
319280 mkdir -p dist
320281 tar zcvf $$@ -C build/$1 $$(notdir $$^ )
321282
@@ -369,29 +330,6 @@ build/$1/bzip2/lib/libbz2.a: $$(foreach target,$$(TARGETS-$1),$$(BZIP2_DIR-$$(ta
369330 mkdir -p build/$1
370331 xcrun lipo -create -o $$@ $$^
371332
372- # Build XZ.framework
373- XZ.framework-$1: $$(XZ_FRAMEWORK-$1 )
374-
375- $$(XZ_FRAMEWORK-$1 ) : build/$1/xz/lib/liblzma.a
376- # Create framework directory structure
377- mkdir -p $$(XZ_FRAMEWORK-$1 ) /Versions/$(XZ_VERSION )
378-
379- # Copy the headers
380- cp -f -r build/$1/xz/include $$(XZ_FRAMEWORK-$1 ) /Versions/$(XZ_VERSION ) /Headers
381-
382- # Create the fat library
383- xcrun libtool -no_warning_for_no_symbols -static \
384- -o $$(XZ_FRAMEWORK-$1 ) /Versions/$(XZ_VERSION ) /xz $$^
385-
386- # Create symlinks
387- ln -fs $(XZ_VERSION ) $$(XZ_FRAMEWORK-$1 ) /Versions/Current
388- ln -fs Versions/Current/Headers $$(XZ_FRAMEWORK-$1 )
389- ln -fs Versions/Current/xz $$(XZ_FRAMEWORK-$1 )
390-
391- build/$1/xz/lib/liblzma.a: $$(foreach target,$$(TARGETS-$1 ) ,$$(XZ_DIR-$$(target ) ) /src/liblzma/.libs/liblzma.a)
392- mkdir -p build/$1
393- xcrun lipo -create -o $$@ $$^
394-
395333Python.framework-$1: $$(PYTHON_FRAMEWORK-$1 )
396334
397335# Build Python.framework
0 commit comments