Skip to content

Commit deb79b8

Browse files
committed
unix: conditional tix building on macOS
1 parent 35796f8 commit deb79b8

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

cpython-unix/build-tix.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,23 @@ cd cpython-source-deps-tix-${TIX_VERSION}
2121
# Yes, really.
2222
chmod +x configure
2323

24+
CFLAGS="-fPIC -DUSE_INTERP_RESULT"
25+
26+
if [ "${PYBUILD_PLATFORM}" = "macos" ]; then
27+
CFLAGS="${CFLAGS} -I${TOOLS_PATH}/deps/include"
28+
EXTRA_CONFIGURE_FLAGS="--without-x"
29+
else
30+
EXTRA_CONFIGURE_FLAGS="--x-includes=/tools/deps/include --x-libraries=/tools/deps/lib"
31+
fi
32+
2433
# -DUSE_INTERP_RESULT is to allow tix to use deprecated fields or something
2534
# like that.
26-
CFLAGS="-fPIC -DUSE_INTERP_RESULT" ./configure \
35+
CFLAGS="${CFLAGS}" ./configure \
2736
--prefix=/tools/deps \
28-
--x-includes=/tools/deps/include \
29-
--x-libraries=/tools/deps/lib \
3037
--with-tcl=${TOOLS_PATH}/deps/lib \
3138
--with-tk=${TOOLS_PATH}/deps/lib \
32-
--enable-shared=no
39+
--enable-shared=no \
40+
${EXTRA_CONFIGURE_FLAGS}
3341

3442
make -j ${NUM_CPUS}
3543
make -j ${NUM_CPUS} install DESTDIR=${ROOT}/out

0 commit comments

Comments
 (0)