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

login
register
mail settings
Submitter Andrei Gherzan
Date March 23, 2012, 10:57 p.m.
Message ID <6d8cb56a00a2d0f140b6b569f8577f96c6113e14.1332543292.git.andrei@gherzan.ro>
Download mbox | patch
Permalink /patch/24379/
State New
Headers show

Comments

Andrei Gherzan - March 23, 2012, 10:57 p.m.
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]

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
 meta/recipes-support/gdbm/gdbm_1.10.bb |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
Koen Kooi - March 24, 2012, 6:28 a.m.
Op 23 mrt. 2012, om 23:57 heeft Andrei Gherzan het volgende geschreven:

> 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]
> 
> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
> ---
> meta/recipes-support/gdbm/gdbm_1.10.bb |   11 +++++++++++
> 1 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/recipes-support/gdbm/gdbm_1.10.bb b/meta/recipes-support/gdbm/gdbm_1.10.bb
> index 9b2fde4..e9fef6e 100644
> --- a/meta/recipes-support/gdbm/gdbm_1.10.bb
> +++ b/meta/recipes-support/gdbm/gdbm_1.10.bb
> @@ -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
> +}
> -- 

Missing PR bump

Patch

diff --git a/meta/recipes-support/gdbm/gdbm_1.10.bb b/meta/recipes-support/gdbm/gdbm_1.10.bb
index 9b2fde4..e9fef6e 100644
--- a/meta/recipes-support/gdbm/gdbm_1.10.bb
+++ b/meta/recipes-support/gdbm/gdbm_1.10.bb
@@ -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
+}