summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-12-28 16:18:56 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-12-28 16:18:56 +0000
commitbe60ee1912e185b7239310e767fcf5e2fec179ea (patch)
tree423a0a89951c1f011d5e69bca603a48bf73024fa /dev-libs
parentStable on sparc wrt #158254 (diff)
downloadgentoo-2-be60ee1912e185b7239310e767fcf5e2fec179ea.tar.gz
gentoo-2-be60ee1912e185b7239310e767fcf5e2fec179ea.tar.bz2
gentoo-2-be60ee1912e185b7239310e767fcf5e2fec179ea.zip
Split the build-system changes from the glibc changes, and add a tiny patch to build on FreeBSD, according to bug #157407.
(Portage version: 2.1.2_rc4-r1)
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libedit/ChangeLog9
-rw-r--r--dev-libs/libedit/files/libedit-20061103-debian-to-gentoo.patch10
-rw-r--r--dev-libs/libedit/files/libedit-20061103-freebsd.patch16
-rw-r--r--dev-libs/libedit/files/libedit-20061103-glibc.patch17
-rw-r--r--dev-libs/libedit/libedit-20061103.ebuild25
5 files changed, 61 insertions, 16 deletions
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ò <flameeyes@gentoo.org>
+ 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/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 <sys/cdefs.h>
+ #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
}