File tree Expand file tree Collapse file tree 5 files changed +15
-39
lines changed Expand file tree Collapse file tree 5 files changed +15
-39
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ sed "${sed_args[@]}" "s|/tools/host|${TOOLS_PATH}/host|g" ${TOOLS_PATH}/host/sha
44
44
# We force linking of external static libraries by removing the shared
45
45
# libraries. This is hacky. But we're building in a temporary container
46
46
# and it gets the job done.
47
- find ${TOOLS_PATH} /deps -name ' *.so*' -exec rm {} \;
47
+ find ${TOOLS_PATH} /deps -name ' *.so*' -a \! \( -name ' libtcl*.so* ' -or -name ' libtk*.so* ' \) - exec rm {} \;
48
48
49
49
tar -xf Python-${PYTHON_VERSION} .tar.xz
50
50
@@ -1253,6 +1253,7 @@ if [ -d "${TOOLS_PATH}/deps/lib/tcl8" ]; then
1253
1253
1254
1254
if [[ " ${PYBUILD_PLATFORM} " != macos* ]]; then
1255
1255
cp -av ${TOOLS_PATH} /deps/lib/Tix8.4.3 ${ROOT} /out/python/install/lib/
1256
+ cp -av ${TOOLS_PATH} /deps/lib/lib* .so ${ROOT} /out/python/install/lib/
1256
1257
fi
1257
1258
fi
1258
1259
Original file line number Diff line number Diff line change @@ -20,9 +20,8 @@ if [ -n "${STATIC}" ]; then
20
20
# `checking whether musl-clang accepts -g...` fails with a duplicate definition error
21
21
TARGET_TRIPLE=" $( echo " ${TARGET_TRIPLE} " | sed -e ' s/-unknown-linux-musl/-unknown-linux-gnu/g' ) "
22
22
fi
23
- fi
24
23
25
- patch -p1 << 'EOF '
24
+ patch -p1 << 'EOF '
26
25
diff --git a/unix/Makefile.in b/unix/Makefile.in
27
26
--- a/unix/Makefile.in
28
27
+++ b/unix/Makefile.in
@@ -36,6 +35,7 @@ diff --git a/unix/Makefile.in b/unix/Makefile.in
36
35
fi; \
37
36
fi; \
38
37
EOF
38
+ fi
39
39
40
40
# Remove packages we don't care about and can pull in unwanted symbols.
41
41
rm -rf pkgs/sqlite* pkgs/tdbc*
@@ -48,12 +48,14 @@ CFLAGS="${CFLAGS}" CPPFLAGS="${CFLAGS}" LDFLAGS="${EXTRA_TARGET_LDFLAGS}" ./conf
48
48
--build=${BUILD_TRIPLE} \
49
49
--host=${TARGET_TRIPLE} \
50
50
--prefix=/tools/deps \
51
- --enable-shared=no \
51
+ --enable-shared" ${STATIC : + =no} " \
52
52
--enable-threads
53
53
54
54
make -j ${NUM_CPUS}
55
55
make -j ${NUM_CPUS} install DESTDIR=${ROOT} /out
56
56
make -j ${NUM_CPUS} install-private-headers DESTDIR=${ROOT} /out
57
57
58
- # For some reason libtcl*.a have weird permissions. Fix that.
59
- chmod 644 ${ROOT} /out/tools/deps/lib/libtcl* .a
58
+ if [ -n " ${STATIC} " ]; then
59
+ # For some reason libtcl*.a have weird permissions. Fix that.
60
+ chmod 644 ${ROOT} /out/tools/deps/lib/libtcl* .a
61
+ fi
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ CFLAGS="${CFLAGS}" CPPFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" ./configure \
31
31
--host=${TARGET_TRIPLE} \
32
32
--prefix=/tools/deps \
33
33
--with-tcl=${TOOLS_PATH} /deps/lib \
34
- --enable-shared=no \
34
+ --enable-shared" ${STATIC : + =no} " \
35
35
--enable-threads \
36
36
${EXTRA_CONFIGURE_FLAGS}
37
37
@@ -54,6 +54,8 @@ make -j ${NUM_CPUS} install DESTDIR=${ROOT}/out
54
54
make -j ${NUM_CPUS} install-private-headers DESTDIR=${ROOT} /out
55
55
56
56
# For some reason libtk*.a have weird permissions. Fix that.
57
- chmod 644 /${ROOT} /out/tools/deps/lib/libtk* .a
57
+ if [ -n " ${STATIC} " ]; then
58
+ chmod 644 /${ROOT} /out/tools/deps/lib/libtk* .a
59
+ fi
58
60
59
61
rm ${ROOT} /out/tools/deps/bin/wish*
Original file line number Diff line number Diff line change @@ -679,40 +679,11 @@ _tkinter:
679
679
- WITH_APPINIT
680
680
includes-deps :
681
681
- include/X11
682
+ build-mode : shared
682
683
links :
683
684
- tcl8.6
684
685
- tk8.6
685
686
686
- # Without -ObjC, we get a crash: -[TKApplication tkProcessEvent:]: unrecognized selector sent to instance.
687
- # See also https://core.tcl-lang.org/tk/tktview/85f316beb15108ac43b03fa6c8608e31f3ae5f92.
688
- # This is apparently an issue with static linking Objective-C binaries.
689
- linker-args :
690
- - args : ["-ObjC"]
691
- targets :
692
- - .*-apple-darwin
693
- links-conditional :
694
- - name : X11
695
- targets :
696
- - .*-unknown-linux-.*
697
- - name : xcb
698
- targets :
699
- - .*-unknown-linux-.*
700
- - name : Xau
701
- targets :
702
- - .*-unknown-linux-.*
703
- # Many of these are dependencies of libtcl and libtk.
704
- frameworks :
705
- - AppKit
706
- - ApplicationServices
707
- - Carbon
708
- - Cocoa
709
- - CoreFoundation
710
- - CoreServices
711
- - CoreGraphics
712
- - IOKit
713
- - QuartzCore
714
- - UniformTypeIdentifiers
715
-
716
687
_tokenize :
717
688
minimum-python-version : " 3.11"
718
689
config-c-only : true
Original file line number Diff line number Diff line change @@ -822,7 +822,7 @@ const GLOBAL_EXTENSIONS_WINDOWS_PRE_3_13: &[&str] = &["_msi"];
822
822
const GLOBAL_EXTENSIONS_WINDOWS_NO_STATIC : & [ & str ] = & [ "_testinternalcapi" , "_tkinter" ] ;
823
823
824
824
/// Extension modules that should be built as shared libraries.
825
- const SHARED_LIBRARY_EXTENSIONS : & [ & str ] = & [ "_crypt" ] ;
825
+ const SHARED_LIBRARY_EXTENSIONS : & [ & str ] = & [ "_crypt" , "_tkinter" ] ;
826
826
827
827
const PYTHON_VERIFICATIONS : & str = include_str ! ( "verify_distribution.py" ) ;
828
828
You can’t perform that action at this time.
0 commit comments