notfixed 965298 1.16.2-2.2
tags 965298 +patch
tags 957314 +patch
thanks

gst-plugins-bad1.0 1.16.2-2.2 fails to build in both testing or unstable for 
different reasons.

In unstable it fails to build because gcc-10 got stricter about multiple 
definitions of global
variables. Upstream already has a fix for this which applied to the Debian 
package without any
conflicts.

In testing it fails to build because the patch applied in the previous NMU for 
make 4.3 broke
the build with make 4.2. I whipped up a fix for that following the advice from 
the make 4.3
release announcement.

While working on the above fixes I discovered that the clean target was not 
cleaning up properly,
so I fixed that too.

I have prepared a NMU fixing these issues and uploaded it to delayed/5, please 
tell me if there
are any objections.
diff -Nru gst-plugins-bad1.0-1.16.2/debian/changelog 
gst-plugins-bad1.0-1.16.2/debian/changelog
--- gst-plugins-bad1.0-1.16.2/debian/changelog  2020-07-15 20:56:22.000000000 
+0000
+++ gst-plugins-bad1.0-1.16.2/debian/changelog  2020-07-23 12:47:21.000000000 
+0000
@@ -1,3 +1,11 @@
+gst-plugins-bad1.0 (1.16.2-2.3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Adjust make 4.3 patch to also work with make 4.2 (Closes: 965298 )
+  * Apply upstream patch to make "lv2" plugin build with gcc-10 (Closes: 
957314 )
+
+ -- Peter Michael Green <plugw...@debian.org>  Thu, 23 Jul 2020 12:47:21 +0000
+
 gst-plugins-bad1.0 (1.16.2-2.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru 
gst-plugins-bad1.0-1.16.2/debian/libgstreamer-plugins-bad1.0-dev.install 
gst-plugins-bad1.0-1.16.2/debian/libgstreamer-plugins-bad1.0-dev.install
--- gst-plugins-bad1.0-1.16.2/debian/libgstreamer-plugins-bad1.0-dev.install    
1970-01-01 00:00:00.000000000 +0000
+++ gst-plugins-bad1.0-1.16.2/debian/libgstreamer-plugins-bad1.0-dev.install    
2020-07-23 12:47:21.000000000 +0000
@@ -0,0 +1,4 @@
+debian/tmp/usr/include
+debian/tmp/usr/lib/*/pkgconfig
+debian/tmp/usr/lib/*/*.so
+debian/tmp/usr/share/gir-*
diff -Nru 
gst-plugins-bad1.0-1.16.2/debian/patches/fix-build-with-make-4.3.patch 
gst-plugins-bad1.0-1.16.2/debian/patches/fix-build-with-make-4.3.patch
--- gst-plugins-bad1.0-1.16.2/debian/patches/fix-build-with-make-4.3.patch      
2020-07-15 20:55:28.000000000 +0000
+++ gst-plugins-bad1.0-1.16.2/debian/patches/fix-build-with-make-4.3.patch      
2020-07-23 12:47:21.000000000 +0000
@@ -1,29 +1,41 @@
-Description: Fix build with make 4.3
+Description: Fix build with make 4.3 while retaining compatibility with make 
4.2
 Author: Gianfranco Costamagna <locutusofb...@debian.org>
-Last-Update: 2020-07-15
+Author: Peter Michael Green <plugw...@debian.org>
+Last-Update: 2020-07-23
 
+Index: gst-plugins-bad1.0-1.16.2/common/glib-gen.mak
+===================================================================
 --- gst-plugins-bad1.0-1.16.2.orig/common/glib-gen.mak
 +++ gst-plugins-bad1.0-1.16.2/common/glib-gen.mak
-@@ -5,7 +5,7 @@
+@@ -5,7 +5,12 @@
  #glib_enum_define=GST_COLOR_BALANCE
  #glib_enum_prefix=gst_color_balance
  
 -enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
-+enum_headers=$(foreach h,$(glib_enum_headers),\n#include \"$(h)\")
++# GNU make 4.3 changes the escaping rules for the hash sign, the reccomended
++# way to maintain compatibility with both 4.2 and 4.3 is to use a variable
++# see https://lwn.net/Articles/810071/
++HASHINCLUDE:=\#include
++
++enum_headers=$(foreach h,$(glib_enum_headers),\n$(HASHINCLUDE) \"$(h)\")
  
  # these are all the rules generating the relevant files
  %-marshal.h: %-marshal.list
+Index: gst-plugins-bad1.0-1.16.2/common/gst-glib-gen.mak
+===================================================================
 --- gst-plugins-bad1.0-1.16.2.orig/common/gst-glib-gen.mak
 +++ gst-plugins-bad1.0-1.16.2/common/gst-glib-gen.mak
-@@ -6,9 +6,9 @@
- #glib_gen_prefix=gst_color_balance
- #glib_gen_basename=colorbalance
+@@ -8,7 +8,12 @@
  #glib_gen_decl_banner=GST_EXPORT
--#glib_gen_decl_include=\#include <gst/foo/foo-prelude.h>
-+#glib_gen_decl_include=#include <gst/foo/foo-prelude.h>
+ #glib_gen_decl_include=\#include <gst/foo/foo-prelude.h>
  
 -enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
-+enum_headers=$(foreach h,$(glib_enum_headers),\n#include \"$(h)\")
++# GNU make 4.3 changes the escaping rules for the hash sign, the reccomended
++# way to maintain compatibility with both 4.2 and 4.3 is to use a variable
++# see https://lwn.net/Articles/810071/
++HASHINCLUDE:=\#include
++
++enum_headers=$(foreach h,$(glib_enum_headers),\n$(HASHINCLUDE) \"$(h)\")
  
  # these are all the rules generating the relevant files
  $(glib_gen_basename)-marshal.h: $(glib_gen_basename)-marshal.list
diff -Nru gst-plugins-bad1.0-1.16.2/debian/patches/lv2-gcc10.patch 
gst-plugins-bad1.0-1.16.2/debian/patches/lv2-gcc10.patch
--- gst-plugins-bad1.0-1.16.2/debian/patches/lv2-gcc10.patch    1970-01-01 
00:00:00.000000000 +0000
+++ gst-plugins-bad1.0-1.16.2/debian/patches/lv2-gcc10.patch    2020-07-23 
12:47:21.000000000 +0000
@@ -0,0 +1,141 @@
+From a0cd455dd0e0375c6395fe732173225ea7e18562 Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <ri...@gnu.org>
+Date: Fri, 20 Mar 2020 15:49:06 +0100
+Subject: [PATCH] lv2: Make it build with -fno-common
+
+GCC 10 defaults to -fno-common. This means that global variables shared
+across multiple translation units should be declared as 'extern' in
+header files and defined in exactly one C file. See:
+https://gcc.gnu.org/gcc-10/porting_to.html
+
+https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1125
+
+Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1125>
+---
+ ext/lv2/gstlv2.c | 33 ++++++++++++++++++++++++++
+ ext/lv2/gstlv2.h | 62 ++++++++++++++++++++++++------------------------
+ 2 files changed, 64 insertions(+), 31 deletions(-)
+
+diff --git a/ext/lv2/gstlv2.c b/ext/lv2/gstlv2.c
+index 60d502f41a..7feeee1921 100644
+--- a/ext/lv2/gstlv2.c
++++ b/ext/lv2/gstlv2.c
+@@ -69,6 +69,39 @@ GST_DEBUG_CATEGORY (lv2_debug);
+ #error "Unsupported OS"
+ #endif
+ 
++LilvWorld *world = NULL;
++LilvNode *atom_class = NULL;
++LilvNode *audio_class = NULL;
++LilvNode *control_class = NULL;
++LilvNode *cv_class = NULL;
++LilvNode *event_class = NULL;
++LilvNode *input_class = NULL;
++LilvNode *output_class = NULL;
++LilvNode *preset_class = NULL;
++LilvNode *state_iface = NULL;
++LilvNode *state_uri = NULL;
++
++LilvNode *integer_prop = NULL;
++LilvNode *toggled_prop = NULL;
++LilvNode *designation_pred = NULL;
++LilvNode *in_place_broken_pred = NULL;
++LilvNode *optional_pred = NULL;
++LilvNode *group_pred = NULL;
++LilvNode *supports_event_pred = NULL;
++LilvNode *label_pred = NULL;
++
++LilvNode *center_role = NULL;
++LilvNode *left_role = NULL;
++LilvNode *right_role = NULL;
++LilvNode *rear_center_role = NULL;
++LilvNode *rear_left_role = NULL;
++LilvNode *rear_right_role = NULL;
++LilvNode *lfe_role = NULL;
++LilvNode *center_left_role = NULL;
++LilvNode *center_right_role = NULL;
++LilvNode *side_left_role = NULL;
++LilvNode *side_right_role = NULL;
++
+ GstStructure *lv2_meta_all = NULL;
+ 
+ static void
+diff --git a/ext/lv2/gstlv2.h b/ext/lv2/gstlv2.h
+index 177f9b2c19..9f72582294 100644
+--- a/ext/lv2/gstlv2.h
++++ b/ext/lv2/gstlv2.h
+@@ -28,40 +28,40 @@
+ 
+ #include "gstlv2utils.h"
+ 
+-LilvWorld *world;
+-LilvNode *atom_class;
+-LilvNode *audio_class;
+-LilvNode *control_class;
+-LilvNode *cv_class;
+-LilvNode *event_class;
+-LilvNode *input_class;
+-LilvNode *output_class;
+-LilvNode *preset_class;
+-LilvNode *state_iface;
+-LilvNode *state_uri;
++extern LilvWorld *world;
++extern LilvNode *atom_class;
++extern LilvNode *audio_class;
++extern LilvNode *control_class;
++extern LilvNode *cv_class;
++extern LilvNode *event_class;
++extern LilvNode *input_class;
++extern LilvNode *output_class;
++extern LilvNode *preset_class;
++extern LilvNode *state_iface;
++extern LilvNode *state_uri;
+ 
+-LilvNode *integer_prop;
+-LilvNode *toggled_prop;
+-LilvNode *designation_pred;
+-LilvNode *in_place_broken_pred;
+-LilvNode *optional_pred;
+-LilvNode *group_pred;
+-LilvNode *supports_event_pred;
+-LilvNode *label_pred;
++extern LilvNode *integer_prop;
++extern LilvNode *toggled_prop;
++extern LilvNode *designation_pred;
++extern LilvNode *in_place_broken_pred;
++extern LilvNode *optional_pred;
++extern LilvNode *group_pred;
++extern LilvNode *supports_event_pred;
++extern LilvNode *label_pred;
+ 
+-LilvNode *center_role;
+-LilvNode *left_role;
+-LilvNode *right_role;
+-LilvNode *rear_center_role;
+-LilvNode *rear_left_role;
+-LilvNode *rear_right_role;
+-LilvNode *lfe_role;
+-LilvNode *center_left_role;
+-LilvNode *center_right_role;
+-LilvNode *side_left_role;
+-LilvNode *side_right_role;
++extern LilvNode *center_role;
++extern LilvNode *left_role;
++extern LilvNode *right_role;
++extern LilvNode *rear_center_role;
++extern LilvNode *rear_left_role;
++extern LilvNode *rear_right_role;
++extern LilvNode *lfe_role;
++extern LilvNode *center_left_role;
++extern LilvNode *center_right_role;
++extern LilvNode *side_left_role;
++extern LilvNode *side_right_role;
+ 
+-GstStructure *lv2_meta_all;
++extern GstStructure *lv2_meta_all;
+ 
+ void gst_lv2_filter_register_element (GstPlugin *plugin,
+                                       GstStructure * lv2_meta);
+-- 
+GitLab
+
diff -Nru gst-plugins-bad1.0-1.16.2/debian/patches/series 
gst-plugins-bad1.0-1.16.2/debian/patches/series
--- gst-plugins-bad1.0-1.16.2/debian/patches/series     2020-07-15 
20:54:46.000000000 +0000
+++ gst-plugins-bad1.0-1.16.2/debian/patches/series     2020-07-23 
12:47:21.000000000 +0000
@@ -4,3 +4,4 @@
 opencv.patch
 29bf8d8528ec694f65c8fae310adac996322cc74.patch
 fix-build-with-make-4.3.patch
+lv2-gcc10.patch
diff -Nru gst-plugins-bad1.0-1.16.2/debian/rules 
gst-plugins-bad1.0-1.16.2/debian/rules
--- gst-plugins-bad1.0-1.16.2/debian/rules      2020-07-15 20:48:09.000000000 
+0000
+++ gst-plugins-bad1.0-1.16.2/debian/rules      2020-07-23 12:47:21.000000000 
+0000
@@ -207,6 +207,7 @@
        for f in $(VERSIONIZE); do \
                rm -f debian/$(gst_pkgname)-$$f; \
        done
+       rm -f debian/gir1.2-gst-plugins-bad-1.0.install 
debian/libgstreamer-opencv1.0-0.install 
debian/libgstreamer-plugins-bad1.0-0.install 
libgstreamer-plugins-bad1.0-dev.install
 
 gst_patch = $(shell echo $(gst_version) | cut -d '.' -f 2)
 gst_patch_next = $(shell expr $(gst_patch) + 1)

Reply via email to