Skip to contentSkip to conversation

tcl: correct the header location in tcl.pc

PATCH New [email protected] 1 participant 2 messages Nov 22, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tcl: correct the header location in tcl.pc

From: Mingli Yu <[email protected]>

The patch alter-includedir.patch previouly install the header to /usr/include/tcl8.6, but it doesn't reflect in tcl.pc and the header location still /usr/include in tcl.pc and result in the below configure failure for other packages such as python3 which depends on tcl and uses pkg-config to detect tcl.

| conftest.c:161:16: fatal error: tcl.h: No such file or directory
161 | #include <tcl.h>

So update alter-includedir.patch to correct the header location in tcl.pc to keep consistency.

---
 .../tcltk/tcl/alter-includedir.patch          | 38 +++++++++++++++----
 1 file changed, 30 insertions(+), 8 deletions(-)
meta/recipes-devtools/tcltk/tcl/alter-includedir.patch +30 -8
index 5b25af2c0c..26c9b0d7fa 100644
@@ -1,3 +1,8 @@
+From c6960f4ca82a153416d138221dd2426475aed683 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <[email protected]>
+Date: Tue, 22 Nov 2022 18:48:27 +0800
+Subject: [PATCH] tcl: update the header location
+
 Lets install the include header and private header files into
 usr/include/tcl8.6 when version of tcl is 8.6.x
 
@@ -7,17 +12,21 @@ Signed-off-by: Khem Raj <[email protected]>
 
 Fixed the TCL_INCLUDE_SPEC
 
+Also update the header location in tcl.pc to correct the header
+location in case some package such python3 which use pkg-config
+to detect tcl doesn't find the header.
+
 Signed-off-by: Robert Yang <[email protected]>
 Signed-off-by: Yi Zhao <[email protected]>
-
+Signed-off-by: Mingli Yu <[email protected]>
 ---
- Makefile.in  | 2 +-
- configure    | 4 ++--
- configure.in | 4 ++--
- 3 files changed, 5 insertions(+), 5 deletions(-)
+ unix/Makefile.in  | 2 +-
+ unix/configure.in | 4 ++--
+ unix/tcl.pc.in    | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
 
-diff --git a/Makefile.in b/Makefile.in
-index 0370491..daa569a 100644
+diff --git a/unix/Makefile.in b/unix/Makefile.in
+index 0ebac43..b0c3ee0 100644
 --- a/unix/Makefile.in
 +++ b/unix/Makefile.in
 @@ -57,7 +57,7 @@ SCRIPT_INSTALL_DIR	= $(INSTALL_ROOT)$(TCL_LIBRARY)
@@ -29,7 +38,7 @@ index 0370491..daa569a 100644
  
  # Path to the private tcl header dir:
  PRIVATE_INCLUDE_DIR	= @PRIVATE_INCLUDE_DIR@
-diff --git a/configure.in b/configure.in
+diff --git a/unix/configure.in b/unix/configure.in
 index 9f96e2b..e323e02 100644
 --- a/unix/configure.in
 +++ b/unix/configure.in
@@ -51,6 +60,19 @@ index 9f96e2b..e323e02 100644
  
  #------------------------------------------------------------------------
  # tclConfig.sh refers to this by a different name
+diff --git a/unix/tcl.pc.in b/unix/tcl.pc.in
+index 846cb11..72ca44b 100644
+--- a/unix/tcl.pc.in
++++ b/unix/tcl.pc.in
+@@ -3,7 +3,7 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+-includedir=@includedir@
++includedir=@includedir@/tcl@PACKAGE_VERSION@
+ 
+ Name: Tool Command Language
+ Description: Tcl is a powerful, easy-to-learn dynamic programming language, suitable for a wide range of uses.
 -- 
 2.25.1
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 python3: make tkinter avaiable when enabled

From: Mingli Yu <[email protected]>

After Python upgrade to 3.11, it requires pkg-config to detect tcl and tk when configure tkinter, so add tcl depends to fix below error.

| The necessary bits to build these optional modules were not found:
| _tkinter

---
 meta/recipes-devtools/python/python3/python3-manifest.json | 1 +
 meta/recipes-devtools/python/python3_3.11.0.bb             | 1 +
 2 files changed, 2 insertions(+)
meta/recipes-devtools/python/python3/python3-manifest.json +1 -0
index 7b6f509a45..be8d177340 100644
@@ -1174,6 +1174,7 @@
             "core"
         ],
         "files": [
+            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/tkinter"
         ],
         "cached": []
meta/recipes-devtools/python/python3_3.11.0.bb +1 -0
index aea2b0b43c..ece28ecf44 100644
@@ -104,6 +104,7 @@ PACKAGECONFIG[editline] = "--with-readline=editline,,libedit,,,readline"
 # Use profile guided optimisation by running PyBench inside qemu-user
 PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native"
 PACKAGECONFIG[tk] = ",,tk"
+PACKAGECONFIG[tcl] = ",,tcl"
 PACKAGECONFIG[gdbm] = ",,gdbm"
 PACKAGECONFIG[lto] = "--with-lto,,"
 
Signature · 1 line
2.25.1