[librasterlite2] 01/05: Add patch to fix FTBFS with OpenJPEG 2.2. (closes: #876808)
Bas Couwenberg
sebastic at debian.org
Tue Sep 26 12:27:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository librasterlite2.
commit 5e01a98c88ca13202ed2e4022141ccbc10793723
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Tue Sep 26 13:45:38 2017 +0200
Add patch to fix FTBFS with OpenJPEG 2.2. (closes: #876808)
---
debian/changelog | 2 +
debian/patches/openjp-2.2.patch | 127 ++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 130 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index d890825..82baa93 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ librasterlite2 (1.0.0~rc0+devel1-5) UNRELEASED; urgency=medium
* Change priority from extra to optional.
* Bump Standards-Version to 4.1.0, changes: priority.
+ * Add patch to fix FTBFS with OpenJPEG 2.2.
+ (closes: #876808)
-- Bas Couwenberg <sebastic at debian.org> Sun, 24 Sep 2017 13:08:21 +0200
diff --git a/debian/patches/openjp-2.2.patch b/debian/patches/openjp-2.2.patch
new file mode 100644
index 0000000..a1cca28
--- /dev/null
+++ b/debian/patches/openjp-2.2.patch
@@ -0,0 +1,127 @@
+Description: Add support for OpenJPEig 2.2.
+Author: Alessandro Furieri <a.furieri at lqt.it>
+Origin: https://www.gaia-gis.it/fossil/librasterlite2/ci/d8b9d9894ad2d72a?sbs=1
+Bug: https://www.gaia-gis.it/fossil/librasterlite2/tktview/4085e7ccf0ce2a350e9cabc93d37bf06a75ca8cf
+Bug-Debian: https://bugs.debian.org/876808
+
+--- a/config.h.in
++++ b/config.h.in
+@@ -70,6 +70,9 @@
+ /* Define to 1 if you have the <openjpeg-2.1/openjpeg.h> header file. */
+ #undef HAVE_OPENJPEG_2_1_OPENJPEG_H
+
++/* Define to 1 if you have the <openjpeg-2.2/openjpeg.h> header file. */
++#undef HAVE_OPENJPEG_2_2_OPENJPEG_H
++
+ /* Define to 1 if you have the <png.h> header file. */
+ #undef HAVE_PNG_H
+
+@@ -154,6 +157,9 @@
+ /* testing for OpenJpeg 2.1 */
+ #undef OPENJPEG_2_1
+
++/* testing for OpenJpeg 2.2 */
++#undef OPENJPEG_2_2
++
+ /* Name of package */
+ #undef PACKAGE
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,6 +30,8 @@ AH_TEMPLATE([TARGET_CPU],
+ [Should contain a text-string describing the intended target CPU])
+ AH_TEMPLATE([OPENJPEG_2_1],
+ [testing for OpenJpeg 2.1])
++AH_TEMPLATE([OPENJPEG_2_2],
++ [testing for OpenJpeg 2.2])
+
+ # config depending options
+ AH_TEMPLATE([OMIT_LZMA],
+@@ -149,28 +151,18 @@ AC_ARG_ENABLE(openjpeg, [AS_HELP_STRING(
+ # testing OpenJpeg-2 headers
+ # they could be either on -/include/openjpeg-2.0
+ # or on -/include/openjpeg-2.1
++ # or on -/include/openjpeg-2.2
+ #
+ AC_CHECK_HEADERS(openjpeg-2.0/openjpeg.h)
+ AC_CHECK_HEADERS(openjpeg-2.1/openjpeg.h)
++ AC_CHECK_HEADERS(openjpeg-2.2/openjpeg.h)
+ if test x"$ac_cv_header_openjpeg_2_0_openjpeg_h" != x"yes" &&
+- test x"$ac_cv_header_openjpeg_2_1_openjpeg_h" != x"yes";
++ test x"$ac_cv_header_openjpeg_2_1_openjpeg_h" != x"yes" &&
++ test x"$ac_cv_header_openjpeg_2_2_openjpeg_h" != x"yes";
+ then
+ AC_MSG_ERROR(['OpenJpeg-2' is required but the header (openjpeg.h) doesn't seem to be installed on this system])
+ fi
+ AC_CHECK_LIB(openjp2,opj_create_decompress,,AC_MSG_ERROR(['libopenjp2' is required but it doesn't seems to be installed on this system.]),-lm)
+- # testing for OpenJpeg 2.0 or 2.1
+- AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#ifdef HAVE_OPENJPEG_2_1_OPENJPEG_H
+- #include <openjpeg-2.1/openjpeg.h>
+- #else
+- #include <openjpeg-2.0/openjpeg.h>
+- #endif]],
+- [[void *d; opj_stream_t *s; opj_stream_set_user_data (s, &d, NULL);]])],
+- [
+- AC_MSG_RESULT([yes])
+- AC_DEFINE(OPENJPEG_2_1)
+- ],
+- [AC_MSG_RESULT([no])]
+- )
+ else
+ AC_DEFINE(OMIT_OPENJPEG)
+ fi
+--- a/src/rl2openjpeg.c
++++ b/src/rl2openjpeg.c
+@@ -60,12 +60,16 @@ the terms of any one of the MPL, the GPL
+ #ifdef HAVE_OPENJPEG_2_1_OPENJPEG_H
+ #include <openjpeg-2.1/openjpeg.h>
+ #else
++#ifdef HAVE_OPENJPEG_2_2_OPENJPEG_H
++#include <openjpeg-2.2/openjpeg.h>
++#else
+ #ifdef __ANDROID__ /* Android specific */
+ #include <openjpeg.h>
+ #else
+ #include <openjpeg-2.0/openjpeg.h>
+ #endif
+ #endif
++#endif
+
+ struct jp2_memfile
+ {
+@@ -400,7 +404,7 @@ compress_jpeg2000 (rl2RasterPtr ptr, uns
+ opj_stream_set_write_function (stream, write_callback);
+ opj_stream_set_seek_function (stream, seek_callback);
+ opj_stream_set_skip_function (stream, skip_callback);
+-#ifdef OPENJPEG_2_1
++#if defined(HAVE_OPENJPEG_2_1_OPENJPEG_H) || defined(HAVE_OPENJPEG_2_2_OPENJPEG_H)
+ opj_stream_set_user_data (stream, &clientdata, NULL);
+ #else
+ opj_stream_set_user_data (stream, &clientdata);
+@@ -760,7 +764,7 @@ rl2_decode_jpeg2000_scaled (int scale, c
+ clientdata.size = jpeg2000_sz;
+ clientdata.eof = jpeg2000_sz;
+ clientdata.current = 0;
+-#ifdef OPENJPEG_2_1
++#if defined(HAVE_OPENJPEG_2_1_OPENJPEG_H) || defined(HAVE_OPENJPEG_2_2_OPENJPEG_H)
+ opj_stream_set_user_data (stream, &clientdata, NULL);
+ #else
+ opj_stream_set_user_data (stream, &clientdata);
+@@ -1332,7 +1336,7 @@ rl2_get_jpeg2000_infos (const char *path
+ clientdata.size = jpeg2000_sz;
+ clientdata.eof = jpeg2000_sz;
+ clientdata.current = 0;
+-#ifdef OPENJPEG_2_1
++#if defined(HAVE_OPENJPEG_2_1_OPENJPEG_H) || defined(HAVE_OPENJPEG_2_2_OPENJPEG_H)
+ opj_stream_set_user_data (stream, &clientdata, NULL);
+ #else
+ opj_stream_set_user_data (stream, &clientdata);
+@@ -1433,7 +1437,7 @@ rl2_get_jpeg2000_blob_type (const unsign
+ clientdata.size = jpeg2000_sz;
+ clientdata.eof = jpeg2000_sz;
+ clientdata.current = 0;
+-#ifdef OPENJPEG_2_1
++#if defined(HAVE_OPENJPEG_2_1_OPENJPEG_H) || defined(HAVE_OPENJPEG_2_2_OPENJPEG_H)
+ opj_stream_set_user_data (stream, &clientdata, NULL);
+ #else
+ opj_stream_set_user_data (stream, &clientdata);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e6d048f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+openjp-2.2.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/librasterlite2.git
More information about the Pkg-grass-devel
mailing list