From c321922f4b0a96b8378cda20b5a68403fa38b4e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Diego=20Elio=20Petten=C3=B2?= Date: Thu, 28 Dec 2006 16:18:56 +0000 Subject: [PATCH] Split the build-system changes from the glibc changes, and add a tiny patch to build on FreeBSD, according to bug #157407. Package-Manager: portage-2.1.2_rc4-r1 --- dev-libs/libedit/ChangeLog | 9 +++- dev-libs/libedit/Manifest | 42 +++++++++++-------- .../libedit-20061103-debian-to-gentoo.patch | 10 +---- .../files/libedit-20061103-freebsd.patch | 16 +++++++ .../files/libedit-20061103-glibc.patch | 17 ++++++++ dev-libs/libedit/libedit-20061103.ebuild | 25 ++++++++--- 6 files changed, 86 insertions(+), 33 deletions(-) create mode 100644 dev-libs/libedit/files/libedit-20061103-freebsd.patch create mode 100644 dev-libs/libedit/files/libedit-20061103-glibc.patch diff --git a/dev-libs/libedit/ChangeLog b/dev-libs/libedit/ChangeLog index bf225e303f82..38c75528ad28 100644 --- a/dev-libs/libedit/ChangeLog +++ b/dev-libs/libedit/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-libs/libedit # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libedit/ChangeLog,v 1.18 2006/11/03 07:11:31 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libedit/ChangeLog,v 1.19 2006/12/28 16:18:56 flameeyes Exp $ + + 28 Dec 2006; Diego Pettenò + files/libedit-20061103-debian-to-gentoo.patch, + +files/libedit-20061103-freebsd.patch, + +files/libedit-20061103-glibc.patch, libedit-20061103.ebuild: + Split the build-system changes from the glibc changes, and add a tiny patch + to build on FreeBSD, according to bug #157407. *libedit-20061103 (03 Nov 2006) diff --git a/dev-libs/libedit/Manifest b/dev-libs/libedit/Manifest index 88c3071f434f..65a88bd22716 100644 --- a/dev-libs/libedit/Manifest +++ b/dev-libs/libedit/Manifest @@ -5,24 +5,32 @@ AUX libedit-20050531-debian-to-gentoo.patch 3869 RMD160 e4e601d310972aa3d245bbd3 MD5 758704551b5bed630ac9f19193f4921e files/libedit-20050531-debian-to-gentoo.patch 3869 RMD160 e4e601d310972aa3d245bbd30ce47ac1db1c65ac files/libedit-20050531-debian-to-gentoo.patch 3869 SHA256 219c635305e0d490fd925b03d299637558f9aea2b8dbba057018481eea67aa4f files/libedit-20050531-debian-to-gentoo.patch 3869 -AUX libedit-20061103-debian-to-gentoo.patch 3864 RMD160 d422d603899e851abb915dbbb7c0d01d35f9de5f SHA1 70ffa4f3b4d7321a7278a6abb1cf2bba58db62b2 SHA256 afc66f92e4e5c6404c5cb4a85c90335a3d372d9456589fc309535ee05c95d6d8 -MD5 7cffa70f59ca345f94010ceb3d7cad2c files/libedit-20061103-debian-to-gentoo.patch 3864 -RMD160 d422d603899e851abb915dbbb7c0d01d35f9de5f files/libedit-20061103-debian-to-gentoo.patch 3864 -SHA256 afc66f92e4e5c6404c5cb4a85c90335a3d372d9456589fc309535ee05c95d6d8 files/libedit-20061103-debian-to-gentoo.patch 3864 -DIST libedit-20050930.tar.bz2 96696 RMD160 0f7711c1d7128d97383aecedd31730783b5abf61 SHA1 c0d00695ff0f65489acc9a435ff82dec70975d3e SHA256 a1dd32b6732f15b125b33de29ec5f50b0f464d23ad3432755ab3b7498b77ddf6 +AUX libedit-20061103-debian-to-gentoo.patch 3472 RMD160 01d9d2f2c59831ff283f496e4c15090caab2c396 SHA1 1c1b62b39454f273e1822499cf6945a7e65f7919 SHA256 8e80db89d128d5d3230274e9b9e58f37a94c2342b208c2b1324b2a17da9e8299 +MD5 16ef5620f88c95809b1628a8b4eefe08 files/libedit-20061103-debian-to-gentoo.patch 3472 +RMD160 01d9d2f2c59831ff283f496e4c15090caab2c396 files/libedit-20061103-debian-to-gentoo.patch 3472 +SHA256 8e80db89d128d5d3230274e9b9e58f37a94c2342b208c2b1324b2a17da9e8299 files/libedit-20061103-debian-to-gentoo.patch 3472 +AUX libedit-20061103-freebsd.patch 474 RMD160 b8d9e28408be9fddcbc72818dde0c4ec4728b1be SHA1 182f0ea1a3961bbe6cadff6de4a9c93cf58820da SHA256 21c667f6251533b4aa5e342262ccddc200a3c5b1070ffc97059baa3124fc1e17 +MD5 1eb94edf8844aec911cd96411c5a851f files/libedit-20061103-freebsd.patch 474 +RMD160 b8d9e28408be9fddcbc72818dde0c4ec4728b1be files/libedit-20061103-freebsd.patch 474 +SHA256 21c667f6251533b4aa5e342262ccddc200a3c5b1070ffc97059baa3124fc1e17 files/libedit-20061103-freebsd.patch 474 +AUX libedit-20061103-glibc.patch 653 RMD160 63dccbe75ecb0882fdad9c8678c5e857fd28ac2b SHA1 c8f29040ea91e62c82af20f4c727484a4e202153 SHA256 6fbd3940dae33c0ee9308baa5093ef0894c6f0e0efe991f89f6db5820130696d +MD5 7bc395455c95f3a20804130540599750 files/libedit-20061103-glibc.patch 653 +RMD160 63dccbe75ecb0882fdad9c8678c5e857fd28ac2b files/libedit-20061103-glibc.patch 653 +SHA256 6fbd3940dae33c0ee9308baa5093ef0894c6f0e0efe991f89f6db5820130696d files/libedit-20061103-glibc.patch 653 +DIST libedit-20050930.tar.bz2 96696 RMD160 0f7711c1d7128d97383aecedd31730783b5abf61 SHA256 a1dd32b6732f15b125b33de29ec5f50b0f464d23ad3432755ab3b7498b77ddf6 DIST libedit-20061103.tar.bz2 97032 RMD160 8c15895dedd69d979c8d911803246808c12ea198 SHA1 1057422d38ff226f8bb6cc392efc9c0c36a1d208 SHA256 11542988eeed1fbe23b8b421389dbd37fb0cedb1d7c76b49399163be27eacf3f EBUILD libedit-20050930.ebuild 932 RMD160 f34a25bc369cf5484fa876397962523723a54a1b SHA1 e384dcfa2fcd2ec44f45e318ecd6df946bd6fef2 SHA256 4f975ae89896edfefe31d53ebcea2fb8ac1e9af590de1a43af4d16ed79295790 MD5 6f5c76ccc4ad0165ad69c6bf6916b4b4 libedit-20050930.ebuild 932 RMD160 f34a25bc369cf5484fa876397962523723a54a1b libedit-20050930.ebuild 932 SHA256 4f975ae89896edfefe31d53ebcea2fb8ac1e9af590de1a43af4d16ed79295790 libedit-20050930.ebuild 932 -EBUILD libedit-20061103.ebuild 1018 RMD160 a03e1aa2763e57284380c148c2a027a1581e09a0 SHA1 ded409d713a52dfa453d24e49b93dd28cf270985 SHA256 9d10825dbd80b06c5fd033bdc51ff1535770b407c9493fe4a7acd5db9825a8a6 -MD5 58d520c1fa3db80d6c58515563fddeaa libedit-20061103.ebuild 1018 -RMD160 a03e1aa2763e57284380c148c2a027a1581e09a0 libedit-20061103.ebuild 1018 -SHA256 9d10825dbd80b06c5fd033bdc51ff1535770b407c9493fe4a7acd5db9825a8a6 libedit-20061103.ebuild 1018 -MISC ChangeLog 1615 RMD160 98332910384d7327d51108e31f1fb866a5222bdf SHA1 38256257669550fe7c90069273e549ea3753162b SHA256 5ad859bf67aaa90731996a5f34cf520e679c071b15080a72a4e4f22df2421183 -MD5 8dc154c60d64fe6846b0a667b2a42074 ChangeLog 1615 -RMD160 98332910384d7327d51108e31f1fb866a5222bdf ChangeLog 1615 -SHA256 5ad859bf67aaa90731996a5f34cf520e679c071b15080a72a4e4f22df2421183 ChangeLog 1615 +EBUILD libedit-20061103.ebuild 1315 RMD160 dbe4bcf04b69fef02a4bc02c36d114e0d725e7cd SHA1 4b4f96ae20c64075275b0b596c6d8ea0bc77f3d0 SHA256 942893f69dfb0c7d7f640439b7fe52fc953c1e0b3d8cd8d409af8f9ee260a22f +MD5 3c7a534698ae5e04e46957fab480bdad libedit-20061103.ebuild 1315 +RMD160 dbe4bcf04b69fef02a4bc02c36d114e0d725e7cd libedit-20061103.ebuild 1315 +SHA256 942893f69dfb0c7d7f640439b7fe52fc953c1e0b3d8cd8d409af8f9ee260a22f libedit-20061103.ebuild 1315 +MISC ChangeLog 1953 RMD160 27ab8e20aae4d8c57013e548d5dfa24a47e80457 SHA1 7691d467d7840ff1aa6f21ec4aaa468e8527b3ed SHA256 a6877b61abe348a263ff37629cc5d704cc89bdf60dc6a6b67697ce808cbc9b09 +MD5 c171bf8419b4800fb2d17e228ee55a53 ChangeLog 1953 +RMD160 27ab8e20aae4d8c57013e548d5dfa24a47e80457 ChangeLog 1953 +SHA256 a6877b61abe348a263ff37629cc5d704cc89bdf60dc6a6b67697ce808cbc9b09 ChangeLog 1953 MISC metadata.xml 620 RMD160 185de826ddbcf0ac5f56b5807e15c9db5a9b6ecf SHA1 ca4dbed5f026bcd680b4532694b567bf435e8e4a SHA256 854e5b5f73775072518392a556d0f43ea0f4932bed80db7efc6a921d6e354ce1 MD5 dd9909c8d431d328b7f97b210f957592 metadata.xml 620 RMD160 185de826ddbcf0ac5f56b5807e15c9db5a9b6ecf metadata.xml 620 @@ -34,9 +42,9 @@ MD5 516cad497ba5c3a5d23ea3bf25f2d6d6 files/digest-libedit-20061103 250 RMD160 450d39f599024f0902b68d12c5255120d28cc3d7 files/digest-libedit-20061103 250 SHA256 e728639d59bc42c99887fa4d8ef36fb3eead6d5e33aad39bca885012568a7e09 files/digest-libedit-20061103 250 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.5 (GNU/Linux) +Version: GnuPG v1.4.6 (GNU/Linux) -iD8DBQFFXSxzamhnQswr0vIRAkAnAKCNW5rIANl4ai6Euc7n6p7uxB9g4QCgml7A -hoNBsyXsx6/VMewm335P/gU= -=NchO +iD8DBQFFk+52AiZjviIA2XgRAku+AKC89T8QGO4qo1tVsUGsNA1T5W3/BQCeJbME +LqRLhI7KFSH2NbVitSlvRnM= +=lhdn -----END PGP SIGNATURE----- diff --git a/dev-libs/libedit/files/libedit-20061103-debian-to-gentoo.patch b/dev-libs/libedit/files/libedit-20061103-debian-to-gentoo.patch index 686c3aa96da1..5d011d92de70 100644 --- a/dev-libs/libedit/files/libedit-20061103-debian-to-gentoo.patch +++ b/dev-libs/libedit/files/libedit-20061103-debian-to-gentoo.patch @@ -13,7 +13,7 @@ # 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 ++SRCS= ${OSRCS} tokenizer.c history.c readline.c # For protection -SRCS= editline.c tokenizer.c history.c readline.c +#SRCS= editline.c tokenizer.c history.c readline.c @@ -21,14 +21,6 @@ LIBEDITDIR?=${.CURDIR} -@@ -42,6 +44,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 @@ -51,54 +51,68 @@ SUBDIR= readline diff --git a/dev-libs/libedit/files/libedit-20061103-freebsd.patch b/dev-libs/libedit/files/libedit-20061103-freebsd.patch new file mode 100644 index 000000000000..dea35d4e122c --- /dev/null +++ b/dev-libs/libedit/files/libedit-20061103-freebsd.patch @@ -0,0 +1,16 @@ +Index: work/netbsd-cvs/sys.h +=================================================================== +--- work.orig/netbsd-cvs/sys.h ++++ work/netbsd-cvs/sys.h +@@ -44,6 +44,11 @@ + #include + #endif + ++#ifdef __FreeBSD__ ++# undef __weak_reference ++# define __weak_reference(x) __attribute__((__weakref__)) ++#endif ++ + #if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8) + # define __attribute__(A) + #endif diff --git a/dev-libs/libedit/files/libedit-20061103-glibc.patch b/dev-libs/libedit/files/libedit-20061103-glibc.patch new file mode 100644 index 000000000000..fdf15570428c --- /dev/null +++ b/dev-libs/libedit/files/libedit-20061103-glibc.patch @@ -0,0 +1,17 @@ +--- netbsd-cvs/Makefile ++++ libedit-uNF/Makefile +@@ -25,5 +26,5 @@ + 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 +@@ -42,6 +44,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 diff --git a/dev-libs/libedit/libedit-20061103.ebuild b/dev-libs/libedit/libedit-20061103.ebuild index e6b32033fcd1..656ce986b6bb 100644 --- a/dev-libs/libedit/libedit-20061103.ebuild +++ b/dev-libs/libedit/libedit-20061103.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libedit/libedit-20061103.ebuild,v 1.1 2006/11/03 07:11:31 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libedit/libedit-20061103.ebuild,v 1.2 2006/12/28 16:18:56 flameeyes Exp $ -inherit eutils +inherit eutils toolchain-funcs DESCRIPTION="BSD replacement for libreadline" HOMEPAGE="http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/" @@ -10,18 +10,27 @@ SRC_URI="mirror://gentoo/${P}.tar.bz2" LICENSE="BSD" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~x86" -IUSE="" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~x86 ~x86-fbsd" +IUSE="elibc_glibc" -DEPEND="sys-libs/ncurses" +DEPEND="sys-libs/ncurses + !<=sys-freebs/freebsd-lib-6.2_rc1" S=${WORKDIR}/netbsd-cvs src_unpack() { unpack ${A} cd "${S}" - mv "${WORKDIR}"/glibc-*/*.c . + epatch "${FILESDIR}"/${PN}-20061103-debian-to-gentoo.patch + + if use elibc_glibc; then + mv "${WORKDIR}"/glibc-*/*.c . + epatch "${FILESDIR}/${P}-glibc.patch" + fi + + # FreeBSD's __weak_reference macro differs from NetBSD's + epatch "${FILESDIR}/${P}-freebsd.patch" } src_compile() { @@ -30,11 +39,15 @@ src_compile() { } src_install() { + into / dolib.so libedit.so || die "dolib.so" + into /usr dolib.a libedit.a || die "dolib.a" insinto /usr/include doins histedit.h || die "doins histedit.h" insinto /usr/include/libedit doins readline/readline.h || die "doins readline.h" doman *.[35] + + gen_usr_ldscript libedit.so } -- 2.26.2