summaryrefslogtreecommitdiff
path: root/app-arch/pbzip2
diff options
context:
space:
mode:
Diffstat (limited to 'app-arch/pbzip2')
-rw-r--r--app-arch/pbzip2/Manifest8
-rw-r--r--app-arch/pbzip2/files/pbzip2-1.1.10-makefile.patch20
-rw-r--r--app-arch/pbzip2/files/pbzip2-1.1.12-data_truncation_fix.patch142
-rw-r--r--app-arch/pbzip2/metadata.xml14
-rw-r--r--app-arch/pbzip2/pbzip2-1.1.12-r1.ebuild43
-rw-r--r--app-arch/pbzip2/pbzip2-1.1.12.ebuild42
-rw-r--r--app-arch/pbzip2/pbzip2-1.1.13.ebuild42
7 files changed, 311 insertions, 0 deletions
diff --git a/app-arch/pbzip2/Manifest b/app-arch/pbzip2/Manifest
new file mode 100644
index 000000000000..652aab9e7624
--- /dev/null
+++ b/app-arch/pbzip2/Manifest
@@ -0,0 +1,8 @@
+AUX pbzip2-1.1.10-makefile.patch 263 BLAKE2B 32043c1a47504a2e901d9c4cb4360f295d39ae70fa7733d687fda7f620c0f5a0d5a4fbfbf65b82c841f21c31d761ff8840f77fa3a624e7c9456dd45299a9b7bb SHA512 f20db966b7da75ccb29578d54dac6d7445165bb5e6d6d29756ca43e0e32ed6abd67384330b652c61f7fdf904393e93d807ad0af5e2657ebb54d625d1fa5659df
+AUX pbzip2-1.1.12-data_truncation_fix.patch 3348 BLAKE2B 848afb0cb6311a28ba958346fdda210aa7bb325c8e3a174c7359e574322f8eb41a04d8e785aa70332de953db170706e9c1fefef6d7274ebfbc211769f4dc88dd SHA512 c6bac8fe33f9d123358c1a01cdb94a8dd6be4c63553f62568311f06b25cf371ab7d881797ebb0d66d9f772c5644fe1f38a70fdbd64b99adaaed82f1e96dcc966
+DIST pbzip2-1.1.12.tar.gz 47826 BLAKE2B 62b1e47b7b67f2a27f31032654506552c33e68121dd50d3496dc746a405cf783807c4966058feb1aebda2080ae1d1d22e944d057ea3a0dba2f9247ea46b23eb0 SHA512 bb68e87867295b89ee6fb76a8b72834daebf0ca6c16b2f10bce67fe7386716a728acd28bf46a9732087202ca0cc774f02c741b0b58801184bb7550f6fd119cd6
+DIST pbzip2-1.1.13.tar.gz 48015 BLAKE2B 1bb410acadc728963c3a04d2665fb1b1f0c206a893ed90352a9c16512e9bd5f82c3f5f3b383b382134bbe904735a1c8a81615a8bc54de8c6bc91633d9ce72c57 SHA512 a150e476a85b2ae71c244561380f8f113072ef712173afaa0bdace5845d5f81a15b135258cb01376156b69a5085b02b7ab866cfab5713aa773b251b203c087b8
+EBUILD pbzip2-1.1.12-r1.ebuild 1122 BLAKE2B d1e86f7fdabc1a141aaa5443e9737c214a69c812ff9dacafcbebd5e9ff7bc4d9b43881dda6f637213e8f411c5d3e9e959c18509499596dca6680b37dc379db9f SHA512 137c5d554c2cae6a9db6010037aa24c1edcff8656ee524526eabde2c175543f596cd25d87f5fefa32567ca9b22856504f52a5f4683c6d619f7fac87dcd47a2db
+EBUILD pbzip2-1.1.12.ebuild 1060 BLAKE2B acb4e0bebcca4008e9ce3e759b57128845688b8ba18f9357564ef6907980899669630f46edcab7ff9b74d7f1f93a111e47f319bd76ffe57fb3c1e445a1940ced SHA512 3c6d032f54827eedf507faddb4c9ef4662dafcd5e36e5730a864f391714f08ab4089e595a2b314dfd494bb2df967ed9e8fa180032daf4c5c7ee63d055cebaf44
+EBUILD pbzip2-1.1.13.ebuild 1141 BLAKE2B 0b4df36bdb353d65c4e338b016b055e8511df3ac7b739c74efae6a632cee5297aa58917c294ed97ceec1230515f4671dec8adccad52a723fe12b65adb62538bf SHA512 5ca654096b0d32c8abeb8123e94030c027782a30e0a088c52850ba104516c1324e50def6bac92eb9f0529592df65de02948f2ce19fe6503191e836d27a8eff86
+MISC metadata.xml 443 BLAKE2B 3a25a8281989265bb3339d4b46442e5c73920567ff19bd12e57a6aa41d40534428e409ca9dc548318d2487288e12e2c6bb305809c7585c3d6742c8709a649d9e SHA512 fbac33ec453bfd5c9cec5ca30ce938281a9d1d280e8936977d77e3fe23e802345814e343d9824cef18164aa3ad2b2aab421239593bfe36f100dcd787739761d0
diff --git a/app-arch/pbzip2/files/pbzip2-1.1.10-makefile.patch b/app-arch/pbzip2/files/pbzip2-1.1.10-makefile.patch
new file mode 100644
index 000000000000..6524b6bf2a05
--- /dev/null
+++ b/app-arch/pbzip2/files/pbzip2-1.1.10-makefile.patch
@@ -0,0 +1,20 @@
+--- pbzip2-1.1.10/Makefile
++++ pbzip2-1.1.10/Makefile
+@@ -17,7 +17,7 @@
+
+
+ # Optimization flags
+-CXXFLAGS = -O2
++#CXXFLAGS = -O2
+
+ #CXXFLAGS += -g -Wall
+ #CXXFLAGS += -ansi
+@@ -50,7 +50,7 @@
+
+
+ # Linker flags
+-LDFLAGS =
++#LDFLAGS =
+
+
+ # External libraries
diff --git a/app-arch/pbzip2/files/pbzip2-1.1.12-data_truncation_fix.patch b/app-arch/pbzip2/files/pbzip2-1.1.12-data_truncation_fix.patch
new file mode 100644
index 000000000000..0ce62e7a77fe
--- /dev/null
+++ b/app-arch/pbzip2/files/pbzip2-1.1.12-data_truncation_fix.patch
@@ -0,0 +1,142 @@
+https://bugs.launchpad.net/pbzip2/+bug/1524909
+https://bugs.gentoo.org/567952
+
+
+=== modified file 'pbzip2.cpp'
+--- pbzip2.cpp 2014-12-21 10:20:27 +0000
++++ pbzip2.cpp 2015-12-11 00:14:31 +0000
+@@ -2083,6 +2083,17 @@
+ return 0;
+ }
+
++void close_streams(FILE *stream, FILE *zStream)
++{
++ if (stream != NULL)
++ fflush(stream);
++
++ if (zStream != NULL && zStream != stdin)
++ fclose(zStream);
++ if (stream != NULL && stream != stdout)
++ fclose(stream);
++}
++
+ /*
+ *********************************************************
+ */
+@@ -2125,9 +2136,7 @@
+ // check file stream for errors
+ if (ferror(zStream))
+ {
+- if (zStream != stdin)
+- fclose(zStream);
+-
++ close_streams(stream, zStream);
+ handle_error(EF_EXIT, -1,
+ "pbzip2: *ERROR: Problem with input stream of file [%s]! Aborting...\n", InFilename);
+ return -1;
+@@ -2155,9 +2164,7 @@
+ // check file stream for errors
+ if (ferror(stream))
+ {
+- if (stream != stdout)
+- fclose(stream);
+-
++ close_streams(stream, zStream);
+ handle_error(EF_EXIT, -1,
+ "pbzip2: *ERROR: Problem with output stream of file [%s]! Aborting...\n", InFilename);
+ return -1;
+@@ -2169,10 +2176,7 @@
+ if (syncGetTerminateFlag() != 0)
+ {
+ fprintf (stderr, "directdecompress: terminating1 - terminateFlag set\n");
+- if (zStream != stdin)
+- fclose(zStream);
+- if (stream != stdout)
+- fclose(stream);
++ close_streams(stream, zStream);
+ return -1;
+ }
+
+@@ -2180,11 +2184,8 @@
+ if (bzf == NULL || bzerr != BZ_OK)
+ {
+ ret = testBZ2ErrorHandling(bzerr, bzf, streamNo);
+- if (zStream != stdin)
+- fclose(zStream);
+- if (stream != stdout)
+- fclose(stream);
+-
++ close_streams(stream, zStream);
++
+ if (ret != 0)
+ {
+ syncSetTerminateFlag(1);
+@@ -2200,10 +2201,7 @@
+ if (syncGetTerminateFlag() != 0)
+ {
+ fprintf (stderr, "directdecompress: terminating2 - terminateFlag set\n");
+- if (zStream != stdin)
+- fclose(zStream);
+- if (stream != stdout)
+- fclose(stream);
++ close_streams(stream, zStream);
+ return -1;
+ }
+
+@@ -2225,11 +2223,8 @@
+ if (ferror(zStream))
+ {
+ ret = testBZ2ErrorHandling(bzerr, bzf, streamNo);
+- if (zStream != stdin)
+- fclose(zStream);
+- if (stream != stdout)
+- fclose(stream);
+-
++ close_streams(stream, zStream);
++
+ if (ret != 0)
+ {
+ syncSetTerminateFlag(1);
+@@ -2242,11 +2237,8 @@
+ if (ferror(stream))
+ {
+ ret = testBZ2ErrorHandling(bzerr, bzf, streamNo);
+- if (zStream != stdin)
+- fclose(zStream);
+- if (stream != stdout)
+- fclose(stream);
+-
++ close_streams(stream, zStream);
++
+ if (ret != 0)
+ {
+ syncSetTerminateFlag(1);
+@@ -2263,11 +2255,8 @@
+ if (ferror(stream))
+ {
+ ret = testBZ2ErrorHandling(bzerr, bzf, streamNo);
+- if (zStream != stdin)
+- fclose(zStream);
+- if (stream != stdout)
+- fclose(stream);
+-
++ close_streams(stream, zStream);
++
+ if (ret != 0)
+ {
+ syncSetTerminateFlag(1);
+@@ -2278,11 +2267,8 @@
+ if (bzerr != BZ_STREAM_END)
+ {
+ ret = testBZ2ErrorHandling(bzerr, bzf, streamNo);
+- if (zStream != stdin)
+- fclose(zStream);
+- if (stream != stdout)
+- fclose(stream);
+-
++ close_streams(stream, zStream);
++
+ if (ret != 0)
+ {
+ syncSetTerminateFlag(1);
+
diff --git a/app-arch/pbzip2/metadata.xml b/app-arch/pbzip2/metadata.xml
new file mode 100644
index 000000000000..98d33df27533
--- /dev/null
+++ b/app-arch/pbzip2/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <use>
+ <flag name="symlink">Install symlinks which override <pkg>app-arch/bzip2</pkg> implementation</flag>
+ </use>
+ <upstream>
+ <remote-id type="launchpad">pbzip2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/pbzip2/pbzip2-1.1.12-r1.ebuild b/app-arch/pbzip2/pbzip2-1.1.12-r1.ebuild
new file mode 100644
index 000000000000..17dd86164475
--- /dev/null
+++ b/app-arch/pbzip2/pbzip2-1.1.12-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Parallel bzip2 (de)compressor using libbz2"
+HOMEPAGE="http://compression.ca/pbzip2/ https://launchpad.net/pbzip2"
+SRC_URI="https://launchpad.net/pbzip2/${PV:0:3}/${PV}/+download/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static symlink"
+
+LIB_DEPEND="app-arch/bzip2[static-libs(+)]"
+RDEPEND="
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ symlink? ( !app-arch/lbzip2[symlink] )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.1.10-makefile.patch \
+ "${FILESDIR}"/${P}-data_truncation_fix.patch
+ tc-export CXX
+ use static && append-ldflags -static
+}
+
+src_install() {
+ dobin pbzip2
+ dodoc AUTHORS ChangeLog README
+ doman pbzip2.1
+ dosym pbzip2 /usr/bin/pbunzip2
+
+ if use symlink ; then
+ local s
+ for s in bzip2 bunzip2 bzcat ; do
+ dosym pbzip2 /usr/bin/${s}
+ done
+ fi
+}
diff --git a/app-arch/pbzip2/pbzip2-1.1.12.ebuild b/app-arch/pbzip2/pbzip2-1.1.12.ebuild
new file mode 100644
index 000000000000..2fbefa71b8fa
--- /dev/null
+++ b/app-arch/pbzip2/pbzip2-1.1.12.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Parallel bzip2 (de)compressor using libbz2"
+HOMEPAGE="http://compression.ca/pbzip2/ https://launchpad.net/pbzip2"
+SRC_URI="https://launchpad.net/pbzip2/${PV:0:3}/${PV}/+download/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static symlink"
+
+LIB_DEPEND="app-arch/bzip2[static-libs(+)]"
+RDEPEND="
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ symlink? ( !app-arch/lbzip2[symlink] )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.1.10-makefile.patch
+ tc-export CXX
+ use static && append-ldflags -static
+}
+
+src_install() {
+ dobin pbzip2
+ dodoc AUTHORS ChangeLog README
+ doman pbzip2.1
+ dosym pbzip2 /usr/bin/pbunzip2
+
+ if use symlink ; then
+ local s
+ for s in bzip2 bunzip2 bzcat ; do
+ dosym pbzip2 /usr/bin/${s}
+ done
+ fi
+}
diff --git a/app-arch/pbzip2/pbzip2-1.1.13.ebuild b/app-arch/pbzip2/pbzip2-1.1.13.ebuild
new file mode 100644
index 000000000000..abf49d114075
--- /dev/null
+++ b/app-arch/pbzip2/pbzip2-1.1.13.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Parallel bzip2 (de)compressor using libbz2"
+HOMEPAGE="http://compression.ca/pbzip2/ https://launchpad.net/pbzip2"
+SRC_URI="https://launchpad.net/pbzip2/${PV:0:3}/${PV}/+download/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static symlink"
+
+LIB_DEPEND="app-arch/bzip2[static-libs(+)]"
+RDEPEND="
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ symlink? ( !app-arch/lbzip2[symlink] )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+src_prepare() {
+ # https://bugs.launchpad.net/pbzip2/+bug/1746369
+ sed -i 's:"PRIuMAX":" PRIuMAX ":g' *.cpp || die
+ epatch "${FILESDIR}"/${PN}-1.1.10-makefile.patch
+ tc-export CXX
+ use static && append-ldflags -static
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+ dodoc AUTHORS ChangeLog README
+
+ if use symlink ; then
+ local s
+ for s in bzip2 bunzip2 bzcat ; do
+ dosym pbzip2 /usr/bin/${s}
+ done
+ fi
+}