1 Star 0 Fork 6

ocs-commit-check/gdk-pixbuf2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
e052a112075a19fb75f1f2ff3de4c82923de13f2.patch 3.82 KB
一键复制 编辑 原始数据 按行查看 历史
ocs-bot 提交于 2024-12-03 15:04 +08:00 . - Apply patches from rpm-tracker
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',
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ocs-commit-check/gdk-pixbuf2.git
git@gitee.com:ocs-commit-check/gdk-pixbuf2.git
ocs-commit-check
gdk-pixbuf2
gdk-pixbuf2
master

搜索帮助

371d5123 14472233 46e8bd33 14472233