1From 3130dca60636dc12d0d12df75b002fd123349e21 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Tue, 22 Nov 2022 18:48:27 +0800
4Subject: [PATCH] tcl: update the header location
5
6Lets install the include header and private header files into
7usr/include/tcl8.6 when version of tcl is 8.6.x
8
9Upstream-Status: Inappropriate [Configuration Specific]
10
11Signed-off-by: Khem Raj <raj.khem@gmai.com>
12
13Fixed the TCL_INCLUDE_SPEC
14
15Also update the header location in tcl.pc to correct the header
16location in case some package such python3 which use pkg-config
17to detect tcl doesn't find the header.
18
19Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
20Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
21Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
22---
23 unix/Makefile.in  | 2 +-
24 unix/configure.in | 4 ++--
25 unix/tcl.pc.in    | 2 +-
26 3 files changed, 4 insertions(+), 4 deletions(-)
27
28diff --git a/unix/Makefile.in b/unix/Makefile.in
29index a3b7d69..969ddb8 100644
30--- a/unix/Makefile.in
31+++ b/unix/Makefile.in
32@@ -57,7 +57,7 @@ SCRIPT_INSTALL_DIR	= $(INSTALL_ROOT)$(TCL_LIBRARY)
33 MODULE_INSTALL_DIR	= $(SCRIPT_INSTALL_DIR)/../tcl8
34
35 # Directory in which to install the include file tcl.h:
36-INCLUDE_INSTALL_DIR	= $(INSTALL_ROOT)$(includedir)
37+INCLUDE_INSTALL_DIR	= $(INSTALL_ROOT)$(includedir)/tcl$(VERSION)
38
39 # Path to the private tcl header dir:
40 PRIVATE_INCLUDE_DIR	= @PRIVATE_INCLUDE_DIR@
41diff --git a/unix/configure.in b/unix/configure.in
42index 4974fb6..a72934f 100644
43--- a/unix/configure.in
44+++ b/unix/configure.in
45@@ -776,7 +776,7 @@ eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}"
46 eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
47
48 test -z "$TCL_LIBRARY" && TCL_LIBRARY='$(libdir)/tcl$(VERSION)'
49-PRIVATE_INCLUDE_DIR='$(includedir)'
50+PRIVATE_INCLUDE_DIR='$(includedir)/tcl$(VERSION)'
51 HTML_DIR='$(DISTDIR)/html'
52
53 # Note:  in the following variable, it's important to use the absolute
54@@ -897,7 +897,7 @@ TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}"
55 TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}"
56
57 # Install time header dir can be set via --includedir
58-eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
59+eval "TCL_INCLUDE_SPEC=\"-I${includedir}/tcl${VERSION}\""
60
61 #------------------------------------------------------------------------
62 # tclConfig.sh refers to this by a different name
63diff --git a/unix/tcl.pc.in b/unix/tcl.pc.in
64index 93b5e69..dcd51d7 100644
65--- a/unix/tcl.pc.in
66+++ b/unix/tcl.pc.in
67@@ -3,7 +3,7 @@
68 prefix=@prefix@
69 exec_prefix=@exec_prefix@
70 libdir=@libdir@
71-includedir=@includedir@
72+includedir=@includedir@/tcl@PACKAGE_VERSION@
73 libfile=@TCL_LIB_FILE@
74
75 Name: Tool Command Language
76