All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/perl-db-file: Fix berkeleydb detection
@ 2015-12-05 22:42 Bernd Kuhls
  2015-12-05 22:42 ` [Buildroot] [PATCH 2/2] package/perl-db-file: Berkeley DB 1.85 compatibility API is not needed Bernd Kuhls
  0 siblings, 1 reply; 3+ messages in thread
From: Bernd Kuhls @ 2015-12-05 22:42 UTC (permalink / raw)
  To: buildroot

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>
---
 package/perl-db-file/perl-db-file.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/perl-db-file/perl-db-file.mk b/package/perl-db-file/perl-db-file.mk
index 6d611ea..3db8c56 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))
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-20 14:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-05 22:42 [Buildroot] [PATCH 1/2] package/perl-db-file: Fix berkeleydb detection Bernd Kuhls
2015-12-05 22:42 ` [Buildroot] [PATCH 2/2] package/perl-db-file: Berkeley DB 1.85 compatibility API is not needed Bernd Kuhls
2015-12-20 14:04   ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.