summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/newt
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-extended/newt
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-extended/newt')
-rw-r--r--meta/recipes-extended/newt/files/cross_ar.patch58
-rw-r--r--meta/recipes-extended/newt/files/fix_SHAREDDIR.patch37
-rw-r--r--meta/recipes-extended/newt/files/remove_slang_include.patch16
-rw-r--r--meta/recipes-extended/newt/libnewt-python_0.52.17.bb27
-rw-r--r--meta/recipes-extended/newt/libnewt_0.52.17.bb54
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 @@
1Fix cross link using autoconf detected AR
2
3If building on 32bit host and creating 64bit libraries, the target
4package builds should not invoke the 32bit hosts's ar. Specifically
5you will get an error message like:
6
7x86_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
8libnewt.a: could not read symbols: Archive has no index; run ranlib to add one
9collect2: error: ld returned 1 exit status
10
11Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
12
13Upstream-Status: Pending
14
15Signed-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
21diff --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
41diff --git a/configure.ac b/configure.ac
42index 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--
571.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 @@
1Upstream-Status: Pending
2
3Author: dexuan.cui@intel.com
4Date: Fri Apr 15 16:17:39 CST 2011
5
6The patch fixes a parallel-make issue: when generating $(SHAREDDIR)/%.o, we should
7ensure the directory ${SHAREDDIR} exists.
8
9We need to push the patch to upstream.
10
11Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
12Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
13---
14 Makefile.in | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --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--
361.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
2Upstream-Status: Pending
3
4Index: 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 @@
1require recipes-extended/newt/libnewt_${PV}.bb
2
3SUMMARY .= " - python"
4DEPENDS = "libnewt python"
5RDEPENDS_${PN} += "python-core"
6
7inherit pythonnative python-dir
8
9EXTRA_OECONF += "--with-python"
10EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}"
11
12
13do_compile () {
14 VERSION="$(sed -n 's/^VERSION = //p' Makefile)"
15 oe_runmake "LIBNEWTSH=${STAGING_LIBDIR}/libnewt.so.$VERSION" _snack.so
16}
17
18do_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
24PACKAGES_remove = "whiptail"
25
26FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
27FILES_${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 @@
1SUMMARY = "A library for text mode user interfaces"
2
3DESCRIPTION = "Newt is a programming library for color text mode, widget based user \
4interfaces. Newt can be used to add stacked windows, entry widgets, \
5checkboxes, radio buttons, labels, plain text fields, scrollbars, \
6etc., to text mode user interfaces. This package also contains the \
7shared library needed by programs built with newt, as well as a \
8/usr/bin/dialog replacement called whiptail. Newt is based on the \
9slang library."
10
11HOMEPAGE = "https://fedorahosted.org/newt/"
12SECTION = "libs"
13
14LICENSE = "LGPLv2"
15LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
16
17# slang needs to be >= 2.2
18DEPENDS = "slang popt"
19
20PR = "r2"
21
22SRC_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
28SRC_URI[md5sum] = "f36d4d908965a0c89fd6fd8b61a6118b"
29SRC_URI[sha256sum] = "69837973ef2ee2fa644426f1c3e48d2b18785ebcd382ef7fd01eb2e67d2d632b"
30
31S = "${WORKDIR}/newt-${PV}"
32
33EXTRA_OECONF = "--without-tcl --without-python"
34
35inherit autotools-brokensep
36
37export STAGING_INCDIR
38export STAGING_LIBDIR
39
40export BUILD_SYS
41export HOST_SYS
42
43PACKAGES_prepend = "whiptail "
44
45do_configure_prepend() {
46 sh autogen.sh
47}
48
49do_compile_prepend() {
50 # Make sure the recompile is OK
51 rm -f ${B}/.depend
52}
53
54FILES_whiptail = "${bindir}/whiptail"