aboutsummaryrefslogtreecommitdiff
path: root/src/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/build.sh')
-rwxr-xr-xsrc/build.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/build.sh b/src/build.sh
index 442cc16..26b4dd8 100755
--- a/src/build.sh
+++ b/src/build.sh
@@ -43,6 +43,22 @@ mkdir ${BUILD_DIR} ${INSTALL_DIR}
echo "GSL: Unpacking archive..."
pushd ${BUILD_DIR}
${TAR?} xzf ${SRCDIR}/../dist/${NAME}.tar.gz
+pushd ${NAME}
+${PATCH?} -p1 < ${SRCDIR}/../dist/stdarg.patch
+# Some (ancient but still used) versions of patch don't support the
+# patch format used here but also don't report an error using the exit
+# code. So we use this patch to test for this
+${PATCH?} -p1 < ${SRCDIR}/../dist/patchtest.patch
+if [ ! -e .patch_tmp ]; then
+ echo 'BEGIN ERROR'
+ echo 'The version of patch is too old to understand this patch format.'
+ echo 'Please set the PATCH environment variable to a more recent '
+ echo 'version of the patch command.'
+ echo 'END ERROR'
+ exit 1
+fi
+rm -f .patch_tmp
+popd
echo "GSL: Configuring..."
cd ${NAME}