Skip to contentSkip to conversation

tcl: prefer tcl's own tzdata

PATCH New Ross Burton 1 participant 2 messages Mar 6

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tcl: prefer tcl's own tzdata

The little thread that was "one of the tcl test cases fails with system tzdata" has unravelled upstream into a series of problems with the tz code when the system tzdata is used:

https://core.tcl-lang.org/tcl/tktview/51aa53616067cb63900b17ca1d71f07b094ffa1a

Add a PACKAGECONFIG for the option, and default to using the tcl tzdata until the issues are resolved upstream.

---
 meta/recipes-devtools/tcltk/tcl_9.0.3.bb | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
meta/recipes-devtools/tcltk/tcl_9.0.3.bb +5 -6
index 3c0a257238..18de3a333a 100644
@@ -38,11 +38,10 @@ EXTRA_AUTORECONF = "--exclude=aclocal"
 
 EXTRA_OECONF = "--disable-rpath --enable-man-suffix=tcl9 --disable-zipfs"
 
-# Prevent installing copy of tzdata based on tzdata installation on the build host
-# It doesn't install tzdata if one of the following files exist on the host:
-# /usr/share/zoneinfo/UTC /usr/share/zoneinfo/GMT /usr/share/lib/zoneinfo/UTC /usr/share/lib/zoneinfo/GMT /usr/lib/zoneinfo/UTC /usr/lib/zoneinfo/GMT
-# otherwise "/usr/lib/tcl8.6/tzdata" is included in tcl package
-EXTRA_OECONF += "--with-tzdata=no"
+PACKAGECONFIG ??= ""
+# Use of system tzdata is not recommended at present:
+# https://core.tcl-lang.org/tcl/tktview/51aa53616067cb63900b17ca1d71f07b094ffa1a
+PACKAGECONFIG[system-tzdata] = "--with-tzdata=no,--with-tzdata=yes,,tzdata"
 
 do_install() {
 	autotools_do_install
@@ -69,7 +68,7 @@ FILES:${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh"
 
 # isn't getting picked up by shlibs code
 RDEPENDS:${PN} += "tcl-lib"
-RDEPENDS:${PN}-ptest += "libgcc locale-base-en-us tzdata"
+RDEPENDS:${PN}-ptest += "libgcc locale-base-en-us"
 
 BBCLASSEXTEND = "native nativesdk"
 
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 tcl8: prefer tcl's own tzdata

The little thread that was "one of the tcl test cases fails with system tzdata" has unravelled upstream into a series of problems with the tz code when the system tzdata is used:

https://core.tcl-lang.org/tcl/tktview/51aa53616067cb63900b17ca1d71f07b094ffa1a

Add a PACKAGECONFIG for the option, and default to using the tcl tzdata until the issues are resolved upstream.

---
 meta/recipes-devtools/tcltk8/tcl8_8.6.17.bb | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
meta/recipes-devtools/tcltk8/tcl8_8.6.17.bb +5 -6
index 0f829a9d1b..0a8d6ea1bf 100644
@@ -42,11 +42,10 @@ EXTRA_AUTORECONF = "--exclude=aclocal"
 
 EXTRA_OECONF = "--enable-threads --disable-rpath --enable-man-suffix=tcl8"
 
-# Prevent installing copy of tzdata based on tzdata installation on the build host
-# It doesn't install tzdata if one of the following files exist on the host:
-# /usr/share/zoneinfo/UTC /usr/share/zoneinfo/GMT /usr/share/lib/zoneinfo/UTC /usr/share/lib/zoneinfo/GMT /usr/lib/zoneinfo/UTC /usr/lib/zoneinfo/GMT
-# otherwise "/usr/lib/tcl8.6/tzdata" is included in tcl package
-EXTRA_OECONF += "--with-tzdata=no"
+PACKAGECONFIG ??= ""
+# Use of system tzdata is not recommended at present:
+# https://core.tcl-lang.org/tcl/tktview/51aa53616067cb63900b17ca1d71f07b094ffa1a
+PACKAGECONFIG[system-tzdata] = "--with-tzdata=no,--with-tzdata=yes,,tzdata"
 
 do_install() {
 	autotools_do_install
@@ -73,7 +72,7 @@ FILES:${PN}-dev += "${libdir}/tcl8Config.sh ${libdir}/tcl8ooConfig.sh"
 
 # isn't getting picked up by shlibs code
 RDEPENDS:${PN} += "tcl8-lib"
-RDEPENDS:${PN}-ptest += "libgcc locale-base-en-us tzdata"
+RDEPENDS:${PN}-ptest += "libgcc locale-base-en-us"
 
 BBCLASSEXTEND = "native nativesdk"
 
Signature · 1 line
2.43.0