From 2dd87fe03376618bf1aaea316ce5fa94ed841614 Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz (arab, vxp) Date: Feb 27 2016 18:19:26 +0000 Subject: Fix linking issue when building mpfr on Arch Linux due to library pathname conflicts not properly handled by libtool. Since .la files need not be included in distribution tarballs, path fixups are applied to them directly. (see , reported by noninc.) --- diff --git a/build.subr b/build.subr index 46fc61b..b695429 100644 --- a/build.subr +++ b/build.subr @@ -248,7 +248,7 @@ parse_with_pkg_name() { [ -z "${PKG_FNAME}" ] && PKG_FNAME=${PKG_URL##*/}; [ -z "${PKG_SUBDIR}" ] && PKG_SUBDIR=${PKG_FNAME%%.tar*}; [ -n "${PKG_ENV_VARS_EXTRA}" ] && export ${PKG_ENV_VARS_EXTRA}; - return 0; + export PKG_PREFIX=$(get_var_unsafe PREFIX_LVL${PKG_LVL}); return 0; fi; shift; done; return 1; }; diff --git a/pkg.build b/pkg.build index dee4837..e61ac95 100644 --- a/pkg.build +++ b/pkg.build @@ -41,8 +41,11 @@ if ! is_build_script_done patch; then fi; [ -x ${PKG_SUBDIR}/configure ] && \ cp portage/config.cache ${PKG_BUILD_DIR}/; - [ ${PKG_LIBTOOL_MIDIPIX:-0} -eq 1 ] && \ + if [ ${PKG_LIBTOOL_MIDIPIX:-0} -eq 1 ]; then cp portage/libtool.midipix ${PKG_SUBDIR}/; + sed -i.orig -e "/^libdir=/s/libdir='/libdir='\$PKG_PREFIX\//"\ + ${PKG_SUBDIR}/libtool.midipix; + fi; set_build_script_done patch -configure; fi; cd ${PKG_BUILD_DIR};