summaryrefslogtreecommitdiff
path: root/unzip/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'unzip/build.sh')
-rw-r--r--unzip/build.sh37
1 files changed, 29 insertions, 8 deletions
diff --git a/unzip/build.sh b/unzip/build.sh
index 6d6fd4f..1f76944 100644
--- a/unzip/build.sh
+++ b/unzip/build.sh
@@ -7,30 +7,51 @@ sources=(
)
build_depends=(
"bzip2"
+ "tar"
)
depends=(
"bzip2"
)
+debian_patchset=25
function prepare() {
tar xf ${name}${version//./}.tar.gz
cd ${name}${version//./}
+
+ curl -LO http://ftp.debian.org/debian/pool/main/u/${name}/${name}_${version}-${debian_patchset}.debian.tar.xz
+ tar xf ${name}_${version}-${debian_patchset}.debian.tar.xz
+
+ msg "Apply debian patchset: ${debian_patchset}"
+ for p in $(find debian/patches -type f -name "*.patch" | sort); do
+ msg2 "$p"
+ patch -p1 < "$p"
+ done
+
}
function build() {
+ DEFINES=
+ if [[ $(uname -s) == Linux ]]; then
+ DEFINES='-DACORN_FTYPE_NFS -DWILD_STOP_AT_DIR -DLARGE_FILE_SUPPORT \
+ -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -DNO_LCHMOD \
+ -DDATE_FORMAT=DF_YMD -DUSE_BZIP2 -DNOMEMCPY -DNO_WORKING_ISPRINT'
+ LF2="$LDFLAGS"
+ elif [[ $(uname -s) == Darwin ]]; then
+ DEFINES="-DUNIX -DBSD -DUSE_BZIP2"
+ LF2=""
+ fi
- # DEFINES, make, and install args from Debian
- DEFINES='-DACORN_FTYPE_NFS -DWILD_STOP_AT_DIR -DLARGE_FILE_SUPPORT \
- -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -DNO_LCHMOD \
- -DDATE_FORMAT=DF_YMD -DUSE_BZIP2 -DNOMEMCPY -DNO_WORKING_ISPRINT'
- make -f unix/Makefile prefix="${_pkgdir}${_prefix}" \
+ echo make -f unix/Makefile \
D_USE_BZ2=-DUSE_BZIP2 \
L_BZ2=-lbz2 \
- LF2="$LDFLAGS" \
- CF="$CFLAGS $CPPFLAGS -I. $DEFINES" \
- unzips
+ CF=\"$CFLAGS $CPPFLAGS -I. $DEFINES\" \
+ prefix=\"${_pkgdir}${_prefix}\" \
+ unzips > run.sh
+
+ chmod +x run.sh
+ bash run.sh
}
function package() {