[surf-alggeo] 01/01: Imported Debian patch 1.0.6+ds-2

Jerome Benoit calculus-guest at moszumanska.debian.org
Mon Apr 27 10:19:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

calculus-guest pushed a commit to branch master
in repository surf-alggeo.

commit 4b4f7c5a3894977424a3144db3b92171e70d9b58
Author: Jerome Benoit <calculus at rezozer.net>
Date:   Mon Apr 27 11:54:08 2015 +0200

    Imported Debian patch 1.0.6+ds-2
---
 debian/changelog                                   |  10 +
 .../patches/upstream-autotoolization-update.patch  | 298 +++++++++++++++++----
 2 files changed, 253 insertions(+), 55 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f9c95fc..08b6412 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+surf-alggeo (1.0.6+ds-2) unstable; urgency=medium
+
+  * Debianization:
+    -debian/patches/:
+     - autotool chain:
+       - libjepg find and check, harden;
+       - GMP find and check, refresh.
+
+ -- Jerome Benoit <calculus at rezozer.net>  Mon, 27 Apr 2015 09:52:53 +0000
+
 surf-alggeo (1.0.6+ds-1) unstable; urgency=medium
 
   * Initial release. (Closes: #777132)
diff --git a/debian/patches/upstream-autotoolization-update.patch b/debian/patches/upstream-autotoolization-update.patch
index 2c6d68a..6cf09ba 100644
--- a/debian/patches/upstream-autotoolization-update.patch
+++ b/debian/patches/upstream-autotoolization-update.patch
@@ -2,7 +2,7 @@ Description: upstream autotool machinery: update
 Origin: debian
 Forwarded: submitted
 Author: Jerome Benoit <calculus at rezozer.net>
-Last-Update: 2015-03-14
+Last-Update: 2015-04-27
 
 --- a/configure.in
 +++ /dev/null
@@ -914,7 +914,7 @@ Last-Update: 2015-03-14
 +## zlib library
 +PKG_CHECK_MODULES([ZLIB],[zlib],[],[AC_MSG_ERROR([unable to find zlib])])
 +## JPEG library
-+PKG_CHECK_MODULES([LIBJPEG],[libjpeg],[],[AC_MSG_ERROR([unable to find libjpeg])])
++AM_PATH_LIBJPEG([62],[],[AC_MSG_ERROR([unable to find libjpeg])])
 +## TIFF library
 +PKG_CHECK_MODULES([LIBTIFF],[libtiff-4],[],[AC_MSG_ERROR([unable to find libtiff])])
 +
@@ -1175,8 +1175,8 @@ Last-Update: 2015-03-14
 -])
 --- /dev/null
 +++ b/m4/adhoc_gmp.m4
-@@ -0,0 +1,333 @@
-+# adhoc_gmp.m4 serial 1
+@@ -0,0 +1,282 @@
++# adhoc_gmp.m4 serial 2
 +dnl m4/adhoc_gmp.m4 -- M4 macro processor include script
 +dnl
 +dnl Copyright (C) 2015 Jerome Benoit <jgmbenoit at rezozer.net>
@@ -1268,11 +1268,6 @@ Last-Update: 2015-03-14
 +	LDFLAGS="$LDFLAGS $GMP_LDFLAGS"
 +	LIBS="$LIBS $GMP_LIBS"
 +
