From 445ed7e10f70899ddc0c44bda203d25f8164a22d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 24 Sep 2020 13:57:14 -0700 Subject: [PATCH] build/bin/sage-spkg: Get rid of USE_LOCAL_SCRIPTS (it was always yes); prepare for script packages --- build/bin/sage-spkg | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/build/bin/sage-spkg b/build/bin/sage-spkg index 0d07f11f019..acec079f16b 100755 --- a/build/bin/sage-spkg +++ b/build/bin/sage-spkg @@ -444,27 +444,32 @@ if [ -e "$PKG_NAME" ]; then fi ################################################################## -# Extract the package +# Normal packages: Extract the package ################################################################## -echo "Setting up build directory for $PKG_NAME" -cp -RLp "$PKG_SCRIPTS" "$PKG_NAME" -cd "$PKG_NAME" || exit $? +if [ -f "$PKG_SCRIPTS"/checksums.ini ]; then + # Normal package + echo "Setting up build directory for $PKG_NAME" + cp -RLp "$PKG_SCRIPTS" "$PKG_NAME" + cd "$PKG_NAME" || exit $? -sage-uncompress-spkg -d src "$PKG_SRC" -if [ $? -ne 0 ]; then - error_msg "Error: failed to extract $PKG_SRC" - exit 1 -fi - -echo "Finished extraction" + sage-uncompress-spkg -d src "$PKG_SRC" + if [ $? -ne 0 ]; then + error_msg "Error: failed to extract $PKG_SRC" + exit 1 + fi -cd src -if ! sage-apply-patches; then - error_msg "Error applying patches" - exit 1 + echo "Finished extraction" + cd src + if ! sage-apply-patches; then + error_msg "Error applying patches" + exit 1 + fi + cd .. +else + # Script package: Build out of the source tree without copying + cd "$PKG_SCRIPTS" fi -cd .. ################################################################## # The package has been extracted, prepare for installation