summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-02-07 14:35:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-23 12:49:49 -0800
commit9a1ac06139591f70a72cd915059a5705d856a1ee (patch)
tree6432dda71c82e02a45856e7cd7b655d784cd8044 /meta/recipes-extended
parentf14fb8d124926d41785673a9a6cbdce849c305f8 (diff)
downloadpoky-9a1ac06139591f70a72cd915059a5705d856a1ee.tar.gz
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>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/slang/slang/dont-link-to-host.patch16
-rw-r--r--meta/recipes-extended/slang/slang/fix-check-pcre.patch116
-rw-r--r--meta/recipes-extended/slang/slang/no-x.patch4
-rw-r--r--meta/recipes-extended/slang/slang/rpathfix.patch82
-rw-r--r--meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch125
-rw-r--r--meta/recipes-extended/slang/slang_2.3.1.bb23
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 @@
1SLANG_INST_LIB is the location of where slang will end up, but when building for
2packaging this doesn't have DESTDIR appended so can potentially link to the host
3for cross builds and will trigger QA errors.
4
5As this is obviously wrong, delete it.
6
7Upstream-Status: Pending
8Signed-off-by: Ross Burton <ross.burton@intel.com>
9
10diff --git a/slsh/Makefile.in b/slsh/Makefile.in
11index cba9d81..4c1c370 100644
12--- a/slsh/Makefile.in
13+++ b/slsh/Makefile.in
14@@ -80 +80 @@ SHELL = /bin/sh
15-INST_LIBS = $(DEST_LIB_DIR) $(RPATH) $(SLANG_INST_LIB) -lslang $(READLINE_LIB) $(DYNAMIC_LIBS)
16+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 @@
1fix the pcre existence checking
2
3when check if there is pcre, the configure file always check
4the host dir. now we make it work by adding correct prefix for
5cross-compile environment.
6
7When enable pcre-module, we see a QA warning because rpaths
8hardcoded into the build, rpaths are not needed, so lets turn
9this off.
10
11Upstream-Status: Inappropriate
12Signed-off-by: Roy.Li <rongqing.li@windriver.com>
13---
14 configure | 72 +++++---------------------------------------------------------
15 1 file changed, 6 insertions(+), 66 deletions(-)
16
17diff --git a/configure b/configure
18--- a/configure
19+++ b/configure
20@@ -7191,6 +7191,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
21 /usr/include/pcre,/usr/lib \
22 /usr/pcre/include,/usr/pcre/lib \
23 /usr/include,/usr/lib \
24+ /usr/include,/usr/lib64 \
25 /opt/include/pcre,/opt/lib \
26 /opt/pcre/include,/opt/pcre/lib \
27 /opt/include,/opt/lib"
28@@ -7221,14 +7222,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
29 xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
30 xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
31 found=0
32- if test -r $xincdir/$xincfile
33+ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
34 then
35 for E in $exts
36 do
37- if test -r "$xlibdir/$xlibfile.$E"
38+ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
39 then
40- jd_pcre_include_dir="$xincdir"
41- jd_pcre_library_dir="$xlibdir"
42+ jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
43+ jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
44 jd_with_pcre_library="yes"
45 found=1
46 break
47@@ -7255,68 +7255,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; }
48 then
49 PCRE_LIB=""
50 else
51-
52-if test "X$jd_pcre_library_dir" != "X"
53-then
54- if test "X$RPATH" = "X"
55- then
56-
57-case "$host_os" in
58- *linux*|*solaris* )
59- if test "X$GCC" = Xyes
60- then
61- if test "X$ac_R_nospace" = "Xno"
62- then
63- RPATH="-Wl,-R,"
64- else
65- RPATH="-Wl,-R"
66- fi
67- else
68- if test "X$ac_R_nospace" = "Xno"
69- then
70- RPATH="-R "
71- else
72- RPATH="-R"
73- fi
74- fi
75- ;;
76- *osf*|*openbsd*|*freebsd*)
77- if test "X$GCC" = Xyes
78- then
79- RPATH="-Wl,-rpath,"
80- else
81- RPATH="-rpath "
82- fi
83- ;;
84- *netbsd*)
85- if test "X$GCC" = Xyes
86- then
87- RPATH="-Wl,-R"
88- fi
89- ;;
90-esac
91-
92- if test "X$RPATH" != "X"
93- then
94- RPATH="$RPATH$jd_pcre_library_dir"
95- fi
96- else
97- _already_there=0
98- for X in `echo $RPATH | sed 's/:/ /g'`
99- do
100- if test "$X" = "$jd_pcre_library_dir"
101- then
102- _already_there=1
103- break
104- fi
105- done
106- if test $_already_there = 0
107- then
108- RPATH="$RPATH:$jd_pcre_library_dir"
109- fi
110- fi
111-fi
112-
113+ RPATH=""
114 fi
115
116 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
12-# For the socket module 12-# For the socket module
13-AC_PATH_XTRA 13-AC_PATH_XTRA
14- 14-
15--- a/modules/Makefile.in
16+++ b/modules/Makefile.in
17@@ -67 +66,0 @@ ZLIB_LIB = @Z_LIB@ -lz
18-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 @@
1Without this patch we see rpaths hardcoded into the build which results in QA
2warnings. These rpaths are not needed so lets turn this off.
3
4Upstream-Status: Inappropriate
5(but could be turned into a proper configure option)
6
7RP 2012/03/14
8
9Index: slang-2.2.4/configure
10===================================================================
11--- slang-2.2.4.orig/configure 2012-03-14 23:40:01.283560679 +0000
12+++ slang-2.2.4/configure 2012-03-14 23:41:18.023558900 +0000
13@@ -6246,68 +6246,7 @@ esac
14 ELF_CFLAGS="$ELF_CFLAGS $IEEE_CFLAGS"
15 CFLAGS="$CFLAGS $IEEE_CFLAGS"
16
17-
18-if test "X$libdir" != "X"
19-then
20- if test "X$RPATH" = "X"
21- then
22-
23-case "$host_os" in
24- *linux*|*solaris* )
25- if test "X$GCC" = Xyes
26- then
27- if test "X$ac_R_nospace" = "Xno"
28- then
29- RPATH="-Wl,-R,"
30- else
31- RPATH="-Wl,-R"
32- fi
33- else
34- if test "X$ac_R_nospace" = "Xno"
35- then
36- RPATH="-R "
37- else
38- RPATH="-R"
39- fi
40- fi
41- ;;
42- *osf*|*openbsd*|*freebsd*)
43- if test "X$GCC" = Xyes
44- then
45- RPATH="-Wl,-rpath,"
46- else
47- RPATH="-rpath "
48- fi
49- ;;
50- *netbsd*)
51- if test "X$GCC" = Xyes
52- then
53- RPATH="-Wl,-R"
54- fi
55- ;;
56-esac
57-
58- if test "X$RPATH" != "X"
59- then
60- RPATH="$RPATH$libdir"
61- fi
62- else
63- _already_there=0
64- for X in `echo $RPATH | sed 's/:/ /g'`
65- do
66- if test "$X" = "$libdir"
67- then
68- _already_there=1
69- break
70- fi
71- done
72- if test $_already_there = 0
73- then
74- RPATH="$RPATH:$libdir"
75- fi
76- fi
77-fi
78-
79+RPATH=""
80
81 # The cast to long int works around a bug in the HP C Compiler
82 # 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 @@
1From 4588f4a0287787788eb86fb16f326cbaa7454e1d Mon Sep 17 00:00:00 2001
2From: Zheng Junling <zhengjunling@huawei.com>
3Date: Mon, 16 Jun 2014 12:51:25 +0000
4Subject: [PATCH] slang: fix the iconv existence checking
5
6When checking whether there is iconv, the configure file always check
7the host env.
8
9Now we make it working properly by adding correct prefix for cross-
10compiling environment.
11
12When enabling iconv-module, we see a QA warning because rpaths hardcoded
13into the build. And rpaths are not needed, so let's turn this off.
14
15This patch is generated by referencing the existing "fix-check-pcre"
16patch.
17
18Upstream-Status: Inappropriate
19
20Signed-off-by: Zheng Junling <zhengjunling@huawei.com>
21---
22 configure | 72 +++++---------------------------------------------------------
23 1 file changed, 6 insertions(+), 66 deletions(-)
24
25diff --git a/configure b/configure
26index fa395ff..7fa769c 100755
27--- a/configure
28+++ b/configure
29@@ -8259,6 +8259,7 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
30 /usr/include/iconv,/usr/lib \
31 /usr/iconv/include,/usr/iconv/lib \
32 /usr/include,/usr/lib \
33+ /usr/include,/usr/lib64 \
34 /opt/include/iconv,/opt/lib \
35 /opt/iconv/include,/opt/iconv/lib \
36 /opt/include,/opt/lib"
37@@ -8289,14 +8290,14 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
38 xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
39 xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
40 found=0
41- if test -r $xincdir/$xincfile
42+ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
43 then
44 for E in $exts
45 do
46- if test -r "$xlibdir/$xlibfile.$E"
47+ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
48 then
49- jd_iconv_include_dir="$xincdir"
50- jd_iconv_library_dir="$xlibdir"
51+ jd_iconv_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
52+ jd_iconv_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
53 jd_with_iconv_library="yes"
54 found=1
55 break
56@@ -8201,68 +8201,7 @@ $as_echo "yes: $jd_iconv_library_dir and $jd_iconv_include_dir" >&6; }
57 then
58 ICONV_LIB=""
59 else
60-
61-if test "X$jd_iconv_library_dir" != "X"
62-then
63- if test "X$RPATH" = "X"
64- then
65-
66-case "$host_os" in
67- *linux*|*solaris* )
68- if test "X$GCC" = Xyes
69- then
70- if test "X$ac_R_nospace" = "Xno"
71- then
72- RPATH="-Wl,-R,"
73- else
74- RPATH="-Wl,-R"
75- fi
76- else
77- if test "X$ac_R_nospace" = "Xno"
78- then
79- RPATH="-R "
80- else
81- RPATH="-R"
82- fi
83- fi
84- ;;
85- *osf*|*openbsd*|*freebsd*)
86- if test "X$GCC" = Xyes
87- then
88- RPATH="-Wl,-rpath,"
89- else
90- RPATH="-rpath "
91- fi
92- ;;
93- *netbsd*)
94- if test "X$GCC" = Xyes
95- then
96- RPATH="-Wl,-R"
97- fi
98- ;;
99-esac
100-
101- if test "X$RPATH" != "X"
102- then
103- RPATH="$RPATH$jd_iconv_library_dir"
104- fi
105- else
106- _already_there=0
107- for X in `echo $RPATH | sed 's/:/ /g'`
108- do
109- if test "$X" = "$jd_iconv_library_dir"
110- then
111- _already_there=1
112- break
113- fi
114- done
115- if test $_already_there = 0
116- then
117- RPATH="$RPATH:$jd_iconv_library_dir"
118- fi
119- fi
120-fi
121-
122+ RPATH=""
123 fi
124
125 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"
14LICENSE = "GPLv2" 14LICENSE = "GPLv2"
15LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02" 15LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
16 16
17
18SRC_URI = "http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \ 17SRC_URI = "http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \
19 file://rpathfix.patch \
20 file://fix-check-pcre.patch \
21 file://slang-fix-the-iconv-existence-checking.patch \
22 file://no-x.patch \ 18 file://no-x.patch \
19 file://dont-link-to-host.patch \
23 " 20 "
24 21
25SRC_URI[md5sum] = "bd46d1dc17a50c72004ad842829d7b1f" 22SRC_URI[md5sum] = "bd46d1dc17a50c72004ad842829d7b1f"
@@ -32,24 +29,26 @@ inherit autotools-brokensep
32CLEANBROKEN = "1" 29CLEANBROKEN = "1"
33 30
34EXTRA_OECONF = "--without-onig" 31EXTRA_OECONF = "--without-onig"
32# There's no way to turn off rpaths and slang will -rpath to the default search
33# path. Unset RPATH to stop this.
34EXTRA_OEMAKE = "RPATH=''"
35 35
36PACKAGECONFIG ??= "pcre" 36PACKAGECONFIG ??= "pcre"
37PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,pcre" 37PACKAGECONFIG[pcre] = "--with-pcre=${STAGING_DIR_HOST}${prefix},--without-pcre,pcre"
38PACKAGECONFIG[png] = "--with-png,--without-png,libpng" 38PACKAGECONFIG[png] = "--with-png=${STAGING_DIR_HOST}${prefix},--without-png,libpng"
39PACKAGECONFIG[zlib] = "--with-z,--without-z,zlib" 39PACKAGECONFIG[zlib] = "--with-z=${STAGING_DIR_HOST}${prefix},--without-z,zlib"
40 40
41do_configure_prepend() { 41do_configure_prepend() {
42 cd ${S}/autoconf
42 # slang keeps configure.ac and rest of autoconf files in autoconf/ directory 43 # slang keeps configure.ac and rest of autoconf files in autoconf/ directory
43 # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac} 44 # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac}
44 # to be present. Resulting files land in autoconf/autoconf/ so we need to move them. 45 # to be present. Resulting files land in autoconf/autoconf/ so we need to move them.
45 cd ${S}/autoconf && gnu-configize --force && mv autoconf/config.* . 46 gnu-configize --force && mv autoconf/config.* .
47 # For the same reason we also need to run autoconf manually.
48 autoconf && mv configure ..
46 cd ${B} 49 cd ${B}
47} 50}
48 51
49do_install() {
50 oe_runmake install DESTDIR=${D} -e 'INST_LIB_DIR=${STAGING_DIR_HOST}/usr/lib'
51}
52
53FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/" 52FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
54 53
55PARALLEL_MAKE = "" 54PARALLEL_MAKE = ""