-+	if test "x$gmp_hdr_version_major" != "x" ; then
-+		gmp_comment_flag=1
-+	else
-+		gmp_comment_flag=0
-+	fi
 +	rm -f conf.gmptest
 +	AC_RUN_IFELSE([AC_LANG_SOURCE(
 +[[
@@ -1281,20 +1276,6 @@ Last-Update: 2015-03-14
 +#include <stdlib.h>
 +#include <string.h>
 +
-+#define PRINTF_MSG_ERROR_MISMATCH_HEADER \
-+	printf("*** This likely indicates either a bad configuration or some other\n"); \
-+	printf("*** inconsistency in the development environment. If the GNU MP header\n"); \
-+	printf("*** is searched in different include paths, it may be sufficient either\n"); \
-+	printf("*** to set a proper include path through the --with-gmp-include configure\n"); \
-+	printf("*** option, or to specify a pertinent C preprocessor via the GMP_GPP or\n"); \
-+	printf("*** CPP influential environment variables.\n"); \
-+	printf("***\n"); \
-+	printf("*** If an old version is installed, it may be best to remove it and to\n"); \
-+	printf("*** reinstall a more recent one; although removing and then reinstalling\n"); \
-+	printf("*** from scratch the GNU MP library may also get things to work. The latest\n"); \
-+	printf("*** version of GNU MP is always available from http://gmplib.org/.\n"); \
-+	printf("***\n");
-+
 +#define PRINTF_MSG_ERROR_MISMATCH_HEADER_LIBRARY \
 +	printf("*** This likely indicates either a bad configuration or some\n"); \
 +	printf("*** other inconsistency in the development environment. If the\n"); \
@@ -1372,38 +1353,6 @@ Last-Update: 2015-03-14
 +			}
 +	}
 +
-+#if $gmp_comment_flag
-+	if (
-+			($gmp_hdr_version_major != gmp_hdr_version_major) ||
-+			($gmp_hdr_version_minor != gmp_hdr_version_minor) ||
-+			($gmp_hdr_version_micro != gmp_hdr_version_micro)
-+		) {
-+		printf("\n***\n");
-+		printf("*** The preprocessed GNU MP header version numbers ($gmp_hdr_dotted_version) and\n");
-+		printf("*** the compiled GNU MP header version numbers (%d.%d.%d)\n",
-+			gmp_hdr_version_major, gmp_hdr_version_minor, gmp_hdr_version_micro);
-+		printf("*** do not match.\n");
-+		printf("***\n");
-+		PRINTF_MSG_ERROR_MISMATCH_HEADER
-+		}
-+	else if (strcmp("$GMP_CC",GMPM4_CC)) {
-+		printf("\n***\n");
-+		printf("*** The preprocessed GNU MP header __GMP_CC macro value (\"$GMP_CC\") and\n");
-+		printf("*** the compiled GNU MP header __GMP_CC macro value (\"" GMPM4_CC "\")\n");
-+		printf("*** do not match.\n");
-+		printf("***\n");
-+		PRINTF_MSG_ERROR_MISMATCH_HEADER
-+		}
-+	else if (strcmp("$GMP_CFLAGS",GMPM4_CFLAGS)) {
-+		printf("\n***\n");
-+		printf("*** The preprocessed GNU MP header __GMP_CFLAGS macro value (\"$GMP_CFLAGS\") and\n");
-+		printf("*** the compiled GNU MP header __GMP_CFLAGS macro value (\"" GMPM4_CFLAGS "\")\n");
-+		printf("*** do not match.\n");
-+		printf("***\n");
-+		PRINTF_MSG_ERROR_MISMATCH_HEADER
-+		}
-+	else
-+#endif
 +	if (
 +			(gmp_lib_version_major != gmp_hdr_version_major) ||
 +			(gmp_lib_version_minor != gmp_hdr_version_minor) ||
@@ -1837,3 +1786,242 @@ Last-Update: 2015-03-14
 @@ -0,0 +1,2 @@
 +
 +EXTRA_DIST = manual.sgml
+--- /dev/null
++++ b/m4/adhoc_libjpeg.m4
+@@ -0,0 +1,236 @@
++# adhoc_libjpeg.m4 serial 1
++dnl m4/adhoc_libjpeg.m4 -- M4 macro processor include script
++dnl
++dnl Copyright (C) 2015 Jerome Benoit <jgmbenoit at rezozer.net>
++dnl
++dnl Based on macros for the GNU GMP library by Owen Taylor, modified by:
++dnl Hans Petter Jansson, 2001-04-09;
++dnl Allin Cottrell, April 2003;
++dnl and certainly others.
++dnl
++dnl Copying and distribution of this file, with or without modification, are
++dnl permitted in any medium without royalty provided the copyright notice and
++dnl this notice are preserved. This file is offered as-is, without any warranty.
++dnl
++dnl
++dnl NOTE:
++dnl  The trick used to extract the library version number of the JPEG library
++dnl  itself was adapted from a comment by user2834915 user at stackoverflow.com,
++dnl  https://stackoverflow.com/questions/10332908/find-out-libjpeg-version-at-runtime-or-other-ways-to-prevent-aborts
++dnl
++
++dnl _adhoc_AC_PROG_PATH_LIBJPEG_CC_ARG_WITH
++AC_DEFUN_ONCE([_adhoc_AC_PROG_PATH_LIBJPEG_CC_ARG_WITH],[dnl
++AC_ARG_WITH([libjpeg-prefix],
++	[AS_HELP_STRING([--with-libjpeg-prefix=PREFIX],
++		[specify prefix for the installed JPEG library [standard search prefixes]])],
++	[libjpeg_config_prefix="$withval"],[libjpeg_config_prefix=""])
++AC_ARG_WITH([libjpeg-include],
++	[AS_HELP_STRING([--with-libjpeg-include=PATH],
++		[specify directory for the installed JPEG library header file [standard search paths]])],
++	[libjpeg_config_include_prefix="$withval"],[libjpeg_config_include_prefix=""])
++AC_ARG_WITH([libjpeg-lib],
++	[AS_HELP_STRING([--with-libjpeg-lib=PATH],
++		[specify directory for the installed JPEG library [standard search paths]])],
++	[libjpeg_config_lib_prefix="$withval"],[libjpeg_config_lib_prefix=""])
++
++	if test "x$libjpeg_config_include_prefix" = "x" ; then
++		if test "x$libjpeg_config_prefix" != "x" ; then
++			libjpeg_config_include_prefix="$libjpeg_config_prefix/include"
++		fi
++	fi
++	if test "x$libjpeg_config_lib_prefix" = "x" ; then
++		if test "x$libjpeg_config_prefix" != "x" ; then
++			libjpeg_config_lib_prefix="$libjpeg_config_prefix/lib"
++		fi
++	fi
++
++	LIBJPEG_CPPFLAGS=
++	if test "x$libjpeg_config_include_prefix" != "x" ; then
++		LIBJPEG_CPPFLAGS="-I$libjpeg_config_include_prefix"
++	fi
++
++	LIBJPEG_LDFLAGS=
++	if test "x$libjpeg_config_lib_prefix" != "x" ; then
++		LIBJPEG_LDFLAGS="-L$libjpeg_config_lib_prefix"
++	fi
++
++AC_SUBST(LIBJPEG_CPPFLAGS)
++AC_SUBST(LIBJPEG_LDFLAGS)
++])
++
++dnl adhoc_AM_PATH_LIBJPEG([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
++AC_DEFUN([adhoc_AM_PATH_LIBJPEG],[dnl
++AC_REQUIRE([AC_PROG_SED])dnl
++AC_REQUIRE([_adhoc_AC_PROG_PATH_LIBJPEG_CC_ARG_WITH])dnl
++
++	min_libjpeg_version=m4_default([$1],[60])
++	min_libjpeg_version_0="$min_libjpeg_version.0"
++
++	min_libjpeg_version_number=`echo $min_libjpeg_version_0 | $SED 's/\([[0-9]]*\).\(.*\)/\1/'`
++
++	min_libjpeg_dotted_version="$min_libjpeg_version_number"
++
++	LIBJPEG_LIBS="-ljpeg"
++
++	AC_MSG_CHECKING([for JPEG library - version >= $min_libjpeg_version ])
++
++	ac_save_CPPFLAGS="$CPPFLAGS"
++	ac_save_CFLAGS="$CFLAGS"
++	ac_save_LDFLAGS="$LDFLAGS"
++	ac_save_LIBS="$LIBS"
++
++	CPPFLAGS="$CPPFLAGS $LIBJPEG_CPPFLAGS"
++	CFLAGS="$CFLAGS $LIBJPEG_CFLAGS"
++	LDFLAGS="$LDFLAGS $LIBJPEG_LDFLAGS"
++	LIBS="$LIBS $LIBJPEG_LIBS"
++
++	rm -f conf.libjpegtest
++	AC_RUN_IFELSE([AC_LANG_SOURCE(
++[[
++#include <stdio.h>
++#include <jpeglib.h>
++
++#define PRINTF_MSG_ERROR_MISMATCH_HEADER_LIBRARY \
++	printf("*** This likely indicates either a bad configuration or some\n"); \
++	printf("*** other inconsistency in the development environment. If the\n"); \
++	printf("*** expected JPEG library cannot be found, it may be sufficient\n"); \
++	printf("*** either to set properly the LD_LIBRARY_PATH environment variable\n"); \
++	printf("*** or to configure ldconfig(8) to consider the installed location.\n"); \
++	printf("*** Otherwise a bad configuration or an inconsistency in the\n"); \
++	printf("*** include/library search paths may be investigated; adjustments\n"); \
++	printf("*** through the use of --with-libjpeg-(include|lib) configure option\n"); \
++	printf("*** may help.\n"); \
++	printf("***\n"); \
++	printf("*** If an old version is installed, it may be best to remove it and to\n"); \
++	printf("*** reinstall a more recent one; although modifying LD_LIBRARY_PATH\n"); \
++	printf("*** may also get things to work. Latest information on JPEG may be\n"); \
++	printf("*** available from <http://jpegclub.org/>.\n"); \
++	printf("***\n");
++
++int adhoc_libjpeg_version(void);
++
++int main ()
++{
++	int libjpeg_hdr_version_number = 0;
++	int libjpeg_lib_version_number = 0;
++
++	fclose (fopen ("conf.libjpegtest", "w"));
++
++#ifdef JPEG_LIB_VERSION
++	libjpeg_hdr_version_number = JPEG_LIB_VERSION;
++#else
++	error JPEG_LIB_VERSION not defined
++#endif
++
++	libjpeg_lib_version_number = adhoc_libjpeg_version();
++
++	if (libjpeg_lib_version_number != libjpeg_hdr_version_number) {
++		printf("\n***\n");
++		printf("*** JPEG header version number (%d) and\n",libjpeg_hdr_version_number);
++		printf("*** JPEG library version number (%d)\n",libjpeg_lib_version_number);
++		printf("*** do not match.\n");
++		printf("***\n");
++		PRINTF_MSG_ERROR_MISMATCH_HEADER_LIBRARY
++		}
++	else if ($min_libjpeg_version_number <= libjpeg_hdr_version_number) {
++		return (0);
++		}
++	else {
++		printf("\n***\n");
++		printf("*** JPEG version $min_libjpeg_dotted_version or higher is required:\n");
++		printf("*** an older version of JPEG (%d) was found.\n",libjpeg_hdr_version_number);
++		printf("*** Latest information on JPEG may be available from <http://jpegclub.org/>.\n");
++		printf("***\n");
++		}
++
++	return (1);
++}
++
++static
++int ADHOC_LIBRARY_JPEG_LIB_VERSION=-1;
++
++static
++void adhoc_libjpeg_version_error_exit(j_common_ptr cinfo) {
++	ADHOC_LIBRARY_JPEG_LIB_VERSION=cinfo->err->msg_parm.i[0];
++	return ; }
++
++int adhoc_libjpeg_version(void) {
++	if (ADHOC_LIBRARY_JPEG_LIB_VERSION < 0) {
++		struct jpeg_decompress_struct cinfo;
++		struct jpeg_error_mgr error_mgr;
++		error_mgr.error_exit=&adhoc_libjpeg_version_error_exit;
++		cinfo.err=&error_mgr;
++#undef JPEG_LIB_VERSION
++#define JPEG_LIB_VERSION -1
++		jpeg_create_decompress(&cinfo);
++#undef JPEG_LIB_VERSION
++		}
++	return (ADHOC_LIBRARY_JPEG_LIB_VERSION); }
++
++]]
++)],[],[no_libjpeg=yes],[AC_MSG_WARN([$ac_n "cross compiling; assumed OK... $ac_c])])
++
++	CPPFLAGS="$ac_save_CPPFLAGS"
++	CFLAGS="$ac_save_CFLAGS"
++	LDFLAGS="$ac_save_LDFLAGS"
++	LIBS="$ac_save_LIBS"
++
++	if test "x$no_libjpeg" = "x" ; then
++		AC_MSG_RESULT([yes])
++		$2
++	else
++		AC_MSG_RESULT([no])
++		if test -f conf.libjpegtest ; then
++			:
++		else
++			echo "***"
++			echo "*** Could not run JPEG test program, checking why..."
++			CPPFLAGS="$CPPFLAGS $LIBJPEG_CPPFLAGS"
++			CFLAGS="$CFLAGS $LIBJPEG_CFLAGS"
++			LDFLAGS="$CFLAGS $LIBJPEG_LDFLAGS"
++			LIBS="$LIBS $LIBJPEG_LIBS"
++			AC_LINK_IFELSE([AC_LANG_PROGRAM(
++[[
++#include <stdio.h>
++#include <jpeg.h>
++]],
++[[ return (1); ]]
++)],
++[
++echo "***"
++echo "*** The test program compiled, but did not run. This usually means"
++echo "*** that the run-time linker is not finding JPEG library or finding the wrong"
++echo "*** version of JPEG. If it is not finding JPEG, you'll need to set your"
++echo "*** LD_LIBRARY_PATH environment variable, or configure ldconfig(8) to consider"
++echo "*** the installed location."
++echo "***"
++echo "*** If you have an old version installed, it is best to remove it; although"
++echo "*** modifying LD_LIBRARY_PATH may also get things to work. Latest information"
++echo "*** on JPEG may be available from <http://jpegclub.org/>."
++echo "***"
++],
++[
++echo "***"
++echo "*** The test program failed to compile or link. See the file config.log for the"
++echo "*** exact error that occured. This usually means JPEG was incorrectly installed"
++echo "*** or that you have moved JPEG since it was installed."
++echo "***"
++])
++			CPPFLAGS="$ac_save_CPPFLAGS"
++			CFLAGS="$ac_save_CFLAGS"
++			LDFLAGS="$ac_save_LDFLAGS"
++			LIBS="$ac_save_LIBS"
++		fi
++		rm -f conf.libjpegtest
++		m4_default([$3],[AC_MSG_ERROR([no suitable JPEG library found])])
++	fi
++	rm -f conf.libjpegtest
++
++AC_SUBST(LIBJPEG_LIBS)
++])
++
++dnl alias
++AU_ALIAS([AM_PATH_LIBJPEG],[adhoc_AM_PATH_LIBJPEG])
++
++dnl eof

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/surf-alggeo.git



More information about the debian-science-commits mailing list