代码拉取完成,页面将自动刷新
同步操作将从 OpenCloudOS Stream/gdk-pixbuf2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From e052a112075a19fb75f1f2ff3de4c82923de13f2 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Tue, 2 Apr 2024 16:40:41 +0200
Subject: [PATCH] build: Disable fringe loaders by default
Add 'gif' and 'others' options for the gif loader and all the
other remaining loaders. This makes it easier for distros to
ship a sane subset of loaders.
---
gdk-pixbuf/meson.build | 20 ++++++++++----------
meson.build | 21 +++++++++++++++++++++
meson_options.txt | 8 ++++++++
3 files changed, 39 insertions(+), 10 deletions(-)
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
index a11926eeee..570625bfe1 100644
--- a/gdk-pixbuf/meson.build
+++ b/gdk-pixbuf/meson.build
@@ -12,19 +12,19 @@ loaders = {
},
'bmp': {
'sources': [ 'io-bmp.c' ],
- 'enabled': not native_windows_loaders,
+ 'enabled': enabled_loaders.contains('bmp') and not native_windows_loaders,
},
'gif': {
'sources': [ 'io-gif.c', 'io-gif-animation.c', 'lzw.c' ],
- 'enabled': not native_windows_loaders,
+ 'enabled': enabled_loaders.contains('gif') and not native_windows_loaders,
},
'ico': {
'sources': [ 'io-ico.c' ],
- 'enabled': not native_windows_loaders,
+ 'enabled': enabled_loaders.contains('ico') and not native_windows_loaders,
},
'ani': {
'sources': [ 'io-ani.c', 'io-ani-animation.c' ],
- 'enabled': true,
+ 'enabled': enabled_loaders.contains('ani'),
},
'jpeg': {
'sources': [ 'io-jpeg.c' ],
@@ -32,7 +32,7 @@ loaders = {
},
'pnm': {
'sources': [ 'io-pnm.c' ],
- 'enabled': true,
+ 'enabled': enabled_loaders.contains('pnm'),
},
'tiff': {
'sources': [ 'io-tiff.c' ],
@@ -40,23 +40,23 @@ loaders = {
},
'xpm': {
'sources': [ 'io-xpm.c' ],
- 'enabled': true,
+ 'enabled': enabled_loaders.contains('xpm'),
},
'xbm': {
'sources': [ 'io-xbm.c' ],
- 'enabled': true,
+ 'enabled': enabled_loaders.contains('xbm'),
},
'tga': {
'sources': [ 'io-tga.c', 'gdk-pixbuf-buffer-queue.c' ],
- 'enabled': true,
+ 'enabled': enabled_loaders.contains('tga'),
},
'icns': {
'sources': [ 'io-icns.c' ],
- 'enabled': true,
+ 'enabled': enabled_loaders.contains('icns'),
},
'qtif': {
'sources': [ 'io-qtif.c' ],
- 'enabled': true,
+ 'enabled': enabled_loaders.contains('qtif'),
},
}
diff --git a/meson.build b/meson.build
index 6fe47a29db..78f3683eb7 100644
--- a/meson.build
+++ b/meson.build
@@ -275,6 +275,27 @@ if not png_opt.disabled()
endif
endif
+gif_opt = get_option('gif')
+if not gif_opt.disabled()
+ enabled_loaders += 'gif'
+endif
+
+others_opt = get_option('others')
+if not others_opt.disabled()
+ # Keep sorted alphabetically
+ enabled_loaders += [
+ 'ani',
+ 'bmp',
+ 'icns',
+ 'ico',
+ 'pnm',
+ 'qtif',
+ 'tga',
+ 'xbm',
+ 'xpm',
+ ]
+endif
+
# On Windows, check whether we are building the native Windows loaders
# (it is an "all-or-nothing" option for BMP, EMF, GIF, ICO, JPEG, TIFF and WMF)
# Note that we currently do not use the native Windows loaders to handle PNG and
diff --git a/meson_options.txt b/meson_options.txt
index d198d99d54..74830154a3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,6 +10,14 @@ option('jpeg',
description: 'Enable JPEG loader (requires libjpeg), disabled on Windows if "native_windows_loaders" is used',
type: 'feature',
value: 'enabled')
+option('gif',
+ description: 'Enable GIF loader, disabled on Windows if "native_windows_loaders" is used',
+ type: 'feature',
+ value: 'enabled')
+option('others',
+ description: 'Enable other loaders, which are weakly maintained',
+ type: 'feature',
+ value: 'disabled')
option('builtin_loaders',
description: 'Comma-separated list of loaders to build into gdk-pixbuf',
type: 'array',
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。