From 407a882b1a955eaf2669fc37f8e85f480ca2963f Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 12 Jul 2014 17:39:23 +0200 Subject: [PATCH] xbps-src/xbps-src-doextract: if build_style declares do_extract(), use it rather than hooks. --- common/xbps-src/libexec/xbps-src-doextract.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/common/xbps-src/libexec/xbps-src-doextract.sh b/common/xbps-src/libexec/xbps-src-doextract.sh index 5688243936a..b374946fcba 100755 --- a/common/xbps-src/libexec/xbps-src-doextract.sh +++ b/common/xbps-src/libexec/xbps-src-doextract.sh @@ -46,8 +46,19 @@ if declare -f do_extract >/dev/null; then cd $wrksrc run_func do_extract else - # Run do-extract hooks - run_pkg_hooks "do-extract" + if [ -n "$build_style" ]; then + if [ ! -r $XBPS_BUILDSTYLEDIR/${build_style}.sh ]; then + msg_error "$pkgver: cannot find build helper $XBPS_BUILDSTYLEDIR/${build_style}.sh!\n" + fi + . $XBPS_BUILDSTYLEDIR/${build_style}.sh + fi + # If the build_style script declares do_extract(), use it rather than hooks. + if declare -f do_extract >/dev/null; then + run_func do_extract + else + # Run do-extract hooks + run_pkg_hooks "do-extract" + fi fi touch -f $XBPS_EXTRACT_DONE