gst1-plugins-bad: fix build against openjpeg 2.2
PATCH v2 1/1 gst1-plugins-bad: fix build against openjpeg 2.2
Add upstream patch to fix build against openjpeg 2.2 and patch to bump gettext version to 0.19 to fix autoreconf build step.
Fixes [1]:
gstopenjpeg.h:42:37: fatal error: openjpeg-2.1/openjpeg.h: No such file or directory
[1] http://autobuild.buildroot.net/results/90f1f7838f08e3a557be27470406d4d84dbcc828
--- ...1-openjpeg-Fix-build-against-openjpeg-2.2.patch | 93 ++++++++++++++++++++++ .../0002-Bump-gettext-version-to-0.19.patch | 46 +++++++++++ 2 files changed, 139 insertions(+) create mode 100644 package/gstreamer1/gst1-plugins-bad/0001-openjpeg-Fix-build-against-openjpeg-2.2.patch create mode 100644 package/gstreamer1/gst1-plugins-bad/0002-Bump-gettext-version-to-0.19.patch
package/gstreamer1/gst1-plugins-bad/0001-openjpeg-Fix-build-against-openjpeg-2.2.patch new file +93 -0
@@ -0,0 +1,93 @@ +From daaf649bda7231fd0d760802232a36ba62a4ea2d Mon Sep 17 00:00:00 2001 +From: Clemens Lang <[email protected]> +Date: Sun, 13 Aug 2017 21:17:18 +0200 +Subject: [PATCH] openjpeg: Fix build against openjpeg 2.2 + +OpenJPEG 2.2 has some API changes and thus ships its headers in a new +include path. Add a configure check (to both meson and autoconf) to +detect the newer version of OpenJPEG and add conditional includes. + +Fix the autoconf test for OpenJPEG 2.1, which checked for HAVE_OPENJPEG, +which was always set even for 2.0. + +https://bugzilla.gnome.org/show_bug.cgi?id=786250 + +Upstream: https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/patch/?id=15f24fef53a955c7c76fc966302cb0453732e657 +Signed-off-by: Peter Seiderer <[email protected]> +--- + configure.ac | 7 ++++++- + ext/openjpeg/gstopenjpeg.h | 4 +++- + ext/openjpeg/meson.build | 21 +++++++++++++-------- + 3 files changed, 22 insertions(+), 10 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 30e26b8..c4f08c7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2813,8 +2813,13 @@ AG_GST_CHECK_FEATURE(OPENJPEG, [openjpeg library], openjpeg, [ + if test x"$HAVE_OPENJPEG" = x"yes"; then + dnl minor API changes in v2.1 + AG_GST_PKG_CHECK_MODULES(OPENJPEG_2_1, libopenjp2 >= 2.1) +- if test x"$HAVE_OPENJPEG" = x"yes"; then ++ if test x"$HAVE_OPENJPEG_2_1" = x"yes"; then + AC_DEFINE([HAVE_OPENJPEG_2_1], 1, [Define if OpenJPEG 2.1 is used]) ++ dnl include paths changed for v2.2 ++ AG_GST_PKG_CHECK_MODULES(OPENJPEG_2_2, libopenjp2 >= 2.2) ++ if test x"$HAVE_OPENJPEG_2_2" = x"yes"; then ++ AC_DEFINE([HAVE_OPENJPEG_2_2], 1, [Define if OpenJPEG 2.2 is used]) ++ fi + fi + else + # Fallback to v1.5 +diff --git a/ext/openjpeg/gstopenjpeg.h b/ext/openjpeg/gstopenjpeg.h +index 03ce52e..52410a4 100644 +--- a/ext/openjpeg/gstopenjpeg.h ++++ b/ext/openjpeg/gstopenjpeg.h +@@ -38,7 +38,9 @@ + #define OPJ_CPRL CPRL + #else + #include <stdio.h> +-# ifdef HAVE_OPENJPEG_2_1 ++# if defined(HAVE_OPENJPEG_2_2) ++# include <openjpeg-2.2/openjpeg.h> ++# elif defined(HAVE_OPENJPEG_2_1) + # include <openjpeg-2.1/openjpeg.h> + # else + # include <openjpeg-2.0/openjpeg.h> +diff --git a/ext/openjpeg/meson.build b/ext/openjpeg/meson.build +index d60974c..e9c416c 100644 +--- a/ext/openjpeg/meson.build ++++ b/ext/openjpeg/meson.build +@@ -6,16 +6,21 @@ openjpeg_sources = [ + + openjpeg_cargs = [] + +-# Check for 2.1, then 2.0 +-openjpeg_dep = dependency('libopenjp2', version : '>=2.1', required : false) ++# Check for 2.2, 2.1, then 2.0 ++openjpeg_dep = dependency('libopenjp2', version : '>=2.2', required : false) + if openjpeg_dep.found() +- openjpeg_cargs += ['-DHAVE_OPENJPEG_2_1'] ++ openjpeg_cargs += ['-DHAVE_OPENJPEG_2_2'] + else +- openjpeg_dep = dependency('libopenjp2', required : false) +- # Fallback to 1.5 +- if not openjpeg_dep.found() +- openjpeg_dep = dependency('libopenjpeg1', required : false) +- openjpeg_cargs += ['-DHAVE_OPENJPEG_1'] ++ openjpeg_dep = dependency('libopenjp2', version : '>=2.1', required : false) ++ if openjpeg_dep.found() ++ openjpeg_cargs += ['-DHAVE_OPENJPEG_2_1'] ++ else ++ openjpeg_dep = dependency('libopenjp2', required : false) ++ # Fallback to 1.5 ++ if not openjpeg_dep.found() ++ openjpeg_dep = dependency('libopenjpeg1', required : false) ++ openjpeg_cargs += ['-DHAVE_OPENJPEG_1'] ++ endif + endif + endif + +-- +2.12.3 +
package/gstreamer1/gst1-plugins-bad/0002-Bump-gettext-version-to-0.19.patch new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
2.12.3
PATCH v2 1/1 gst1-plugins-bad: fix build against openjpeg 2.2
Hello,
Quoted 6 lines · Peter Seiderer
package/gstreamer1/gst1-plugins-bad/0002-Bump-gettext-version-to-0.19.patch new file +0
-0
package/gstreamer1/gst1-plugins-bad/0002-Bump-gettext-version-to-0.19.patch line 10
Quoted 10 lines
package/gstreamer1/gst1-plugins-bad/0002-Bump-gettext-version-to-0.19.patch new file +10
-0@@ -0,0 +1,46 @@ +From 750da2a0dbaaefa4e702bf7ede16917b57b7efa8 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Thu, 7 Sep 2017 23:01:44 +0200 +Subject: [PATCH] Bump gettext version to 0.19 + +Fixes autoreconf failure: + + *** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.17 but the autoconf macros are from gettext version 0.19 + +Signed-off-by: Peter Seiderer <[email protected]>
I think the normal fix for this is to add <pkg>_GETTEXTIZE = YES in the package.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v2 1/1 gst1-plugins-bad: fix build against openjpeg 2.2
Hello Thomas,
Quoted 14 lines · Thomas Petazzoni
Hello,
Quoted 11 lines · Peter Seiderer
package/gstreamer1/gst1-plugins-bad/0002-Bump-gettext-version-to-0.19.patch new file +5
-0@@ -0,0 +1,46 @@ +From 750da2a0dbaaefa4e702bf7ede16917b57b7efa8 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Thu, 7 Sep 2017 23:01:44 +0200 +Subject: [PATCH] Bump gettext version to 0.19 +
Quoted 8 lines
package/gstreamer1/gst1-plugins-bad/0002-Bump-gettext-version-to-0.19.patch line 10
Quoted 5 lines
package/gstreamer1/gst1-plugins-bad/0002-Bump-gettext-version-to-0.19.patch new file +5
-0+Fixes autoreconf failure: + + *** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.17 but the autoconf macros are from gettext version 0.19 + +Signed-off-by: Peter Seiderer <[email protected]>I think the normal fix for this is to add <pkg>_GETTEXTIZE = YES in the package.
Thanks for the tip (did not know about it yet)...new patch version follows...
Regards,
Peter
Quoted 2 lines
Thomas