diff options
-rw-r--r-- | meta/recipes-extended/newt/files/fix_python_fpic.patch | 24 | ||||
-rw-r--r-- | meta/recipes-extended/newt/libnewt_0.52.14.bb | 24 |
2 files changed, 42 insertions, 6 deletions
diff --git a/meta/recipes-extended/newt/files/fix_python_fpic.patch b/meta/recipes-extended/newt/files/fix_python_fpic.patch new file mode 100644 index 0000000000..3ef94e0c56 --- /dev/null +++ b/meta/recipes-extended/newt/files/fix_python_fpic.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | Fix relocations warning when compile python module | ||
2 | |||
3 | After enable python support in newt, bitbake complains warning: | ||
4 | |||
5 | WARNING: QA Issue: ELF binary '/mnt/sda10/poky-all-platform/build/tmp/work/i586-poky-linux/libnewt/0.52.14-r2/packages-split/libnewt-python/usr/lib/python2.7/site-packages/_snackmodule.so' has relocations in .text | ||
6 | |||
7 | Add flag -fPIC to compile _snackmodule.so to fix the warning. | ||
8 | |||
9 | Signed-off-by: Kang Kai <kai.kang@windriver.com> | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | --- | ||
14 | --- newt-0.52.14/Makefile.in 2012-12-04 17:27:27.578915801 +0800 | ||
15 | +++ newt-0.52.14/Makefile.in.new 2012-12-04 17:28:43.274918472 +0800 | ||
16 | @@ -84,7 +84,7 @@ | ||
17 | PIFLAGS=`$$ver-config --includes`; \ | ||
18 | PLDFLAGS=`$$ver-config --ldflags`; \ | ||
19 | PLFLAGS=`$$ver-config --libs`; \ | ||
20 | - $(CC) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snackmodule.o snackmodule.c ;\ | ||
21 | + $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snackmodule.o snackmodule.c ;\ | ||
22 | $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L. -lnewt $(LIBS);\ | ||
23 | done || : | ||
24 | touch $@ | ||
diff --git a/meta/recipes-extended/newt/libnewt_0.52.14.bb b/meta/recipes-extended/newt/libnewt_0.52.14.bb index 0208695699..c1ec029c56 100644 --- a/meta/recipes-extended/newt/libnewt_0.52.14.bb +++ b/meta/recipes-extended/newt/libnewt_0.52.14.bb | |||
@@ -15,28 +15,40 @@ LICENSE = "LGPLv2" | |||
15 | LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605" | 15 | LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605" |
16 | 16 | ||
17 | # slang needs to be >= 2.2 | 17 | # slang needs to be >= 2.2 |
18 | DEPENDS = "slang popt" | 18 | DEPENDS = "slang popt python" |
19 | 19 | ||
20 | PR = "r1" | 20 | PR = "r2" |
21 | 21 | ||
22 | SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \ | 22 | SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \ |
23 | file://remove_slang_include.patch \ | 23 | file://remove_slang_include.patch \ |
24 | file://fix_SHAREDDIR.patch \ | 24 | file://fix_SHAREDDIR.patch \ |
25 | file://cross_ar.patch" | 25 | file://cross_ar.patch \ |
26 | file://fix_python_fpic.patch" | ||
26 | 27 | ||
27 | SRC_URI[md5sum] = "eb78c6bb658b92ec7198908b5b8d0e37" | 28 | SRC_URI[md5sum] = "eb78c6bb658b92ec7198908b5b8d0e37" |
28 | SRC_URI[sha256sum] = "f70f4f58baa60388ddf2e39249ffb00898fb40f2b2767e42e2ab51fe4b40978e" | 29 | SRC_URI[sha256sum] = "f70f4f58baa60388ddf2e39249ffb00898fb40f2b2767e42e2ab51fe4b40978e" |
29 | 30 | ||
30 | S = "${WORKDIR}/newt-${PV}" | 31 | S = "${WORKDIR}/newt-${PV}" |
31 | 32 | ||
32 | EXTRA_OECONF = "--without-python --without-tcl" | 33 | EXTRA_OECONF = "--without-tcl" |
33 | 34 | ||
34 | inherit autotools | 35 | inherit autotools pythonnative python-dir |
35 | 36 | ||
36 | PACKAGES_prepend = "whiptail " | 37 | EXTRA_OEMAKE = "PYTHONVERS=${PYTHON_DIR}" |
38 | |||
39 | export STAGING_INCDIR | ||
40 | export STAGING_LIBDIR | ||
41 | |||
42 | export BUILD_SYS | ||
43 | export HOST_SYS | ||
44 | |||
45 | PACKAGES_prepend = "whiptail ${PN}-python " | ||
37 | 46 | ||
38 | do_configure_prepend() { | 47 | do_configure_prepend() { |
39 | sh autogen.sh | 48 | sh autogen.sh |
40 | } | 49 | } |
41 | 50 | ||
42 | FILES_whiptail = "${bindir}/whiptail" | 51 | FILES_whiptail = "${bindir}/whiptail" |
52 | FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" | ||
53 | FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*" | ||
54 | FILES_${PN}-staticdev = "${libdir}/*.a" | ||