diff options
Diffstat (limited to 'meta/recipes-extended/newt')
-rw-r--r-- | meta/recipes-extended/newt/files/cross_ar.patch | 58 | ||||
-rw-r--r-- | meta/recipes-extended/newt/files/fix_SHAREDDIR.patch | 37 | ||||
-rw-r--r-- | meta/recipes-extended/newt/files/remove_slang_include.patch | 16 | ||||
-rw-r--r-- | meta/recipes-extended/newt/libnewt-python_0.52.17.bb | 27 | ||||
-rw-r--r-- | meta/recipes-extended/newt/libnewt_0.52.17.bb | 54 |
5 files changed, 192 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..03007aa4f4 --- /dev/null +++ b/meta/recipes-extended/newt/files/cross_ar.patch | |||
@@ -0,0 +1,58 @@ | |||
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 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
16 | --- | ||
17 | Makefile.in | 3 ++- | ||
18 | configure.ac | 4 ++++ | ||
19 | 2 files changed, 6 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/Makefile.in b/Makefile.in | ||
22 | --- a/Makefile.in | ||
23 | +++ b/Makefile.in | ||
24 | @@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@ | ||
25 | LDFLAGS = @LDFLAGS@ | ||
26 | CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ | ||
27 | GNU_LD = @GNU_LD@ | ||
28 | +AR = @AR@ | ||
29 | |||
30 | VERSION = @VERSION@ | ||
31 | TAG = r$(subst .,-,$(VERSION)) | ||
32 | @@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNEWTSH) | ||
33 | $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS) | ||
34 | |||
35 | $(LIBNEWT): $(LIBOBJS) | ||
36 | - ar rv $@ $^ | ||
37 | + $(AR) rv $@ $^ | ||
38 | |||
39 | newt.o $(SHAREDDIR)/newt.o: newt.c Makefile | ||
40 | |||
41 | diff --git a/configure.ac b/configure.ac | ||
42 | index 92e6da8..cd83d57 100644 | ||
43 | --- a/configure.ac | ||
44 | +++ b/configure.ac | ||
45 | @@ -15,6 +15,10 @@ AC_PROG_INSTALL | ||
46 | AC_PROG_LN_S | ||
47 | AC_PROG_GREP | ||
48 | AC_SYS_LARGEFILE | ||
49 | +AN_MAKEVAR([AR], [AC_PROG_AR]) | ||
50 | +AN_PROGRAM([ar], [AC_PROG_AR]) | ||
51 | +AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) | ||
52 | +AC_PROG_AR | ||
53 | |||
54 | # Are we using GNU ld? | ||
55 | AC_MSG_CHECKING([for GNU ld]) | ||
56 | -- | ||
57 | 1.8.1.2 | ||
58 | |||
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..b0a1e8c105 --- /dev/null +++ b/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch | |||
@@ -0,0 +1,37 @@ | |||
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 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
13 | --- | ||
14 | Makefile.in | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/Makefile.in b/Makefile.in | ||
18 | --- a/Makefile.in | ||
19 | +++ b/Makefile.in | ||
20 | @@ -128,12 +128,12 @@ $(SHAREDDIR): | ||
21 | |||
22 | sharedlib: $(LIBNEWTSH) | ||
23 | |||
24 | -$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS) | ||
25 | +$(LIBNEWTSH): $(SHAREDOBJS) | ||
26 | $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) $(SHAREDOBJS) $(LDFLAGS) $(LIBS) | ||
27 | ln -fs $(LIBNEWTSONAME) libnewt.$(SOEXT) | ||
28 | ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME) | ||
29 | |||
30 | -$(SHAREDDIR)/%.o : %.c | ||
31 | +$(SHAREDDIR)/%.o : %.c $(SHAREDDIR) | ||
32 | $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $< | ||
33 | |||
34 | install: $(LIBNEWT) install-sh whiptail | ||
35 | -- | ||
36 | 1.8.1.2 | ||
37 | |||
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.17.bb b/meta/recipes-extended/newt/libnewt-python_0.52.17.bb new file mode 100644 index 0000000000..d591fbd3d2 --- /dev/null +++ b/meta/recipes-extended/newt/libnewt-python_0.52.17.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" _snack.so | ||
16 | } | ||
17 | |||
18 | do_install () { | ||
19 | install -d ${D}${PYTHON_SITEPACKAGES_DIR} | ||
20 | install -m 0755 ${PYTHON_DIR}/_snack.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.17.bb b/meta/recipes-extended/newt/libnewt_0.52.17.bb new file mode 100644 index 0000000000..28d5cf1a34 --- /dev/null +++ b/meta/recipes-extended/newt/libnewt_0.52.17.bb | |||
@@ -0,0 +1,54 @@ | |||
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=5f30f0716dfdd0d91eb439ebec522ec2" | ||
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 | " | ||
27 | |||
28 | SRC_URI[md5sum] = "f36d4d908965a0c89fd6fd8b61a6118b" | ||
29 | SRC_URI[sha256sum] = "69837973ef2ee2fa644426f1c3e48d2b18785ebcd382ef7fd01eb2e67d2d632b" | ||
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 | do_compile_prepend() { | ||
50 | # Make sure the recompile is OK | ||
51 | rm -f ${B}/.depend | ||
52 | } | ||
53 | |||
54 | FILES_whiptail = "${bindir}/whiptail" | ||