#
# set +o errexit -o noglob -o nounset is assumed.
#
pkg_libxml2_install_make_post() {
if [ -e "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config" ]\
&& ! rtl_fileop rm "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config"; then
return 1;
fi;
if ! cat > "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config" <<EOF
#!/bin/sh
case "\${1}" in
--cflags) printf "-I${PREFIX_NATIVE}/include/libxml2"; ;;
--libs) printf "-L${PREFIX_NATIVE}/lib" -lxml2 -lz -llzma -lpthread -lm"; ;;
esac;
EOF
then
return 1;
else
rtl_fileop chmod +x "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config";
fi;
};
# vim:filetype=sh textwidth=0