From ee823d0a54c5b164e8d25f835f9e06b16e104492 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 17 Jul 2019 13:59:58 +0100 Subject: [PATCH] gdk: Fix some weirdness around generated sources --- .../patches/018_gdkenumtypes.c_location.patch | 8 +-- ...ult-constructed-GdkPixbuf-properties.patch | 4 +- ...stribute-generated-files-in-tarballs.patch | 60 +++++++++++++++++++ ...ate-gdkenumtypes.-ch-in-the-builddir.patch | 33 ++++++++++ debian/patches/reftest-known-fail.patch | 6 +- debian/patches/series | 2 + 6 files changed, 104 insertions(+), 9 deletions(-) create mode 100644 debian/patches/gdk-Don-t-distribute-generated-files-in-tarballs.patch create mode 100644 debian/patches/gdk-Generate-gdkenumtypes.-ch-in-the-builddir.patch diff --git a/debian/patches/018_gdkenumtypes.c_location.patch b/debian/patches/018_gdkenumtypes.c_location.patch index ead29445eb..867ad045de 100644 --- a/debian/patches/018_gdkenumtypes.c_location.patch +++ b/debian/patches/018_gdkenumtypes.c_location.patch @@ -19,10 +19,10 @@ Forwarded: yes 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/gdk/Makefile.am b/gdk/Makefile.am -index 689ee52..da2ba33 100644 +index 6373e26..1b11d72 100644 --- a/gdk/Makefile.am +++ b/gdk/Makefile.am -@@ -179,8 +179,8 @@ gdk_c_sources = \ +@@ -184,8 +184,8 @@ gdk_c_sources = \ gdkwindowimpl.c gdk_built_sources = \ @@ -33,7 +33,7 @@ index 689ee52..da2ba33 100644 gdkmarshalers.h \ gdkmarshalers.c \ gdkresources.h \ -@@ -412,7 +412,7 @@ endif +@@ -417,7 +417,7 @@ endif lib_LTLIBRARIES = libgdk-3.la @@ -42,7 +42,7 @@ index 689ee52..da2ba33 100644 EXTRA_DIST += \ $(gdk_built_sources) \ fallback-c89.c -@@ -426,18 +426,15 @@ BUILT_SOURCES = \ +@@ -431,18 +431,15 @@ BUILT_SOURCES = \ $(gdk_built_sources) \ gdkconfig.h diff --git a/debian/patches/Don-t-test-default-constructed-GdkPixbuf-properties.patch b/debian/patches/Don-t-test-default-constructed-GdkPixbuf-properties.patch index 7f2b41f7b6..a27dd72c33 100644 --- a/debian/patches/Don-t-test-default-constructed-GdkPixbuf-properties.patch +++ b/debian/patches/Don-t-test-default-constructed-GdkPixbuf-properties.patch @@ -11,10 +11,10 @@ Forwarded: no 1 file changed, 4 insertions(+) diff --git a/testsuite/gtk/defaultvalue.c b/testsuite/gtk/defaultvalue.c -index 0cb3073..74a51ff 100644 +index a82788b..65290ba 100644 --- a/testsuite/gtk/defaultvalue.c +++ b/testsuite/gtk/defaultvalue.c -@@ -488,6 +488,10 @@ main (int argc, char **argv) +@@ -489,6 +489,10 @@ main (int argc, char **argv) if (otypes[i] == GTK_TYPE_FILE_CHOOSER_NATIVE) continue; diff --git a/debian/patches/gdk-Don-t-distribute-generated-files-in-tarballs.patch b/debian/patches/gdk-Don-t-distribute-generated-files-in-tarballs.patch new file mode 100644 index 0000000000..129b2e5cc1 --- /dev/null +++ b/debian/patches/gdk-Don-t-distribute-generated-files-in-tarballs.patch @@ -0,0 +1,60 @@ +From: Simon McVittie +Date: Wed, 17 Jul 2019 13:54:41 +0100 +Subject: gdk: Don't distribute generated files in tarballs + +gdkversionmacros.h is generated by configure, so it should be in +DISTCLEANFILES. The rest of $(gdk_built_sources) are built at compile +time by GLib tools, so in principle they should be in CLEANFILES, but +DISTCLEANFILES is close enough. + +Signed-off-by: Simon McVittie +--- + gdk/Makefile.am | 21 +++------------------ + 1 file changed, 3 insertions(+), 18 deletions(-) + +diff --git a/gdk/Makefile.am b/gdk/Makefile.am +index 525c5a0..64e5b17 100644 +--- a/gdk/Makefile.am ++++ b/gdk/Makefile.am +@@ -203,16 +203,8 @@ nodist_gdkinclude_HEADERS = gdkconfig.h gdkenumtypes.h gdkversionmacros.h + deprecatedincludedir = $(includedir)/gtk-3.0/gdk/deprecated + deprecatedinclude_HEADERS = $(deprecated_h_sources) + +-common_sources = \ +- $(gdk_private_headers) \ +- $(gdk_c_sources) \ +- gdkenumtypes.c \ +- gdkmarshalers.c \ +- gdkmarshalers.h \ +- gdkresources.h \ +- gdkresources.c +- +-libgdk_3_la_SOURCES = $(common_sources) ++libgdk_3_la_SOURCES = $(gdk_private_headers) $(gdk_c_sources) ++nodist_libgdk_3_la_SOURCES = $(gdk_built_sources) + libgdk_3_la_CFLAGS = $(AM_CFLAGS) $(GDK_HIDDEN_VISIBILITY_CFLAGS) + libgdk_3_la_LIBADD = $(GDK_DEP_LIBS) $(SHM_LIBS) + libgdk_3_la_LDFLAGS = $(LDADD) +@@ -417,7 +409,7 @@ endif + + lib_LTLIBRARIES = libgdk-3.la + +-MAINTAINERCLEANFILES = $(gdk_built_sources) ++DISTCLEANFILES = $(gdk_built_sources) + EXTRA_DIST += \ + $(gdk_built_sources) \ + fallback-c89.c +@@ -562,13 +554,6 @@ install-data-local: install-ms-lib install-def-file + uninstall-local: uninstall-ms-lib uninstall-def-file + rm -f $(DESTDIR)$(configexecincludedir)/gdkconfig.h + +-# if srcdir!=builddir, clean out maintainer-clean files from builddir +-# this allows dist to pass. +-distclean-local: +- if test $(srcdir) != .; then \ +- rm -f $(MAINTAINERCLEANFILES); \ +- fi +- + .PHONY: files + + files: diff --git a/debian/patches/gdk-Generate-gdkenumtypes.-ch-in-the-builddir.patch b/debian/patches/gdk-Generate-gdkenumtypes.-ch-in-the-builddir.patch new file mode 100644 index 0000000000..4ba06c0c1c --- /dev/null +++ b/debian/patches/gdk-Generate-gdkenumtypes.-ch-in-the-builddir.patch @@ -0,0 +1,33 @@ +From: Simon McVittie +Date: Wed, 17 Jul 2019 13:48:50 +0100 +Subject: gdk: Generate gdkenumtypes.[ch] in the $(builddir) + +Signed-off-by: Simon McVittie +--- + gdk/Makefile.am | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gdk/Makefile.am b/gdk/Makefile.am +index 1b11d72..525c5a0 100644 +--- a/gdk/Makefile.am ++++ b/gdk/Makefile.am +@@ -184,8 +184,8 @@ gdk_c_sources = \ + gdkwindowimpl.c + + gdk_built_sources = \ +- $(srcdir)/gdkenumtypes.h \ +- $(srcdir)/gdkenumtypes.c \ ++ gdkenumtypes.h \ ++ gdkenumtypes.c \ + gdkmarshalers.h \ + gdkmarshalers.c \ + gdkresources.h \ +@@ -434,7 +434,7 @@ BUILT_SOURCES = \ + gdkenumtypes.h: $(gdk_public_h_sources) $(srcdir)/gdkenumtypes.h.template + $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.h.template \ + $(gdk_h_sources) ) >> xgen-geth \ +- && (cmp -s xgen-geth gdkenumtypes.h || cp xgen-geth $(srcdir)/gdkenumtypes.h ) \ ++ && (cmp -s xgen-geth gdkenumtypes.h || cp xgen-geth gdkenumtypes.h ) \ + && rm -f xgen-geth + gdkenumtypes.c: $(gdk_h_sources) gdkenumtypes.c.template + $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.c.template \ diff --git a/debian/patches/reftest-known-fail.patch b/debian/patches/reftest-known-fail.patch index b2d28655de..0bcb50c2a9 100644 --- a/debian/patches/reftest-known-fail.patch +++ b/debian/patches/reftest-known-fail.patch @@ -8,10 +8,10 @@ Forwarded: no 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/testsuite/reftests/gtk-reftest.c b/testsuite/reftests/gtk-reftest.c -index 4930af8..69f906c 100644 +index 6400b26..22d06c1 100644 --- a/testsuite/reftests/gtk-reftest.c +++ b/testsuite/reftests/gtk-reftest.c -@@ -253,6 +253,20 @@ save_image (cairo_surface_t *surface, +@@ -257,6 +257,20 @@ save_image (cairo_surface_t *surface, g_free (filename); } @@ -32,7 +32,7 @@ index 4930af8..69f906c 100644 static void test_ui_file (GFile *file) { -@@ -285,7 +299,13 @@ test_ui_file (GFile *file) +@@ -289,7 +303,13 @@ test_ui_file (GFile *file) if (diff_image) { save_image (diff_image, ui_file, ".diff.png"); diff --git a/debian/patches/series b/debian/patches/series index 1b2acf8846..e5c1a8f542 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,5 @@ reftest-known-fail.patch Don-t-test-default-constructed-GdkPixbuf-properties.patch Revert-Update-some-a11y-test-results.patch +gdk-Generate-gdkenumtypes.-ch-in-the-builddir.patch +gdk-Don-t-distribute-generated-files-in-tarballs.patch