srecord: add libgcrypt PACKAGECONFIG
PATCH 1/2 srecord: add libgcrypt PACKAGECONFIG
Instead of forcibly disabling libgcrypt, add a PACKAGECONFIG and enable it as functionality is good.
Also remove the redundant libtool-native DEPENDS as autotools adds this dependency by default.
Signed-off-by Ross Burton <[email protected]>
--- meta-oe/recipes-support/srecord/srecord_1.64.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta-oe/recipes-support/srecord/srecord_1.64.bb +3 -2
@@ -13,11 +13,12 @@ SRC_URI[sha256sum] = "49a4418733c508c03ad79a29e95acec9a2fbc4c7306131d2a8f5ef3201 UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/srecord/files/releases" -DEPENDS = "libtool-native boost groff-native" +DEPENDS = "boost groff-native" inherit autotools-brokensep -EXTRA_OECONF = "--without-gcrypt" +PACKAGECONFIG ??= "gcrypt" +PACKAGECONFIG[gcrypt] = "--with-gcrypt,--without-gcrypt,libgcrypt" # Set variable WITHOUT_DOC=0 to enable documentation generation EXTRA_OEMAKE = "WITHOUT_DOC=1"
Signature · 1 line
2.25.1
PATCH 2/2 srecord: properly initialize libtool
Signed-off-by Ross Burton <[email protected]>
--- .../srecord/files/libtool.patch | 67 +++++++++++++++++++ .../recipes-support/srecord/srecord_1.64.bb | 7 ++ 2 files changed, 74 insertions(+) create mode 100644 meta-oe/recipes-support/srecord/files/libtool.patch
meta-oe/recipes-support/srecord/files/libtool.patch new file +67 -0
@@ -0,0 +1,67 @@ +Instead of just looking for a libtool binary, actually configure libtool. + +As the build doesn't use automake we need to manually set top_builddir in the Makefile. + +Upstream-Status: Inactive-Upstream [2014] +Signed-off-by: Ross Burton <[email protected]> + +diff --git a/Makefile.in b/Makefile.in +index a2b5494..aa0b8ca 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -36,6 +36,7 @@ + # + srcdir = @srcdir@ + VPATH = @srcdir@ ++top_builddir = @srcdir@ + + # + # the name of the install program to use +diff --git a/etc/configure.ac b/etc/configure.ac +index e444543..b137443 100644 +--- a/etc/configure.ac ++++ b/etc/configure.ac +@@ -161,42 +161,7 @@ AS_IF([test "x$with_gcrypt" != xno], AC_GCRYPT_SETUP()) + dnl! + dnl! Now look for libtool. + dnl! +-AC_CHECK_PROGS(LIBTOOL, libtool) +-if test -z "$LIBTOOL" +-then +- AC_MSG_RESULT([ +- You must have GNU Libtool installed to build srecord. +- Homepage: http://www.gnu.org/software/libtool/]) +- OK=no +- if apt-get --version > /dev/null 2> /dev/null; then +- AC_MSG_RESULT([ +- The following command may be used to install it: +- sudo apt-get install libtool +- ]) +- OK=yes +- fi +- if yum --version > /dev/null 2> /dev/null; then +- AC_MSG_RESULT([ +- The following command may be used to install it: +- sudo yum install libtool +- ]) +- OK=yes +- fi +- if pkg_info -a > /dev/null 2> /dev/null; then +- AC_MSG_RESULT([ +- The following command may be used to install it: +- sudo pkg_add -r libtool +- ]) +- OK=yes +- fi +- if test "$OK" != "yes"; then +- AC_MSG_RESULT([ +- If you are using a package based install, you will need the +- libtool package. +- ]) +- fi +- exit 1 +-fi ++LT_INIT + + dnl + dnl If the soelim program exists, and understands the -I option,
meta-oe/recipes-support/srecord/srecord_1.64.bb +7 -0
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8dfcbf2f0a144b97f0931b6394debea7" SRC_URI = " \ http://srecord.sourceforge.net/srecord-${PV}.tar.gz \ file://add-option-to-remove-docs.patch \ + file://libtool.patch \ " SRC_URI[md5sum] = "4de4a7497472d7972645c2af91313769"
@@ -17,6 +18,12 @@ DEPENDS = "boost groff-native" inherit autotools-brokensep +do_configure:prepend() { + # To autoreconf we need the script in ${S}, we can't tell autotools to use + # etc/ because then it can't find the Makefile.in + ln -s ${S}/etc/configure.ac ${S} +} + PACKAGECONFIG ??= "gcrypt" PACKAGECONFIG[gcrypt] = "--with-gcrypt,--without-gcrypt,libgcrypt"
Signature · 1 line
2.25.1