Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
gzip: build native tools from source
Browse files Browse the repository at this point in the history
Recent git versions have started to call up gzip for git-archive.
However, our gzip is an MSYS program, which ends up messing up
line-endings in the binary stream between git and gzip.

Building a native gzip makes this problem go away.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
  • Loading branch information
kusma committed Sep 29, 2011
1 parent c1861ba commit f354ff8
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/gzip/patches/0001-use-windows-exe-prefix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From aaa5e6e398e1e4dc527df0e95c5c07e32118cb79 Mon Sep 17 00:00:00 2001
From: Erik Faye-Lund <kusmabite@gmail.com>
Date: Thu, 29 Sep 2011 21:55:40 +0200
Subject: [PATCH] use windows exe-suffix

---
Makefile.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 40906a2..590bf8f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -81,7 +81,7 @@ G=@G@
ZCAT=@ZCAT@
# To install zcat executable and man page as gzcat, use: ZCAT=gzcat

-X=
+X=.exe
# For OS/2 or MSDOS, use: X=.exe

O=.o
--
1.7.6.355.g842ba.dirty

38 changes: 38 additions & 0 deletions src/gzip/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh

cd "$(dirname "$0")"

VERSION=1.2.4
DIR=gzip-$VERSION
URL=ftp://ftp.cs.tu-berlin.de/pub/gnu/gzip/$DIR.tar.gz
FILE=${URL##*/}

die () {
echo "$*" >&2
exit 1
}

test -d $DIR || {
test -f $FILE ||
curl -O $URL ||
die "Could not download $FILE"

tar xzvf $FILE && (
cd $DIR &&
git init &&
git add . &&
git commit -m "Import of $FILE"
)
} || die "Could not check out $FILE"

test $(cd $DIR && git rev-list HEAD | wc -l) -gt 1 ||
(cd $DIR && git am ../patches/*) ||
die "Could not apply patches"

(cd $DIR &&
INSTALL=/bin/install ./configure --prefix=/mingw &&
make &&
index=$(/share/msysGit/pre-install.sh) &&
make install &&
/share/msysGit/post-install.sh $index "Install $FILE"
) || die "Could not install $FILE"

0 comments on commit f354ff8

Please sign in to comment.