Skip to contentSkip to conversation

gdk-pixbuf: convert from autotools to meson

PATCH New Alexander Kanavin 1 participant 1 message Feb 18, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gdk-pixbuf: convert from autotools to meson

Drop autotools-specific patches.

Rework jku's thumbnailer patch into meson configuration.

Add a patch to disable tests in native builds.

---
 .../0001-Disable-tests-in-native-builds.patch |  30 ++++
 ...f-decisions-around-cross-compilation.patch |  38 +++++
 ...without-libtiff-not-having-an-effect.patch |  27 ----
 ...nd-thumbnailer-cross-compile-failure.patch |  53 +++----
 ...nd-thumbnailer-cross-compile-failure.patch | 131 ++++++++++++++++++
 .../extending-libinstall-dependencies.patch   |  42 ------
 .../gdk-pixbuf/hardcoded_libtool.patch        |  33 -----
 .../gdk-pixbuf/gdk-pixbuf_2.36.11.bb          |  40 ++++--
 8 files changed, 247 insertions(+), 147 deletions(-)
 create mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Disable-tests-in-native-builds.patch
 create mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch
 delete mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-without-libtiff-not-having-an-effect.patch
 create mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0002-Work-around-thumbnailer-cross-compile-failure.patch
 delete mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch
 delete mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Disable-tests-in-native-builds.patch new file +30 -0
new file mode 100644
index 00000000000..c991635bb95
@@ -0,0 +1,30 @@
+From d44aad1858c9c0da74f389d3de4dabade28b56c3 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Mon, 18 Feb 2019 16:00:12 +0100
+Subject: [PATCH] Disable tests in native builds.
+
+They have found to be problematic at least on Centos 7:
+https://autobuilder.yoctoproject.org/typhoon/#/builders/50/builds/296/steps/7/logs/step1b
+
+With autotools this was not a problem because it had a configuration
+switch for disabling test, which was used. Meson has no such facility :(
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 92c4049..0871c84 100644
+--- a/meson.build
++++ b/meson.build
+@@ -397,7 +397,7 @@ endif
+ # i18n
+ subdir('po')
+ 
+-subdir('tests')
++#subdir('tests')
+ subdir('thumbnailer')
+ 
+ # Documentation
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch new file +38 -0
new file mode 100644
index 00000000000..90d4830df50
@@ -0,0 +1,38 @@
+From 48cbdd56036728ffea431ad63cf5e2ad05cef69c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Thu, 14 Feb 2019 18:06:25 +0100
+Subject: [PATCH] Fix a couple of decisions around cross-compilation
+
+1. gobject-introspection can be build when cross compiling
+2. generating loaders.cache requires running a target binary which
+we do elsewhere (in postinsts)
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ gdk-pixbuf/meson.build | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
+index 77c162b..fc3eb33 100644
+--- a/gdk-pixbuf/meson.build
++++ b/gdk-pixbuf/meson.build
+@@ -230,6 +230,7 @@ foreach bin: gdkpixbuf_bin
+   set_variable(bin_name.underscorify(), bin)
+ endforeach
+ 
++if not meson.is_cross_build()
+ # The 'loaders.cache' used for testing, so we don't accidentally
+ # load the installed cache; we always build it by default
+ loaders_cache = custom_target('loaders.cache',
+@@ -241,8 +242,9 @@ loaders_cache = custom_target('loaders.cache',
+                               ],
+                               build_by_default: true)
+ loaders_dep = declare_dependency(sources: [ loaders_cache ])
++endif
+ 
+-build_gir = get_option('with_gir') and not meson.is_cross_build()
++build_gir = get_option('with_gir')
+ if build_gir
+   gir_args = [
+     '--quiet',
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-without-libtiff-not-having-an-effect.patch deleted +0 -27
deleted file mode 100644
index 2a54d8ed763..00000000000
@@ -1,27 +0,0 @@
-From 460befc992adb32434b0408b453be39a6866ccf8 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <[email protected]>
-Date: Tue, 10 Oct 2017 14:33:18 +0300
-Subject: [PATCH] Fix --without-libtiff not having an effect.
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=788770]
-Signed-off-by: Alexander Kanavin <[email protected]>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 315e0cc..98e780c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -676,7 +676,7 @@ if test x$gio_can_sniff = x; then
-   AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])
- fi
- 
--AM_CONDITIONAL(HAVE_TIFF, test "x$libtiff_found" != x)
-+AM_CONDITIONAL(HAVE_TIFF, test "x$libtiff_found" != xno)
- AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
- AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
- AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
--- 
-2.14.1
-
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-cross-compile-failure.patch +17 -36

