Skip to content

Commit 1989b8c

Browse files
committed
build.sh: Vendor libffi
This is needed in recoveryOS, where native libffi is missing. Signed-off-by: Hector Martin <[email protected]>
1 parent 7bc5bf8 commit 1989b8c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

build.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ M1N1="$PWD/m1n1"
1313
ARTWORK="$PWD/artwork"
1414
AFW="$PWD/asahi_firmware"
1515
SRC="$PWD/src"
16+
VENDOR="$PWD/vendor"
1617
DL="$PWD/dl"
1718
PACKAGE="$PWD/package"
1819
RELEASES="$PWD/releases"
@@ -64,10 +65,15 @@ mkdir -p "$PACKAGE/Frameworks/Python.framework"
6465
7z x -so "$DL/$PYTHON_PKG" Python_Framework.pkg/Payload | zcat | \
6566
cpio -i -D "$PACKAGE/Frameworks/Python.framework"
6667

67-
echo "Slimming down Python..."
6868

6969
cd "$PACKAGE/Frameworks/Python.framework/Versions/Current"
7070

71+
echo "Copying vendored libffi into Python framework..."
72+
73+
cp -P "$VENDOR"/libffi/* lib/
74+
75+
echo "Slimming down Python..."
76+
7177
rm -rf include share
7278
cd lib
7379
rm -rf -- tdb* tk* Tk* libtk* *tcl*
@@ -76,6 +82,7 @@ rm -rf test ensurepip idlelib
7682
cd lib-dynload
7783
rm -f _test* _tkinter*
7884

85+
7986
echo "Copying certificates..."
8087

8188
certs="$(python3 -c 'import certifi; print(certifi.where())')"

0 commit comments

Comments
 (0)