summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-05-16 03:31:11 +0000
committerMike Frysinger <vapier@gentoo.org>2011-05-16 03:31:11 +0000
commit85dc35877a38321df4961bb2bc61e7ce0dfc4bb6 (patch)
tree46b212fce4eca0415b1b72d47ec3a20498451826 /app-arch/bzip2
parentold (diff)
downloadhistorical-85dc35877a38321df4961bb2bc61e7ce0dfc4bb6.tar.gz
historical-85dc35877a38321df4961bb2bc61e7ce0dfc4bb6.tar.bz2
historical-85dc35877a38321df4961bb2bc61e7ce0dfc4bb6.zip
Update progress patch by Justin Binns for LFS #365639 by Christopher Head.
Package-Manager: portage-2.2.0_alpha32/cvs/Linux x86_64
Diffstat (limited to 'app-arch/bzip2')
-rw-r--r--app-arch/bzip2/ChangeLog10
-rw-r--r--app-arch/bzip2/Manifest17
-rw-r--r--app-arch/bzip2/bzip2-1.0.6-r2.ebuild73
-rw-r--r--app-arch/bzip2/files/bzip2-1.0.6-progress.patch163
4 files changed, 257 insertions, 6 deletions
diff --git a/app-arch/bzip2/ChangeLog b/app-arch/bzip2/ChangeLog
index 2521368a3e06..b5f239bf9d39 100644
--- a/app-arch/bzip2/ChangeLog
+++ b/app-arch/bzip2/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-arch/bzip2
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/bzip2/ChangeLog,v 1.85 2010/10/09 16:30:07 armin76 Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/bzip2/ChangeLog,v 1.86 2011/05/16 03:31:10 vapier Exp $
+
+*bzip2-1.0.6-r2 (16 May 2011)
+
+ 16 May 2011; Mike Frysinger <vapier@gentoo.org> +bzip2-1.0.6-r2.ebuild,
+ +files/bzip2-1.0.6-progress.patch:
+ Update progress patch by Justin Binns for LFS #365639 by Christopher Head.
09 Oct 2010; Raúl Porcel <armin76@gentoo.org> bzip2-1.0.6.ebuild:
ia64/m68k/s390/sh/sparc stable wrt #338215
diff --git a/app-arch/bzip2/Manifest b/app-arch/bzip2/Manifest
index 3b7e1a715817..44e9c6f3468e 100644
--- a/app-arch/bzip2/Manifest
+++ b/app-arch/bzip2/Manifest
@@ -1,14 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX bzip2-1.0.2-progress.patch 6141 RMD160 213842d0d7742dce4c1d938b79134b9e910bc8ec SHA1 90a0032645886b633c9b730d0a1abb88c88a9873 SHA256 a76f6d082a1a1fef2eff111177d7c7568e1d457fb2b98cde71bbbe6ea1c7c787
AUX bzip2-1.0.3-no-test.patch 161 RMD160 8611ae7d6fe578e7fd24585e158c10468caca2f1 SHA1 6a8a9495e71f291aaf5bd89b134e83ccd0b5e006 SHA256 806dcb0f9f46a2b0b3ef04212405708198a25e281617e27a44c565948c159a49
AUX bzip2-1.0.4-POSIX-shell.patch 672 RMD160 1863eb33a8fd89cb25d3a907e67e4e8c989bf88f SHA1 43ccd410482c2d51240afed34db59fee90344fa5 SHA256 34bc42c1d6c980e0970a517c9602b904efb2f676ec191e80fcbcd185ccb6b1fe
AUX bzip2-1.0.4-makefile-CFLAGS.patch 569 RMD160 1fd187ef6c49bca32807a83842af3d76bbe1dddf SHA1 59f2d6172d0d8ced74f44258954e6760a6184987 SHA256 853621ae207f0115210e06f738d4e79861110712823419707875116cb45b105e
AUX bzip2-1.0.4-man-links.patch 413 RMD160 ce3b8ae5b5c87024c959b95ace2868930a4ebcac SHA1 9f34a13a9c0e8c3f4808bf053f73a5e73158aaff SHA256 1fc9d91f3f7bd3eecd86149b9c95b3162d9d7956f7de543aa8bc41cbcd04f88b
-AUX bzip2-1.0.4-saneso.patch 439 RMD160 3ac613223c1cd57023cae7b60d236452be87161f SHA1 20dd82b41420b42f612b8a8c419df1463b353e69 SHA256 a3c343536f0292017d11f453f19f2afc4118de20b9200fcca83d1c641821b8e9
+AUX bzip2-1.0.6-progress.patch 5756 RMD160 c288ba9362f429b279173b353abd4b4b40b68604 SHA1 353b74786f3f8fcddb73691780280a72ef77b85d SHA256 f93e6b50082a8e880ee8436c7ec6a65a8f01e9282436af77f95bb259b1c7f7f7
AUX bzip2-1.0.6-saneso.patch 439 RMD160 9738dcd8bd4c482ea3bec4409a9e5bce49ef82eb SHA1 605b3ad94084a4f6a905827e180336df95b20769 SHA256 8345a9fcfce28a459a12126748ac27480a384e80974c31d9fae752d818ea05d9
-DIST bzip2-1.0.5.tar.gz 841402 RMD160 2b31a22138e3914d82a656fee28e2bf029cbc3d4 SHA1 8b02713ea0c8eb501cc8bdac4432d7f29700f767 SHA256 f7bf5368309d76e5daf3a89d4d1bea688dac7780742e7a0ae1af19be9316fe22
DIST bzip2-1.0.6.tar.gz 782025 RMD160 cc31bbae95e8eec259cef7627eae0c667654a339 SHA1 3f89f861209ce81a6bab1fd1998c0ef311712002 SHA256 a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd
-EBUILD bzip2-1.0.5-r1.ebuild 2244 RMD160 ad29267336ca62e0d0958145824ec4d919590bc9 SHA1 d8010ed719d3c83a11a4724c0f9c13931819577c SHA256 6956b9abd9e83ffeae1f17a4c903578eed16bcafe7ee4be8210c6dffba2da0df
EBUILD bzip2-1.0.6-r1.ebuild 2183 RMD160 a1e61ea3f7afa19c5b00d40e1b8712668aed46f2 SHA1 1d9a42eafef0a0b86bea516e1dcdd3ee8c053e1f SHA256 4d7615ffc4a8b3fa39d5626a7c2fa3d18ec9e34577a6983bf0c87039f1c2bbe3
+EBUILD bzip2-1.0.6-r2.ebuild 2170 RMD160 8b03c4c9b6e0673a4d29961fa50a9b83545cb84d SHA1 6c5f7d014ba3416d6b7288fd57d1bb533b94569c SHA256 d921cef213b66cb5f2bb13ee6f07160dce861f1cfa85a340c177b82905e64473
EBUILD bzip2-1.0.6.ebuild 2045 RMD160 ba8dd3bc5344fcf3a71d1f19af1808fc813d8e58 SHA1 f94effdd275b308cb20f2609addec001e00799a8 SHA256 c8d2600e7a05cfe24a1c252ea0a44f66ea6239dc9f87ee8d2c1fd06e32e69196
-MISC ChangeLog 13498 RMD160 8f7a2c10d60dccd3a903c1930f22bbc366644fe1 SHA1 e7df2858814a86066065eaf2520f301a5879c7cd SHA256 9188aec96cee15ff19715967d95e4d23499cfb24cb13b01dbfe728e581938b73
+MISC ChangeLog 13717 RMD160 a33bc0062dfa61b81ed38f7f95a0710dfc4421f8 SHA1 29c24f59ebff20995b65c4395502dc7503872e85 SHA256 c4f62e72403c15de72de224e097d350a478fdb37dc69f82f088ee714720a5a6b
MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iF4EAREIAAYFAk3QmoUACgkQaC/OocHi7JZZwwEAg+PFYqbv2AzgMOY7bm1NxdHN
+XPVgT/149/Qph+dP6QsA/ih70Kdh5M1SgsjWAX8pq5xexPpOZ6Ip+QN6icDy3lu5
+=CwxZ
+-----END PGP SIGNATURE-----
diff --git a/app-arch/bzip2/bzip2-1.0.6-r2.ebuild b/app-arch/bzip2/bzip2-1.0.6-r2.ebuild
new file mode 100644
index 000000000000..3843b3be4b5c
--- /dev/null
+++ b/app-arch/bzip2/bzip2-1.0.6-r2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/bzip2/bzip2-1.0.6-r2.ebuild,v 1.1 2011/05/16 03:31:11 vapier Exp $
+
+EAPI="2"
+
+inherit eutils multilib toolchain-funcs flag-o-matic
+
+DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
+HOMEPAGE="http://www.bzip.org/"
+SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz"
+
+LICENSE="BZIP2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="static"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
+ epatch "${FILESDIR}"/${PN}-1.0.6-saneso.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
+ epatch "${FILESDIR}"/${PN}-1.0.6-progress.patch
+ epatch "${FILESDIR}"/${PN}-1.0.3-no-test.patch
+ epatch "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
+
+ # - Use right man path
+ # - Generate symlinks instead of hardlinks
+ # - pass custom variables to control libdir
+ sed -i \
+ -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
+ -e 's:ln -s -f $(PREFIX)/bin/:ln -s :' \
+ -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
+ Makefile || die
+}
+
+bemake() {
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ "$@" || die
+}
+src_compile() {
+ bemake -f Makefile-libbz2_so all || die
+ use static && append-flags -static
+ bemake all || die
+}
+
+src_install() {
+ emake PREFIX="${D}"/usr LIBDIR=$(get_libdir) install || die
+ dodoc README* CHANGES bzip2.txt manual.*
+
+ # Install the shared lib manually. We install:
+ # .x.x.x - standard shared lib behavior
+ # .x.x - SONAME some distros use #338321
+ # .x - SONAME Gentoo uses
+ dolib.so libbz2.so.${PV} || die
+ local s
+ for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do
+ dosym libbz2.so.${PV} /usr/$(get_libdir)/${v} || die
+ done
+ gen_usr_ldscript -a bz2
+
+ if ! use static ; then
+ newbin bzip2-shared bzip2 || die
+ fi
+
+ # move "important" bzip2 binaries to /bin and use the shared libbz2.so
+ dodir /bin
+ mv "${D}"/usr/bin/b{zip2,zcat,unzip2} "${D}"/bin/ || die
+ dosym bzip2 /bin/bzcat || die
+ dosym bzip2 /bin/bunzip2 || die
+}
diff --git a/app-arch/bzip2/files/bzip2-1.0.6-progress.patch b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch
new file mode 100644
index 000000000000..7691d63e27c8
--- /dev/null
+++ b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch
@@ -0,0 +1,163 @@
+Ripped from Mandrake
+
+http://bugs.gentoo.org/82192
+
+--- bzip2-1.0.6/bzip2.1
++++ bzip2-1.0.6/bzip2.1
+@@ -235,6 +235,10 @@
+ Suppress non-essential warning messages. Messages pertaining to
+ I/O errors and other critical events will not be suppressed.
+ .TP
++.B \-p \-\-show\-progress
++Show percentage of input\-file done and while compressing show the percentage
++of the original file the new file is.
++.TP
+ .B \-v --verbose
+ Verbose mode -- show the compression ratio for each file processed.
+ Further \-v's increase the verbosity level, spewing out lots of
+--- bzip2-1.0.6/bzip2.c
++++ bzip2-1.0.6/bzip2.c
+@@ -145,6 +145,7 @@
+ #include <signal.h>
+ #include <math.h>
+ #include <errno.h>
++#include <time.h>
+ #include <ctype.h>
+ #include "bzlib.h"
+
+@@ -301,6 +302,7 @@
+ Char progNameReally[FILE_NAME_LEN];
+ FILE *outputHandleJustInCase;
+ Int32 workFactor;
++Char showProgress;
+
+ static void panic ( Char* ) NORETURN;
+ static void ioError ( void ) NORETURN;
+@@ -425,6 +427,12 @@
+ UInt32 nbytes_in_lo32, nbytes_in_hi32;
+ UInt32 nbytes_out_lo32, nbytes_out_hi32;
+ Int32 bzerr, bzerr_dummy, ret;
++ double fileSize = 0; /* initialized to make the compiler stop crying */
++ /* double because big files might otherwhise give
++ * overflows. not long long since not all compilers
++ * support that one
++ */
++ time_t startTime, currentTime;
+
+ SET_BINARY_MODE(stream);
+ SET_BINARY_MODE(zStream);
+@@ -432,12 +440,21 @@
+ if (ferror(stream)) goto errhandler_io;
+ if (ferror(zStream)) goto errhandler_io;
+
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ (void)fseek(stream, 0, SEEK_END);
++ fileSize = ftello(stream);
++ rewind(stream);
++ if (verbosity >= 1)
++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize);
++ }
++
+ bzf = BZ2_bzWriteOpen ( &bzerr, zStream,
+ blockSize100k, verbosity, workFactor );
+ if (bzerr != BZ_OK) goto errhandler;
+
+ if (verbosity >= 2) fprintf ( stderr, "\n" );
+
++ time(&startTime);
+ while (True) {
+
+ if (myfeof(stream)) break;
+@@ -446,6 +463,22 @@
+ if (nIbuf > 0) BZ2_bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf );
+ if (bzerr != BZ_OK) goto errhandler;
+
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ time(&currentTime);
++
++ if ((currentTime - startTime) > 1) { /* show progress every 2 seconds */
++ double curInPos = ftello(stream);
++ double curOutPos = ftello(zStream);
++
++ startTime = currentTime;
++
++ fprintf(stderr, "%.2f%% done", (curInPos * 100.0) / fileSize);
++ if (srcMode == SM_F2F)
++ fprintf(stderr, ", new size: %.2f%%", (curOutPos * 100.0) / curInPos);
++
++ fprintf(stderr, " \r");
++ }
++ }
+ }
+
+ BZ2_bzWriteClose64 ( &bzerr, bzf, 0,
+@@ -526,6 +559,8 @@
+ UChar unused[BZ_MAX_UNUSED];
+ Int32 nUnused;
+ UChar* unusedTmp;
++ double fileSize = 0; /* initialized to make the compiler stop crying */
++ time_t startTime, currentTime;
+
+ nUnused = 0;
+ streamNo = 0;
+@@ -533,9 +568,19 @@
+ SET_BINARY_MODE(stream);
+ SET_BINARY_MODE(zStream);
+
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ off_t dummy = ftello(zStream);
++ (void)fseeko(zStream, 0, SEEK_END);
++ fileSize = ftello(zStream);
++ (void)fseeko(zStream, dummy, SEEK_SET);
++ if (verbosity >= 1)
++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize);
++ }
++
+ if (ferror(stream)) goto errhandler_io;
+ if (ferror(zStream)) goto errhandler_io;
+
++ time(&startTime);
+ while (True) {
+
+ bzf = BZ2_bzReadOpen (
+@@ -551,6 +596,16 @@
+ if ((bzerr == BZ_OK || bzerr == BZ_STREAM_END) && nread > 0)
+ fwrite ( obuf, sizeof(UChar), nread, stream );
+ if (ferror(stream)) goto errhandler_io;
++
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ time(&currentTime);
++ if ((currentTime - startTime) >= 2) {
++ double curInPos = ftello(zStream);
++ startTime = currentTime;
++
++ fprintf(stderr, "%.2f%% done\r", (curInPos * 100.0) / fileSize);
++ }
++ }
+ }
+ if (bzerr != BZ_STREAM_END) goto errhandler;
+
+@@ -1872,6 +1927,7 @@
+ deleteOutputOnInterrupt = False;
+ exitValue = 0;
+ i = j = 0; /* avoid bogus warning from egcs-1.1.X */
++ showProgress = False;
+
+ /*-- Set up signal handlers for mem access errors --*/
+ signal (SIGSEGV, mySIGSEGVorSIGBUScatcher);
+@@ -1949,6 +2005,7 @@
+ case 'k': keepInputFiles = True; break;
+ case 's': smallMode = True; break;
+ case 'q': noisy = False; break;
++ case 'p': showProgress = True; break;
+ case '1': blockSize100k = 1; break;
+ case '2': blockSize100k = 2; break;
+ case '3': blockSize100k = 3; break;
+@@ -1985,6 +2042,7 @@
+ if (ISFLAG("--keep")) keepInputFiles = True; else
+ if (ISFLAG("--small")) smallMode = True; else
+ if (ISFLAG("--quiet")) noisy = False; else
++ if (ISFLAG("--show-progress")) showProgress = True; else
+ if (ISFLAG("--version")) license(); else
+ if (ISFLAG("--license")) license(); else
+ if (ISFLAG("--exponential")) workFactor = 1; else