This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake-spec.r
85 lines (76 loc) · 2.89 KB
/
make-spec.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
REBOL []
name: 'PNG
source: %png/mod-png.c
definitions: copy [
;
; Rebol already includes zlib, and LodePNG is hooked to that
; copy of zlib exported as part of the internal API.
;
"LODEPNG_NO_COMPILE_ZLIB"
; LodePNG doesn't take a target buffer pointer to compress "into".
; Instead, you hook it by giving it an allocator. The one used
; by Rebol backs the memory with a series, so that the image data
; may be registered with the garbage collector.
;
"LODEPNG_NO_COMPILE_ALLOCATORS"
; With LodePNG, using C++ compilation creates a dependency on
; std::vector. This is conditional on __cplusplus, but there's
; an #ifdef saying that even if you're compiling as C++ to not
; do this. It's not an interesting debug usage of C++, however,
; so there's no reason to be doing it.
;
"LODEPNG_NO_COMPILE_CPP"
; We don't want LodePNG's disk I/O routines--we use READ and write
;
"LODEPNG_NO_COMPILE_DISK"
; There's an option for handling "ancillary chunks". These are things
; like text or embedded ICC profiles:
; http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html
;
; Until someone requests such a feature and a way to interface with it,
; support for them will just make the executable bigger. Leave these
; out for now.
;
"LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS"
]
includes: [
%prep/extensions/png
]
depends: [
[
%png/lodepng.c
; May 2018 update to MSVC 2017 added warnings about Spectre
; mitigation. The JPG code contains a lot of code that would
; trigger slowdown. It is not a priority to rewrite, given
; that some other vetted 3rd party JPG code should be used.
;
<msc:/wd5045> ; https://stackoverflow.com/q/50399940
; The LodePNG module has local scopes with declarations that
; alias declarations in outer scopes. This can be confusing,
; so it's avoided in the core, but LodePNG is maintained by
; someone else with different standards.
;
; declaration of 'identifier' hides previous
; local declaration
;
<msc:/wd4456>
; This line causes the warning "result of 32-bit shift
; implicitly converted to 64-bits" in MSVC 64-bit builds:
;
; size_t palsize = 1u << mode_out->bitdepth;
;
; It could be changed to `((size_t)1) << ...` and avoid it.
;
<msc:/wd4334>
; There is a casting away of const qualifiers, which is bad,
; but the PR to fix it has not been merged to LodePNG master.
;
<gnu:-Wno-cast-qual>
; Comparison of unsigned enum value is >= 0. A pending PR that has
; not been merged mentions this...update lodepng if that happens:
;
; https://github.com/lvandeve/lodepng/pull/135
;
<gnu:-Wno-type-limits>
]
]