diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2024-06-19 11:22:48 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-06-19 11:28:54 -0700 |
commit | 785f6147bc5871da147b9c9ae156d72f94769d95 (patch) | |
tree | 22327eb3cb1c8eead9faff14af09cd23ad7679c8 /meta-oe/recipes-extended/newt | |
parent | 05237151280c6e762c744792fe6d8ece0e66fb9f (diff) | |
download | meta-openembedded-785f6147bc5871da147b9c9ae156d72f94769d95.tar.gz |
libnewt: add from oe-core
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/newt')
4 files changed, 167 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch b/meta-oe/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch new file mode 100644 index 000000000..090ed5c1c --- /dev/null +++ b/meta-oe/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 08ba909500412611953aea0fa2fe0d8fe76b6e24 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> | ||
3 | Date: Wed, 21 Sep 2016 21:14:40 +0200 | ||
4 | Subject: [PATCH] detect gold as GNU linker too | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> | ||
12 | |||
13 | --- | ||
14 | configure.ac | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/configure.ac b/configure.ac | ||
18 | index 468c718..cd93f30 100644 | ||
19 | --- a/configure.ac | ||
20 | +++ b/configure.ac | ||
21 | @@ -28,7 +28,7 @@ AC_CHECK_SIZEOF([void *]) | ||
22 | AC_MSG_CHECKING([for GNU ld]) | ||
23 | LD=$($CC -print-prog-name=ld 2>&5) | ||
24 | |||
25 | -if test $($LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld") = 0; then | ||
26 | +if test $($LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ") = 0; then | ||
27 | # Not | ||
28 | GNU_LD="" | ||
29 | AC_MSG_RESULT([no]) | ||
diff --git a/meta-oe/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch b/meta-oe/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch new file mode 100644 index 000000000..bc55582fd --- /dev/null +++ b/meta-oe/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From fad40cfc18a42946a9a9e440c3434cd6b847ff9d Mon Sep 17 00:00:00 2001 | ||
2 | From: Otavio Salvador <otavio@ossystems.com.br> | ||
3 | Date: Mon, 18 Jan 2016 17:05:19 +0000 | ||
4 | Subject: [PATCH] Makefile.in: Add tinfo library to the linking libraries | ||
5 | Organization: O.S. Systems Software LTDA. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
10 | --- | ||
11 | Makefile.in | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/Makefile.in b/Makefile.in | ||
15 | index a85d00f..98b85f9 100644 | ||
16 | --- a/Makefile.in | ||
17 | +++ b/Makefile.in | ||
18 | @@ -1,4 +1,4 @@ | ||
19 | -LIBS = -lslang @LIBS@ | ||
20 | +LIBS = -lslang -ltinfo @LIBS@ | ||
21 | LIBTCL = @TCL_LIB_FLAG@ | ||
22 | |||
23 | CC = @CC@ | ||
24 | -- | ||
25 | 2.1.4 | ||
26 | |||
diff --git a/meta-oe/recipes-extended/newt/files/cross_ar.patch b/meta-oe/recipes-extended/newt/files/cross_ar.patch new file mode 100644 index 000000000..86cc0be1d --- /dev/null +++ b/meta-oe/recipes-extended/newt/files/cross_ar.patch | |||
@@ -0,0 +1,56 @@ | |||
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 | Index: newt-0.52.20/Makefile.in | ||
22 | =================================================================== | ||
23 | --- newt-0.52.20.orig/Makefile.in | ||
24 | +++ newt-0.52.20/Makefile.in | ||
25 | @@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@ | ||
26 | LDFLAGS = @LDFLAGS@ | ||
27 | CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ | ||
28 | GNU_LD = @GNU_LD@ | ||
29 | +AR = @AR@ | ||
30 | |||
31 | VERSION = @VERSION@ | ||
32 | TAG = r$(subst .,-,$(VERSION)) | ||
33 | @@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNE | ||
34 | $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS) | ||
35 | |||
36 | $(LIBNEWT): $(LIBOBJS) | ||
37 | - ar rv $@ $^ | ||
38 | + $(AR) rv $@ $^ | ||
39 | |||
40 | newt.o $(SHAREDDIR)/newt.o: newt.c Makefile | ||
41 | |||
42 | Index: newt-0.52.20/configure.ac | ||
43 | =================================================================== | ||
44 | --- newt-0.52.20.orig/configure.ac | ||
45 | +++ newt-0.52.20/configure.ac | ||
46 | @@ -15,6 +15,10 @@ AC_PROG_INSTALL | ||
47 | AC_PROG_LN_S | ||
48 | AC_PROG_GREP | ||
49 | AC_SYS_LARGEFILE | ||
50 | +AN_MAKEVAR([AR], [AC_PROG_AR]) | ||
51 | +AN_PROGRAM([ar], [AC_PROG_AR]) | ||
52 | +AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) | ||
53 | +AC_PROG_AR | ||
54 | |||
55 | AC_CHECK_SIZEOF([long]) | ||
56 | AC_CHECK_SIZEOF([long long]) | ||
diff --git a/meta-oe/recipes-extended/newt/libnewt_0.52.24.bb b/meta-oe/recipes-extended/newt/libnewt_0.52.24.bb new file mode 100644 index 000000000..1e39a1c5c --- /dev/null +++ b/meta-oe/recipes-extended/newt/libnewt_0.52.24.bb | |||
@@ -0,0 +1,56 @@ | |||
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://releases.pagure.org/newt/" | ||
12 | SECTION = "libs" | ||
13 | |||
14 | LICENSE = "LGPL-2.0-only" | ||
15 | LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" | ||
16 | |||
17 | # slang needs to be >= 2.2 | ||
18 | DEPENDS = "slang popt python3" | ||
19 | |||
20 | SRC_URI = "https://releases.pagure.org/newt/newt-${PV}.tar.gz \ | ||
21 | file://cross_ar.patch \ | ||
22 | file://Makefile.in-Add-tinfo-library-to-the-linking-librari.patch \ | ||
23 | file://0001-detect-gold-as-GNU-linker-too.patch \ | ||
24 | " | ||
25 | |||
26 | SRC_URI[sha256sum] = "5ded7e221f85f642521c49b1826c8de19845aa372baf5d630a51774b544fbdbb" | ||
27 | |||
28 | S = "${WORKDIR}/newt-${PV}" | ||
29 | |||
30 | inherit autotools-brokensep python3native python3-dir python3targetconfig | ||
31 | |||
32 | EXTRA_OECONF = "--without-tcl --with-python" | ||
33 | |||
34 | EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}" | ||
35 | |||
36 | CLEANBROKEN = "1" | ||
37 | |||
38 | export CPPFLAGS | ||
39 | |||
40 | PACKAGES:prepend = "whiptail ${PN}-python " | ||
41 | |||
42 | RDEPENDS:${PN}-python += "python3-core" | ||
43 | FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*" | ||
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" | ||
55 | |||
56 | BBCLASSEXTEND = "native nativesdk" | ||