diff options
author | rhaas <rhaas@9e23cc15-e5c8-4d65-9080-beda90ea645b> | 2015-04-28 20:55:21 +0000 |
---|---|---|
committer | rhaas <rhaas@9e23cc15-e5c8-4d65-9080-beda90ea645b> | 2015-04-28 20:55:21 +0000 |
commit | f7af87e6ef03625e7ed3f06d0377476fe72fa5b6 (patch) | |
tree | 48188cb6fdfc032af4225741f6a1b0e4370e6ce7 | |
parent | 0ecb9c9e4cef42a89366e1c7fa0d65e7dd22d27d (diff) |
use stdarg.h rather than vararg.h
git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/GSL/trunk@69 9e23cc15-e5c8-4d65-9080-beda90ea645b
-rw-r--r-- | dist/patchtest.patch | 5 | ||||
-rw-r--r-- | dist/stdarg.patch | 13 | ||||
-rwxr-xr-x | src/build.sh | 16 |
3 files changed, 34 insertions, 0 deletions
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 <stdarg.h> + #else +-#include <varargs.h> ++#include <stdarg.h> + #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} |