summaryrefslogtreecommitdiff
path: root/unzip
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-05-07 05:59:37 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-05-07 05:59:37 -0400
commitcd85778597a709c5d589c9f984d039e5b96bafca (patch)
tree4a0e4cecb2ff216cc270a2fac5716a54175e7c15 /unzip
parent041601b591742fa071f50f25ee8ef9f5b1008bd4 (diff)
downloadspm_packages-cd85778597a709c5d589c9f984d039e5b96bafca.tar.gz
Initial Darwin compat sweep
Diffstat (limited to 'unzip')
-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() {