Skip to contentSkip to conversation

Integrate tk and activate -enable-libgdbm-compat in gdbm

PATCH In review Andrei Gherzan 2 participants 4 messages Mar 23, 2012 – Mar 24, 2012

lore
Share & tools
lore
#0 lore raw

cover Integrate tk and activate -enable-libgdbm-compat in gdbm

These changes are needed for some python modules:
_tkinter
dbm

The following changes since commit 5a6ded1355156557635004fdde2c01feec436be2:

yocto-kernel: new script (2012-03-22 19:21:15 +0000)

are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ag/master
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ag/master

Andrei Gherzan (2):
gdbm: Activate -enable-libgdbm-compat and add symlinks to headers in
include/gdbm
tk: Integrate tk v8.5.11

 meta/recipes-devtools/tcltk/tk_8.5.11.bb |   68 ++++++++++++++++++++++++++++++
 meta/recipes-support/gdbm/gdbm_1.10.bb   |   11 +++++
 2 files changed, 79 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/tcltk/tk_8.5.11.bb
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/2 gdbm: Activate -enable-libgdbm-compat and add symlinks to headers in include/gdbm

ndbm.h is needed by python for dbm module. This is why -enable-libgdbm-compat was added to configure.
The second change is because python is looking for the gdbm headers in include/gdbm. The easiest way to solve this issue is to add symlinks in include/gdbm.

[YOCTO #1937]

---
 meta/recipes-support/gdbm/gdbm_1.10.bb |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
meta/recipes-support/gdbm/gdbm_1.10.bb +11 -0
index 9b2fde4..e9fef6e 100644
@@ -13,4 +13,15 @@ SRC_URI[sha256sum] = "23f8134c5b94bbfb06d756a6b78f074fba6e6028cf2fe01341d40b26db
 
 inherit autotools gettext lib_package
 
+# Needed for dbm python module
+EXTRA_OECONF = "-enable-libgdbm-compat"
+
 BBCLASSEXTEND = "native nativesdk"
+
+do_install_append () {
+    # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
+    # these headers
+    install -d ${D}${includedir}/gdbm
+    ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
+    ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
+}
Signature · 1 line
1.7.5.4
#2 lore raw

PATCH 2/2 tk: Integrate tk v8.5.11

Tk (along with Tcl) is needed in python for module _tkinter.

[YOCTO #1937]

---
 meta/recipes-devtools/tcltk/tk_8.5.11.bb |   68 ++++++++++++++++++++++++++++++
 1 files changed, 68 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/tcltk/tk_8.5.11.bb
meta/recipes-devtools/tcltk/tk_8.5.11.bb new file +68 -0
new file mode 100644
index 0000000..9be31f0
@@ -0,0 +1,68 @@
+DESCRIPTION = "Tk graphical toolkit for the Tcl scripting language."
+LICENSE = "BSD-3-Clause"
+SECTION = "devel/tcltk"
+HOMEPAGE = "http://tcl.sourceforge.net"
+DEPENDS = "tcl xproto"
+
+LIC_FILES_CHKSUM = "file://../license.terms;md5=33c2a4845e058f33c0f52f375625f650 \
+                    file://../compat/license.terms;md5=33c2a4845e058f33c0f52f375625f650 \
+                    file://../library/license.terms;md5=33c2a4845e058f33c0f52f375625f650 \
+                    file://../macosx/license.terms;md5=33c2a4845e058f33c0f52f375625f650 \
+                    file://../tests/license.terms;md5=33c2a4845e058f33c0f52f375625f650 \
+                    file://../win/license.terms;md5=33c2a4845e058f33c0f52f375625f650 \
+                    "
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/tk${PV}-src.tar.gz"
+SRC_URI[md5sum] = "b61b72f0aad230091b100746f078b8f1"
+SRC_URI[sha256sum] = "d35810b33a0931656f1d128e7e0776cc0c4d8b9c72af322cab5a7ee30485eb70"
+
+S = "${WORKDIR}/tk${PV}/unix"
+
+inherit autotools
+
+EXTRA_OECONF = "--enable-threads \
+                --disable-rpath \
+                --with-tcl=${STAGING_BINDIR_CROSS} \
+                "
+
+do_configure() {
+	gnu-configize
+	oe_runconf
+}
+
+do_install() {
+	autotools_do_install
+	oe_libinstall -so libtk8.5 ${STAGING_LIBDIR}
+	sed -i "s+${WORKDIR}+${STAGING_INCDIR}+g" tkConfig.sh
+	sed -i "s,-L${libdir},," tkConfig.sh
+	install -d ${STAGING_BINDIR_CROSS}/
+	install -m 0755 tkConfig.sh ${STAGING_BINDIR_CROSS}
+	cd ..
+	for dir in compat generic unix
+	do
+		install -d ${STAGING_INCDIR}/tk${PV}/$dir
+		install -m 0644 $dir/*.h ${STAGING_INCDIR}/tk${PV}/$dir/
+	done
+}
+
+PACKAGES =+ "${PN}-demos \
+	     ${PN}-lib \
+	     "
+FILES_${PN}-lib   = "${libdir}/libtk8.5.so* \
+                     "
+FILES_${PN}-demos = "${libdir}/tk8.5/demos/* \
+                     "
+FILES_${PN}      += "${libdir}/tk8.5/ttk/* \
+		     ${libdir}/tk8.5/images/* \
+		     ${libdir}/tk8.5/msgs/* \
+		     ${libdir}/tk8.5/*.tcl \
+		     ${libdir}/tk8.5/tclIndex \
+		     "
+FILES_${PN}-dev += "${libdir}/tkConfig.sh \
+		    ${libdir}/tk8.5/tkAppInit.c \
+		    "
+
+RDEPENDS_${PN} += "tk-lib"
+
Signature · 1 line
1.7.5.4
#3 lore raw

Re: [PATCH 1/2] gdbm: Activate -enable-libgdbm-compat and add symlinks to headers in include/gdbm

In reply to Andrei Gherzan

Op 23 mrt. 2012, om 23:57 heeft Andrei Gherzan het volgende geschreven:

Quoted 25 lines

ndbm.h is needed by python for dbm module. This is why -enable-libgdbm-compat was added to configure.
The second change is because python is looking for the gdbm headers in include/gdbm. The easiest way to solve this issue is to add symlinks in include/gdbm.

[YOCTO #1937]

---
meta/recipes-support/gdbm/gdbm_1.10.bb | 11 +++++++++++

1 files changed, 11 insertions(+), 0 deletions(-)
meta/recipes-support/gdbm/gdbm_1.10.bb +0 -0
index 9b2fde4..e9fef6e 100644
@@ -13,4 +13,15 @@ SRC_URI[sha256sum] = "23f8134c5b94bbfb06d756a6b78f074fba6e6028cf2fe01341d40b26db
 

inherit autotools gettext lib_package

meta/recipes-support/gdbm/gdbm_1.10.bb +3 -0
+# Needed for dbm python module
+EXTRA_OECONF = "-enable-libgdbm-compat"
+

BBCLASSEXTEND = "native nativesdk"

meta/recipes-support/gdbm/gdbm_1.10.bb SRC_URI[sha256sum] = "23f8134c5b94bbfb06d756a6b78f074fba6e6028cf2fe01341d40b26db · line 27

Quoted 8 lines
meta/recipes-support/gdbm/gdbm_1.10.bb +8 -0
+
+do_install_append () {
+    # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
+    # these headers
+    install -d ${D}${includedir}/gdbm
+    ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
+    ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
+}

Missing PR bump