-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
79 lines (70 loc) · 2.94 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
MACHER=/usr/local/bin/macher
ZLIB=Zlib.framework/Versions/Current/lib/libz.dylib
READLINE=Readline.framework/Versions/Current/lib/libreadline.dylib
SSL=OpenSSL.framework/Versions/Current/lib/libssl.dylib
CRYPTO=OpenSSL.framework/Versions/Current/lib/libcrypto.dylib
TCL_FRAMEWORK=Frameworks/Tcl.framework
TCL_VERSION_DIR=${TCL_FRAMEWORK}/Versions/Current
TCL_LIB=${TCL_VERSION_DIR}/Tcl
TK_FRAMEWORK=Frameworks/Tk.framework
TK_VERSION_DIR=${TK_FRAMEWORK}/Versions/Current
TK_LIB=${TK_VERSION_DIR}/Tk
WISH=${TK_VERSION_DIR}/Resources/Wish.app
PYTHON_VERSION=3.12
PYTHON_LIB=Frameworks/Python.framework/Versions/${PYTHON_VERSION}/lib/python${PYTHON_VERSION}
LIB_DYNLOAD=${PYTHON_LIB}/lib-dynload
PYTHON_EXE=Frameworks/Python.framework/Versions/Current/bin/python${PYTHON_VERSION}
RESOURCES=Frameworks/Python.framework/Versions/${PYTHON_VERSION}/Resources
CONFIG=${PYTHON_LIB}/config-${PYTHON_VERSION}-darwin
all: Setup Zlib Readline OpenSSL TclTk Python
.PHONY: Setup Zlib Readline OpenSSL TclTk Python Tarball
Setup:
mkdir -p Frameworks
Zlib:
rm -rf Zlib/dist
bash Zlib/build_zlib.sh
find Zlib/dist/Zlib.framework -name '*.a' -delete
rm -rf Frameworks/Zlib.framework
mv Zlib/dist/Zlib.framework Frameworks
${MACHER} set_id @rpath/libz.dylib Frameworks/${ZLIB}
Readline:
rm -rf Readline/dist
bash Readline/build_readline.sh
find Readline/dist/Readline.framework -name '*.a' -delete
rm -rf Frameworks/Readline.framework
mv Readline/dist/Readline.framework Frameworks
${MACHER} set_id @rpath/libreadline.dylib Frameworks/${READLINE}
OpenSSL:
rm -rf OpenSSL/dist
bash OpenSSL/build_openssl.sh
find OpenSSL/dist/OpenSSL.framework -name '*.a' -delete
rm -rf Frameworks/OpenSSL.framework
mv OpenSSL/dist/OpenSSL.framework Frameworks
${MACHER} set_id @rpath/libssl.dylib Frameworks/${SSL}
${MACHER} edit_libpath @loader_path/libcrypto.dylib Frameworks/${SSL}
${MACHER} set_id @rpath/libcrypto.dylib Frameworks/${CRYPTO}
TclTk:
rm -rf TclTk/dist
bash TclTk/build_tcltk.sh
find TclTk/dist/Frameworks/Tcl.framework -name '*.a' -delete
find TclTk/dist/Frameworks/Tk.framework -name '*.a' -delete
rm -rf ${TCL_FRAMEWORK}
rm -rf ${TK_FRAMEWORK}
mv TclTk/dist/Frameworks/Tcl.framework Frameworks
mv TclTk/dist/Frameworks/Tk.framework Frameworks
chmod +w ${TCL_LIB} ${TK_LIB}
${MACHER} set_id @rpath/Tcl ${TCL_LIB}
${MACHER} set_id @rpath/Tk ${TK_LIB}
rm -rf ${WISH}
rm ${TCL_FRAMEWORK}/{PrivateHeaders,Tcl,tclConfig.sh}
mv ${TCL_VERSION_DIR}/{tclConfig.sh,tclooConfig.sh} ${TCL_VERSION_DIR}/Resources
rm ${TK_FRAMEWORK}/{PrivateHeaders,Tk,tkConfig.sh}
mv ${TK_VERSION_DIR}/tkConfig.sh ${TK_VERSION_DIR}/Resources
Python:
bash Python-${PYTHON_VERSION}/build_python.sh
find Python-${PYTHON_VERSION}/dist/Python.framework -name '*.a' -delete
rm -rf Frameworks/Python.framework
mv Python-${PYTHON_VERSION}/dist/Python.framework Frameworks
Tarball:
tar cfz Frameworks-${PYTHON_VERSION}.tgz Frameworks
shasum Frameworks-${PYTHON_VERSION}.tgz > Frameworks-${PYTHON_VERSION}.sha1