From patchwork Fri Sep 8 13:31:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 811590 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xpdXq1XNTz9s7p for ; Fri, 8 Sep 2017 23:32:26 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 121DD88074; Fri, 8 Sep 2017 13:32:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PH5cXXqjoN8O; Fri, 8 Sep 2017 13:32:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id EAA4787FEF; Fri, 8 Sep 2017 13:32:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id BFF6E1CEB72 for ; Fri, 8 Sep 2017 13:32:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BA9D688F2E for ; Fri, 8 Sep 2017 13:32:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D1Yb9KPsx+ig for ; Fri, 8 Sep 2017 13:32:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by whitealder.osuosl.org (Postfix) with ESMTPS id 93CBE88F2C for ; Fri, 8 Sep 2017 13:32:13 +0000 (UTC) Received: from linux.local ([188.99.112.207]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MRo6b-1e1gBF3KoL-00SwAQ; Fri, 08 Sep 2017 15:32:00 +0200 From: Peter Seiderer To: buildroot@busybox.net Date: Fri, 8 Sep 2017 15:31:56 +0200 Message-Id: <20170908133156.10357-1-ps.report@gmx.net> X-Mailer: git-send-email 2.12.3 X-Provags-ID: V03:K0:q1/jDOSezmdsWePy4lzeu+rzdmC1wTHJ5RygLWVDu50AezRzcfN q3nH+gzx47r+BlVbnnEtrU/FJDlINg+OnJlu2N0dF87kFMGThj9k5e6M0PXjr7mZn8Z4808 q1FUArnYJaXObfzNFpbvtwvC1T4oQQ48MRZz1debffEzkLCXln1gJag8sVM+eCWy8Y0304r Dk4IoB8eYq8ZMMjzplNjg== X-UI-Out-Filterresults: notjunk:1; V01:K0:0wGcZoK5DWI=:MLBdbMHREAVFZcEpYaHcky rr5QExrIw/PGZpav/KS4AWisU6ngPiu9BElj1UgvPufqE0xR8TI2jYAyTFWA+xDY6V5x02Bt3 kd3mDLvojqMt1PtR3PRlq+5FFAhFMXITg0H21lCgWFJb5CeSibKQdJZz73ejU3nvdZvYeCaBF XB4B0Fy4rO3Wxl20xx3oY7ZNpeau5JDi6MAJcKzDP19En/+BkWdQvCFGCyrKlaZ7wpMeKKxMi CzFic3d7CPSmbGtcXYpltfpOLixYxmJ41PR2phOhxZ5wLdXplj41I3HNCr6LmzFB0wp2AC1pZ uWBdVLB94u6O9Gh8VXES8wx/N7a5SuVoqLHKpd9gubHTwNiSdvUxTLC3L68dEKZ2ld65caHgI vWIPK95XLDa5UhCJhXigj+4fLD/ufsM55vOtUAFf8ff14Et3AJjfILOnfP1BvUh1FNzxNyOQl Ij0PYa0fjGWKYVHdek8GqLFQJBiNL7T4ubYVKN7RnsWuqWA9cL8tVI1sw0A8uXgyGiVKQs5Vj nN9C5CPaYd4NNAIwwU6whEl1Rut37LpNluMFKhvD7t1mYEPvhFigaiWWf4jDZXqBuYem+IwMs YwQZ+c3F8FIO6ZPJlYGYOyHmomPVJRaU3MM8GUfOZRKk4FEutRVegusEY1fU0B0SYAmehkazC KII6deNgElXZyB9QB+mogRpMncrst7c0JG6TES8MvwziZ+uj/l3CkJ93Bvu19mjUSzUsO6PjT Lgmay3fDXpSJQ4aDIJVeb4bywxBpQlU3sm0vccxMKEBRUhbQoDA0BhPbtkU8JiLngiK0G5+4v hr/5sSAKWdy50z00F6hFtfFZcr+2A== Subject: [Buildroot] [PATCH v3] gst1-plugins-bad: fix build against openjpeg 2.2 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add upstream patch to fix build against openjpeg 2.2. 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 Signed-off-by: Peter Seiderer --- Changes v2 -> v3: - add _GETTEXTIZE (instead of Makefile.in.in patch, suggested by Thomas Petazzoni) Changes v1 ->v2: - add _AUTORECONF (suggested by Peter Korsgaard) --- ...1-openjpeg-Fix-build-against-openjpeg-2.2.patch | 93 ++++++++++++++++++++++ .../gst1-plugins-bad/gst1-plugins-bad.mk | 4 + 2 files changed, 97 insertions(+) create mode 100644 package/gstreamer1/gst1-plugins-bad/0001-openjpeg-Fix-build-against-openjpeg-2.2.patch diff --git a/package/gstreamer1/gst1-plugins-bad/0001-openjpeg-Fix-build-against-openjpeg-2.2.patch b/package/gstreamer1/gst1-plugins-bad/0001-openjpeg-Fix-build-against-openjpeg-2.2.patch new file mode 100644 index 0000000000..d9268bc9b6 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-bad/0001-openjpeg-Fix-build-against-openjpeg-2.2.patch @@ -0,0 +1,93 @@ +From daaf649bda7231fd0d760802232a36ba62a4ea2d Mon Sep 17 00:00:00 2001 +From: Clemens Lang +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 +--- + 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 +-# ifdef HAVE_OPENJPEG_2_1 ++# if defined(HAVE_OPENJPEG_2_2) ++# include ++# elif defined(HAVE_OPENJPEG_2_1) + # include + # else + # include +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 + diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk index 7a32689b85..8b707d5eb9 100644 --- a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk @@ -13,6 +13,10 @@ GST1_PLUGINS_BAD_LICENSE_FILES = COPYING COPYING.LIB # enabled. GST1_PLUGINS_BAD_LICENSE = LGPL-2.0+, LGPL-2.1+ +# patch 0001-openjpeg-Fix-build-against-openjpeg-2.2.patch touches configure.ac +GST1_PLUGINS_BAD_AUTORECONF = YES +GST1_PLUGINS_BAD_GETTEXTIZE = YES + GST1_PLUGINS_BAD_CONF_OPTS = \ --disable-examples \ --disable-valgrind \