Skip to content
This repository has been archived by the owner on Sep 3, 2019. It is now read-only.

Commit

Permalink
Fixed the zlib 64 bit release script.
Browse files Browse the repository at this point in the history
The patch is can be replaced by providing a command line option.
Improved the handling of errors in the script.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
  • Loading branch information
patthoyts committed Jun 20, 2012
1 parent 763d959 commit 41dd47d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 26 deletions.
16 changes: 0 additions & 16 deletions src/mingw-w64/patch/zlib-config.patch

This file was deleted.

24 changes: 14 additions & 10 deletions src/mingw-w64/release-zlib.sh
Expand Up @@ -7,6 +7,11 @@ mirror=http://zlib.net/
file=zlib-1.2.7.tar.gz file=zlib-1.2.7.tar.gz
dir=${file%.tar.gz} dir=${file%.tar.gz}


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

# download it # download it
if ! (test -f $file || curl $mirror$file -o $file) if ! (test -f $file || curl $mirror$file -o $file)
then then
Expand All @@ -18,26 +23,25 @@ then
fi fi


# unpack it # unpack it
test -d $dir || tar xzf $file || exit test -d $dir || tar xzf $file || die "Failed to unpack archive"


# initialize Git repository # initialize Git repository
test -d $dir/.git || test -d $dir/.git ||
(cd $dir && git init && git add . && git commit -m initial) || exit (cd $dir &&

git init &&
# patch it git config core.autocrlf false &&
if ! grep DISABLED_MINGW $dir/configure > /dev/null 2>&1 git add . &&
then git commit -m "Import of $file"
(cd $dir && git apply --verbose ../patch/zlib-config.patch) || exit ) || die "Failed to create repository"
fi


# compile it # compile it
sysroot="$(pwd)/sysroot/x86_64-w64-mingw32" sysroot="$(pwd)/sysroot/x86_64-w64-mingw32"
cross="$(pwd)/sysroot/bin/x86_64-w64-mingw32" cross="$(pwd)/sysroot/bin/x86_64-w64-mingw32"
test -f $dir/example.exe || { test -f $dir/example.exe || {
(cd $dir && (cd $dir &&
CC="$cross-gcc.exe" AR="$cross-ar.exe" RANLIB="$cross-ranlib.exe" \ CC="$cross-gcc.exe" AR="$cross-ar.exe" RANLIB="$cross-ranlib.exe" \
./configure --static --prefix=$sysroot && ./configure --static --prefix=$sysroot --uname=CYGWIN &&
make) || exit make) || die "Failed to compile"
} }


# install it # install it
Expand Down

0 comments on commit 41dd47d

Please sign in to comment.