diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2010-04-02 21:13:51 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2010-04-02 21:13:51 +0000 |
commit | 1371d67ec7d1023d14c0d3f53daf4440dd2d6619 (patch) | |
tree | c1025ecada28be6770ef9610f649fda54267dbe3 /dev-libs/libtar | |
parent | Version bump dev-vcs/mercurial to 1.5.1. (diff) | |
download | gentoo-2-1371d67ec7d1023d14c0d3f53daf4440dd2d6619.tar.gz gentoo-2-1371d67ec7d1023d14c0d3f53daf4440dd2d6619.tar.bz2 gentoo-2-1371d67ec7d1023d14c0d3f53daf4440dd2d6619.zip |
Import Debian patchset. Build both shared and static libs.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/libtar')
-rw-r--r-- | dev-libs/libtar/ChangeLog | 10 | ||||
-rw-r--r-- | dev-libs/libtar/files/libtar-1.2.11-example-fix.patch | 20 | ||||
-rw-r--r-- | dev-libs/libtar/files/libtar-1.2.11-memleak.patch | 114 | ||||
-rw-r--r-- | dev-libs/libtar/libtar-1.2.11-r2.ebuild | 29 | ||||
-rw-r--r-- | dev-libs/libtar/libtar-1.2.11-r3.ebuild | 41 | ||||
-rw-r--r-- | dev-libs/libtar/metadata.xml | 9 |
6 files changed, 54 insertions, 169 deletions
diff --git a/dev-libs/libtar/ChangeLog b/dev-libs/libtar/ChangeLog index e1679a0e31b6..c1da9e88c5cc 100644 --- a/dev-libs/libtar/ChangeLog +++ b/dev-libs/libtar/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-libs/libtar -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libtar/ChangeLog,v 1.8 2009/12/31 17:25:38 ranger Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libtar/ChangeLog,v 1.9 2010/04/02 21:13:50 ssuominen Exp $ + +*libtar-1.2.11-r3 (02 Apr 2010) + + 02 Apr 2010; Samuli Suominen <ssuominen@gentoo.org> + +libtar-1.2.11-r3.ebuild: + Import Debian patchset. Build both shared and static libs. 31 Dec 2009; Brent Baude <ranger@gentoo.org> libtar-1.2.11-r2.ebuild: Marking libtar-1.2.11-r2 ~ppc64 for bug 283235 diff --git a/dev-libs/libtar/files/libtar-1.2.11-example-fix.patch b/dev-libs/libtar/files/libtar-1.2.11-example-fix.patch deleted file mode 100644 index f7f3bf50911b..000000000000 --- a/dev-libs/libtar/files/libtar-1.2.11-example-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- libtar-1.2.11.orig/libtar/libtar.c -+++ libtar-1.2.11/libtar/libtar.c -@@ -19,6 +19,7 @@ - #include <sys/param.h> - - #ifdef STDC_HEADERS -+# include <stdlib.h> - # include <string.h> - #endif - -@@ -91,6 +92,10 @@ - return -1; - } - -+ /* This is a bad thing to do on big-endian lp64 systems, where the -+ size and placement of integers is different than pointers. -+ However, to fix the problem 4 wrapper functions would be needed and -+ an extra bit of data associating GZF with the wrapper functions. */ - return (int)gzf; - } diff --git a/dev-libs/libtar/files/libtar-1.2.11-memleak.patch b/dev-libs/libtar/files/libtar-1.2.11-memleak.patch deleted file mode 100644 index 0b023042d6e0..000000000000 --- a/dev-libs/libtar/files/libtar-1.2.11-memleak.patch +++ /dev/null @@ -1,114 +0,0 @@ -Seems libtar likes to leak memory. Lets plug it. - -Patch by Per Lidén http://www.fukt.bth.se/~per/ -https://lists.feep.net:8080/pipermail/libtar/index.html -http://bugs.gentoo.org/show_bug.cgi?id=82858 - -Problem with patch: doesn't appear to be thread safe, but oh well, -not like the functions are named with _r suffixes ;). - ---- libtar-1.2.11-orig/lib/decode.c -+++ libtar-1.2.11/lib/decode.c -@@ -26,7 +26,7 @@ - char * - th_get_pathname(TAR *t) - { -- char filename[MAXPATHLEN]; -+ static char filename[MAXPATHLEN]; - - if (t->th_buf.gnu_longname) - return t->th_buf.gnu_longname; -@@ -35,11 +35,11 @@ - { - snprintf(filename, sizeof(filename), "%.155s/%.100s", - t->th_buf.prefix, t->th_buf.name); -- return strdup(filename); -+ return filename; - } - - snprintf(filename, sizeof(filename), "%.100s", t->th_buf.name); -- return strdup(filename); -+ return filename; - } - - ---- libtar-1.2.11-orig/lib/extract.c -+++ libtar-1.2.11/lib/extract.c -@@ -28,14 +28,6 @@ - #endif - - --struct linkname --{ -- char ln_save[MAXPATHLEN]; -- char ln_real[MAXPATHLEN]; --}; --typedef struct linkname linkname_t; -- -- - static int - tar_set_file_perms(TAR *t, char *realname) - { -@@ -98,7 +90,9 @@ - tar_extract_file(TAR *t, char *realname) - { - int i; -- linkname_t *lnp; -+ char *lnp; -+ int pathname_len; -+ int realname_len; - - if (t->options & TAR_NOOVERWRITE) - { -@@ -137,11 +131,13 @@ - if (i != 0) - return i; - -- lnp = (linkname_t *)calloc(1, sizeof(linkname_t)); -+ pathname_len = strlen(th_get_pathname(t)) + 1; -+ realname_len = strlen(realname) + 1; -+ lnp = (char *)calloc(1, pathname_len + realname_len); - if (lnp == NULL) - return -1; -- strlcpy(lnp->ln_save, th_get_pathname(t), sizeof(lnp->ln_save)); -- strlcpy(lnp->ln_real, realname, sizeof(lnp->ln_real)); -+ strcpy(&lnp[0], th_get_pathname(t)); -+ strcpy(&lnp[pathname_len], realname); - #ifdef DEBUG - printf("tar_extract_file(): calling libtar_hash_add(): key=\"%s\", " - "value=\"%s\"\n", th_get_pathname(t), realname); -@@ -288,7 +284,7 @@ - { - char *filename; - char *linktgt = NULL; -- linkname_t *lnp; -+ char *lnp; - libtar_hashptr_t hp; - - if (!TH_ISLNK(t)) -@@ -304,8 +300,8 @@ - if (libtar_hash_getkey(t->h, &hp, th_get_linkname(t), - (libtar_matchfunc_t)libtar_str_match) != 0) - { -- lnp = (linkname_t *)libtar_hashptr_data(&hp); -- linktgt = lnp->ln_real; -+ lnp = (char *)libtar_hashptr_data(&hp); -+ linktgt = &lnp[strlen(lnp) + 1]; - } - else - linktgt = th_get_linkname(t); ---- libtar-1.2.11-orig/lib/libtar.h -+++ libtar-1.2.11/lib/libtar.h -@@ -63,9 +63,9 @@ - /***** handle.c ************************************************************/ - - typedef int (*openfunc_t)(const char *, int, ...); --typedef int (*closefunc_t)(int); --typedef ssize_t (*readfunc_t)(int, void *, size_t); --typedef ssize_t (*writefunc_t)(int, const void *, size_t); -+typedef int (*closefunc_t)(long); -+typedef ssize_t (*readfunc_t)(long, void *, size_t); -+typedef ssize_t (*writefunc_t)(long, const void *, size_t); - - typedef struct - { diff --git a/dev-libs/libtar/libtar-1.2.11-r2.ebuild b/dev-libs/libtar/libtar-1.2.11-r2.ebuild deleted file mode 100644 index 21d0f3f1e605..000000000000 --- a/dev-libs/libtar/libtar-1.2.11-r2.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libtar/libtar-1.2.11-r2.ebuild,v 1.4 2009/12/31 17:25:38 ranger Exp $ - -inherit eutils - -DESCRIPTION="C library for manipulating POSIX tar files" -HOMEPAGE="http://www.feep.net/libtar/" -SRC_URI="ftp://ftp.feep.net/pub/software/libtar/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" -IUSE="" - -DEPEND="sys-libs/zlib" -RDEPEND="${DEPEND}" - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${P}-example-fix.patch - sed -i '/INSTALL_PROGRAM/s: -s$::' */Makefile.in -} - -src_install() { - emake install DESTDIR="${D}" || die - dodoc ChangeLog README TODO -} diff --git a/dev-libs/libtar/libtar-1.2.11-r3.ebuild b/dev-libs/libtar/libtar-1.2.11-r3.ebuild new file mode 100644 index 000000000000..1abfbcc903f5 --- /dev/null +++ b/dev-libs/libtar/libtar-1.2.11-r3.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libtar/libtar-1.2.11-r3.ebuild,v 1.1 2010/04/02 21:13:50 ssuominen Exp $ + +EAPI=2 +inherit autotools eutils multilib + +p_level=6 + +DESCRIPTION="C library for manipulating tar archives" +HOMEPAGE="http://www.feep.net/libtar/ http://packages.qa.debian.org/libt/libtar.html" +SRC_URI="ftp://ftp.feep.net/pub/software/libtar/${P}.tar.gz + mirror://debian/pool/main/libt/${PN}/${PN}_${PV}-${p_level}.diff.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="static-libs zlib" + +DEPEND="zlib? ( sys-libs/zlib ) + !zlib? ( app-arch/gzip )" + +src_prepare() { + epatch "${WORKDIR}"/${PN}_${PV}-${p_level}.diff + eautoreconf +} + +src_configure() { + econf \ + $(use_enable static-libs static) \ + $(use_with zlib) +} + +src_install() { + emake DESTDIR="${D}" install || die + + dodoc ChangeLog* README TODO + newdoc debian/changelog ChangeLog.debian + + rm -f "${D}"/usr/$(get_libdir)/${PN}.la +} diff --git a/dev-libs/libtar/metadata.xml b/dev-libs/libtar/metadata.xml index 54494c4bb860..7cc5007c5d79 100644 --- a/dev-libs/libtar/metadata.xml +++ b/dev-libs/libtar/metadata.xml @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>no-herd</herd> -<maintainer> -<email>maintainer-needed@gentoo.org</email> -</maintainer> + <herd>no-herd</herd> + <maintainer> + <email>ssuominen@gentoo.org</email> + <name>Samuli Suominen</name> + </maintainer> </pkgmetadata> |