summaryrefslogtreecommitdiff
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
parent041601b591742fa071f50f25ee8ef9f5b1008bd4 (diff)
downloadspm_packages-cd85778597a709c5d589c9f984d039e5b96bafca.tar.gz
Initial Darwin compat sweep
-rw-r--r--.gitignore1
-rw-r--r--bzip2/build.sh87
-rw-r--r--findutils/build.sh2
-rw-r--r--gdbm/build.sh4
-rw-r--r--gettext/build.sh4
-rw-r--r--libXau/build.sh4
-rw-r--r--libexpat/build.sh4
-rw-r--r--libffi/build.sh3
-rw-r--r--libtool/build.sh3
-rw-r--r--ncurses/build.sh23
-rw-r--r--openssl/build.sh7
-rw-r--r--pcre/build.sh4
-rw-r--r--perl/build.sh40
-rw-r--r--pkgconf/build.sh9
-rw-r--r--python/build.sh22
-rw-r--r--readline/build.sh2
-rw-r--r--sqlite/build.sh4
-rw-r--r--tcl/build.sh7
-rw-r--r--tk/build.sh11
-rw-r--r--unzip/build.sh37
-rw-r--r--xorg-util-macros/build.sh1
-rw-r--r--xz/build.sh7
22 files changed, 215 insertions, 71 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1377554
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.swp
diff --git a/bzip2/build.sh b/bzip2/build.sh
index ab59efd..4ddf384 100644
--- a/bzip2/build.sh
+++ b/bzip2/build.sh
@@ -3,35 +3,92 @@ name=bzip2
version=1.0.8
revision=0
sources=(
- https://sourceware.org/pub/bzip2/${name}-${version}.tar.gz
+ https://sourceware.org/pub/${name}/${name}-${version}.tar.gz
)
depends=()
+lib_type=so
function prepare() {
tar xf ${name}-${version}.tar.gz
cd ${name}-${version}
+
+ if [[ $(uname -s) == Darwin ]]; then
+ # Rotate the elder signs 14.8 degrees counter-clockwise
+ lib_type=dylib
+ cp Makefile Makefile.orig
+ cp Makefile-libbz2_so Makefile-libbz2_so.orig
+ sed -e 's|$(PREFIX)|$(DESTDIR)$(PREFIX)|g' -e 's|2\.so|2.dylib|g' < Makefile.orig > Makefile
+ sed -e 's|-soname|-install_name|g' -e 's|2\.so|2.dylib|g' < Makefile-libbz2_so.orig > Makefile-libbz2_so
+ fi
}
function build() {
- make -f Makefile-libbz2_so CC="gcc $CFLAGS $LDFLAGS"
make bzip2 bzip2recover CC="gcc $CFLAGS $LDFLAGS"
+ make -f Makefile-libbz2_so CC="gcc $CFLAGS $LDFLAGS"
}
function package() {
- install -dm755 "${_pkgdir}/${_prefix}"/{bin,lib,include,share/man/man1}
- install -m755 bzip2-shared "${_pkgdir}/${_prefix}"/bin/bzip2
- install -m755 bzip2recover bzdiff bzgrep bzmore "${_pkgdir}/${_prefix}"/bin
- ln -sf bzip2 "${_pkgdir}/${_prefix}"/bin/bunzip2
- ln -sf bzip2 "${_pkgdir}/${_prefix}"/bin/bzcat
- cp -a libbz2.so* "${_pkgdir}/${_prefix}"/lib
- ln -s libbz2.so.${version} "${_pkgdir}/${_prefix}"/lib/libbz2.so
- ln -s libbz2.so.${version} "${_pkgdir}/${_prefix}"/lib/libbz2.so.1
- install -m644 bzlib.h "${_pkgdir}/${_prefix}"/include
- install -m644 bzip2.1 "${_pkgdir}/${_prefix}"/share/man/man1
- ln -sf bzip2.1 "${_pkgdir}/${_prefix}"/share/man/man1/bunzip2.1
- ln -sf bzip2.1 "${_pkgdir}/${_prefix}"/share/man/man1/bzcat.1
- ln -sf bzip2.1 "${_pkgdir}/${_prefix}"/share/man/man1/bzip2recover.1
+ # Wow, this makefile is horrible. Fix shared library names.
+ lib_format=${lib_type}.${version}
+ lib_format_short=${lib_type}.${version%.*}
+ if [[ $(uname -s) == Darwin ]]; then
+ lib_format_darwin=${version}.${lib_type}
+ lib_format_darwin_short=${version%.*}.${lib_type}
+
+ mv libbz2.${lib_format} libbz2.${lib_format_darwin}
+ # Remove remaining Linux-style shared libraries
+ rm -f libbz2.${lib_type}*
+
+ # Reconstruct symlinks
+ ln -s libbz2.${lib_format_darwin} libbz2.${lib_format_darwin_short}
+ ln -s libbz2.${lib_format_darwin} libbz2.${lib_type}
+
+ # Reset LC_ID_DYLIB to use expected naming conventions
+ install_name_tool -id libbz2.${lib_format_darwin_short} \
+ libbz2.${lib_format_darwin}
+
+ lib_format=${lib_format_darwin}
+ lib_format_short=${lib_format_darwin_short}
+ fi
+
+ # Install bzip2, for what its worth
+ make install PREFIX=${_prefix} DESTDIR=${_pkgdir}
+
+ # Install binaries
+ cp -a bzip2-shared "${_pkgdir}${_prefix}"/bin/bzip2
+ cp -a libbz2.${lib_format} "${_pkgdir}${_prefix}"/lib
+ cp -a libbz2.${lib_format_short} "${_pkgdir}${_prefix}"/lib
+ cp -a libbz2.${lib_type} "${_pkgdir}${_prefix}"/lib
+
+ # Wow, this makefile is horrible. Destroy symlinks it created.
+ for f in "${_pkgdir}${_prefix}"/bin/*; do
+ if [[ -L "$f" ]]; then
+ rm -f "${f}"
+ fi
+ done
+
+ # Fix botched copy operation in makefile
+ cp -a bzdiff "${_pkgdir}${_prefix}"/bin
+ cp -a bzgrep "${_pkgdir}${_prefix}"/bin
+ chmod +x bzmore
+ cp -a bzmore "${_pkgdir}${_prefix}"/bin
+
+ # Recreate symlinks with relative paths
+ ln -sf bzip2 "${_pkgdir}${_prefix}"/bin/bunzip2
+ ln -sf bzip2 "${_pkgdir}${_prefix}"/bin/bzcat
+ ln -sf bzgrep "${_pkgdir}${_prefix}"/bin/bzfgrep
+ ln -sf bzgrep "${_pkgdir}${_prefix}"/bin/bzegrep
+ ln -sf bzdiff "${_pkgdir}${_prefix}"/bin/bzcmp
+ ln -sf bzmore "${_pkgdir}${_prefix}"/bin/bzless
+
+ # Fix man directory location
+ mkdir -p "${_pkgdir}${_prefix}"/share
+ mv "${_pkgdir}${_prefix}"/man "${_pkgdir}${_prefix}"/share
+
+ ln -sf bzip2.1 "${_pkgdir}${_prefix}"/share/man/man1/bunzip2.1
+ ln -sf bzip2.1 "${_pkgdir}${_prefix}"/share/man/man1/bzcat.1
+ ln -sf bzip2.1 "${_pkgdir}${_prefix}"/share/man/man1/bzip2recover.1
}
diff --git a/findutils/build.sh b/findutils/build.sh
index 2865dd5..280ac94 100644
--- a/findutils/build.sh
+++ b/findutils/build.sh
@@ -6,8 +6,6 @@ sources=(
"https://ftp.gnu.org/gnu/${name}/${name}-${version}.tar.xz"
)
build_depends=(
- "automake"
- "autoconf"
"xz"
)
depends=(
diff --git a/gdbm/build.sh b/gdbm/build.sh
index 6a680e9..bb25202 100644
--- a/gdbm/build.sh
+++ b/gdbm/build.sh
@@ -15,6 +15,10 @@ depends=(
function prepare() {
tar xf ${name}-${version}.tar.gz
cd ${name}-${version}
+ if [[ $(uname -s) == Darwin ]]; then
+ # two -rpaths don't make a working build -- for whatever reason
+ LDFLAGS="-L${_runtime}/lib"
+ fi
}
function build() {
diff --git a/gettext/build.sh b/gettext/build.sh
index 5d0192e..6adab04 100644
--- a/gettext/build.sh
+++ b/gettext/build.sh
@@ -11,6 +11,10 @@ depends=()
function prepare() {
tar xf ${name}-${version}.tar.gz
cd ${name}-${version}
+
+ if [[ $(uname -s) == Darwin ]]; then
+ LDFLAGS="-L${_runtime}"
+ fi
}
function build() {
diff --git a/libXau/build.sh b/libXau/build.sh
index 67481ae..9a14fb7 100644
--- a/libXau/build.sh
+++ b/libXau/build.sh
@@ -16,6 +16,10 @@ depends=(
function prepare() {
tar xf ${name}-${version}.tar.gz
cd ${name}-${version}
+
+ if [[ $(uname -s) == Darwin ]]; then
+ LDFLAGS="-L${_runtime}"
+ fi
}
function build() {
diff --git a/libexpat/build.sh b/libexpat/build.sh
index ccb636c..c0d4c53 100644
--- a/libexpat/build.sh
+++ b/libexpat/build.sh
@@ -18,6 +18,10 @@ depends=()
function prepare() {
tar xf R_${version//./_}.tar.gz
cd ${name}-R_${version//./_}/expat
+
+ if [[ $(uname -s) == Darwin ]]; then
+ LDFLAGS="-L${_runtime}"
+ fi
}
function build() {
diff --git a/libffi/build.sh b/libffi/build.sh
index 471cec2..9b464b4 100644
--- a/libffi/build.sh
+++ b/libffi/build.sh
@@ -16,6 +16,9 @@ depends=()
function prepare() {
tar xf ${name}-${version}.tar.gz
cd ${name}-${version}
+ if [[ $(uname -s) == Darwin ]]; then
+ LDFLAGS="-L${_runtime}/lib"
+ fi
}
function build() {
diff --git a/libtool/build.sh b/libtool/build.sh
index 441e763..1c6f42b 100644
--- a/libtool/build.sh
+++ b/libtool/build.sh
@@ -15,6 +15,9 @@ depends=(
function prepare() {
tar xf ${name}-${version}.tar.gz
cd ${name}-${version}
+ if [[ $(uname) == Darwin ]]; then
+ LDFLAGS="-L${_runtime}/lib"
+ fi
}
function build() {
diff --git a/ncurses/build.sh b/ncurses/build.sh
index d96717f..ec2875c 100644
--- a/ncurses/build.sh
+++ b/ncurses/build.sh
@@ -6,15 +6,17 @@ sources=(
"http://mirror.rit.edu/gnu/${name}/${name}-${version}.tar.gz"
)
build_depends=(
- "automake"
- "autoconf"
)
depends=()
+lib_type=so
function prepare() {
tar xf ${name}-${version}.tar.gz
cd ${name}-${version}
+ if [[ $(uname -s) == Darwin ]]; then
+ lib_type=dylib
+ fi
}
function build() {
@@ -40,21 +42,16 @@ function package() {
# fool packages looking to link to non-wide-character ncurses libraries
for lib in ncurses ncurses++ form panel menu; do
- echo "INPUT(-l${lib}w)" > "${_pkgdir}/${_prefix}/lib/lib${lib}.so"
- ln -s ${lib}w.pc "${_pkgdir}/${_prefix}/lib/pkgconfig/${lib}.pc"
- done
-
- for lib in tic tinfo; do
- echo "INPUT(libncursesw.so.${version:0:1})" > "${_pkgdir}/${_prefix}/lib/lib${lib}.so"
- ln -s libncursesw.so.${version:0:1} "${_pkgdir}/${_prefix}/lib/lib${lib}.so.${version:0:1}"
- ln -s ncursesw.pc "${_pkgdir}${_prefix}/lib/pkgconfig/${lib}.pc"
+ ln -s lib${lib}w.${lib_type} "${_pkgdir}${_prefix}/lib/lib${lib}.${lib_type}"
+ ln -s lib${lib}w.a "${_pkgdir}${_prefix}/lib/lib${lib}.a"
+ ln -s ${lib}w.pc "${_pkgdir}${_prefix}/lib/pkgconfig/${lib}.pc"
done
# some packages look for -lcurses during build
- echo 'INPUT(-lncursesw)' > "${_pkgdir}${_prefix}/lib/libcursesw.so"
- ln -s libncurses.so "${_pkgdir}/${_prefix}/lib/libcurses.so"
+ #echo 'INPUT(-lncursesw)' > "${_pkgdir}${_prefix}/lib/libcursesw.so"
+ ln -s libncurses.${lib_type} "${_pkgdir}${_prefix}/lib/libcurses.${lib_type}"
# some packages include from ncurses/
- ln -s ncursesw "${_pkgdir}/${_prefix}/include/ncurses"
+ ln -s ncursesw "${_pkgdir}${_prefix}/include/ncurses"
}
diff --git a/openssl/build.sh b/openssl/build.sh
index 30f1d5d..e7b34cf 100644
--- a/openssl/build.sh
+++ b/openssl/build.sh
@@ -16,10 +16,13 @@ function prepare() {
}
function build() {
- export LDFLAGS="-Wl,-rpath=${_runtime}/lib -L${_runtime}/lib"
export KERNEL_BITS=64
export TARGET=linux-x86_64
- #mkdir -p ${build_runtime}/lib
+
+ if [[ $(uname -s) == Darwin ]]; then
+ TARGET=darwin64-x86_64-cc
+ fi
+
./Configure \
--prefix="${_prefix}" \
--openssldir="${_prefix}/etc/ssl" \
diff --git a/pcre/build.sh b/pcre/build.sh
index 6c1784a..acf7060 100644
--- a/pcre/build.sh
+++ b/pcre/build.sh
@@ -20,6 +20,10 @@ depends=(
function prepare() {
tar xf ${name}-${version}.tar.gz
cd ${name}-${version}
+
+ if [[ $(uname -s) == Darwin ]]; then
+ LDFLAGS="-L${_runtime}/lib"
+ fi
}
function build() {
diff --git a/perl/build.sh b/perl/build.sh
index 3726861..adc7046 100644
--- a/perl/build.sh
+++ b/perl/build.sh
@@ -8,17 +8,22 @@ sources=(
)
build_depends=(
"bzip2"
+ "gdbm"
+ "zlib"
)
depends=(
"bzip2"
- "gdbm"
"readline"
+ "zlib"
)
-
+lib_type=so
function prepare() {
tar xf ${name}-${version}.tar.gz
cd ${name}-${version}
+ if [[ $(uname -s) == Darwin ]]; then
+ lib_type=dylib
+ fi
}
function build() {
@@ -26,8 +31,8 @@ function build() {
-Dusethreads \
-Duseshrplib \
-Dusesitecustomize \
- -Ui_ndbm \
- -Di_gdbm \
+ $([[ $(uname -s) == Linux ]] && echo -Ui_ndbm) \
+ $([[ $(uname -s) == Linux ]] && echo -Di_gdbm) \
-Doptimize="${CFLAGS}" \
-Dprefix=${_prefix} \
-Dvendorprefix=${_prefix} \
@@ -44,17 +49,30 @@ function build() {
-Dinc_version_list=none \
-Dman1ext=1perl \
-Dman3ext=3perl ${arch_opts} \
- -Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}"
+ -Dldflags="${LDFLAGS}"
+
+ #-Dccflags="${CFLAGS}" \
+ #-Dlddlflags="-shared ${LDFLAGS}" \
BUILD_BZIP2=0
BZIP2_LIB="${_runtime}/lib"
- export BUILD_BZIP2 BZIP2_LIB
+ BZIP2_INCLUDE="${_runtime}/include"
+ export BUILD_BZIP2 BZIP2_LIB BZIP2_INCLUDE
+
+ BUILD_ZLIB=0
+ ZLIB_LIB="${_runtime}/lib"
+ ZLIB_INCLUDE="${_runtime}/include"
+ export BUILD_ZLIB ZLIB_LIB ZLIB_INCLUDE
make -j${_maxjobs}
}
function package() {
make install DESTDIR="${_pkgdir}"
+
+ # Fix permissions. On Darwin, several files are installed as read-only.
+ find "${_pkgdir}" -type f | xargs chmod u+w
+
cat << EOF > "${_pkgdir}${_prefix}/share/perl5/site_perl/sitecustomize.pl"
@INC = (
"${_prefix}/lib/perl5/${_baseversion}/site_perl",
@@ -67,16 +85,16 @@ function package() {
);
EOF
sed -e '/^man1ext=/ s/1perl/1p/' -e '/^man3ext=/ s/3perl/3pm/' \
- -i "${_pkgdir}${_prefix}/lib/perl5/${_baseversion}/core_perl/Config_heavy.pl"
+ -i'.orig' "${_pkgdir}${_prefix}/lib/perl5/${_baseversion}/core_perl/Config_heavy.pl"
sed -e '/(makepl_arg =>/ s/""/"INSTALLDIRS=site"/' \
-e '/(mbuildpl_arg =>/ s/""/"installdirs=site"/' \
- -i "${_pkgdir}${_prefix}/share/perl5/core_perl/CPAN/FirstTime.pm"
+ -i'.orig' "${_pkgdir}${_prefix}/share/perl5/core_perl/CPAN/FirstTime.pm"
- p5lib="$(find ${_pkgdir}/${_prefix}/lib -type f -name 'libperl.so')"
- mv "${p5lib}" "${_pkgdir}/${_prefix}/lib"
+ p5lib=$(find ${_pkgdir}${_prefix}/lib -type f -name "libperl.${lib_type}")
+ mv "${p5lib}" "${_pkgdir}${_prefix}/lib"
pushd "$(dirname ${p5lib})"
- ln -s ../../../../libperl.so
+ ln -s ../../../../libperl.${lib_type}
popd
rm -f "${_pkgdir}${_prefix}/bin/perl${version}"
diff --git a/pkgconf/build.sh b/pkgconf/build.sh
index a865902..a2230cb 100644
--- a/pkgconf/build.sh
+++ b/pkgconf/build.sh
@@ -17,6 +17,10 @@ function prepare() {
tar xf ${name}-${version}.tar.gz
# an ugly release tag makes for an ugly directory, fyi
cd ${name}-${name}-${version}
+ if [[ $(uname -s) == Darwin ]]; then
+ # extra -rpath kills the build
+ LDFLAGS="-L${_runtime}/lib"
+ fi
}
function build() {
@@ -30,10 +34,9 @@ function build() {
}
function package() {
+ target="$(./config.guess)"
make install DESTDIR="${_pkgdir}"
ln -s pkgconf "${_pkgdir}${_prefix}/bin/pkg-config"
- ln -s pkgconf "${_pkgdir}${_prefix}/bin/x86_64-pc-linux-gnu-pkg-config"
+ ln -s pkgconf "${_pkgdir}${_prefix}/bin/${target%%.*}-pkg-config"
ln -s pkgconf.1 "${_pkgdir}${_prefix}/share/man/man1/pkg-config.1"
}
-
-
diff --git a/python/build.sh b/python/build.sh
index 380e20f..1115cc7 100644
--- a/python/build.sh
+++ b/python/build.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
name=python
version=3.8.2
_basever=${version%.*}
@@ -15,7 +15,7 @@ build_depends=(
)
depends=(
"bzip2"
- "e2fsprogs"
+ $([[ $(uname) == Linux ]] && echo "e2fsprogs")
"gdbm"
"gzip"
"libexpat"
@@ -28,11 +28,16 @@ depends=(
"sqlite"
"zlib"
)
+lib_type=so
function prepare() {
tar xf Python-${version}.tar.xz
cd Python-${version}
+
+ if [[ $(uname -s) == Darwin ]]; then
+ lib_type=dylib
+ fi
}
function build() {
@@ -46,8 +51,8 @@ function build() {
--enable-ipv6 \
--enable-loadable-sqlite-extensions \
--enable-shared \
- --with-tcltk-includes="$(pkg-config --cflags tcl) $(pkg-config --cflags tk)" \
- --with-tcltk-libs="$(pkg-config --libs tcl) $(pkg-config --libs tk)" \
+ $([[ $bootstrap == 0 ]] && echo --with-tcltk-includes="$(pkg-config --cflags tcl) $(pkg-config --cflags tk)") \
+ $([[ $bootstrap == 0 ]] && echo --with-tcltk-libs="$(pkg-config --libs tcl) $(pkg-config --libs tk)") \
--with-computed-gotos \
--with-dbmliborder=gdbm:ndbm \
--with-pymalloc \
@@ -67,12 +72,11 @@ function package() {
ln -s pydoc3 "${_pkgdir}/${_prefix}"/bin/pydoc
ln -s python${_basever}.1 "${_pkgdir}/${_prefix}"/share/man/man1/python.1
- if [[ -f "${_pkgdir}/${_prefix}"/lib/libpython${_basever}m.so ]]; then
- chmod 755 "${_pkgdir}/${_prefix}"/lib/libpython${_basever}m.so
+ if [[ -f "${_pkgdir}/${_prefix}"/lib/libpython${_basever}m.${lib_type} ]]; then
+ chmod 755 "${_pkgdir}/${_prefix}"/lib/libpython${_basever}m.${lib_type}
fi
- if [[ -f "${_pkgdir}/${_prefix}"/lib/libpython${_basever%.*}.so ]]; then
- chmod 755 "${_pkgdir}/${_prefix}"/lib/libpython${_basever%.*}.so
+ if [[ -f "${_pkgdir}/${_prefix}"/lib/libpython${_basever%.*}.${lib_type} ]]; then
+ chmod 755 "${_pkgdir}/${_prefix}"/lib/libpython${_basever%.*}.${lib_type}
fi
}
-
diff --git a/readline/build.sh b/readline/build.sh
index a96eaa1..f290767 100644
--- a/readline/build.sh
+++ b/readline/build.sh
@@ -6,8 +6,6 @@ sources=(
"http://mirror.rit.edu/gnu/${name}/${name}-${version}.tar.gz"
)
build_depends=(
- "automake"
- "autoconf"
"ncurses"
)
depends=(
diff --git a/sqlite/build.sh b/sqlite/build.sh
index 45b6973..faac1b7 100644
--- a/sqlite/build.sh
+++ b/sqlite/build.sh
@@ -21,6 +21,10 @@ depends=(
function prepare() {
tar xf ${name}-autoconf-${_v}.tar.gz
cd ${name}-autoconf-${_v}
+ if [[ $(uname -s) == Darwin ]]; then
+ # extra -rpath kills the build
+ LDFLAGS="-L${_runtime}/lib"
+ fi
}
function build() {
diff --git a/tcl/build.sh b/tcl/build.sh
index 429f87b..a45ed26 100644
--- a/tcl/build.sh
+++ b/tcl/build.sh
@@ -12,10 +12,15 @@ build_depends=(
depends=(
"pcre"
)
+lib_type=so
function prepare() {
tar xf ${name}${version}-src.tar.gz
cd ${name}${version}
+
+ if [[ $(uname -s) == Darwin ]]; then
+ lib_type=dylib
+ fi
}
function build() {
@@ -26,5 +31,5 @@ function build() {
function package() {
make install DESTDIR="${_pkgdir}"
- chmod 755 "${_pkgdir}/${_prefix}"/lib/*.so
+ chmod 755 "${_pkgdir}/${_prefix}"/lib/*.${lib_type}
}
diff --git a/tk/build.sh b/tk/build.sh
index b14a82a..83be737 100644
--- a/tk/build.sh
+++ b/tk/build.sh
@@ -12,13 +12,18 @@ build_depends=(
"tcl==${version}"
)
depends=(
- "libX11"
+ $([[ $(uname -s) == Linux ]] && echo "libX11")
"tcl==${version}"
)
+lib_type=so
function prepare() {
tar xf ${name}${version_full}-src.tar.gz
cd ${name}${version}
+
+ if [[ $(uname -s) == Darwin ]]; then
+ lib_type=dylib
+ fi
}
function build() {
@@ -32,7 +37,7 @@ function build() {
function package() {
make install DESTDIR="${_pkgdir}"
pushd "${_pkgdir}/${_prefix}"/bin
- ln -s "${_pkgdir}/${_prefix}"/bin/wish${version%.*} wish
+ ln -s wish${version%.*} "${_pkgdir}/${_prefix}"/bin/wish
popd
- chmod 755 "${_pkgdir}/${_prefix}"/lib/*.so
+ chmod 755 "${_pkgdir}/${_prefix}"/lib/*.${lib_type}
}
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() {
diff --git a/xorg-util-macros/build.sh b/xorg-util-macros/build.sh
index 7ff8c16..58eb3e2 100644
--- a/xorg-util-macros/build.sh
+++ b/xorg-util-macros/build.sh
@@ -10,7 +10,6 @@ depends=()
function prepare() {
tar xf util-macros-${version}.tar.gz
-find
cd util-macros-${version}
}
diff --git a/xz/build.sh b/xz/build.sh
index e625ffc..7e8b063 100644
--- a/xz/build.sh
+++ b/xz/build.sh
@@ -1,6 +1,6 @@
#!/bin/bash
name=xz
-version=5.2.4
+version=5.2.5
revision=0
sources=(
"https://tukaani.org/xz/${name}-${version}.tar.gz"
@@ -11,6 +11,11 @@ depends=()
function prepare() {
tar xf ${name}-${version}.tar.gz
cd ${name}-${version}
+
+ if [[ $(uname -s) == Darwin ]]; then
+ # redundant rpath kills the build
+ LDFLAGS="-L${_runtime}/lib"
+ fi
}
function build() {