diff options
author | Ross Burton <ross.burton@intel.com> | 2017-02-07 14:35:43 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-23 12:29:12 -0800 |
commit | 3506898dbd62bb028349b83e1538a7ea665c3d1c (patch) | |
tree | f80f357c77c35c5e36b7892db05686c695f2a100 /meta | |
parent | 50feffd0917b0ab408b34ded9c2f741a9c4e5b74 (diff) | |
download | openembedded-core-3506898dbd62bb028349b83e1538a7ea665c3d1c.tar.gz openembedded-core-3506898dbd62bb028349b83e1538a7ea665c3d1c.tar.bz2 openembedded-core-3506898dbd62bb028349b83e1538a7ea665c3d1c.zip |
slang: rewrite recipe to run autoconf
I discovered that we were not running autoreconf (and cannot due to the
unconvential file structure upstream), so manually run autoconf and move the
generated configure to the right place as we do already for gnu-configize.
Update no-x.patch (now that it is actually being used) so that it doesn't break
the build.
Patch out the use of INST_LIB_DIR in slsh/Makefile.in as this is the *target*
path, so is inappropriate to link to. This means we can remove the custom
do_install() which was working around the problem.
Remove all rpath patches (now overwritten by autoconf) and replace
with just passing RPATH='' via oe_runmake.
Remove the library search path patches (now overwritten by autoconf) and replace
with passing explicit pointers to the sysroot in the options.
[ YOCTO #10969 ]
(From OE-Core rev: 48fe39b09fbac973ba188938ab2a080f71ee8d68)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
6 files changed, 31 insertions, 335 deletions
diff --git a/meta/recipes-extended/slang/slang/dont-link-to-host.patch b/meta/recipes-extended/slang/slang/dont-link-to-host.patch new file mode 100644 index 0000000000..42dba0fae4 --- /dev/null +++ b/meta/recipes-extended/slang/slang/dont-link-to-host.patch @@ -0,0 +1,16 @@ +SLANG_INST_LIB is the location of where slang will end up, but when building for +packaging this doesn't have DESTDIR appended so can potentially link to the host +for cross builds and will trigger QA errors. + +As this is obviously wrong, delete it. + +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/slsh/Makefile.in b/slsh/Makefile.in +index cba9d81..4c1c370 100644 +--- a/slsh/Makefile.in ++++ b/slsh/Makefile.in +@@ -80 +80 @@ SHELL = /bin/sh +-INST_LIBS = $(DEST_LIB_DIR) $(RPATH) $(SLANG_INST_LIB) -lslang $(READLINE_LIB) $(DYNAMIC_LIBS) ++INST_LIBS = $(DEST_LIB_DIR) $(RPATH) -lslang $(READLINE_LIB) $(DYNAMIC_LIBS) diff --git a/meta/recipes-extended/slang/slang/fix-check-pcre.patch b/meta/recipes-extended/slang/slang/fix-check-pcre.patch deleted file mode 100644 index a0ec0ff658..0000000000 --- a/meta/recipes-extended/slang/slang/fix-check-pcre.patch +++ /dev/null @@ -1,116 +0,0 @@ -fix the pcre existence checking - -when check if there is pcre, the configure file always check -the host dir. now we make it work by adding correct prefix for -cross-compile environment. - -When enable pcre-module, we see a QA warning because rpaths -hardcoded into the build, rpaths are not needed, so lets turn -this off. - -Upstream-Status: Inappropriate -Signed-off-by: Roy.Li <rongqing.li@windriver.com> ---- - configure | 72 +++++--------------------------------------------------------- - 1 file changed, 6 insertions(+), 66 deletions(-) - -diff --git a/configure b/configure ---- a/configure -+++ b/configure -@@ -7191,6 +7191,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; } - /usr/include/pcre,/usr/lib \ - /usr/pcre/include,/usr/pcre/lib \ - /usr/include,/usr/lib \ -+ /usr/include,/usr/lib64 \ - /opt/include/pcre,/opt/lib \ - /opt/pcre/include,/opt/pcre/lib \ - /opt/include,/opt/lib" -@@ -7221,14 +7222,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; } - xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'` - xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'` - found=0 -- if test -r $xincdir/$xincfile -+ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile - then - for E in $exts - do -- if test -r "$xlibdir/$xlibfile.$E" -+ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E" - then -- jd_pcre_include_dir="$xincdir" -- jd_pcre_library_dir="$xlibdir" -+ jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir" -+ jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir" - jd_with_pcre_library="yes" - found=1 - break -@@ -7255,68 +7255,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; } - then - PCRE_LIB="" - else -- --if test "X$jd_pcre_library_dir" != "X" --then -- if test "X$RPATH" = "X" -- then -- --case "$host_os" in -- *linux*|*solaris* ) -- if test "X$GCC" = Xyes -- then -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-Wl,-R," -- else -- RPATH="-Wl,-R" -- fi -- else -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-R " -- else -- RPATH="-R" -- fi -- fi -- ;; -- *osf*|*openbsd*|*freebsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-rpath," -- else -- RPATH="-rpath " -- fi -- ;; -- *netbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-R" -- fi -- ;; --esac -- -- if test "X$RPATH" != "X" -- then -- RPATH="$RPATH$jd_pcre_library_dir" -- fi -- else -- _already_there=0 -- for X in `echo $RPATH | sed 's/:/ /g'` -- do -- if test "$X" = "$jd_pcre_library_dir" -- then -- _already_there=1 -- break -- fi -- done -- if test $_already_there = 0 -- then -- RPATH="$RPATH:$jd_pcre_library_dir" -- fi -- fi --fi -- -+ RPATH="" - fi - - PCRE_INC=-I$jd_pcre_include_dir diff --git a/meta/recipes-extended/slang/slang/no-x.patch b/meta/recipes-extended/slang/slang/no-x.patch index d7666bfc89..7dc1602fe3 100644 --- a/meta/recipes-extended/slang/slang/no-x.patch +++ b/meta/recipes-extended/slang/slang/no-x.patch @@ -12,3 +12,7 @@ index b61e974..a3e5db2 100644 -# For the socket module -AC_PATH_XTRA - +--- a/modules/Makefile.in ++++ b/modules/Makefile.in +@@ -67 +66,0 @@ ZLIB_LIB = @Z_LIB@ -lz +-SOCKET_LIBS = @X_EXTRA_LIBS@ diff --git a/meta/recipes-extended/slang/slang/rpathfix.patch b/meta/recipes-extended/slang/slang/rpathfix.patch deleted file mode 100644 index f82a5313d5..0000000000 --- a/meta/recipes-extended/slang/slang/rpathfix.patch +++ /dev/null @@ -1,82 +0,0 @@ -Without this patch we see rpaths hardcoded into the build which results in QA -warnings. These rpaths are not needed so lets turn this off. - -Upstream-Status: Inappropriate -(but could be turned into a proper configure option) - -RP 2012/03/14 - -Index: slang-2.2.4/configure -=================================================================== ---- slang-2.2.4.orig/configure 2012-03-14 23:40:01.283560679 +0000 -+++ slang-2.2.4/configure 2012-03-14 23:41:18.023558900 +0000 -@@ -6246,68 +6246,7 @@ esac - ELF_CFLAGS="$ELF_CFLAGS $IEEE_CFLAGS" - CFLAGS="$CFLAGS $IEEE_CFLAGS" - -- --if test "X$libdir" != "X" --then -- if test "X$RPATH" = "X" -- then -- --case "$host_os" in -- *linux*|*solaris* ) -- if test "X$GCC" = Xyes -- then -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-Wl,-R," -- else -- RPATH="-Wl,-R" -- fi -- else -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-R " -- else -- RPATH="-R" -- fi -- fi -- ;; -- *osf*|*openbsd*|*freebsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-rpath," -- else -- RPATH="-rpath " -- fi -- ;; -- *netbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-R" -- fi -- ;; --esac -- -- if test "X$RPATH" != "X" -- then -- RPATH="$RPATH$libdir" -- fi -- else -- _already_there=0 -- for X in `echo $RPATH | sed 's/:/ /g'` -- do -- if test "$X" = "$libdir" -- then -- _already_there=1 -- break -- fi -- done -- if test $_already_there = 0 -- then -- RPATH="$RPATH:$libdir" -- fi -- fi --fi -- -+RPATH="" - - # The cast to long int works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects diff --git a/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch deleted file mode 100644 index 850551ef0a..0000000000 --- a/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 4588f4a0287787788eb86fb16f326cbaa7454e1d Mon Sep 17 00:00:00 2001 -From: Zheng Junling <zhengjunling@huawei.com> -Date: Mon, 16 Jun 2014 12:51:25 +0000 -Subject: [PATCH] slang: fix the iconv existence checking - -When checking whether there is iconv, the configure file always check -the host env. - -Now we make it working properly by adding correct prefix for cross- -compiling environment. - -When enabling iconv-module, we see a QA warning because rpaths hardcoded -into the build. And rpaths are not needed, so let's turn this off. - -This patch is generated by referencing the existing "fix-check-pcre" -patch. - -Upstream-Status: Inappropriate - -Signed-off-by: Zheng Junling <zhengjunling@huawei.com> ---- - configure | 72 +++++--------------------------------------------------------- - 1 file changed, 6 insertions(+), 66 deletions(-) - -diff --git a/configure b/configure -index fa395ff..7fa769c 100755 ---- a/configure -+++ b/configure -@@ -8259,6 +8259,7 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; } - /usr/include/iconv,/usr/lib \ - /usr/iconv/include,/usr/iconv/lib \ - /usr/include,/usr/lib \ -+ /usr/include,/usr/lib64 \ - /opt/include/iconv,/opt/lib \ - /opt/iconv/include,/opt/iconv/lib \ - /opt/include,/opt/lib" -@@ -8289,14 +8290,14 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; } - xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'` - xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'` - found=0 -- if test -r $xincdir/$xincfile -+ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile - then - for E in $exts - do -- if test -r "$xlibdir/$xlibfile.$E" -+ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E" - then -- jd_iconv_include_dir="$xincdir" -- jd_iconv_library_dir="$xlibdir" -+ jd_iconv_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir" -+ jd_iconv_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir" - jd_with_iconv_library="yes" - found=1 - break -@@ -8201,68 +8201,7 @@ $as_echo "yes: $jd_iconv_library_dir and $jd_iconv_include_dir" >&6; } - then - ICONV_LIB="" - else -- --if test "X$jd_iconv_library_dir" != "X" --then -- if test "X$RPATH" = "X" -- then -- --case "$host_os" in -- *linux*|*solaris* ) -- if test "X$GCC" = Xyes -- then -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-Wl,-R," -- else -- RPATH="-Wl,-R" -- fi -- else -- if test "X$ac_R_nospace" = "Xno" -- then -- RPATH="-R " -- else -- RPATH="-R" -- fi -- fi -- ;; -- *osf*|*openbsd*|*freebsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-rpath," -- else -- RPATH="-rpath " -- fi -- ;; -- *netbsd*) -- if test "X$GCC" = Xyes -- then -- RPATH="-Wl,-R" -- fi -- ;; --esac -- -- if test "X$RPATH" != "X" -- then -- RPATH="$RPATH$jd_iconv_library_dir" -- fi -- else -- _already_there=0 -- for X in `echo $RPATH | sed 's/:/ /g'` -- do -- if test "$X" = "$jd_iconv_library_dir" -- then -- _already_there=1 -- break -- fi -- done -- if test $_already_there = 0 -- then -- RPATH="$RPATH:$jd_iconv_library_dir" -- fi -- fi --fi -- -+ RPATH="" - fi - - ICONV_INC=-I$jd_iconv_include_dir diff --git a/meta/recipes-extended/slang/slang_2.3.1.bb b/meta/recipes-extended/slang/slang_2.3.1.bb index 7bf3af6836..3a5030354c 100644 --- a/meta/recipes-extended/slang/slang_2.3.1.bb +++ b/meta/recipes-extended/slang/slang_2.3.1.bb @@ -14,12 +14,9 @@ DEPENDS = "ncurses virtual/libiconv" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02" - SRC_URI = "http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \ - file://rpathfix.patch \ - file://fix-check-pcre.patch \ - file://slang-fix-the-iconv-existence-checking.patch \ file://no-x.patch \ + file://dont-link-to-host.patch \ " SRC_URI[md5sum] = "bd46d1dc17a50c72004ad842829d7b1f" @@ -32,24 +29,26 @@ inherit autotools-brokensep CLEANBROKEN = "1" EXTRA_OECONF = "--without-onig" +# There's no way to turn off rpaths and slang will -rpath to the default search +# path. Unset RPATH to stop this. +EXTRA_OEMAKE = "RPATH=''" PACKAGECONFIG ??= "pcre" -PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,pcre" -PACKAGECONFIG[png] = "--with-png,--without-png,libpng" -PACKAGECONFIG[zlib] = "--with-z,--without-z,zlib" +PACKAGECONFIG[pcre] = "--with-pcre=${STAGING_DIR_HOST}${prefix},--without-pcre,pcre" +PACKAGECONFIG[png] = "--with-png=${STAGING_DIR_HOST}${prefix},--without-png,libpng" +PACKAGECONFIG[zlib] = "--with-z=${STAGING_DIR_HOST}${prefix},--without-z,zlib" do_configure_prepend() { + cd ${S}/autoconf # slang keeps configure.ac and rest of autoconf files in autoconf/ directory # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac} # to be present. Resulting files land in autoconf/autoconf/ so we need to move them. - cd ${S}/autoconf && gnu-configize --force && mv autoconf/config.* . + gnu-configize --force && mv autoconf/config.* . + # For the same reason we also need to run autoconf manually. + autoconf && mv configure .. cd ${B} } -do_install() { - oe_runmake install DESTDIR=${D} -e 'INST_LIB_DIR=${STAGING_DIR_HOST}/usr/lib' -} - FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/" PARALLEL_MAKE = "" |