Patchwork [meta-oe] libedit: Adds version 20110802 (initial recipe)

login
register
mail settings
Submitter Noor Ahsan
Date Feb. 21, 2012, 12:47 p.m.
Message ID <1329828457-23375-1-git-send-email-noor_ahsan@mentor.com>
Download mbox | patch
Permalink /patch/21477/
State New, archived
Headers show

Comments

Noor Ahsan - Feb. 21, 2012, 12:47 p.m.
From: Noor Ahsan <noor_ahsan@mentor.com>

* Imported recipe from oe-classic commit id 4e75705872fd9f289bbf4c74a912ca4710f50b93.
* Upgrade it to latest stable version.
* Tested on P4080DS.

Signed-of-by: Noor Ahsan <noor_ahsan@mentor.com>
---
 .../libedit/files/20031222-debian-to-gentoo.patch  |  125 ++++++++++++++++++++
 .../libedit/files/libedit-add-soname.diff          |   12 ++
 .../recipes-devtools/libedit/libedit_20110802.bb   |   16 +++
 3 files changed, 153 insertions(+), 0 deletions(-)
Khem Raj - Feb. 21, 2012, 9:12 p.m.
On Tue, Feb 21, 2012 at 4:47 AM, Noor, Ahsan <noor_ahsan@mentor.com> wrote:
>
> +Upstream-Status: Inappropriate [not author]

hmm thats interesting. We can still push patches upstream with proper
attribution to author.
therefore this may not be a reason to make it Inappropriate.
Noor Ahsan - Feb. 22, 2012, 7:15 a.m.
Does this block my recipe to be accepted in meta-oe and by your comment below you are suggesting me to upstream that patch to libedit project?

-----Original Message-----
From: openembedded-devel-bounces@lists.openembedded.org [mailto:openembedded-devel-bounces@lists.openembedded.org] On Behalf Of Khem Raj
Sent: Wednesday, February 22, 2012 2:12 AM
To: openembedded-devel@lists.openembedded.org
Subject: Re: [oe] [meta-oe][PATCH] libedit: Adds version 20110802 (initial recipe)

On Tue, Feb 21, 2012 at 4:47 AM, Noor, Ahsan <noor_ahsan@mentor.com> wrote:
>
> +Upstream-Status: Inappropriate [not author]

hmm thats interesting. We can still push patches upstream with proper
attribution to author.
therefore this may not be a reason to make it Inappropriate.
Khem Raj - Feb. 24, 2012, 7:31 a.m.
On (22/02/12 07:15), Ahsan, Noor wrote:
> Does this block my recipe to be accepted in meta-oe and by your comment below you are suggesting me to upstream that patch to libedit project?
> 

Well I am ok since it has something in there may be just change it to
'Pending' so that if someone later wants to upstream this patch he gets
a right message and it does not hurt to get patches run via upstream in
any case.

> -----Original Message-----
> From: openembedded-devel-bounces@lists.openembedded.org [mailto:openembedded-devel-bounces@lists.openembedded.org] On Behalf Of Khem Raj
> Sent: Wednesday, February 22, 2012 2:12 AM
> To: openembedded-devel@lists.openembedded.org
> Subject: Re: [oe] [meta-oe][PATCH] libedit: Adds version 20110802 (initial recipe)
> 
> On Tue, Feb 21, 2012 at 4:47 AM, Noor, Ahsan <noor_ahsan@mentor.com> wrote:
> >
> > +Upstream-Status: Inappropriate [not author]
> 
> hmm thats interesting. We can still push patches upstream with proper
> attribution to author.
> therefore this may not be a reason to make it Inappropriate.
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Patch

