summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/newt
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/newt')
-rw-r--r--meta-oe/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch26
-rw-r--r--meta-oe/recipes-extended/newt/files/cross_ar.patch59
-rw-r--r--meta-oe/recipes-extended/newt/libnewt_0.52.25.bb55
3 files changed, 140 insertions, 0 deletions
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 0000000000..bc55582fd9
--- /dev/null
+++ b/meta-oe/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch
@@ -0,0 +1,26 @@
1From fad40cfc18a42946a9a9e440c3434cd6b847ff9d Mon Sep 17 00:00:00 2001
2From: Otavio Salvador <otavio@ossystems.com.br>
3Date: Mon, 18 Jan 2016 17:05:19 +0000
4Subject: [PATCH] Makefile.in: Add tinfo library to the linking libraries
5Organization: O.S. Systems Software LTDA.
6
7Upstream-Status: Pending
8
9Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
10---
11 Makefile.in | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/Makefile.in b/Makefile.in
15index 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--
252.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 0000000000..eb8c4134b2
--- /dev/null
+++ b/meta-oe/recipes-extended/newt/files/cross_ar.patch
@@ -0,0 +1,59 @@
1From 0f33421000006f5991d1cddcb9dbc68b64141e44 Mon Sep 17 00:00:00 2001
2From: Jason Wessel <jason.wessel@windriver.com>
3Date: Wed, 19 Jun 2024 11:22:48 +0200
4Subject: [PATCH] Fix cross link using autoconf detected AR
5
6If building on 32bit host and creating 64bit libraries, the target
7package builds should not invoke the 32bit hosts's ar. Specifically
8you will get an error message like:
9
10x86_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
11libnewt.a: could not read symbols: Archive has no index; run ranlib to add one
12collect2: error: ld returned 1 exit status
13
14Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15
16Upstream-Status: Pending
17
18Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
19---
20 Makefile.in | 3 ++-
21 configure.ac | 4 ++++
22 2 files changed, 6 insertions(+), 1 deletion(-)
23
24diff --git a/Makefile.in b/Makefile.in
25index f8fe290..8a44a56 100644
26--- a/Makefile.in
27+++ b/Makefile.in
28@@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@
29 LDFLAGS = @LDFLAGS@
30 CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
31 GNU_LD = @GNU_LD@
32+AR = @AR@
33
34 VERSION = @VERSION@
35 TAG = r$(subst .,-,$(VERSION))
36@@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNEWTSH)
37 $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS)
38
39 $(LIBNEWT): $(LIBOBJS)
40- ar rv $@ $^
41+ $(AR) rv $@ $^
42
43 newt.o $(SHAREDDIR)/newt.o: newt.c Makefile
44
45diff --git a/configure.ac b/configure.ac
46index 434121e..2cfffd6 100644
47--- a/configure.ac
48+++ b/configure.ac
49@@ -15,6 +15,10 @@ AC_PROG_CC
50 AC_PROG_LN_S
51 AC_PROG_GREP
52 AC_SYS_LARGEFILE
53+AN_MAKEVAR([AR], [AC_PROG_AR])
54+AN_PROGRAM([ar], [AC_PROG_AR])
55+AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
56+AC_PROG_AR
57
58 AC_CHECK_SIZEOF([long])
59 AC_CHECK_SIZEOF([long long])
diff --git a/meta-oe/recipes-extended/newt/libnewt_0.52.25.bb b/meta-oe/recipes-extended/newt/libnewt_0.52.25.bb
new file mode 100644
index 0000000000..18a45a3342
--- /dev/null
+++ b/meta-oe/recipes-extended/newt/libnewt_0.52.25.bb
@@ -0,0 +1,55 @@
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://releases.pagure.org/newt/"
12SECTION = "libs"
13
14LICENSE = "LGPL-2.0-only"
15LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
16
17# slang needs to be >= 2.2
18DEPENDS = "slang popt python3"
19
20SRC_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 "
24
25SRC_URI[sha256sum] = "ef0ca9ee27850d1a5c863bb7ff9aa08096c9ed312ece9087b30f3a426828de82"
26
27S = "${UNPACKDIR}/newt-${PV}"
28
29inherit autotools-brokensep python3native python3-dir python3targetconfig
30
31EXTRA_OECONF = "--without-tcl --with-python"
32
33EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}"
34
35CLEANBROKEN = "1"
36
37export CPPFLAGS
38
39PACKAGES:prepend = "whiptail ${PN}-python "
40
41RDEPENDS:${PN}-python += "python3-core"
42FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*"
43
44do_configure:prepend() {
45 sh autogen.sh
46}
47
48do_compile:prepend() {
49 # Make sure the recompile is OK
50 rm -f ${B}/.depend
51}
52
53FILES:whiptail = "${bindir}/whiptail"
54
55BBCLASSEXTEND = "native nativesdk"