summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/newt
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2024-06-19 11:22:48 +0200
committerKhem Raj <raj.khem@gmail.com>2024-06-19 11:28:54 -0700
commit785f6147bc5871da147b9c9ae156d72f94769d95 (patch)
tree22327eb3cb1c8eead9faff14af09cd23ad7679c8 /meta-oe/recipes-extended/newt
parent05237151280c6e762c744792fe6d8ece0e66fb9f (diff)
downloadmeta-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')
-rw-r--r--meta-oe/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch29
-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.patch56
-rw-r--r--meta-oe/recipes-extended/newt/libnewt_0.52.24.bb56
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 @@
1From 08ba909500412611953aea0fa2fe0d8fe76b6e24 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
3Date: Wed, 21 Sep 2016 21:14:40 +0200
4Subject: [PATCH] detect gold as GNU linker too
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Upstream-Status: Pending
10
11Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
12
13---
14 configure.ac | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/configure.ac b/configure.ac
18index 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 @@
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 000000000..86cc0be1d
--- /dev/null
+++ b/meta-oe/recipes-extended/newt/files/cross_ar.patch
@@ -0,0 +1,56 @@
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
21Index: 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
42Index: 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 @@
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 file://0001-detect-gold-as-GNU-linker-too.patch \
24 "
25
26SRC_URI[sha256sum] = "5ded7e221f85f642521c49b1826c8de19845aa372baf5d630a51774b544fbdbb"
27
28S = "${WORKDIR}/newt-${PV}"
29
30inherit autotools-brokensep python3native python3-dir python3targetconfig
31
32EXTRA_OECONF = "--without-tcl --with-python"
33
34EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}"
35
36CLEANBROKEN = "1"
37
38export CPPFLAGS
39
40PACKAGES:prepend = "whiptail ${PN}-python "
41
42RDEPENDS:${PN}-python += "python3-core"
43FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*"
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"
55
56BBCLASSEXTEND = "native nativesdk"