diff --git a/meta-oe/recipes-devtools/libedit/files/20031222-debian-to-gentoo.patch b/meta-oe/recipes-devtools/libedit/files/20031222-debian-to-gentoo.patch
new file mode 100644
index 0000000..62069d5
--- /dev/null
+++ b/meta-oe/recipes-devtools/libedit/files/20031222-debian-to-gentoo.patch
@@ -0,0 +1,125 @@ 
+This patch is from openembedded 4e75705872fd9f289bbf4c74a912ca4710f50b93. 
+
+Upstream-Status: Inappropriate [not author]
+diff -ur netbsd-cvs/Makefile libedit-20031222/Makefile
+--- netbsd-cvs/Makefile	2003-12-22 13:44:24.798012752 -0500
++++ libedit-20031222/Makefile	2003-12-22 14:55:15.133863488 -0500
+@@ -5,6 +5,7 @@
+ 
+ WARNS=	3
+ LIB=	edit
++LIBS=-lncurses
+ 
+ OSRCS=	chared.c common.c el.c emacs.c fcns.c help.c hist.c key.c map.c \
+ 	parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c
+@@ -22,9 +23,10 @@
+ 	editline.3 tok_line.3 editline.3 tok_str.3
+ 
+ # For speed and debugging
+-#SRCS=   ${OSRCS} tokenizer.c history.c readline.c
++SRCS=   ${OSRCS} tokenizer.c history.c readline.c vis.c unvis.c fgetln.c strlcat.c strlcpy.c
+ # For protection
+-SRCS=	editline.c tokenizer.c history.c readline.c
++#SRCS=	editline.c tokenizer.c history.c readline.c
++OOBJS= $(patsubst %.c,%.o,$(SRCS))
+ 
+ LIBEDITDIR?=${.CURDIR}
+ 
+@@ -38,6 +40,7 @@
+ CPPFLAGS+=-I. -I${.CURDIR}
+ CPPFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
+ CPPFLAGS+=#-DDEBUG_PASTE -DDEBUG_EDIT
++CFLAGS+=-I. -include ../glibc-bsd-glue/bsdcompat.h -I../glibc-compat -I../glibc-bsd-glue
+ 
+ AHDR=vi.h emacs.h common.h 
+ ASRC=${LIBEDITDIR}/vi.c ${LIBEDITDIR}/emacs.c ${LIBEDITDIR}/common.c
+@@ -46,46 +49,56 @@
+ CLEANFILES+=	${AHDR} fcns.h help.h fcns.c help.c
+ 
+ SUBDIR=	readline
++HOST_SH=sh
++LIBEDITDIR=.
++all: .depend libedit.a libedit.so
+ 
+ vi.h: vi.c makelist
+ 	${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \
+-	    > ${.TARGET}.tmp && \
+-	    mv ${.TARGET}.tmp ${.TARGET}
++	    > $@.tmp && \
++	    mv $@.tmp $@
+ 
+ emacs.h: emacs.c makelist
+ 	${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/emacs.c \
+-	    > ${.TARGET}.tmp && \
+-	    mv ${.TARGET}.tmp ${.TARGET}
++	    > $@.tmp && \
++	    mv $@.tmp $@
+ 
+ common.h: common.c makelist
+ 	${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/common.c \
+-	    > ${.TARGET}.tmp && \
+-	    mv ${.TARGET}.tmp ${.TARGET}
++	    > $@.tmp && \
++	    mv $@.tmp $@
+ 
+ fcns.h: ${AHDR} makelist
+-	${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \
+-	    mv ${.TARGET}.tmp ${.TARGET}
++	${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > $@.tmp && \
++	    mv $@.tmp $@
+ 
+ fcns.c: ${AHDR} fcns.h help.h makelist
+-	${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \
+-	    mv ${.TARGET}.tmp ${.TARGET}
++	${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > $@.tmp && \
++	    mv $@.tmp $@
+ 
+ help.c: ${ASRC} makelist 
+-	${HOST_SH} ${LIBEDITDIR}/makelist -bc ${ASRC} > ${.TARGET}.tmp && \
+-	    mv ${.TARGET}.tmp ${.TARGET}
++	${HOST_SH} ${LIBEDITDIR}/makelist -bc ${ASRC} > $@.tmp && \
++	    mv $@.tmp $@
+ 
+ help.h: ${ASRC} makelist
+-	${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \
+-	    mv ${.TARGET}.tmp ${.TARGET}
++	${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > $@.tmp && \
++	    mv $@.tmp $@
+ 
+ editline.c: ${OSRCS}
+-	${HOST_SH} ${LIBEDITDIR}/makelist -e ${.ALLSRC:T} > ${.TARGET}.tmp && \
+-	    mv ${.TARGET}.tmp ${.TARGET}
++	${HOST_SH} ${LIBEDITDIR}/makelist -e ${.ALLSRC:T} > $@.tmp && \
++	    mv $@.tmp $@
+ 
+ test.o:	${LIBEDITDIR}/TEST/test.c
+ 	
+ test:	libedit.a test.o 
+-	${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermcap
++	${CC} ${LDFLAGS} ${.ALLSRC} -o $@ libedit.a ${LDADD} -ltermcap
+ 
+-.include <bsd.lib.mk>
+-.include <bsd.subdir.mk>
++.depend: vi.h emacs.h common.h fcns.h help.h help.c
++	-mkdir .a .so
++.c.o:
++	${CC} ${CFLAGS} -c $< -o .a/$*
++	${CC} ${CFLAGS} -fPIC -c $< -o .so/$*
++libedit.a: ${OOBJS}
++	ar -r $@ .a/*
++libedit.so: ${OOBJS}
++	${CC} --shared -o $@ .so/* ${LIBS}
+diff -ur netbsd-cvs/el.c libedit-20031222/el.c
+--- netbsd-cvs/el.c	2003-12-22 13:44:25.474909848 -0500
++++ libedit-20031222/el.c	2003-12-22 15:00:15.545194024 -0500
+@@ -439,8 +439,10 @@
+ 		static const char elpath[] = "/.editrc";
+ 		char path[MAXPATHLEN];
+ 
++#if 0
+ 		if (issetugid())
+ 			return (-1);
++#endif
+ 		if ((ptr = getenv("HOME")) == NULL)
+ 			return (-1);
+ 		if (strlcpy(path, ptr, sizeof(path)) >= sizeof(path))
diff --git a/meta-oe/recipes-devtools/libedit/files/libedit-add-soname.diff b/meta-oe/recipes-devtools/libedit/files/libedit-add-soname.diff
new file mode 100644
index 0000000..6b0434c
--- /dev/null
+++ b/meta-oe/recipes-devtools/libedit/files/libedit-add-soname.diff
@@ -0,0 +1,12 @@ 
+Add sonmae option in compiler switches. This patch is from openembedded 4e75705872fd9f289bbf4c74a912ca4710f50b93
+
+Upstream-Status: Inappropriate [not author]
+
+--- Makefile.orig	2005-04-20 18:12:45.000000000 +0200
++++ Makefile	2005-04-20 18:14:37.000000000 +0200
+@@ -101,4 +101,4 @@
+ libedit.a: ${OOBJS}
+ 	ar -r $@ .a/*
+ libedit.so: ${OOBJS}
+-	${CC} --shared -o $@ .so/* ${LIBS}
++	${CC} --shared -Wl,-soname=libedit.so.0 -o $@ .so/* ${LIBS}
diff --git a/meta-oe/recipes-devtools/libedit/libedit_20110802.bb b/meta-oe/recipes-devtools/libedit/libedit_20110802.bb
new file mode 100644
index 0000000..7410245
--- /dev/null
+++ b/meta-oe/recipes-devtools/libedit/libedit_20110802.bb
@@ -0,0 +1,16 @@ 
+DESCRIPTION = "BSD replacement for libreadline"
+HOMEPAGE = "http://www.thrysoee.dk/editline/"
+SECTION = "libs"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1e4228d0c5a9093b01aeaaeae6641533"
+
+DEPENDS = "ncurses"
+
+inherit autotools
+
+SRC_URI = "http://www.thrysoee.dk/editline/${PN}-${PV}-3.0.tar.gz"
+
+S = ${WORKDIR}/${PN}-${PV}-3.0
+
+SRC_URI[md5sum] = "0ea42e2c794da8ed32f6307b427f6590"
+SRC_URI[sha256sum] = "0b5ec9aa41faff761cda7819add93e9d8cb9c0bad85e65a686475e8375ac8a71"