diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-05-27 11:35:02 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-05-27 11:35:02 -0400 |
commit | bb038280d2b5e12916d14587fd5e82455b456698 (patch) | |
tree | d33aa2ec22b9cc4fd7cce68a152cc6078a37a0ff /libxml2 | |
parent | cd85778597a709c5d589c9f984d039e5b96bafca (diff) | |
download | spm_packages-bb038280d2b5e12916d14587fd5e82455b456698.tar.gz |
Darwin pass 2
Diffstat (limited to 'libxml2')
-rw-r--r-- | libxml2/build.sh | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/libxml2/build.sh b/libxml2/build.sh index 8bd6ca6..437a9dd 100644 --- a/libxml2/build.sh +++ b/libxml2/build.sh @@ -9,22 +9,43 @@ build_depends=( "automake" "autoconf" "libtool" + "pkgconf" ) depends=( "icu" + "libiconv" + "xz" + "zlib" ) +lib_type=so + function prepare() { tar xf v${version}.tar.gz cd ${name}-${version} + if [[ $(uname -s) == Darwin ]]; then + lib_type=dylib + LDFLAGS="-L${_runtime}" + fi } function build() { sh autogen.sh - ./configure --prefix="${_prefix}" + ./configure --prefix="${_prefix}" \ + --with-icu \ + --with-iconv="${_runtime}" \ + --with-libz="${_runtime}" \ + --with-lzma="${_runtime}" make -j${_maxjobs} } function package() { make install DESTDIR="${_pkgdir}" + if [[ $(uname -s) == Darwin ]]; then + pushd "${_pkgdir}${_prefix}" + for prog in bin/xmlcatalog bin/xmllint; do + install_name_tool -add_rpath "${_runtime}"/lib "$prog" + done + popd + fi } |