diff options
Diffstat (limited to 'meta/recipes-extended/newt')
6 files changed, 196 insertions, 0 deletions
diff --git a/meta/recipes-extended/newt/files/cross_ar.patch b/meta/recipes-extended/newt/files/cross_ar.patch new file mode 100644 index 0000000000..f67239abda --- /dev/null +++ b/meta/recipes-extended/newt/files/cross_ar.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | Fix cross link using autoconf detected AR | ||
2 | |||
3 | If building on 32bit host and creating 64bit libraries, the target | ||
4 | package builds should not invoke the 32bit hosts's ar. Specifically | ||
5 | you will get an error message like: | ||
6 | |||
7 | x86_64-linux-gcc -m64 --sysroot=/opt/qemux86-64/tmp/sysroots/qemux86-64 -g -o test test.o libnewt.a -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lslang | ||
8 | libnewt.a: could not read symbols: Archive has no index; run ranlib to add one | ||
9 | collect2: error: ld returned 1 exit status | ||
10 | |||
11 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | |||
15 | --- | ||
16 | Makefile.in | 3 ++- | ||
17 | configure.ac | 4 ++++ | ||
18 | 2 files changed, 6 insertions(+), 1 deletion(-) | ||
19 | |||
20 | --- a/Makefile.in | ||
21 | +++ b/Makefile.in | ||
22 | @@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@ | ||
23 | LDFLAGS = @LDFLAGS@ | ||
24 | CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ | ||
25 | GNU_LD = @GNU_LD@ | ||
26 | +AR = @AR@ | ||
27 | |||
28 | VERSION = @VERSION@ | ||
29 | TAG = r$(subst .,-,$(VERSION)) | ||
30 | @@ -95,7 +96,7 @@ whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH) | ||
31 | $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS) | ||
32 | |||
33 | $(LIBNEWT): $(LIBOBJS) | ||
34 | - ar rv $@ $^ | ||
35 | + $(AR) rv $@ $^ | ||
36 | |||
37 | newt.o $(SHAREDDIR)/newt.o: newt.c Makefile | ||
38 | |||
39 | --- a/configure.ac | ||
40 | +++ b/configure.ac | ||
41 | @@ -14,6 +14,10 @@ AC_PROG_CC | ||
42 | AC_PROG_INSTALL | ||
43 | AC_PROG_LN_S | ||
44 | AC_PROG_GREP | ||
45 | +AN_MAKEVAR([AR], [AC_PROG_AR]) | ||
46 | +AN_PROGRAM([ar], [AC_PROG_AR]) | ||
47 | +AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) | ||
48 | +AC_PROG_AR | ||
49 | |||
50 | # Are we using GNU ld? | ||
51 | AC_MSG_CHECKING([for GNU ld]) | ||
diff --git a/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch b/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch new file mode 100644 index 0000000000..7795260388 --- /dev/null +++ b/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Author: dexuan.cui@intel.com | ||
4 | Date: Fri Apr 15 16:17:39 CST 2011 | ||
5 | |||
6 | The patch fixes a parallel-make issue: when generating $(SHAREDDIR)/%.o, we should | ||
7 | ensure the directory ${SHAREDDIR} exists. | ||
8 | |||
9 | We need to push the patch to upstream. | ||
10 | |||
11 | Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> | ||
12 | |||
13 | --- a/Makefile.in | ||
14 | +++ b/Makefile.in | ||
15 | @@ -114,12 +114,12 @@ | ||
16 | |||
17 | sharedlib: $(LIBNEWTSH) | ||
18 | |||
19 | -$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS) | ||
20 | +$(LIBNEWTSH): $(SHAREDOBJS) | ||
21 | $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) $(SHAREDOBJS) $(LDFLAGS) $(LIBS) | ||
22 | ln -fs $(LIBNEWTSONAME) libnewt.so | ||
23 | ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME) | ||
24 | |||
25 | -$(SHAREDDIR)/%.o : %.c | ||
26 | +$(SHAREDDIR)/%.o : %.c $(SHAREDDIR) | ||
27 | $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $< | ||
28 | |||
29 | install: $(LIBNEWT) install-sh whiptail | ||
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/files/remove_slang_include.patch b/meta/recipes-extended/newt/files/remove_slang_include.patch new file mode 100644 index 0000000000..a2634ec75b --- /dev/null +++ b/meta/recipes-extended/newt/files/remove_slang_include.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | |||
2 | Upstream-Status: Pending | ||
3 | |||
4 | Index: git/Makefile.in | ||
5 | =================================================================== | ||
6 | --- git.orig/Makefile.in | ||
7 | +++ git/Makefile.in | ||
8 | @@ -5,7 +5,7 @@ CC = @CC@ | ||
9 | CPP = @CPP@ | ||
10 | CFLAGS = @CFLAGS@ | ||
11 | LDFLAGS = @LDFLAGS@ | ||
12 | -CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@ | ||
13 | +CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ | ||
14 | GNU_LD = @GNU_LD@ | ||
15 | |||
16 | VERSION = @VERSION@ | ||
diff --git a/meta/recipes-extended/newt/libnewt-python_0.52.14.bb b/meta/recipes-extended/newt/libnewt-python_0.52.14.bb new file mode 100644 index 0000000000..871b1958eb --- /dev/null +++ b/meta/recipes-extended/newt/libnewt-python_0.52.14.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | require recipes-extended/newt/libnewt_${PV}.bb | ||
2 | |||
3 | SUMMARY .= " - python" | ||
4 | DEPENDS = "libnewt python" | ||
5 | RDEPENDS_${PN} += "python-core" | ||
6 | |||
7 | inherit pythonnative python-dir | ||
8 | |||
9 | EXTRA_OECONF += "--with-python" | ||
10 | EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}" | ||
11 | |||
12 | |||
13 | do_compile () { | ||
14 | VERSION="$(sed -n 's/^VERSION = //p' Makefile)" | ||
15 | oe_runmake "LIBNEWTSH=${STAGING_LIBDIR}/libnewt.so.$VERSION" _snackmodule.so | ||
16 | } | ||
17 | |||
18 | do_install () { | ||
19 | install -d ${D}${PYTHON_SITEPACKAGES_DIR} | ||
20 | install -m 0755 ${PYTHON_DIR}/_snackmodule.so ${D}${PYTHON_SITEPACKAGES_DIR}/ | ||
21 | install -m 0644 snack.py ${D}${PYTHON_SITEPACKAGES_DIR}/ | ||
22 | } | ||
23 | |||
24 | PACKAGES_remove = "whiptail" | ||
25 | |||
26 | FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*" | ||
27 | FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" | ||
diff --git a/meta/recipes-extended/newt/libnewt_0.52.14.bb b/meta/recipes-extended/newt/libnewt_0.52.14.bb new file mode 100644 index 0000000000..65bcf40428 --- /dev/null +++ b/meta/recipes-extended/newt/libnewt_0.52.14.bb | |||
@@ -0,0 +1,49 @@ | |||
1 | SUMMARY = "A library for text mode user interfaces" | ||
2 | |||
3 | DESCRIPTION = "Newt is a programming library for color text mode, widget based user \ | ||
4 | interfaces. Newt can be used to add stacked windows, entry widgets, \ | ||
5 | checkboxes, radio buttons, labels, plain text fields, scrollbars, \ | ||
6 | etc., to text mode user interfaces. This package also contains the \ | ||
7 | shared library needed by programs built with newt, as well as a \ | ||
8 | /usr/bin/dialog replacement called whiptail. Newt is based on the \ | ||
9 | slang library." | ||
10 | |||
11 | HOMEPAGE = "https://fedorahosted.org/newt/" | ||
12 | SECTION = "libs" | ||
13 | |||
14 | LICENSE = "LGPLv2" | ||
15 | LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605" | ||
16 | |||
17 | # slang needs to be >= 2.2 | ||
18 | DEPENDS = "slang popt" | ||
19 | |||
20 | PR = "r2" | ||
21 | |||
22 | SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \ | ||
23 | file://remove_slang_include.patch \ | ||
24 | file://fix_SHAREDDIR.patch \ | ||
25 | file://cross_ar.patch \ | ||
26 | file://fix_python_fpic.patch" | ||
27 | |||
28 | SRC_URI[md5sum] = "eb78c6bb658b92ec7198908b5b8d0e37" | ||
29 | SRC_URI[sha256sum] = "f70f4f58baa60388ddf2e39249ffb00898fb40f2b2767e42e2ab51fe4b40978e" | ||
30 | |||
31 | S = "${WORKDIR}/newt-${PV}" | ||
32 | |||
33 | EXTRA_OECONF = "--without-tcl --without-python" | ||
34 | |||
35 | inherit autotools-brokensep | ||
36 | |||
37 | export STAGING_INCDIR | ||
38 | export STAGING_LIBDIR | ||
39 | |||
40 | export BUILD_SYS | ||
41 | export HOST_SYS | ||
42 | |||
43 | PACKAGES_prepend = "whiptail " | ||
44 | |||
45 | do_configure_prepend() { | ||
46 | sh autogen.sh | ||
47 | } | ||
48 | |||
49 | FILES_whiptail = "${bindir}/whiptail" | ||