Commit dd303278 authored by Matthew Waters's avatar Matthew Waters 🐨

recipes: update gdk-pixbuf to 2.38.0

And port to meson as upstream has removed autotools support
parent 524b314b
......@@ -4,16 +4,24 @@ from cerbero.utils import shell
class Recipe(recipe.Recipe):
name = 'gdk-pixbuf'
version = '2.36.2'
version = '2.38.0'
licenses = [License.LGPLv2Plus]
stype = SourceType.TARBALL
btype = BuildType.MESON
maj_ver = '.'.join(version.split('.')[0:2])
url = 'https://download.gnome.org/sources/{0}/{1}/{0}-{2}.tar.xz'.format(name, maj_ver, version)
tarball_checksum = '3a082ad67d68b55970aed0b2034a06618167be98a42d5c70de736756b45d325d'
configure_options = '--with-included-loaders --enable-static --enable-gio-sniffing=no '
tarball_checksum = 'dd50973c7757bcde15de6bcd3a6d462a445efd552604ae6435a0532fbbadae47'
meson_options = {'docs' : 'false',
'man' : 'false',
'installed_tests' : 'false',
'builtin_loaders' : 'all',
'gio_sniffing' : 'false',
'x11' : 'false'}
deps = ['libjpeg-turbo', 'glib', 'libpng', 'tiff', 'zlib' ]
autoreconf = True
patches = ['gdk-pixbuf/0001-thumbnailer-Add-EXEEXT-to-the-the-gdk-pixbuf-print-m.patch']
patches = ['gdk-pixbuf/0001-meson-add-option-for-disabling-GIO-sniffing.patch',
'gdk-pixbuf/0001-meson-Don-t-generate-the-loader-cache-when-cross-com.patch',
'gdk-pixbuf/0001-meson-don-t-build-tests-or-the-thumbnailer-if-cross-.patch']
files_libs = ['libgdk_pixbuf-2.0']
files_bins = ['gdk-pixbuf-query-loaders', 'gdk-pixbuf-csource']
......@@ -23,11 +31,13 @@ class Recipe(recipe.Recipe):
def prepare(self):
if self.config.target_platform == Platform.WINDOWS:
self.configure_options += '--without-gdiplus '
if self.config.target_platform == Platform.DARWIN:
self.configure_options += '--without-x11 '
self.meson_options['native_windows_loaders'] = 'true'
if self.config.target_platform == Platform.LINUX:
self.meson_options['x11'] = 'true'
if self.config.prefix_is_executable():
self.files_misc = ['lib/gdk-pixbuf-2.0/2.10.0/loaders.cache']
else:
self.meson_options['tests'] = 'false'
def post_install (self):
if self.config.platform == Platform.WINDOWS and\
......
From 36a5a8a6ef1a98183093204d781ec4e55365711e Mon Sep 17 00:00:00 2001
From: Matthew Waters <matthew@centricular.com>
Date: Mon, 8 Oct 2018 21:04:49 +1100
Subject: [PATCH 1/2] meson: Don't generate the loader cache when
cross-compiling
---
gdk-pixbuf/meson.build | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
index 1995ffd..47f971e 100644
--- a/gdk-pixbuf/meson.build
+++ b/gdk-pixbuf/meson.build
@@ -291,17 +291,22 @@ foreach bin: gdkpixbuf_bin
set_variable(bin_name.underscorify(), bin)
endforeach
-# 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',
- output: 'loaders.cache',
- capture: true,
- command: [
- gdk_pixbuf_query_loaders,
- dynamic_loaders,
- ],
- build_by_default: true)
-loaders_dep = declare_dependency(sources: [ loaders_cache ])
+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',
+ output: 'loaders.cache',
+ capture: true,
+ command: [
+ gdk_pixbuf_query_loaders,
+ dynamic_loaders,
+ ],
+ build_by_default: true)
+ loaders_dep = declare_dependency(sources: [ loaders_cache ])
+else
+ loaders_dep = declare_dependency()
+ loaders_cache = []
+endif
pkgconfig = import('pkgconfig')
pkgconfig.generate(
--
2.19.0
From f3c13c23bf09bc49bc52b0ba9609d5b6a2833c0a Mon Sep 17 00:00:00 2001
From: Matthew Waters <matthew@centricular.com>
Date: Mon, 8 Oct 2018 17:18:56 +1100
Subject: [PATCH] meson: add option for disabling GIO sniffing
Some linux-like platforms (e.g. Android) don't have a mime-info database
readily available for use.
---
meson.build | 8 ++++----
meson_options.txt | 5 +++++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 43b11f6..6b0ba49 100644
--- a/meson.build
+++ b/meson.build
@@ -189,11 +189,11 @@ gmodule_dep = dependency('gmodule-no-export-2.0')
gio_dep = dependency('gio-2.0')
# On non-Windows/macOS systems we always required shared-mime-info and GIO
-if host_system != 'windows' and host_system != 'darwin'
- shared_mime_dep = dependency('shared-mime-info')
+# shared_mime_dep = []
+shared_mime_dep = []
+if get_option('gio_sniffing') and host_system != 'windows' and host_system != 'darwin'
+ shared_mime_dep += dependency('shared-mime-info')
gdk_pixbuf_conf.set('GDK_PIXBUF_USE_GIO_MIME', 1)
-else
- shared_mime_dep = []
endif
# Check if medialib is available
diff --git a/meson_options.txt b/meson_options.txt
index 9f6b650..a7c33a8 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -46,3 +46,8 @@ option('installed_tests',
description: 'Install the test suite',
type: 'boolean',
value: true)
+option('gio_sniffing',
+ description: 'Perform file type detection using GIO (Unused on MacOS and Windows)',
+ type: 'boolean',
+ value: true)
+
--
2.19.0
From 76a8364e0ea7de2f1b30e88eec21e29a4e2e516c Mon Sep 17 00:00:00 2001
From: Matthew Waters <matthew@centricular.com>
Date: Mon, 8 Oct 2018 21:14:05 +1100
Subject: [PATCH] meson: don't build tests or the thumbnailer if cross building
---
meson.build | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 6b0ba49..56ef4f1 100644
--- a/meson.build
+++ b/meson.build
@@ -396,8 +396,10 @@ endif
# i18n
subdir('po')
-subdir('tests')
-subdir('thumbnailer')
+if not meson.is_cross_build()
+ subdir('tests')
+ subdir('thumbnailer')
+endif
# Documentation
subdir('docs')
--
2.19.0
From adff3e30eea40bc798cf3c25d69830cfae38a6b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
Date: Fri, 23 Dec 2016 11:17:23 +0200
Subject: [PATCH] thumbnailer: Add $(EXEEXT) to the the
gdk-pixbuf-print-mime-types
Fixes the build on Windows and elsewhere, where there's a filename
extension for executables
---
thumbnailer/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/thumbnailer/Makefile.am b/thumbnailer/Makefile.am
index d85af21..6f0c149 100644
--- a/thumbnailer/Makefile.am
+++ b/thumbnailer/Makefile.am
@@ -25,7 +25,7 @@ gdk_pixbuf_print_mime_types_LDADD = \
thumbnailerdir = $(datadir)/thumbnailers/
thumbnailer_DATA = gdk-pixbuf-thumbnailer.thumbnailer
-gdk-pixbuf-thumbnailer.thumbnailer: gdk-pixbuf-thumbnailer.thumbnailer.in Makefile gdk-pixbuf-print-mime-types
+gdk-pixbuf-thumbnailer.thumbnailer: gdk-pixbuf-thumbnailer.thumbnailer.in Makefile gdk-pixbuf-print-mime-types$(EXEEXT)
$(AM_V_GEN) GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/loaders.cache \
GDK_PIXBUF_PIXDATA=$(top_builddir)/gdk-pixbuf/gdk-pixbuf-pixdata \
$(SED) -e "s|\@bindir\@|$(bindir)|" \
--
2.11.0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment