diff options
author | Steve Arnold <nerdboy@gentoo.org> | 2009-12-05 22:32:30 +0000 |
---|---|---|
committer | Steve Arnold <nerdboy@gentoo.org> | 2009-12-05 22:32:30 +0000 |
commit | 9960ec8e2e823cafced310a99f8f1185f1bc0ffd (patch) | |
tree | cd47c9dd204bf50730487210874e2baaa1e9c414 | |
parent | whitespace (diff) | |
download | gentoo-2-9960ec8e2e823cafced310a99f8f1185f1bc0ffd.tar.gz gentoo-2-9960ec8e2e823cafced310a99f8f1185f1bc0ffd.tar.bz2 gentoo-2-9960ec8e2e823cafced310a99f8f1185f1bc0ffd.zip |
Lemony-fresh rev-bump, now with shared library support.
(Portage version: 2.2_rc54/cvs/Linux x86_64)
-rw-r--r-- | dev-libs/liblist/ChangeLog | 9 | ||||
-rw-r--r-- | dev-libs/liblist/files/liblist-2.1-sharedlib.patch | 57 | ||||
-rw-r--r-- | dev-libs/liblist/liblist-2.1-r1.ebuild | 61 |
3 files changed, 126 insertions, 1 deletions
diff --git a/dev-libs/liblist/ChangeLog b/dev-libs/liblist/ChangeLog index dabb63b440cd..151855287622 100644 --- a/dev-libs/liblist/ChangeLog +++ b/dev-libs/liblist/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-libs/liblist # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/liblist/ChangeLog,v 1.1 2009/04/20 05:44:09 nerdboy Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/liblist/ChangeLog,v 1.2 2009/12/05 22:32:30 nerdboy Exp $ + +*liblist-2.1-r1 (05 Dec 2009) + + 05 Dec 2009; Steve Arnold <nerdboy@gentoo.org> +liblist-2.1-r1.ebuild, + +files/liblist-2.1-sharedlib.patch: + Lemony-fresh rev-bump, now with shared library support. Closes bug #294788. + Manifest issue also fixed (closes bug #294785). *liblist-2.1 (20 Apr 2009) diff --git a/dev-libs/liblist/files/liblist-2.1-sharedlib.patch b/dev-libs/liblist/files/liblist-2.1-sharedlib.patch new file mode 100644 index 000000000000..a8d72158d96e --- /dev/null +++ b/dev-libs/liblist/files/liblist-2.1-sharedlib.patch @@ -0,0 +1,57 @@ +--- Makefile.orig 2009-11-27 12:04:33.000000000 -0800 ++++ Makefile 2009-11-27 12:11:47.786739617 -0800 +@@ -25,12 +25,22 @@ + LIBS = -L. -llist + #LIBS = -L . -llist # Use this for HP-UX; great loader guys! + CPP = cpp -E -P -C ++CC = cc ++LD = cc + MANDIR = /usr/share/man + LIBDIR = /usr/lib64 + INCDIR = /usr/include + + #add macro for ranlib 4/96 *kob* - ranlib doesn't exist on solaris + RANLIB = ls ++LN = ln -s ++ ++# try making shared lib (SLA 11/2009) ++SHARED = liblist.so ++LDFLAGS += -L$(LIBDIR) ++MKOBJ = $(CC) -fPIC -c list.c -I$(INCDIR) ++MKSO = -shared -Wl,-soname,$(SHARED) ++SOVER = 0.0 + + # We specify some goofy dependencies between the man pages and the source, + # because the man page reflects whether USE_MACROS was specified. Thus, +@@ -42,8 +52,16 @@ + (cd examples; make) + + liblist.a: list.o ++ @echo "Making static lib ..." + ar rc liblist.a list.o + $(RANLIB) liblist.a ++ @echo "done" ++ @echo "Making shared lib $(SHARED) ..." ++ $(MKOBJ) -I. ++ $(LD) -I. $(MKSO) list.o -o $(SHARED).$(SOVER) $(LDFLAGS) ++ $(LN) $(SHARED).$(SOVER) $(SHARED).0 ++ $(LN) $(SHARED).$(SOVER) $(SHARED) ++ @echo "done" + + list.o: list.h list.3 Makefile + +@@ -62,6 +80,7 @@ + install: + install -c liblist.a $(DESTDIR)$(LIBDIR) + $(RANLIB) $(DESTDIR)$(LIBDIR)/liblist.a ++ install -c liblist.so $(DESTDIR)$(LIBDIR) + install -c list.h $(DESTDIR)$(INCDIR) + install -c queue.h $(DESTDIR)$(INCDIR) + install -c stack.h $(DESTDIR)$(INCDIR) +@@ -73,5 +92,5 @@ + install -c stack.3 $(DESTDIR)$(MANDIR)/man3 + + clean: +- rm -f *.o *.a list.h *.3 core ++ rm -f *.o *.a *.so list.h *.3 core + (cd examples; make clean) diff --git a/dev-libs/liblist/liblist-2.1-r1.ebuild b/dev-libs/liblist/liblist-2.1-r1.ebuild new file mode 100644 index 000000000000..f01c322d8b73 --- /dev/null +++ b/dev-libs/liblist/liblist-2.1-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/liblist/liblist-2.1-r1.ebuild,v 1.1 2009/12/05 22:32:30 nerdboy Exp $ + +inherit eutils toolchain-funcs + +DESCRIPTION="This package provides generic linked-list manipulation routines, plus queues and stacks." +HOMEPAGE="http://www.gentoogeek.org/viewvc/C/liblist/" +SRC_URI="http://www.gentoogeek.org/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="doc examples" + +src_unpack() { + unpack ${A} + cd "${S}" + sed -i -e "s:/usr/lib:/usr/$(get_libdir):g" Makefile \ + examples/cache/Makefile || die "sed 1 failed" + epatch "${FILESDIR}"/${P}-sharedlib.patch +} + +src_compile() { + make CC="$(tc-getCC)" LD="$(tc-getCC)" \ + || die "make failed" +} + +src_install() { + newman list.3 llist.3 + newman stack.man lstack.3 + newman queue.man lqueue.3 + dolib.a ${PN}.a + dolib.so ${PN}.so* + insinto /usr/include + doins list.h queue.h stack.h + dodoc README + + if use examples; then + dolib.a examples/cache/libcache.a + dobin examples/cache/cachetest + newman cache.3 lcache.3 + insinto /usr/share/doc/${P}/examples + doins examples/{*.c,Makefile,README} + insinto /usr/share/doc/${P}/examples/cache + doins examples/cache/{*.c,Makefile,README} + doins + fi + + if use doc; then + insinto /usr/share/doc/${P} + doins paper/paper.ps + fi +} + +pkg_postinst() { + elog "Note the man pages for this package have been renamed to avoid" + elog "name collisions with some system functions, however, the libs" + elog "and header files have not been changed." + elog "The new names are llist, lcache, lqueue, and lstack." +} |