Skip to content

Commit

Permalink
Python add tcl/tk dependency (make) for module _tkinter (#6932)
Browse files Browse the repository at this point in the history
  • Loading branch information
Begasus committed May 24, 2022
1 parent 7bed2ef commit bda9fa3
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 16 deletions.
30 changes: 30 additions & 0 deletions dev-lang/python/patches/python3-3.7.12.patchset
Original file line number Diff line number Diff line change
Expand Up @@ -778,3 +778,33 @@ index 3173b3b..88b66ed 100644
--
2.28.0


From 719b6b5d78c02d7eb025ec52d1e71d08c596cce5 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Mon, 23 May 2022 14:53:35 +0200
Subject: Fix search paths for tcl/tk


diff --git a/configure.ac b/configure.ac
index b0cca04..6b708fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3077,8 +3077,13 @@ then
then
AC_MSG_ERROR([use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither])
fi
- TCLTK_INCLUDES=""
- TCLTK_LIBS=""
+ if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
+ TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
+ TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
+ else
+ TCLTK_INCLUDES=""
+ TCLTK_LIBS=""
+ fi
else
TCLTK_INCLUDES="$with_tcltk_includes"
TCLTK_LIBS="$with_tcltk_libs"
--
2.36.1

Original file line number Diff line number Diff line change
Expand Up @@ -787,3 +787,33 @@ index 062ca45..ac29f71 100644
--
2.30.2


From a65ae93e0be3e998c5e47210107ea2bcbe985c4f Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Mon, 23 May 2022 12:41:29 +0200
Subject: Fix search paths for tcl/tk


diff --git a/configure.ac b/configure.ac
index b7731f8..d8806df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3096,8 +3096,13 @@ then
then
AC_MSG_ERROR([use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither])
fi
- TCLTK_INCLUDES=""
- TCLTK_LIBS=""
+ if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
+ TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
+ TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
+ else
+ TCLTK_INCLUDES=""
+ TCLTK_LIBS=""
+ fi
else
TCLTK_INCLUDES="$with_tcltk_includes"
TCLTK_LIBS="$with_tcltk_libs"
--
2.36.1

30 changes: 30 additions & 0 deletions dev-lang/python/patches/python39-3.9.10.patchset
Original file line number Diff line number Diff line change
Expand Up @@ -807,3 +807,33 @@ index 29d6126..aa1ad57 100644
--
2.30.2


From c1e2fc1180e777bd61cd01d763e3cf425ef62578 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Mon, 23 May 2022 08:45:31 +0200
Subject: Fix search paths for tcl/tk


diff --git a/configure.ac b/configure.ac
index 90c19a2..ad979e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3202,8 +3202,13 @@ then
then
AC_MSG_ERROR([use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither])
fi
- TCLTK_INCLUDES=""
- TCLTK_LIBS=""
+ if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
+ TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
+ TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
+ else
+ TCLTK_INCLUDES=""
+ TCLTK_LIBS=""
+ fi
else
TCLTK_INCLUDES="$with_tcltk_includes"
TCLTK_LIBS="$with_tcltk_libs"
--
2.36.1

12 changes: 6 additions & 6 deletions dev-lang/python/python3-3.7.12.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OSI-approved open source license."
HOMEPAGE="https://www.python.org"
LICENSE="Python"
COPYRIGHT="1990-2018 Python Software Foundation"
REVISION="1"
REVISION="2"
SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz"
CHECKSUM_SHA256="f77bf7fb47839f213e5cbf7827281078ea90de7e72b44f10d7ef385ea8c43210"
SOURCE_DIR="Python-$portVersion"
Expand Down Expand Up @@ -66,6 +66,7 @@ REQUIRES="
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libbz2$secondaryArchSuffix
devel:libexpat$secondaryArchSuffix
devel:libffi$secondaryArchSuffix
Expand All @@ -74,16 +75,17 @@ BUILD_REQUIRES="
devel:libssl$secondaryArchSuffix
devel:libedit$secondaryArchSuffix
devel:libsqlite3$secondaryArchSuffix
devel:libtclstub8.6$secondaryArchSuffix
devel:libtk8.6$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:aclocal
cmd:autoconf
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:libtoolize$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
cmd:make
"
Expand All @@ -97,9 +99,7 @@ BUILD()
export CFLAGS="-D_BSD_SOURCE"
rm -Rf Modules/expat

libtoolize --force --copy --install
aclocal
autoconf
autoreconf -fi
export OPT=""
runConfigure --omit-dirs binDir,includeDir ./configure \
--enable-shared --without-ensurepip --with-system-ffi \
Expand Down
4 changes: 3 additions & 1 deletion dev-lang/python/python310-3.10.2.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OSI-approved open source license."
HOMEPAGE="https://www.python.org"
LICENSE="Python"
COPYRIGHT="1990-2021 Python Software Foundation"
REVISION="1"
REVISION="2"
SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz"
CHECKSUM_SHA256="17de3ac7da9f2519aa9d64378c603a73a0e9ad58dffa8812e45160c086de64c7"
SOURCE_DIR="Python-$portVersion"
Expand Down Expand Up @@ -66,6 +66,8 @@ BUILD_REQUIRES="
devel:libssl$secondaryArchSuffix
devel:libedit$secondaryArchSuffix
devel:libsqlite3$secondaryArchSuffix
devel:libtclstub8.6$secondaryArchSuffix
devel:libtk8.6$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
Expand Down
16 changes: 8 additions & 8 deletions dev-lang/python/python38-3.8.12.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ OSI-approved open source license."
HOMEPAGE="https://www.python.org"
LICENSE="Python"
COPYRIGHT="1990-2020 Python Software Foundation"
REVISION="1"
REVISION="2"
SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz"
CHECKSUM_SHA256="b1d3a76420375343b5e8a22fceb1ac65b77193e9ed27146524f0a9db058728ea"
SOURCE_DIR="Python-$portVersion"
PATCHES="python3-$portVersion.patchset"
PATCHES="python38-$portVersion.patchset"
if [ "$secondaryArchSuffix" = _x86 ] ; then
PATCHES+="
python3_x86-$portVersion.patchset
python38_x86-$portVersion.patchset
"
fi

Expand Down Expand Up @@ -57,6 +57,7 @@ REQUIRES="
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libbz2$secondaryArchSuffix
devel:libexpat$secondaryArchSuffix
devel:libffi$secondaryArchSuffix
Expand All @@ -65,17 +66,18 @@ BUILD_REQUIRES="
devel:libssl$secondaryArchSuffix
devel:libedit$secondaryArchSuffix
devel:libsqlite3$secondaryArchSuffix
devel:libtclstub8.6$secondaryArchSuffix
devel:libtk8.6$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
autoconf_archive
cmd:aclocal
cmd:autoconf
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:libtoolize$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
cmd:make
"
Expand All @@ -89,9 +91,7 @@ BUILD()
export CFLAGS="-D_BSD_SOURCE"
rm -Rf Modules/expat

libtoolize --force --copy --install
aclocal
autoconf
autoreconf -fi
export OPT=""

runConfigure --omit-dirs binDir,includeDir ./configure \
Expand Down
4 changes: 3 additions & 1 deletion dev-lang/python/python39-3.9.10.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OSI-approved open source license."
HOMEPAGE="https://www.python.org"
LICENSE="Python"
COPYRIGHT="1990-2020 Python Software Foundation"
REVISION="4"
REVISION="5"
SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz"
CHECKSUM_SHA256="0a8fbfb5287ebc3a13e9baf3d54e08fa06778ffeccf6311aef821bb3a6586cc8"
SOURCE_DIR="Python-$portVersion"
Expand Down Expand Up @@ -66,6 +66,8 @@ BUILD_REQUIRES="
devel:libssl$secondaryArchSuffix
devel:libedit$secondaryArchSuffix
devel:libsqlite3$secondaryArchSuffix
devel:libtclstub8.6$secondaryArchSuffix
devel:libtk8.6$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
Expand Down

0 comments on commit bda9fa3

Please sign in to comment.