From 972dcfcdbfe75dcfeb777150c136576cf1a71e99 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 9 Oct 2015 22:59:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- meta/recipes-extended/newt/files/cross_ar.patch | 58 ++++++++++++++++++++++ .../newt/files/fix_SHAREDDIR.patch | 37 ++++++++++++++ .../newt/files/remove_slang_include.patch | 16 ++++++ .../newt/libnewt-python_0.52.17.bb | 27 ++++++++++ meta/recipes-extended/newt/libnewt_0.52.17.bb | 54 ++++++++++++++++++++ 5 files changed, 192 insertions(+) create mode 100644 meta/recipes-extended/newt/files/cross_ar.patch create mode 100644 meta/recipes-extended/newt/files/fix_SHAREDDIR.patch create mode 100644 meta/recipes-extended/newt/files/remove_slang_include.patch create mode 100644 meta/recipes-extended/newt/libnewt-python_0.52.17.bb create mode 100644 meta/recipes-extended/newt/libnewt_0.52.17.bb (limited to 'meta/recipes-extended/newt') 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 @@ +Fix cross link using autoconf detected AR + +If building on 32bit host and creating 64bit libraries, the target +package builds should not invoke the 32bit hosts's ar. Specifically +you will get an error message like: + +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 +libnewt.a: could not read symbols: Archive has no index; run ranlib to add one +collect2: error: ld returned 1 exit status + +Signed-off-by: Jason Wessel + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia +--- + Makefile.in | 3 ++- + configure.ac | 4 ++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +--- a/Makefile.in ++++ b/Makefile.in +@@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ + CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ + GNU_LD = @GNU_LD@ ++AR = @AR@ + + VERSION = @VERSION@ + TAG = r$(subst .,-,$(VERSION)) +@@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNEWTSH) + $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS) + + $(LIBNEWT): $(LIBOBJS) +- ar rv $@ $^ ++ $(AR) rv $@ $^ + + newt.o $(SHAREDDIR)/newt.o: newt.c Makefile + +diff --git a/configure.ac b/configure.ac +index 92e6da8..cd83d57 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -15,6 +15,10 @@ AC_PROG_INSTALL + AC_PROG_LN_S + AC_PROG_GREP + AC_SYS_LARGEFILE ++AN_MAKEVAR([AR], [AC_PROG_AR]) ++AN_PROGRAM([ar], [AC_PROG_AR]) ++AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) ++AC_PROG_AR + + # Are we using GNU ld? + AC_MSG_CHECKING([for GNU ld]) +-- +1.8.1.2 + 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 @@ +Upstream-Status: Pending + +Author: dexuan.cui@intel.com +Date: Fri Apr 15 16:17:39 CST 2011 + +The patch fixes a parallel-make issue: when generating $(SHAREDDIR)/%.o, we should +ensure the directory ${SHAREDDIR} exists. + +We need to push the patch to upstream. + +Signed-off-by: Dexuan Cui +Signed-off-by: Hongxu Jia +--- + Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +--- a/Makefile.in ++++ b/Makefile.in +@@ -128,12 +128,12 @@ $(SHAREDDIR): + + sharedlib: $(LIBNEWTSH) + +-$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS) ++$(LIBNEWTSH): $(SHAREDOBJS) + $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) $(SHAREDOBJS) $(LDFLAGS) $(LIBS) + ln -fs $(LIBNEWTSONAME) libnewt.$(SOEXT) + ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME) + +-$(SHAREDDIR)/%.o : %.c ++$(SHAREDDIR)/%.o : %.c $(SHAREDDIR) + $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $< + + install: $(LIBNEWT) install-sh whiptail +-- +1.8.1.2 + 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 @@ + +Upstream-Status: Pending + +Index: git/Makefile.in +=================================================================== +--- git.orig/Makefile.in ++++ git/Makefile.in +@@ -5,7 +5,7 @@ CC = @CC@ + CPP = @CPP@ + CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ +-CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@ ++CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ + GNU_LD = @GNU_LD@ + + 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 @@ +require recipes-extended/newt/libnewt_${PV}.bb + +SUMMARY .= " - python" +DEPENDS = "libnewt python" +RDEPENDS_${PN} += "python-core" + +inherit pythonnative python-dir + +EXTRA_OECONF += "--with-python" +EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}" + + +do_compile () { + VERSION="$(sed -n 's/^VERSION = //p' Makefile)" + oe_runmake "LIBNEWTSH=${STAGING_LIBDIR}/libnewt.so.$VERSION" _snack.so +} + +do_install () { + install -d ${D}${PYTHON_SITEPACKAGES_DIR} + install -m 0755 ${PYTHON_DIR}/_snack.so ${D}${PYTHON_SITEPACKAGES_DIR}/ + install -m 0644 snack.py ${D}${PYTHON_SITEPACKAGES_DIR}/ +} + +PACKAGES_remove = "whiptail" + +FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*" +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 @@ +SUMMARY = "A library for text mode user interfaces" + +DESCRIPTION = "Newt is a programming library for color text mode, widget based user \ +interfaces. Newt can be used to add stacked windows, entry widgets, \ +checkboxes, radio buttons, labels, plain text fields, scrollbars, \ +etc., to text mode user interfaces. This package also contains the \ +shared library needed by programs built with newt, as well as a \ +/usr/bin/dialog replacement called whiptail. Newt is based on the \ +slang library." + +HOMEPAGE = "https://fedorahosted.org/newt/" +SECTION = "libs" + +LICENSE = "LGPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" + +# slang needs to be >= 2.2 +DEPENDS = "slang popt" + +PR = "r2" + +SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \ + file://remove_slang_include.patch \ + file://fix_SHAREDDIR.patch \ + file://cross_ar.patch \ +" + +SRC_URI[md5sum] = "f36d4d908965a0c89fd6fd8b61a6118b" +SRC_URI[sha256sum] = "69837973ef2ee2fa644426f1c3e48d2b18785ebcd382ef7fd01eb2e67d2d632b" + +S = "${WORKDIR}/newt-${PV}" + +EXTRA_OECONF = "--without-tcl --without-python" + +inherit autotools-brokensep + +export STAGING_INCDIR +export STAGING_LIBDIR + +export BUILD_SYS +export HOST_SYS + +PACKAGES_prepend = "whiptail " + +do_configure_prepend() { + sh autogen.sh +} + +do_compile_prepend() { + # Make sure the recompile is OK + rm -f ${B}/.depend +} + +FILES_whiptail = "${bindir}/whiptail" -- cgit v1.2.3-54-g00ecf