aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Francois Perrad <fperrad@gmail.com>2015-12-06 15:14:36 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-12-13 15:56:06 +0100
commit593bd60c4d67cad26a3b8ed839887ecbce2e6a2e (patch)
tree6f10f6abb0e30db3673089bc17f6a1b8ec61f5a0
parent90cf8d87abc1715ad0475c0d817a164303e1ad0f (diff)
downloadbuildroot-593bd60c4d67cad26a3b8ed839887ecbce2e6a2e.tar.gz
buildroot-593bd60c4d67cad26a3b8ed839887ecbce2e6a2e.tar.bz2
package/perl-db-file: Fix berkeleydb detection
Without this patch libdb.so is not detected and lib/perl5/site_perl/5.22.0/i586-linux/auto/DB_File/DB_File.so is not linked against it: Parsing config.in... Looks Good. Checking if your kit is complete... Looks good Warning (mostly harmless): No library found for -ldb Generating a Unix-style Makefile Writing Makefile for DB_File Writing MYMETA.yml and MYMETA.json >>> perl-db-file 1.835 Building $ output/host/usr/bin/i586-buildroot-linux-uclibc-readelf -a output/target/usr/lib/perl5/site_perl/5.22.0/i586-linux/auto/DB_File/DB_File.so | grep NEEDED 0x00000001 (NEEDED) Shared library: [libc.so.1] After applying this patch configure output will look like this: Parsing config.in... Looks Good. Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for DB_File Writing MYMETA.yml and MYMETA.json >>> perl-db-file 1.835 Building and the resulting library is correctly linked against libdb: $ output/host/usr/bin/i586-buildroot-linux-uclibc-readelf -a output/target/usr/lib/perl5/site_perl/5.22.0/i586-linux/auto/DB_File/DB_File.so | grep NEEDED 0x00000001 (NEEDED) Shared library: [libdb-5.3.so] 0x00000001 (NEEDED) Shared library: [libc.so.1] Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/perl-db-file/perl-db-file.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/perl-db-file/perl-db-file.mk b/package/perl-db-file/perl-db-file.mk
index 6d611ea9a4..3db8c563cb 100644
--- a/package/perl-db-file/perl-db-file.mk
+++ b/package/perl-db-file/perl-db-file.mk
@@ -11,4 +11,12 @@ PERL_DB_FILE_DEPENDENCIES = berkeleydb
PERL_DB_FILE_LICENSE = Artistic or GPLv1+
PERL_DB_FILE_LICENSE_FILES = README
+define PERL_DB_FILE_FIX_CONFIG_IN
+ $(SED) 's%^INCLUDE.*%INCLUDE = $(STAGING_DIR)/usr/include%' \
+ $(@D)/config.in
+ $(SED) 's%^LIB.*%LIB = $(STAGING_DIR)/usr/lib%' \
+ $(@D)/config.in
+endef
+PERL_DB_FILE_POST_PATCH_HOOKS += PERL_DB_FILE_FIX_CONFIG_IN
+
$(eval $(perl-package))