Debian Codegraph @

src/imageformats/configure.json

raw symbols SCIP
1 {
2 "module": "imageformats",
3 "depends": [
4 "gui"
5 ],
6 "condition": "module.gui",
7
8 "commandline": {
9 "options": {
10 "jasper": { "type": "boolean" },
11 "mng": { "type": "boolean" },
12 "tiff": { "type": "enum", "values": [ "no", "qt", "system" ] },
13 "webp": { "type": "enum", "values": [ "no", "qt", "system" ] }
14 }
15 },
16
17 "libraries": {
18 "jasper": {
19 "headers": "jasper/jasper.h",
20 "test": {
21 "include": [
22 "string.h",
23 "jasper/jasper.h"
24 ],
25 "head": [
26 "constexpr bool streq(const char *a, const char *b)",
27 "{",
28 " return a[0] == b[0] && (!a[0] || streq(a + 1, b + 1));",
29 "}"
30 ],
31 "main": [
32 "static_assert(!streq(JAS_VERSION, \"1.900.0\"),",
33 " \"JasPer version 1.900.0 is considered broken.\");"
34 ]
35 },
36 "sources": [
37 { "type": "pkgConfig", "args": "jasper" },
38 { "libs": "-ljasper" }
39 ]
40 },
41 "mng": {
42 "headers": "libmng.h",
43 "test": {
44 "include": [
45 "stdio.h",
46 "libmng.h"
47 ],
48 "main": [
49 "mng_handle hMNG;",
50 "mng_cleanup(&hMNG);",
51 "#if defined(MNG_VERSION_MAJOR)",
52 "#if MNG_VERSION_MAJOR < 1 || (MNG_VERSION_MAJOR == 1 && MNG_VERSION_MINOR == 0 && MNG_VERSION_RELEASE < 9)",
53 "#error System libmng version is less than 1.0.9",
54 "#endif",
55 "#endif"
56 ]
57 },
58 "sources": [
59 { "type": "pkgConfig", "args": "libmng" },
60 { "libs": "-lmng" }
61 ]
62 },
63 "tiff": {
64 "headers": "tiffio.h",
65 "test": {
66 "main": [
67 "#if !defined(TIFF_VERSION) && defined(TIFF_VERSION_CLASSIC)",
68 "// libtiff 4.0 splits it into TIFF_VERSION_CLASSIC and TIFF_VERSION_BIG",
69 "# define TIFF_VERSION TIFF_VERSION_CLASSIC",
70 "#endif",
71
72 "#if !defined(TIFF_VERSION)",
73 "# error \"Required libtiff not found\"",
74 "#elif TIFF_VERSION < 42",
75 "# error \"unsupported tiff version\"",
76 "#endif",
77
78 "tdata_t buffer = _TIFFmalloc(128);",
79 "_TIFFfree(buffer);",
80
81 "// some libtiff implementations where TIFF_VERSION >= 42 do not",
82 "// have TIFFReadRGBAImageOriented(), so let's check for it",
83 "TIFFReadRGBAImageOriented(0, 0, 0, 0, 0, 0);"
84 ]
85 },
86 "sources": [
87 { "type": "pkgConfig", "args": "libtiff-4" },
88 { "libs": "-ltiff" }
89 ]
90 },
91 "webp": {
92 "headers": [
93 "webp/decode.h",
94 "webp/encode.h",
95 "webp/demux.h",
96 "webp/mux.h"
97 ],
98 "test": {
99 "main": [
100 "#if WEBP_ABI_IS_INCOMPATIBLE(WEBP_DECODER_ABI_VERSION, 0x0203) || WEBP_ABI_IS_INCOMPATIBLE(WEBP_ENCODER_ABI_VERSION, 0x0202)",
101 "#error \"Incompatible libwebp version\"",
102 "#endif",
103
104 "WebPDecoderConfig config;",
105 "WebPDecBuffer *output_buffer = &config.output;",
106 "WebPBitstreamFeatures *bitstream = &config.input;",
107 "WebPPicture picture;",
108 "picture.use_argb = 0;",
109 "WebPConfig config2;",
110 "config2.lossless = 0;",
111 "WebPData data = {};",
112 "WebPDemuxer *demuxer = WebPDemux(&data);",
113 "WebPIterator iter;",
114 "iter.frame_num = 0;"
115 ]
116 },
117 "sources": [
118 { "type": "pkgConfig", "args": "libwebp libwebpmux libwebpdemux" },
119 { "libs": "-lwebp -lwebpdemux -lwebpmux" }
120 ]
121 }
122 },
123
124 "features": {
125 "jasper": {
126 "label": "JasPer",
127 "disable": "input.jasper == 'no'",
128 "condition": "features.imageformatplugin && libs.jasper",
129 "output": [
130 "privateFeature",
131 { "type": "define", "negative": true, "name": "QT_NO_IMAGEFORMAT_JASPER" }
132 ]
133 },
134 "mng": {
135 "label": "MNG",
136 "disable": "input.mng == 'no'",
137 "condition": "libs.mng",
138 "output": [ "privateFeature" ]
139 },
140 "tiff": {
141 "label": "TIFF",
142 "disable": "input.tiff == 'no'",
143 "condition": "features.imageformatplugin && !(config.winrt && arch.i386)",
144 "output": [
145 "privateFeature"
146 ]
147 },
148 "system-tiff": {
149 "label": " Using system libtiff",
150 "disable": "input.tiff == 'qt'",
151 "enable": "input.tiff == 'system'",
152 "condition": "features.tiff && libs.tiff",
153 "output": [ "privateFeature" ]
154 },
155 "webp": {
156 "label": "WEBP",
157 "disable": "input.webp == 'no'",
158 "condition": "features.imageformatplugin",
159 "output": [
160 "privateFeature"
161 ]
162 },
163 "system-webp": {
164 "label": " Using system libwebp",
165 "disable": "input.webp == 'qt'",
166 "enable": "input.webp == 'system'",
167 "condition": "features.webp && libs.webp",
168 "output": [ "privateFeature" ]
169 }
170 },
171
172 "summary": [
173 {
174 "section": "Further Image Formats",
175 "entries": [
176 "jasper",
177 "mng",
178 "tiff", "system-tiff",
179 "webp", "system-webp"
180 ]
181 }
182 ]
183 }