summaryrefslogtreecommitdiff
path: root/libxml2/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'libxml2/build.sh')
-rw-r--r--libxml2/build.sh23
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
}