64 lines not on this page · raw message

meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0002-Work-around-thumbnailer-cross-compile-failure.patch new file +131 -0

131 lines not on this page · raw message

meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch deleted +0 -42

42 lines not on this page · raw message

meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch deleted +0 -33
deleted file mode 100644
index ecca62a7129..00000000000
@@ -1,33 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: gdk-pixbuf-2.22.1/configure.ac
-===================================================================
---- gdk-pixbuf-2.22.1.orig/configure.ac	2010-11-26 09:06:34.000000000 +0800
-+++ gdk-pixbuf-2.22.1/configure.ac	2010-11-26 09:07:33.000000000 +0800
-@@ -287,7 +287,7 @@
- case $enable_explicit_deps in
-   auto)
-     export SED
--    deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
-+    deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
-     if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
-       enable_explicit_deps=yes
-     else
-@@ -484,7 +484,7 @@
-     dnl Now we check to see if our libtool supports shared lib deps
-     dnl (in a rather ugly way even)
-     if $dynworks; then
--        pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
-+        pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./$host_alias-libtool --config"
-         pixbuf_deplibs_check=`$pixbuf_libtool_config | \
-             grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
-             sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
-@@ -957,7 +957,7 @@
- # We are using gmodule-no-export now, but I'm leaving the stripping
- # code in place for now, since pango and atk still require gmodule.
- export SED
--export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+export_dynamic=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
- if test -n "$export_dynamic"; then
-   GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
- fi
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb +31 -9
index a7d3884d1fb..5e825afb3f5 100644
@@ -13,18 +13,40 @@ DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info"
 MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
 
 SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
-           file://hardcoded_libtool.patch \
-           file://extending-libinstall-dependencies.patch \
            file://run-ptest \
            file://fatal-loader.patch \
            file://0001-Work-around-thumbnailer-cross-compile-failure.patch \
-           file://0001-Fix-without-libtiff-not-having-an-effect.patch \
+           file://0001-Fix-a-couple-of-decisions-around-cross-compilation.patch \
+           "
+
+SRC_URI_append_class-target = " \
+           file://0002-Work-around-thumbnailer-cross-compile-failure.patch \
+           "
+SRC_URI_append_class-nativesdk = " \
+           file://0002-Work-around-thumbnailer-cross-compile-failure.patch \
+           "
+SRC_URI_append_class-native = " \
+           file://0001-Disable-tests-in-native-builds.patch \
            "
 
 SRC_URI[md5sum] = "6e84e5485c17ce7c25df77fe76eb2d6a"
 SRC_URI[sha256sum] = "ae62ab87250413156ed72ef756347b10208c00e76b222d82d9ed361ed9dde2f3"
 
-inherit autotools pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package
+inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package
+
+GTKDOC_ENABLE_FLAG = "-Dwith_docs=true"
+GTKDOC_DISABLE_FLAG = "-Dwith_docs=false"
+
+GI_ENABLE_FLAG = "-Dwith_gir=true"
+GI_DISABLE_FLAG = "-Dwith_gir=false"
+
+EXTRA_OEMESON_append_class-nativesdk = " ${GI_DISABLE_FLAG}"
+
+EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GI_ENABLE_FLAG}', \
+                                                                                       '${GI_DISABLE_FLAG}', d)} "
+
+EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
+                                                                                     '${GTKDOC_DISABLE_FLAG}', d)} "
 
 LIBV = "2.10.0"
 
@@ -34,12 +56,12 @@ PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}"
 PACKAGECONFIG_linuxstdbase = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${GDK_PIXBUF_LOADERS}"
 PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
 
-PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng"
-PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg"
-PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff"
-PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
+PACKAGECONFIG[png] = "-Denable_png=true,-Denable_png=false,libpng"
+PACKAGECONFIG[jpeg] = "-Denable_jpeg=true,-Denable_jpeg=false,jpeg"
+PACKAGECONFIG[tiff] = "-Denable_tiff=true,-Denable_tiff=false,tiff"
+PACKAGECONFIG[jpeg2000] = "-Denable_jasper=true,-Denable_jasper=false,jasper"
 
-PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
+PACKAGECONFIG[x11] = ",,virtual/libx11"
 
 PACKAGES =+ "${PN}-xlib"
 
Signature · 1 line
2.17.1