Delete gzip
This commit is contained in:
parent
e29fc1fe95
commit
bdb0c7f760
@ -1,32 +0,0 @@
|
|||||||
# ChangeLog for app-arch/gzip
|
|
||||||
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
|
|
||||||
# $Header: $
|
|
||||||
|
|
||||||
17 Feb 2015; Mario Fetka <mario.fetka@gmail.com> +files/gzip-1.4-asmv.patch,
|
|
||||||
gzip-1.6.ebuild:
|
|
||||||
Bump
|
|
||||||
|
|
||||||
*gzip-1.6 (13 Aug 2013)
|
|
||||||
|
|
||||||
13 Aug 2013; Mario Fetka <mario.fetka@gmail.com>
|
|
||||||
+files/gzip-1.4-no-gets.patch, +gzip-1.6.ebuild:
|
|
||||||
Bump and add rsyncable patch
|
|
||||||
|
|
||||||
17 Oct 2012; Mario Fetka <mario.fetka@gmail.com>
|
|
||||||
files/gzip-1.4-rsyncable.patch:
|
|
||||||
Update 1.4 patch
|
|
||||||
|
|
||||||
*gzip-1.5 (17 Oct 2012)
|
|
||||||
|
|
||||||
17 Oct 2012; Mario Fetka <mario.fetka@gmail.com> gzip-1.4.ebuild,
|
|
||||||
+files/gzip-1.4-rsyncable.patch, +gzip-1.5.ebuild,
|
|
||||||
+files/gzip-1.5-rsyncable.patch, -files/patch-gzip-rsyncable.diff:
|
|
||||||
Update ebuilds and rsyncable patches
|
|
||||||
|
|
||||||
*gzip-1.4 (24 Jun 2011)
|
|
||||||
|
|
||||||
24 Jun 2011; Mario Fetka <mario.fetka@gmail.com>
|
|
||||||
+files/gzip-1.3.8-install-symlinks.patch, +gzip-1.4.ebuild,
|
|
||||||
+files/gzip-1.4-assembler.patch, +files/patch-gzip-rsyncable.diff,
|
|
||||||
+metadata.xml:
|
|
||||||
add rsyncable patch
|
|
@ -1,14 +0,0 @@
|
|||||||
AUX gzip-1.3.8-install-symlinks.patch 280 SHA256 f8b8c8548ae32975ba8e5bbc79add0f951954e1b4a21de55575274de177925d1 SHA512 b804a4d4ef9294a8f241b75a06ee6464d932330824dc95f2fa1f67bb6f22f4d66287e4f47dcafce4e59e68fa3d11ac61cdbca55ab0939747d8a17464d2aa29c1 WHIRLPOOL 13a5806a61a565a5a1de4d07b7aa252743016e559fe72752f2e7130d414eba0c6167608f3485f2fadf21a592cd15aa36c8e58682ca5309aa28ea874a8b7bdcb5
|
|
||||||
AUX gzip-1.4-asmv.patch 702 SHA256 b065aaed488c6ed1930e93e99f9cc94cc9da8b355337b2a82c2cb168eebd122b SHA512 34ab638432a690e1678a1754817d65f5e0258a50ea4f308f4a26ae48a2829537ae23a252ee08540c486931c617e634e6a0fc5712d8c337099029c7b3eeb3b408 WHIRLPOOL 17a8af8bb17c88988822f0aacba738339cede8a764ab3ae04a1f24904d68fc592acacd1bb1f9da8dd66e702a6a973aff0e6ddc6811aa428f21be0dc38ab2f415
|
|
||||||
AUX gzip-1.4-assembler.patch 1703 SHA256 4d05f0c6df2fcca0dcc6f72f4545ea89e0cdcb92d1f6b9e9e2bd1942da46cf81 SHA512 8a501a03263b2cf2e4c87d0f8736bfe598ecf3f32c0e76b508d88504888405fb75ce97614a2c138a49d18f516fe3dd6d9440b8d04c8f67f7b4c1833d5cb25413 WHIRLPOOL f40b81cb1ed1b3566fa3e27503ae5d8dc3fa28b15b72c1278da894190ddbf1fbeca4d158bb78d913b02edd6c9ad83f149149a40633b451cb0395194eb844a4e3
|
|
||||||
AUX gzip-1.4-no-gets.patch 779 SHA256 adf17732f03e1a794018da083ad9a2f754176d2590dd1671a4b33d1ef788d474 SHA512 451a50f9a4025ed52d1689a86a86e53f5caf30c4363d5cedae45a20361d5b8f09d0aa05e0b55aca139358e0997cb5491627d5425bf2ba43cc58efcbd685ec0b7 WHIRLPOOL 59a0ae40f20eecb1b8d4e14980b34fa2cf8845cd26860a63905749a40d22452025fd93895775ef5f11d860d67de27efc20c491895674abfeb1ccde4d240b6ff2
|
|
||||||
AUX gzip-1.4-rsyncable.patch 10852 SHA256 59e0788c611a7d19ecd48b876db31d9b311244b912087fd4d74f92f3ed4a080a SHA512 bfcd26a81e2bbdecaa3599d2896d6ebbf6dfefa787809de08174881e3665e5a8b57ea78a1634ffb55233a6b84d9c4d23c19df2c7709576594e1e89359753a4d5 WHIRLPOOL bd22fd6d19dc413d9bb65166a827092d9eb62a36cf76e90ca82f700a9818bc60e296ca42832591b1f9bff15b56449af139d6ffe91a2dfd40c0967245a345d283
|
|
||||||
AUX gzip-1.5-rsyncable.patch 10912 SHA256 c9024df8719d42b0b0f133f829865ccab2d5b58a0b5847a9425314d03fa8c9b6 SHA512 9d853058938eeb7ec1578b4ccd3dd1a062c79aac474f04567891b4b4a414171d92e6cbe41c348f9d0835fff56613e603e6aa05b03d312022e01902e5e5a8d0c7 WHIRLPOOL 8882f39fee56e7848922f55fefb902f110cc0202a4c1c833eec052541491419ae322b10840a1e0aa34fc1d3ff87ba12a29b1154bd17265760c68c005f60a04dc
|
|
||||||
DIST gzip-1.4.tar.gz 907411 SHA256 d166cfd3da380da1bd535633e8890bfb5664f9e68870a611d1dc01a3e9f711ee
|
|
||||||
DIST gzip-1.5.tar.xz 720956 SHA256 9ac20a3841a1246a8bedd800ea1fb93ef76521535d89cb59397d267026b6a173 SHA512 27b1b9c1ab75331b5368abb54541f3f251009a3bc6e49e42cda13bc088673d9f8c89c55caa63da60c1ea70fac2e6de24203b7aeaaaad4bc54302edbe275f46ea WHIRLPOOL c718e5e4e0e6f29de285380c25564997615b7213fa32604922436c3c6221bb9531d01518a6cc4e0a80b4694bb040768654d4bf07bb48290f90e61f13962e96ab
|
|
||||||
DIST gzip-1.6.tar.xz 725084 SHA256 37dfed1a485d53212c43b3fa2a7c7952f09bf5cd86e37121c222341ee1b27847 SHA512 06da599fc38b459d7e9a3f43fdd06d1a0d7b29ad14cb7b6552176bab584a1135bb47ba37a4eb377e6c42c4934d557079ace1e289a252ae192ee154079a62ed01 WHIRLPOOL 7c639d9a57d5f9a820972275c7813ccd76df7a87ad68b00668696aec251b84fd7efb1129205e8a7cd51e40706b718ce3ce71dc9aa6626acf074bcea6f0fe5c39
|
|
||||||
EBUILD gzip-1.4.ebuild 1358 SHA256 8f489d2726cb4a44fc3ad7a369f2ee0a0ba3476e5aa4052a2486cc1f8eaec26c SHA512 5d190ee0faedbf4ec25b88aaa00813b080dbedea82ab7f037383938f8737d7dc1dbd7de6bb17541b2174d5c6a73d2dff05a04efc51feb96948842c005b77e705 WHIRLPOOL 3c65eb219ec250b676979ad4976c4a18b1ec7069e3174be7d098c9aaded73526bab5536ecb499605d13c6033b15cb8582267139d10d57d521aaac901bb9eba09
|
|
||||||
EBUILD gzip-1.5.ebuild 1272 SHA256 fc73bf16decd7c1bc20be86ee1117376dca3e6422c8d1515e3961857c54887bb SHA512 13debf71fadea7ad32479c80f38a5ee833b50faa4faf687a6ee9a24a1af7e456130bca2fc08c7be74da4c0f690de05df18039ae5e69eff487b77f9db3afa7a38 WHIRLPOOL 5eae5bbe9752804f4a86e9d2af0d84b1ab6d2b3ba8ad304cf11346fe1c04d445b151c8a5def5a7ee5a6984b4082446662eae3f136b511a44ddc7b531673f815a
|
|
||||||
EBUILD gzip-1.6.ebuild 1384 SHA256 1b1fc7abae87f9e0371c06e2a43dcda462a2d4905aa92e8e70c9ec4852ea5942 SHA512 0a8a245fd79facb8035adbb7c39f56fbfcb6c3fa7ea7813f62aff4578f864ceec0813d0b670f5097b694cbc1b8467e461fa544a66e40a0a42d20572748920b35 WHIRLPOOL 13a2b2005b29c5af624631bc7ccad8a728e8dd517a77dfb82c37c7e2b2a65d824bed4e4cbd1891fb2d51bba7ff270bbca0f0283cfb0a6e92eac870ee5bbaba63
|
|
||||||
MISC ChangeLog 985 SHA256 9505b3bff8aa9a9d57ec1c0686fef532a6e9d10de5491a6422249f635a0d7291 SHA512 84811064be2532f2fe8e6fffde0bb44fd978341d7d8cbe91c281220a4c0eb4098a9777ac834667bf123e7e9de167e2be223a9881aefa9d819bf65573a6dcfd97 WHIRLPOOL f141c99a8757aa0df8259f0e656a2bc3ee181d9e9a8cdf302e6752534de0c169957bf4b82503420b8ded261ec9b9c54d507160bc8c969c5a70038a379241a8bd
|
|
||||||
MISC metadata.xml 258 SHA256 3e8d2c98025402bd29168f46db0e4ed14ae2d64ee8e75508d87b136d06ba044c SHA512 fe541f144f9f9f14e041cd9481c964cc55c38579475221a76599dd81b2bd3e902c6c4b043d7897fd50c36d4e4efe38e51cc736d018b95341fee0b58d919bc985 WHIRLPOOL 8edc342ed57308000e6131785fb4401a4cf013a3b55dd498c4cd0ee73e2d3302d8da1e1d5b86a8845ccfd059a0b2b46cc00fb7e736d241633e9e827d31256e93
|
|
@ -1,11 +0,0 @@
|
|||||||
--- Makefile.in
|
|
||||||
+++ Makefile.in
|
|
||||||
@@ -926,7 +926,7 @@
|
|
||||||
rm -f "$$dest" && \
|
|
||||||
case $@ in \
|
|
||||||
install-exec-hook) \
|
|
||||||
- ln "$$source" "$$dest" || $(LN_S) "$$source" "$$dest";; \
|
|
||||||
+ $(LN_S) "$$source" "$$dest";; \
|
|
||||||
esac \
|
|
||||||
) || exit; \
|
|
||||||
done; \
|
|
@ -1,30 +0,0 @@
|
|||||||
http://bugs.gentoo.org/show_bug.cgi?id=302773
|
|
||||||
|
|
||||||
--- tailor.h.old 2010-01-29 11:13:02.000000000 +0000
|
|
||||||
+++ tailor.h 2010-01-29 13:18:15.000000000 +0000
|
|
||||||
@@ -69,9 +69,6 @@
|
|
||||||
# include <io.h>
|
|
||||||
# define OS_CODE 0x00
|
|
||||||
# define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
|
|
||||||
-# if !defined(NO_ASM) && !defined(ASMV)
|
|
||||||
-# define ASMV
|
|
||||||
-# endif
|
|
||||||
#else
|
|
||||||
# define near
|
|
||||||
#endif
|
|
||||||
@@ -182,7 +179,6 @@
|
|
||||||
# define PATH_SEP2 ':'
|
|
||||||
# define STDC_HEADERS
|
|
||||||
# define OS_CODE 0x01
|
|
||||||
-# define ASMV
|
|
||||||
# ifdef __GNUC__
|
|
||||||
# define HAVE_DIRENT_H
|
|
||||||
# define HAVE_FCNTL_H
|
|
||||||
@@ -201,7 +197,6 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ATARI) || defined(atarist)
|
|
||||||
-# define ASMV
|
|
||||||
# define OS_CODE 0x05
|
|
||||||
# ifdef TOSFS
|
|
||||||
# define PATH_SEP2 '\\'
|
|
@ -1,52 +0,0 @@
|
|||||||
http://bugs.gentoo.org/309079
|
|
||||||
http://lists.gnu.org/archive/html/bug-gzip/2010-02/msg00032.html
|
|
||||||
|
|
||||||
From 61af16213a488af3a8e994399ebd0859d390edb6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jim Meyering <meyering@redhat.com>
|
|
||||||
Date: Sat, 20 Mar 2010 13:05:58 +0100
|
|
||||||
Subject: [PATCH] use assembly code matcher when possible
|
|
||||||
|
|
||||||
* configure.ac (ASCPPPOST): Backslash-escape "#" in AC_SUBST'd
|
|
||||||
variable, to keep make from seeing it as a comment-introducer.
|
|
||||||
Based on a patch by Petr Pisar.
|
|
||||||
* lib/Makefile.am (match.$(OBJEXT)): Use AM_V_GEN and AM_V_at.
|
|
||||||
* lib/match.c: Don't include <config.h>.
|
|
||||||
It would impede configure-time assembler test.
|
|
||||||
* .x-sc_require_config_h: Exempt lib/match.c from syntax-check.
|
|
||||||
* .x-sc_require_config_h_first: Likewise.
|
|
||||||
---
|
|
||||||
.x-sc_require_config_h | 1 +
|
|
||||||
.x-sc_require_config_h_first | 1 +
|
|
||||||
THANKS | 1 +
|
|
||||||
configure.ac | 2 +-
|
|
||||||
lib/Makefile.am | 12 ++++++------
|
|
||||||
lib/match.c | 2 --
|
|
||||||
6 files changed, 10 insertions(+), 9 deletions(-)
|
|
||||||
create mode 100644 .x-sc_require_config_h
|
|
||||||
create mode 100644 .x-sc_require_config_h_first
|
|
||||||
|
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -22588,5 +22588,5 @@
|
|
||||||
|
|
||||||
# cc -E produces incorrect asm files on SVR4, so postprocess it.
|
|
||||||
-ASCPPPOST="sed '/^ *#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
|
|
||||||
+ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/lib/match.c b/lib/match.c
|
|
||||||
index 4ef6128..5dd8d64 100644
|
|
||||||
--- a/lib/match.c
|
|
||||||
+++ b/lib/match.c
|
|
||||||
@@ -28,8 +28,6 @@
|
|
||||||
* David Mosberger-Tang <davidm@hpl.hp.com>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
-#include <config.h>
|
|
||||||
-
|
|
||||||
/* Preprocess with -DNO_UNDERLINE if your C compiler does not prefix
|
|
||||||
* external symbols with an underline character '_'.
|
|
||||||
*/
|
|
||||||
--
|
|
||||||
1.7.1.1
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
hack until gzip pulls a newer gnulib version
|
|
||||||
|
|
||||||
From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Eric Blake <eblake@redhat.com>
|
|
||||||
Date: Thu, 29 Mar 2012 13:30:41 -0600
|
|
||||||
Subject: [PATCH] stdio: don't assume gets any more
|
|
||||||
|
|
||||||
Gnulib intentionally does not have a gets module, and now that C11
|
|
||||||
and glibc have dropped it, we should be more proactive about warning
|
|
||||||
any user on a platform that still has a declaration of this dangerous
|
|
||||||
interface.
|
|
||||||
|
|
||||||
--- a/lib/stdio.in.h
|
|
||||||
+++ b/lib/stdio.in.h
|
|
||||||
@@ -125,7 +125,6 @@
|
|
||||||
so any use of gets warrants an unconditional warning. Assume it is
|
|
||||||
always declared, since it is required by C89. */
|
|
||||||
#undef gets
|
|
||||||
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
|
|
||||||
|
|
||||||
#if @GNULIB_FOPEN@
|
|
||||||
# if @REPLACE_FOPEN@
|
|
@ -1,299 +0,0 @@
|
|||||||
NOTE: this patch is for _gzip_!
|
|
||||||
|
|
||||||
This is pending for actual inclusion in gzip. It is currently being
|
|
||||||
tried out in the default gzip for Debian Sarge, and may go into the
|
|
||||||
upstream gzip at somepoint in the not-too-distant future.
|
|
||||||
|
|
||||||
--- gzip-1.3.6/deflate.c.orig 2006-11-30 00:13:22.863409500 +0100
|
|
||||||
+++ gzip-1.3.6/deflate.c 2006-11-30 00:14:14.346627000 +0100
|
|
||||||
@@ -135,6 +135,14 @@
|
|
||||||
#endif
|
|
||||||
/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
|
|
||||||
|
|
||||||
+#ifndef RSYNC_WIN
|
|
||||||
+# define RSYNC_WIN 4096
|
|
||||||
+#endif
|
|
||||||
+/* Size of rsync window, must be < MAX_DIST */
|
|
||||||
+
|
|
||||||
+#define RSYNC_SUM_MATCH(sum) ((sum) % RSYNC_WIN == 0)
|
|
||||||
+/* Whether window sum matches magic value */
|
|
||||||
+
|
|
||||||
/* ===========================================================================
|
|
||||||
* Local data used by the "longest match" routines.
|
|
||||||
*/
|
|
||||||
@@ -216,6 +224,8 @@
|
|
||||||
unsigned near good_match;
|
|
||||||
/* Use a faster search when the previous match is longer than this */
|
|
||||||
|
|
||||||
+local ulg rsync_sum; /* rolling sum of rsync window */
|
|
||||||
+local ulg rsync_chunk_end; /* next rsync sequence point */
|
|
||||||
|
|
||||||
/* Values for max_lazy_match, good_match and max_chain_length, depending on
|
|
||||||
* the desired pack level (0..9). The values given below have been tuned to
|
|
||||||
@@ -314,6 +324,10 @@
|
|
||||||
#endif
|
|
||||||
/* prev will be initialized on the fly */
|
|
||||||
|
|
||||||
+ /* rsync params */
|
|
||||||
+ rsync_chunk_end = 0xFFFFFFFFUL;
|
|
||||||
+ rsync_sum = 0;
|
|
||||||
+
|
|
||||||
/* Set the default configuration parameters:
|
|
||||||
*/
|
|
||||||
max_lazy_match = configuration_table[pack_level].max_lazy;
|
|
||||||
@@ -550,6 +564,8 @@
|
|
||||||
memcpy((char*)window, (char*)window+WSIZE, (unsigned)WSIZE);
|
|
||||||
match_start -= WSIZE;
|
|
||||||
strstart -= WSIZE; /* we now have strstart >= MAX_DIST: */
|
|
||||||
+ if (rsync_chunk_end != 0xFFFFFFFFUL)
|
|
||||||
+ rsync_chunk_end -= WSIZE;
|
|
||||||
|
|
||||||
block_start -= (long) WSIZE;
|
|
||||||
|
|
||||||
@@ -577,13 +593,46 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+local void rsync_roll(start, num)
|
|
||||||
+ unsigned start;
|
|
||||||
+ unsigned num;
|
|
||||||
+{
|
|
||||||
+ unsigned i;
|
|
||||||
+
|
|
||||||
+ if (start < RSYNC_WIN) {
|
|
||||||
+ /* before window fills. */
|
|
||||||
+ for (i = start; i < RSYNC_WIN; i++) {
|
|
||||||
+ if (i == start + num) return;
|
|
||||||
+ rsync_sum += (ulg)window[i];
|
|
||||||
+ }
|
|
||||||
+ num -= (RSYNC_WIN - start);
|
|
||||||
+ start = RSYNC_WIN;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* buffer after window full */
|
|
||||||
+ for (i = start; i < start+num; i++) {
|
|
||||||
+ /* New character in */
|
|
||||||
+ rsync_sum += (ulg)window[i];
|
|
||||||
+ /* Old character out */
|
|
||||||
+ rsync_sum -= (ulg)window[i - RSYNC_WIN];
|
|
||||||
+ if (rsync_chunk_end == 0xFFFFFFFFUL && RSYNC_SUM_MATCH(rsync_sum))
|
|
||||||
+ rsync_chunk_end = i;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* ===========================================================================
|
|
||||||
+ * Set rsync_chunk_end if window sum matches magic value.
|
|
||||||
+ */
|
|
||||||
+#define RSYNC_ROLL(s, n) \
|
|
||||||
+ do { if (rsync) rsync_roll((s), (n)); } while(0)
|
|
||||||
+
|
|
||||||
/* ===========================================================================
|
|
||||||
* Flush the current block, with given end-of-file flag.
|
|
||||||
* IN assertion: strstart is set to the end of the current match.
|
|
||||||
*/
|
|
||||||
#define FLUSH_BLOCK(eof) \
|
|
||||||
flush_block(block_start >= 0L ? (char*)&window[(unsigned)block_start] : \
|
|
||||||
- (char*)NULL, (long)strstart - block_start, (eof))
|
|
||||||
+ (char*)NULL, (long)strstart - block_start, flush-1, (eof))
|
|
||||||
|
|
||||||
/* ===========================================================================
|
|
||||||
* Processes a new input file and return its compressed length. This
|
|
||||||
@@ -594,7 +643,7 @@
|
|
||||||
local off_t deflate_fast()
|
|
||||||
{
|
|
||||||
IPos hash_head; /* head of the hash chain */
|
|
||||||
- int flush; /* set if current block must be flushed */
|
|
||||||
+ int flush; /* set if current block must be flushed, 2=>and padded */
|
|
||||||
unsigned match_length = 0; /* length of best match */
|
|
||||||
|
|
||||||
prev_length = MIN_MATCH-1;
|
|
||||||
@@ -624,6 +673,7 @@
|
|
||||||
|
|
||||||
lookahead -= match_length;
|
|
||||||
|
|
||||||
+ RSYNC_ROLL(strstart, match_length);
|
|
||||||
/* Insert new strings in the hash table only if the match length
|
|
||||||
* is not too large. This saves time but degrades compression.
|
|
||||||
*/
|
|
||||||
@@ -652,9 +702,14 @@
|
|
||||||
/* No match, output a literal byte */
|
|
||||||
Tracevv((stderr,"%c",window[strstart]));
|
|
||||||
flush = ct_tally (0, window[strstart]);
|
|
||||||
+ RSYNC_ROLL(strstart, 1);
|
|
||||||
lookahead--;
|
|
||||||
strstart++;
|
|
||||||
}
|
|
||||||
+ if (rsync && strstart > rsync_chunk_end) {
|
|
||||||
+ rsync_chunk_end = 0xFFFFFFFFUL;
|
|
||||||
+ flush = 2;
|
|
||||||
+ }
|
|
||||||
if (flush) FLUSH_BLOCK(0), block_start = strstart;
|
|
||||||
|
|
||||||
/* Make sure that we always have enough lookahead, except
|
|
||||||
@@ -728,6 +783,7 @@
|
|
||||||
*/
|
|
||||||
lookahead -= prev_length-1;
|
|
||||||
prev_length -= 2;
|
|
||||||
+ RSYNC_ROLL(strstart, prev_length+1);
|
|
||||||
do {
|
|
||||||
strstart++;
|
|
||||||
INSERT_STRING(strstart, hash_head);
|
|
||||||
@@ -740,24 +796,39 @@
|
|
||||||
match_available = 0;
|
|
||||||
match_length = MIN_MATCH-1;
|
|
||||||
strstart++;
|
|
||||||
- if (flush) FLUSH_BLOCK(0), block_start = strstart;
|
|
||||||
|
|
||||||
+ if (rsync && strstart > rsync_chunk_end) {
|
|
||||||
+ rsync_chunk_end = 0xFFFFFFFFUL;
|
|
||||||
+ flush = 2;
|
|
||||||
+ }
|
|
||||||
+ if (flush) FLUSH_BLOCK(0), block_start = strstart;
|
|
||||||
} else if (match_available) {
|
|
||||||
/* If there was no match at the previous position, output a
|
|
||||||
* single literal. If there was a match but the current match
|
|
||||||
* is longer, truncate the previous match to a single literal.
|
|
||||||
*/
|
|
||||||
Tracevv((stderr,"%c",window[strstart-1]));
|
|
||||||
- if (ct_tally (0, window[strstart-1])) {
|
|
||||||
- FLUSH_BLOCK(0), block_start = strstart;
|
|
||||||
- }
|
|
||||||
+ flush = ct_tally (0, window[strstart-1]);
|
|
||||||
+ if (rsync && strstart > rsync_chunk_end) {
|
|
||||||
+ rsync_chunk_end = 0xFFFFFFFFUL;
|
|
||||||
+ flush = 2;
|
|
||||||
+ }
|
|
||||||
+ if (flush) FLUSH_BLOCK(0), block_start = strstart;
|
|
||||||
+ RSYNC_ROLL(strstart, 1);
|
|
||||||
strstart++;
|
|
||||||
lookahead--;
|
|
||||||
} else {
|
|
||||||
/* There is no previous match to compare with, wait for
|
|
||||||
* the next step to decide.
|
|
||||||
*/
|
|
||||||
+ if (rsync && strstart > rsync_chunk_end) {
|
|
||||||
+ /* Reset huffman tree */
|
|
||||||
+ rsync_chunk_end = 0xFFFFFFFFUL;
|
|
||||||
+ flush = 2;
|
|
||||||
+ FLUSH_BLOCK(0), block_start = strstart;
|
|
||||||
+ }
|
|
||||||
match_available = 1;
|
|
||||||
+ RSYNC_ROLL(strstart, 1);
|
|
||||||
strstart++;
|
|
||||||
lookahead--;
|
|
||||||
}
|
|
||||||
--- gzip-1.3.6/gzip.c.orig 2006-11-20 09:40:33.000000000 +0100
|
|
||||||
+++ gzip-1.3.6/gzip.c 2006-11-30 00:15:31.387441750 +0100
|
|
||||||
@@ -218,6 +218,7 @@
|
|
||||||
unsigned insize; /* valid bytes in inbuf */
|
|
||||||
unsigned inptr; /* index of next byte to be processed in inbuf */
|
|
||||||
unsigned outcnt; /* bytes in output buffer */
|
|
||||||
+int rsync = 0; /* make ryncable chunks */
|
|
||||||
|
|
||||||
struct option longopts[] =
|
|
||||||
{
|
|
||||||
@@ -247,6 +248,7 @@
|
|
||||||
{"best", 0, 0, '9'}, /* compress better */
|
|
||||||
{"lzw", 0, 0, 'Z'}, /* make output compatible with old compress */
|
|
||||||
{"bits", 1, 0, 'b'}, /* max number of bits per code (implies -Z) */
|
|
||||||
+ {"rsyncable", 0, 0, 'R'}, /* make rsync-friendly archive */
|
|
||||||
{ 0, 0, 0, 0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -329,6 +331,7 @@
|
|
||||||
" -Z, --lzw produce output compatible with old compress",
|
|
||||||
" -b, --bits=BITS max number of bits per code (implies -Z)",
|
|
||||||
#endif
|
|
||||||
+ " --rsyncable make rsync-friendly archive",
|
|
||||||
"",
|
|
||||||
"With no FILE, or when FILE is -, read standard input.",
|
|
||||||
"",
|
|
||||||
@@ -469,6 +472,9 @@
|
|
||||||
recursive = 1;
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
+ case 'R':
|
|
||||||
+ rsync = 1;
|
|
||||||
+ break;
|
|
||||||
case 'S':
|
|
||||||
#ifdef NO_MULTIPLE_DOTS
|
|
||||||
if (*optarg == '.') optarg++;
|
|
||||||
--- gzip-1.3.5/gzip.h 2001-09-30 23:53:41 -0700
|
|
||||||
+++ rsyncable/gzip.h 2005-02-05 09:40:33 -0800
|
|
||||||
@@ -133,6 +133,7 @@
|
|
||||||
extern unsigned insize; /* valid bytes in inbuf */
|
|
||||||
extern unsigned inptr; /* index of next byte to be processed in inbuf */
|
|
||||||
extern unsigned outcnt; /* bytes in output buffer */
|
|
||||||
+extern int rsync; /* deflate into rsyncable chunks */
|
|
||||||
|
|
||||||
extern off_t bytes_in; /* number of input bytes */
|
|
||||||
extern off_t bytes_out; /* number of output bytes */
|
|
||||||
@@ -281,7 +282,7 @@
|
|
||||||
/* in trees.c */
|
|
||||||
void ct_init OF((ush *attr, int *method));
|
|
||||||
int ct_tally OF((int dist, int lc));
|
|
||||||
-off_t flush_block OF((char *buf, ulg stored_len, int eof));
|
|
||||||
+off_t flush_block OF((char *buf, ulg stored_len, int pad, int eof));
|
|
||||||
|
|
||||||
/* in bits.c */
|
|
||||||
void bi_init OF((file_t zipfile));
|
|
||||||
--- gzip-1.3.6/doc/gzip.texi 2002-09-29 23:57:29 -0700
|
|
||||||
+++ rsyncable/doc/gzip.texi 2005-02-05 09:40:33 -0800
|
|
||||||
@@ -334,6 +334,14 @@
|
|
||||||
into the directory and compress all the files it finds there (or
|
|
||||||
decompress them in the case of @code{gunzip}).
|
|
||||||
|
|
||||||
+@item --rsyncable
|
|
||||||
+While compressing, synchronize the output occasionally based on the
|
|
||||||
+input. This increases size by less than 1 percent most cases, but
|
|
||||||
+means that the @code{rsync} program can take advantage of similarities
|
|
||||||
+in the uncompressed input when syncronizing two files compressed with
|
|
||||||
+this flag. @code{gunzip} cannot tell the difference between a
|
|
||||||
+compressed file created with this option, and one created without it.
|
|
||||||
+
|
|
||||||
@item --suffix @var{suf}
|
|
||||||
@itemx -S @var{suf}
|
|
||||||
Use suffix @samp{@var{suf}} instead of @samp{.gz}. Any suffix can be
|
|
||||||
--- gzip-1.3.5/trees.c 1999-10-05 22:00:00 -0700
|
|
||||||
+++ rsyncable/trees.c 2005-02-05 09:40:33 -0800
|
|
||||||
@@ -46,12 +46,13 @@
|
|
||||||
* void ct_tally (int dist, int lc);
|
|
||||||
* Save the match info and tally the frequency counts.
|
|
||||||
*
|
|
||||||
- * off_t flush_block (char *buf, ulg stored_len, int eof)
|
|
||||||
+ * off_t flush_block (char *buf, ulg stored_len, int pad, int eof)
|
|
||||||
* Determine the best encoding for the current block: dynamic trees,
|
|
||||||
* static trees or store, and output the encoded block to the zip
|
|
||||||
- * file. Returns the total compressed length for the file so far.
|
|
||||||
- *
|
|
||||||
- */
|
|
||||||
+ * file. If pad is set, pads the block to the next
|
|
||||||
+ * byte. Returns the total compressed length for the file so
|
|
||||||
+ * far.
|
|
||||||
+ * */
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
@@ -847,9 +848,10 @@
|
|
||||||
* trees or store, and output the encoded block to the zip file. This function
|
|
||||||
* returns the total compressed length for the file so far.
|
|
||||||
*/
|
|
||||||
-off_t flush_block(buf, stored_len, eof)
|
|
||||||
+off_t flush_block(buf, stored_len, pad, eof)
|
|
||||||
char *buf; /* input block, or NULL if too old */
|
|
||||||
ulg stored_len; /* length of input block */
|
|
||||||
+ int pad; /* pad output to byte boundary */
|
|
||||||
int eof; /* true if this is the last block for a file */
|
|
||||||
{
|
|
||||||
ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
|
|
||||||
@@ -941,6 +943,10 @@
|
|
||||||
Assert (input_len == bytes_in, "bad input size");
|
|
||||||
bi_windup();
|
|
||||||
compressed_len += 7; /* align on byte boundary */
|
|
||||||
+ } else if (pad && (compressed_len % 8) != 0) {
|
|
||||||
+ send_bits((STORED_BLOCK<<1)+eof, 3); /* send block type */
|
|
||||||
+ compressed_len = (compressed_len + 3 + 7) & ~7L;
|
|
||||||
+ copy_block(buf, 0, 1); /* with header */
|
|
||||||
}
|
|
||||||
|
|
||||||
return compressed_len >> 3;
|
|
@ -1,299 +0,0 @@
|
|||||||
NOTE: this patch is for _gzip_!
|
|
||||||
|
|
||||||
This is pending for actual inclusion in gzip. It is currently being
|
|
||||||
tried out in the default gzip for Debian Sarge, and may go into the
|
|
||||||
upstream gzip at somepoint in the not-too-distant future.
|
|
||||||
|
|
||||||
--- gzip-1.5/deflate.c.orig 2012-04-24 18:25:28.000000000 +0200
|
|
||||||
+++ gzip-1.5/deflate.c 2012-06-18 19:36:09.127690198 +0200
|
|
||||||
@@ -131,6 +131,14 @@
|
|
||||||
#endif
|
|
||||||
/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
|
|
||||||
|
|
||||||
+#ifndef RSYNC_WIN
|
|
||||||
+# define RSYNC_WIN 4096
|
|
||||||
+#endif
|
|
||||||
+/* Size of rsync window, must be < MAX_DIST */
|
|
||||||
+
|
|
||||||
+#define RSYNC_SUM_MATCH(sum) ((sum) % RSYNC_WIN == 0)
|
|
||||||
+/* Whether window sum matches magic value */
|
|
||||||
+
|
|
||||||
/* ===========================================================================
|
|
||||||
* Local data used by the "longest match" routines.
|
|
||||||
*/
|
|
||||||
@@ -212,6 +220,8 @@
|
|
||||||
unsigned good_match;
|
|
||||||
/* Use a faster search when the previous match is longer than this */
|
|
||||||
|
|
||||||
+local ulg rsync_sum; /* rolling sum of rsync window */
|
|
||||||
+local ulg rsync_chunk_end; /* next rsync sequence point */
|
|
||||||
|
|
||||||
/* Values for max_lazy_match, good_match and max_chain_length, depending on
|
|
||||||
* the desired pack level (0..9). The values given below have been tuned to
|
|
||||||
@@ -314,6 +324,10 @@
|
|
||||||
#endif
|
|
||||||
/* prev will be initialized on the fly */
|
|
||||||
|
|
||||||
+ /* rsync params */
|
|
||||||
+ rsync_chunk_end = 0xFFFFFFFFUL;
|
|
||||||
+ rsync_sum = 0;
|
|
||||||
+
|
|
||||||
/* Set the default configuration parameters:
|
|
||||||
*/
|
|
||||||
max_lazy_match = configuration_table[pack_level].max_lazy;
|
|
||||||
@@ -550,6 +564,8 @@
|
|
||||||
memcpy((char*)window, (char*)window+WSIZE, (unsigned)WSIZE);
|
|
||||||
match_start -= WSIZE;
|
|
||||||
strstart -= WSIZE; /* we now have strstart >= MAX_DIST: */
|
|
||||||
+ if (rsync_chunk_end != 0xFFFFFFFFUL)
|
|
||||||
+ rsync_chunk_end -= WSIZE;
|
|
||||||
|
|
||||||
block_start -= (long) WSIZE;
|
|
||||||
|
|
||||||
@@ -579,13 +595,46 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+local void rsync_roll(start, num)
|
|
||||||
+ unsigned start;
|
|
||||||
+ unsigned num;
|
|
||||||
+{
|
|
||||||
+ unsigned i;
|
|
||||||
+
|
|
||||||
+ if (start < RSYNC_WIN) {
|
|
||||||
+ /* before window fills. */
|
|
||||||
+ for (i = start; i < RSYNC_WIN; i++) {
|
|
||||||
+ if (i == start + num) return;
|
|
||||||
+ rsync_sum += (ulg)window[i];
|
|
||||||
+ }
|
|
||||||
+ num -= (RSYNC_WIN - start);
|
|
||||||
+ start = RSYNC_WIN;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* buffer after window full */
|
|
||||||
+ for (i = start; i < start+num; i++) {
|
|
||||||
+ /* New character in */
|
|
||||||
+ rsync_sum += (ulg)window[i];
|
|
||||||
+ /* Old character out */
|
|
||||||
+ rsync_sum -= (ulg)window[i - RSYNC_WIN];
|
|
||||||
+ if (rsync_chunk_end == 0xFFFFFFFFUL && RSYNC_SUM_MATCH(rsync_sum))
|
|
||||||
+ rsync_chunk_end = i;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* ===========================================================================
|
|
||||||
+ * Set rsync_chunk_end if window sum matches magic value.
|
|
||||||
+ */
|
|
||||||
+#define RSYNC_ROLL(s, n) \
|
|
||||||
+ do { if (rsync) rsync_roll((s), (n)); } while(0)
|
|
||||||
+
|
|
||||||
/* ===========================================================================
|
|
||||||
* Flush the current block, with given end-of-file flag.
|
|
||||||
* IN assertion: strstart is set to the end of the current match.
|
|
||||||
*/
|
|
||||||
#define FLUSH_BLOCK(eof) \
|
|
||||||
flush_block(block_start >= 0L ? (char*)&window[(unsigned)block_start] : \
|
|
||||||
- (char*)NULL, (long)strstart - block_start, (eof))
|
|
||||||
+ (char*)NULL, (long)strstart - block_start, flush-1, (eof))
|
|
||||||
|
|
||||||
/* ===========================================================================
|
|
||||||
* Processes a new input file and return its compressed length. This
|
|
||||||
@@ -596,7 +645,7 @@
|
|
||||||
local off_t deflate_fast()
|
|
||||||
{
|
|
||||||
IPos hash_head; /* head of the hash chain */
|
|
||||||
- int flush; /* set if current block must be flushed */
|
|
||||||
+ int flush; /* set if current block must be flushed, 2=>and padded */
|
|
||||||
unsigned match_length = 0; /* length of best match */
|
|
||||||
|
|
||||||
prev_length = MIN_MATCH-1;
|
|
||||||
@@ -626,6 +675,7 @@
|
|
||||||
|
|
||||||
lookahead -= match_length;
|
|
||||||
|
|
||||||
+ RSYNC_ROLL(strstart, match_length);
|
|
||||||
/* Insert new strings in the hash table only if the match length
|
|
||||||
* is not too large. This saves time but degrades compression.
|
|
||||||
*/
|
|
||||||
@@ -654,9 +704,14 @@
|
|
||||||
/* No match, output a literal byte */
|
|
||||||
Tracevv((stderr,"%c",window[strstart]));
|
|
||||||
flush = ct_tally (0, window[strstart]);
|
|
||||||
+ RSYNC_ROLL(strstart, 1);
|
|
||||||
lookahead--;
|
|
||||||
strstart++;
|
|
||||||
}
|
|
||||||
+ if (rsync && strstart > rsync_chunk_end) {
|
|
||||||
+ rsync_chunk_end = 0xFFFFFFFFUL;
|
|
||||||
+ flush = 2;
|
|
||||||
+ }
|
|
||||||
if (flush) FLUSH_BLOCK(0), block_start = strstart;
|
|
||||||
|
|
||||||
/* Make sure that we always have enough lookahead, except
|
|
||||||
@@ -730,6 +785,7 @@
|
|
||||||
*/
|
|
||||||
lookahead -= prev_length-1;
|
|
||||||
prev_length -= 2;
|
|
||||||
+ RSYNC_ROLL(strstart, prev_length+1);
|
|
||||||
do {
|
|
||||||
strstart++;
|
|
||||||
INSERT_STRING(strstart, hash_head);
|
|
||||||
@@ -742,24 +798,39 @@
|
|
||||||
match_available = 0;
|
|
||||||
match_length = MIN_MATCH-1;
|
|
||||||
strstart++;
|
|
||||||
- if (flush) FLUSH_BLOCK(0), block_start = strstart;
|
|
||||||
|
|
||||||
+ if (rsync && strstart > rsync_chunk_end) {
|
|
||||||
+ rsync_chunk_end = 0xFFFFFFFFUL;
|
|
||||||
+ flush = 2;
|
|
||||||
+ }
|
|
||||||
+ if (flush) FLUSH_BLOCK(0), block_start = strstart;
|
|
||||||
} else if (match_available) {
|
|
||||||
/* If there was no match at the previous position, output a
|
|
||||||
* single literal. If there was a match but the current match
|
|
||||||
* is longer, truncate the previous match to a single literal.
|
|
||||||
*/
|
|
||||||
Tracevv((stderr,"%c",window[strstart-1]));
|
|
||||||
- if (ct_tally (0, window[strstart-1])) {
|
|
||||||
- FLUSH_BLOCK(0), block_start = strstart;
|
|
||||||
- }
|
|
||||||
+ flush = ct_tally (0, window[strstart-1]);
|
|
||||||
+ if (rsync && strstart > rsync_chunk_end) {
|
|
||||||
+ rsync_chunk_end = 0xFFFFFFFFUL;
|
|
||||||
+ flush = 2;
|
|
||||||
+ }
|
|
||||||
+ if (flush) FLUSH_BLOCK(0), block_start = strstart;
|
|
||||||
+ RSYNC_ROLL(strstart, 1);
|
|
||||||
strstart++;
|
|
||||||
lookahead--;
|
|
||||||
} else {
|
|
||||||
/* There is no previous match to compare with, wait for
|
|
||||||
* the next step to decide.
|
|
||||||
*/
|
|
||||||
+ if (rsync && strstart > rsync_chunk_end) {
|
|
||||||
+ /* Reset huffman tree */
|
|
||||||
+ rsync_chunk_end = 0xFFFFFFFFUL;
|
|
||||||
+ flush = 2;
|
|
||||||
+ FLUSH_BLOCK(0), block_start = strstart;
|
|
||||||
+ }
|
|
||||||
match_available = 1;
|
|
||||||
+ RSYNC_ROLL(strstart, 1);
|
|
||||||
strstart++;
|
|
||||||
lookahead--;
|
|
||||||
}
|
|
||||||
--- gzip-1.5/gzip.c.orig 2012-04-24 18:25:28.000000000 +0200
|
|
||||||
+++ gzip-1.5/gzip.c 2012-06-18 19:37:13.954354148 +0200
|
|
||||||
@@ -213,6 +213,7 @@
|
|
||||||
unsigned insize; /* valid bytes in inbuf */
|
|
||||||
unsigned inptr; /* index of next byte to be processed in inbuf */
|
|
||||||
unsigned outcnt; /* bytes in output buffer */
|
|
||||||
+int rsync = 0; /* make ryncable chunks */
|
|
||||||
|
|
||||||
static int handled_sig[] =
|
|
||||||
{
|
|
||||||
@@ -270,6 +271,7 @@
|
|
||||||
{"best", 0, 0, '9'}, /* compress better */
|
|
||||||
{"lzw", 0, 0, 'Z'}, /* make output compatible with old compress */
|
|
||||||
{"bits", 1, 0, 'b'}, /* max number of bits per code (implies -Z) */
|
|
||||||
+ {"rsyncable", 0, 0, 'R'}, /* make rsync-friendly archive */
|
|
||||||
|
|
||||||
{ 0, 0, 0, 0 }
|
|
||||||
};
|
|
||||||
@@ -353,6 +355,7 @@
|
|
||||||
" -Z, --lzw produce output compatible with old compress",
|
|
||||||
" -b, --bits=BITS max number of bits per code (implies -Z)",
|
|
||||||
#endif
|
|
||||||
+ " --rsyncable make rsync-friendly archive",
|
|
||||||
"",
|
|
||||||
"With no FILE, or when FILE is -, read standard input.",
|
|
||||||
"",
|
|
||||||
@@ -482,6 +485,9 @@
|
|
||||||
recursive = 1;
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
+ case 'R':
|
|
||||||
+ rsync = 1;
|
|
||||||
+ break;
|
|
||||||
case 'S':
|
|
||||||
#ifdef NO_MULTIPLE_DOTS
|
|
||||||
if (*optarg == '.') optarg++;
|
|
||||||
--- gzip-1.5/gzip.h.orig 2012-01-01 09:53:58.000000000 +0100
|
|
||||||
+++ gzip-1.5/gzip.h 2012-06-18 19:36:31.987689240 +0200
|
|
||||||
@@ -140,6 +140,7 @@
|
|
||||||
extern unsigned insize; /* valid bytes in inbuf */
|
|
||||||
extern unsigned inptr; /* index of next byte to be processed in inbuf */
|
|
||||||
extern unsigned outcnt; /* bytes in output buffer */
|
|
||||||
+extern int rsync; /* deflate into rsyncable chunks */
|
|
||||||
|
|
||||||
extern off_t bytes_in; /* number of input bytes */
|
|
||||||
extern off_t bytes_out; /* number of output bytes */
|
|
||||||
@@ -287,7 +288,7 @@
|
|
||||||
/* in trees.c */
|
|
||||||
extern void ct_init (ush *attr, int *method);
|
|
||||||
extern int ct_tally (int dist, int lc);
|
|
||||||
-extern off_t flush_block (char *buf, ulg stored_len, int eof);
|
|
||||||
+extern off_t flush_block (char *buf, ulg stored_len, int pad, int eof);
|
|
||||||
|
|
||||||
/* in bits.c */
|
|
||||||
extern void bi_init (file_t zipfile);
|
|
||||||
--- gzip-1.3.6/doc/gzip.texi 2002-09-29 23:57:29 -0700
|
|
||||||
+++ rsyncable/doc/gzip.texi 2005-02-05 09:40:33 -0800
|
|
||||||
@@ -334,6 +334,14 @@
|
|
||||||
into the directory and compress all the files it finds there (or
|
|
||||||
decompress them in the case of @code{gunzip}).
|
|
||||||
|
|
||||||
+@item --rsyncable
|
|
||||||
+While compressing, synchronize the output occasionally based on the
|
|
||||||
+input. This increases size by less than 1 percent most cases, but
|
|
||||||
+means that the @code{rsync} program can take advantage of similarities
|
|
||||||
+in the uncompressed input when syncronizing two files compressed with
|
|
||||||
+this flag. @code{gunzip} cannot tell the difference between a
|
|
||||||
+compressed file created with this option, and one created without it.
|
|
||||||
+
|
|
||||||
@item --suffix @var{suf}
|
|
||||||
@itemx -S @var{suf}
|
|
||||||
Use suffix @samp{@var{suf}} instead of @samp{.gz}. Any suffix can be
|
|
||||||
--- gzip-1.3.5/trees.c 1999-10-05 22:00:00 -0700
|
|
||||||
+++ rsyncable/trees.c 2005-02-05 09:40:33 -0800
|
|
||||||
@@ -46,12 +46,13 @@
|
|
||||||
* void ct_tally (int dist, int lc);
|
|
||||||
* Save the match info and tally the frequency counts.
|
|
||||||
*
|
|
||||||
- * off_t flush_block (char *buf, ulg stored_len, int eof)
|
|
||||||
+ * off_t flush_block (char *buf, ulg stored_len, int pad, int eof)
|
|
||||||
* Determine the best encoding for the current block: dynamic trees,
|
|
||||||
* static trees or store, and output the encoded block to the zip
|
|
||||||
- * file. Returns the total compressed length for the file so far.
|
|
||||||
- *
|
|
||||||
- */
|
|
||||||
+ * file. If pad is set, pads the block to the next
|
|
||||||
+ * byte. Returns the total compressed length for the file so
|
|
||||||
+ * far.
|
|
||||||
+ * */
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
@@ -847,9 +848,10 @@
|
|
||||||
* trees or store, and output the encoded block to the zip file. This function
|
|
||||||
* returns the total compressed length for the file so far.
|
|
||||||
*/
|
|
||||||
-off_t flush_block(buf, stored_len, eof)
|
|
||||||
+off_t flush_block(buf, stored_len, pad, eof)
|
|
||||||
char *buf; /* input block, or NULL if too old */
|
|
||||||
ulg stored_len; /* length of input block */
|
|
||||||
+ int pad; /* pad output to byte boundary */
|
|
||||||
int eof; /* true if this is the last block for a file */
|
|
||||||
{
|
|
||||||
ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
|
|
||||||
@@ -941,6 +943,10 @@
|
|
||||||
Assert (input_len == bytes_in, "bad input size");
|
|
||||||
bi_windup();
|
|
||||||
compressed_len += 7; /* align on byte boundary */
|
|
||||||
+ } else if (pad && (compressed_len % 8) != 0) {
|
|
||||||
+ send_bits((STORED_BLOCK<<1)+eof, 3); /* send block type */
|
|
||||||
+ compressed_len = (compressed_len + 3 + 7) & ~7L;
|
|
||||||
+ copy_block(buf, 0, 1); /* with header */
|
|
||||||
}
|
|
||||||
|
|
||||||
return compressed_len >> 3;
|
|
@ -1,49 +0,0 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/app-arch/gzip/gzip-1.4.ebuild,v 1.12 2012/07/06 17:58:32 vapier Exp $
|
|
||||||
|
|
||||||
inherit eutils flag-o-matic
|
|
||||||
|
|
||||||
DESCRIPTION="Standard GNU compressor"
|
|
||||||
HOMEPAGE="http://www.gnu.org/software/gzip/"
|
|
||||||
SRC_URI="mirror://gnu-alpha/gzip/${P}.tar.gz
|
|
||||||
mirror://gnu/gzip/${P}.tar.gz
|
|
||||||
mirror://gentoo/${P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="GPL-3"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
|
||||||
IUSE="nls pic static"
|
|
||||||
|
|
||||||
RDEPEND=""
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
nls? ( sys-devel/gettext )"
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
unpack ${A}
|
|
||||||
cd "${S}"
|
|
||||||
epatch "${FILESDIR}"/${PN}-1.4-rsyncable.patch
|
|
||||||
epatch "${FILESDIR}"/${PN}-1.3.8-install-symlinks.patch
|
|
||||||
epatch "${FILESDIR}"/${P}-assembler.patch #309079
|
|
||||||
epatch "${FILESDIR}"/${P}-no-gets.patch
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
use static && append-flags -static
|
|
||||||
# avoid text relocation in gzip
|
|
||||||
use pic && export DEFS="NO_ASM"
|
|
||||||
econf || die
|
|
||||||
emake || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake install DESTDIR="${D}" || die
|
|
||||||
dodoc ChangeLog NEWS README THANKS TODO
|
|
||||||
docinto txt
|
|
||||||
dodoc algorithm.doc gzip.doc
|
|
||||||
|
|
||||||
# keep most things in /usr, just the fun stuff in /
|
|
||||||
dodir /bin
|
|
||||||
mv "${D}"/usr/bin/{gunzip,gzip,uncompress,zcat} "${D}"/bin/ || die
|
|
||||||
sed -e 's:/usr::' -i "${D}"/bin/gunzip || die
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/app-arch/gzip/gzip-1.5.ebuild,v 1.8 2012/09/09 15:56:45 armin76 Exp $
|
|
||||||
|
|
||||||
inherit eutils flag-o-matic unpacker
|
|
||||||
|
|
||||||
DESCRIPTION="Standard GNU compressor"
|
|
||||||
HOMEPAGE="http://www.gnu.org/software/gzip/"
|
|
||||||
SRC_URI="mirror://gnu-alpha/gzip/${P}.tar.xz
|
|
||||||
mirror://gnu/gzip/${P}.tar.xz
|
|
||||||
mirror://gentoo/${P}.tar.xz"
|
|
||||||
|
|
||||||
LICENSE="GPL-3"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
|
||||||
IUSE="nls pic static"
|
|
||||||
|
|
||||||
RDEPEND=""
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
nls? ( sys-devel/gettext )"
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
unpacker
|
|
||||||
cd "${S}"
|
|
||||||
epatch "${FILESDIR}"/${PN}-1.5-rsyncable.patch
|
|
||||||
epatch "${FILESDIR}"/${PN}-1.3.8-install-symlinks.patch
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
use static && append-flags -static
|
|
||||||
# avoid text relocation in gzip
|
|
||||||
use pic && export DEFS="NO_ASM"
|
|
||||||
econf || die
|
|
||||||
emake || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake install DESTDIR="${D}" || die
|
|
||||||
dodoc ChangeLog NEWS README THANKS TODO
|
|
||||||
docinto txt
|
|
||||||
dodoc algorithm.doc gzip.doc
|
|
||||||
|
|
||||||
# keep most things in /usr, just the fun stuff in /
|
|
||||||
dodir /bin
|
|
||||||
mv "${D}"/usr/bin/{gunzip,gzip,uncompress,zcat} "${D}"/bin/ || die
|
|
||||||
sed -e 's:/usr::' -i "${D}"/bin/gunzip || die
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
# Copyright 1999-2015 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/app-arch/gzip/gzip-1.6.ebuild,v 1.9 2015/01/26 10:38:30 ago Exp $
|
|
||||||
|
|
||||||
EAPI="4"
|
|
||||||
|
|
||||||
inherit eutils flag-o-matic
|
|
||||||
|
|
||||||
DESCRIPTION="Standard GNU compressor"
|
|
||||||
HOMEPAGE="http://www.gnu.org/software/gzip/"
|
|
||||||
SRC_URI="mirror://gnu-alpha/gzip/${P}.tar.xz
|
|
||||||
mirror://gnu/gzip/${P}.tar.xz
|
|
||||||
mirror://gentoo/${P}.tar.xz"
|
|
||||||
|
|
||||||
LICENSE="GPL-3"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
IUSE="pic static"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
epatch "${FILESDIR}"/${PN}-1.5-rsyncable.patch
|
|
||||||
epatch "${FILESDIR}"/${PN}-1.3.8-install-symlinks.patch
|
|
||||||
epatch "${FILESDIR}"/${PN}-1.4-asmv.patch
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
use static && append-flags -static
|
|
||||||
# avoid text relocation in gzip
|
|
||||||
use pic && export DEFS="NO_ASM"
|
|
||||||
econf
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
default
|
|
||||||
docinto txt
|
|
||||||
dodoc algorithm.doc gzip.doc
|
|
||||||
|
|
||||||
# keep most things in /usr, just the fun stuff in /
|
|
||||||
dodir /bin
|
|
||||||
mv "${ED}"/usr/bin/{gunzip,gzip,uncompress,zcat} "${ED}"/bin/ || die
|
|
||||||
sed -e "s:${EPREFIX}/usr:${EPREFIX}:" -i "${ED}"/bin/gunzip || die
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
|
||||||
<pkgmetadata>
|
|
||||||
<herd>base-system</herd>
|
|
||||||
<use>
|
|
||||||
<flag name='pic'>disable optimized assembly code that is not PIC friendly</flag>
|
|
||||||
</use>
|
|
||||||
</pkgmetadata>
|
|
Loading…
Reference in New Issue
Block a user