[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4711/8267] slang: rewrite recipe to run autoconf



commit 9a1ac06139591f70a72cd915059a5705d856a1ee
Author: Ross Burton <ross burton intel com>
Date:   Tue Feb 7 14:35:43 2017 +0000

    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)
    
    (From OE-Core rev: 3506898dbd62bb028349b83e1538a7ea665c3d1c)
    
    Signed-off-by: Ross Burton <ross burton intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 .../slang/slang/dont-link-to-host.patch            |   16 +++
 .../slang/slang/fix-check-pcre.patch               |  116 ------------------
 meta/recipes-extended/slang/slang/no-x.patch       |    4 +
 meta/recipes-extended/slang/slang/rpathfix.patch   |   82 -------------
 .../slang-fix-the-iconv-existence-checking.patch   |  125 --------------------
 meta/recipes-extended/slang/slang_2.3.1.bb         |   23 ++--
 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 0000000..42dba0f
--- /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/no-x.patch b/meta/recipes-extended/slang/slang/no-x.patch
index d7666bf..7dc1602 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_2.3.1.bb b/meta/recipes-extended/slang/slang_2.3.1.bb
index 7bf3af6..3a50303 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 = ""


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]