From f7af87e6ef03625e7ed3f06d0377476fe72fa5b6 Mon Sep 17 00:00:00 2001 From: rhaas Date: Tue, 28 Apr 2015 20:55:21 +0000 Subject: use stdarg.h rather than vararg.h git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/GSL/trunk@69 9e23cc15-e5c8-4d65-9080-beda90ea645b --- dist/patchtest.patch | 5 +++++ dist/stdarg.patch | 13 +++++++++++++ src/build.sh | 16 ++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 dist/patchtest.patch create mode 100644 dist/stdarg.patch diff --git a/dist/patchtest.patch b/dist/patchtest.patch new file mode 100644 index 0000000..2ec828b --- /dev/null +++ b/dist/patchtest.patch @@ -0,0 +1,5 @@ +diff --new-file -ru Lorene.orig/.patch_tmp Lorene/.patch_tmp +--- Lorene.orig/.patch_tmp 1969-12-31 18:00:00.000000000 -0600 ++++ Lorene/.patch_tmp 2010-06-24 19:43:15.000000000 -0500 +@@ -0,0 +1 @@ ++ diff --git a/dist/stdarg.patch b/dist/stdarg.patch new file mode 100644 index 0000000..f64eeca --- /dev/null +++ b/dist/stdarg.patch @@ -0,0 +1,13 @@ +diff -ru gsl-1.16-orig/test/results.c gsl-1.16/test/results.c +--- gsl-1.16-orig/test/results.c 2013-07-17 13:04:26.000000000 -0700 ++++ gsl-1.16/test/results.c 2015-04-28 13:24:11.901318472 -0700 +@@ -29,7 +29,7 @@ + #ifdef STDC_HEADERS + #include + #else +-#include ++#include + #endif + #endif + +Only in gsl-1.16/test: results.c~ 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} -- cgit v1.2.3