mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Compare commits
1239 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7cecdcae07 | ||
![]() |
cf59edd364 | ||
![]() |
2b978915d8 | ||
![]() |
254a64ec30 | ||
![]() |
9eb25bd899 | ||
![]() |
8087a21d0a | ||
![]() |
2e5f296bfa | ||
![]() |
4266c75f40 | ||
![]() |
f451a4de09 | ||
![]() |
6aa47debba | ||
![]() |
3391bb98e3 | ||
![]() |
21895b05ab | ||
![]() |
be81ebe1a4 | ||
![]() |
edf46621f3 | ||
![]() |
5dc5937b30 | ||
![]() |
7084241c75 | ||
![]() |
640204280f | ||
![]() |
740366c32b | ||
![]() |
5d53dfd20c | ||
![]() |
5b62726ced | ||
![]() |
a5830bfcb1 | ||
![]() |
3bca02e274 | ||
![]() |
197bbfe0d5 | ||
![]() |
0cc6436ef5 | ||
![]() |
f04c457a51 | ||
![]() |
5631b9b952 | ||
![]() |
dc71f481ff | ||
![]() |
e2c1579816 | ||
![]() |
cff8620272 | ||
![]() |
5be32eb35c | ||
![]() |
611bf1016c | ||
![]() |
0e37c0b477 | ||
![]() |
7108843467 | ||
![]() |
2b0eb78656 | ||
![]() |
ffb8e8b26f | ||
![]() |
cc5ee6b213 | ||
![]() |
b4800bae33 | ||
![]() |
ea12796820 | ||
![]() |
643dbda7d6 | ||
![]() |
34e3f7a65b | ||
![]() |
3e67531078 | ||
![]() |
23bdc7a6c4 | ||
![]() |
69a3e5bfd1 | ||
![]() |
c90491724e | ||
![]() |
98448e372d | ||
![]() |
f2b0f5fe1c | ||
![]() |
7101a5569f | ||
![]() |
e046c0dc3b | ||
![]() |
34005e3d3d | ||
![]() |
44f97f08d7 | ||
![]() |
044536de92 | ||
![]() |
738f5e743c | ||
![]() |
f20e66aa93 | ||
![]() |
5d09501462 | ||
![]() |
872555f4ba | ||
![]() |
bb7e922914 | ||
![]() |
b20e6fb314 | ||
![]() |
5356b94169 | ||
![]() |
812c34c13c | ||
![]() |
68e090e700 | ||
![]() |
8c7ed2e3b2 | ||
![]() |
2519a03418 | ||
![]() |
c4b20d0a3a | ||
![]() |
a8242dd947 | ||
![]() |
171bdd3a6c | ||
![]() |
0024abd279 | ||
![]() |
fcb0bca15f | ||
![]() |
deadeea7a2 | ||
![]() |
9cc729b523 | ||
![]() |
36a16fd761 | ||
![]() |
4d7c99334e | ||
![]() |
19a5a5eba3 | ||
![]() |
8a28d0558e | ||
![]() |
03660a516b | ||
![]() |
f753baae52 | ||
![]() |
92e8581f12 | ||
![]() |
8ffc967e8a | ||
![]() |
51f5bd68b9 | ||
![]() |
3714c584b1 | ||
![]() |
2a845ff819 | ||
![]() |
0cc367aaea | ||
![]() |
3042f74de0 | ||
![]() |
4599354be8 | ||
![]() |
823c2d80dc | ||
![]() |
75748d93ce | ||
![]() |
6f786ff0f6 | ||
![]() |
c1cc0f3f4c | ||
![]() |
d9d70e6506 | ||
![]() |
76e5ec217f | ||
![]() |
65470ac86c | ||
![]() |
8b1d489bce | ||
![]() |
a7a8faeefa | ||
![]() |
d7d950e8bd | ||
![]() |
f14d5fcd1e | ||
![]() |
7c90057cfe | ||
![]() |
1bf304c43c | ||
![]() |
9ee82380da | ||
![]() |
642b5d81e3 | ||
![]() |
d3cf9b6e22 | ||
![]() |
d288a1dd36 | ||
![]() |
0a27b48e94 | ||
![]() |
65cd5fa3e5 | ||
![]() |
f3a45ac2e9 | ||
![]() |
d161ce6116 | ||
![]() |
b3bcbf9f82 | ||
![]() |
b8a0a5401f | ||
![]() |
529e69e76a | ||
![]() |
cd5e582fd6 | ||
![]() |
bcb3124141 | ||
![]() |
cb08862674 | ||
![]() |
18ab7d09dd | ||
![]() |
68d7ce8040 | ||
![]() |
c0f3dd43d8 | ||
![]() |
222dd7ca49 | ||
![]() |
e3c7b26fbd | ||
![]() |
b7276eca01 | ||
![]() |
ef153d5325 | ||
![]() |
f5e92d7697 | ||
![]() |
88ab4f592d | ||
![]() |
3117b5f94a | ||
![]() |
5a7e87fc04 | ||
![]() |
8cc22a8c15 | ||
![]() |
843dbb7579 | ||
![]() |
1d1cc9ae18 | ||
![]() |
1964d560e9 | ||
![]() |
68ba4f1f7d | ||
![]() |
0e204b7364 | ||
![]() |
53a7f4e320 | ||
![]() |
fcdec9c66e | ||
![]() |
222086586b | ||
![]() |
40878fd6dc | ||
![]() |
20f819c29e | ||
![]() |
7e18d14296 | ||
![]() |
43d6ad3e15 | ||
![]() |
33ef48b6d6 | ||
![]() |
532fec0214 | ||
![]() |
e4a31f024b | ||
![]() |
9e538750d9 | ||
![]() |
ceed2a3cf6 | ||
![]() |
f1848a3b56 | ||
![]() |
ed217e3e60 | ||
![]() |
e1fa61daa8 | ||
![]() |
80691b9da2 | ||
![]() |
890231026d | ||
![]() |
3b9a73ed3e | ||
![]() |
e05ebfba7c | ||
![]() |
ec2e58c16a | ||
![]() |
7b888092b9 | ||
![]() |
14a348ddc8 | ||
![]() |
29e31f622f | ||
![]() |
d165a20ae4 | ||
![]() |
aa95dee697 | ||
![]() |
e7ba9c0dfc | ||
![]() |
6b5a2da072 | ||
![]() |
dddaf0c625 | ||
![]() |
72c4520d3c | ||
![]() |
0fa3c0f698 | ||
![]() |
4191872d0d | ||
![]() |
42c8fcbff9 | ||
![]() |
f74d5ecce8 | ||
![]() |
fb65436e06 | ||
![]() |
63c715b7d7 | ||
![]() |
1cdde11877 | ||
![]() |
8120345c89 | ||
![]() |
7a6148290f | ||
![]() |
c6ee62af2e | ||
![]() |
46b79d4716 | ||
![]() |
49eeb1f8ba | ||
![]() |
366c9c6a24 | ||
![]() |
920db2ecc0 | ||
![]() |
cc8006c48d | ||
![]() |
aa9023bbd0 | ||
![]() |
c9ac5bdba4 | ||
![]() |
ab6d97b7c8 | ||
![]() |
9138be341b | ||
![]() |
ce1f1f001e | ||
![]() |
805ed7a2d4 | ||
![]() |
2aebfb4aa9 | ||
![]() |
7f1f960d4f | ||
![]() |
59a68c83f0 | ||
![]() |
3bd304e5f4 | ||
![]() |
f0c578748b | ||
![]() |
2d7da9db8a | ||
![]() |
4356cb0709 | ||
![]() |
35d9f5ea52 | ||
![]() |
31439b6b8d | ||
![]() |
537c66660e | ||
![]() |
ac944e2b36 | ||
![]() |
ba980b8f0c | ||
![]() |
27e548af25 | ||
![]() |
92b2128a75 | ||
![]() |
6159bad8a9 | ||
![]() |
3285bf0d4c | ||
![]() |
4edbb4da81 | ||
![]() |
9a774b9156 | ||
![]() |
671661849a | ||
![]() |
438a518611 | ||
![]() |
8fb49b8b94 | ||
![]() |
144b348e07 | ||
![]() |
1a0d7a7481 | ||
![]() |
866fdf6f8f | ||
![]() |
6f8257e437 | ||
![]() |
269b753496 | ||
![]() |
2b814cde29 | ||
![]() |
893b8113f0 | ||
![]() |
7ec2bd28c7 | ||
![]() |
70d10da35c | ||
![]() |
064f992187 | ||
![]() |
46f1106a3f | ||
![]() |
a7fe3414e5 | ||
![]() |
ce4b632dd7 | ||
![]() |
6b0d1bd75b | ||
![]() |
2a4f0f5aee | ||
![]() |
7dacc4d5aa | ||
![]() |
da109d3e6e | ||
![]() |
f9348b77da | ||
![]() |
2ea11e2235 | ||
![]() |
b60316f4ee | ||
![]() |
050ce505e4 | ||
![]() |
2a23247420 | ||
![]() |
6b241f3786 | ||
![]() |
b3521c60af | ||
![]() |
6beae586d6 | ||
![]() |
bdbbcaa457 | ||
![]() |
abb8d4a71f | ||
![]() |
c993ae4c67 | ||
![]() |
6abf8c1e91 | ||
![]() |
0dfe422e9f | ||
![]() |
71b9b5e16e | ||
![]() |
9f9f8d8e63 | ||
![]() |
437b24a958 | ||
![]() |
2ed5a70bca | ||
![]() |
85f866dea3 | ||
![]() |
2fff013a69 | ||
![]() |
acfd50ae0b | ||
![]() |
8fc13a8704 | ||
![]() |
1460b3ce78 | ||
![]() |
e1088f99d4 | ||
![]() |
d65b3ebf00 | ||
![]() |
a3d1a35b98 | ||
![]() |
9c1dc4d13d | ||
![]() |
e755fb79ba | ||
![]() |
f79c85e22d | ||
![]() |
53d2188fa5 | ||
![]() |
f2294569cf | ||
![]() |
1547b335e4 | ||
![]() |
b2ef6edbe8 | ||
![]() |
5a6ea1822b | ||
![]() |
22ad62c25e | ||
![]() |
71475b064f | ||
![]() |
ee9d6d7bf2 | ||
![]() |
f8e5fa92b0 | ||
![]() |
c81516e943 | ||
![]() |
0b7bc40de1 | ||
![]() |
82414985c1 | ||
![]() |
c0616f1017 | ||
![]() |
c741d1e392 | ||
![]() |
ad9e42a877 | ||
![]() |
d7f77bf271 | ||
![]() |
f135775ad4 | ||
![]() |
afc6c595bf | ||
![]() |
e6c5bf46c4 | ||
![]() |
8be5c147d5 | ||
![]() |
f7abe3c419 | ||
![]() |
82097c2108 | ||
![]() |
e519af8b49 | ||
![]() |
efc96c9d59 | ||
![]() |
aab24fa1b3 | ||
![]() |
efa9c2e920 | ||
![]() |
c22ef3b2e3 | ||
![]() |
66fede80d2 | ||
![]() |
59fa76e164 | ||
![]() |
70fda1837d | ||
![]() |
aeb26da4cb | ||
![]() |
cd0ea2a7f5 | ||
![]() |
9923515ff4 | ||
![]() |
61bfdb0cb0 | ||
![]() |
9db8cff6ef | ||
![]() |
b445aade83 | ||
![]() |
3c152a8ef7 | ||
![]() |
5a0b7e9c29 | ||
![]() |
b126f80710 | ||
![]() |
3c761b5135 | ||
![]() |
07b8803110 | ||
![]() |
32f465a66b | ||
![]() |
074e2eaab0 | ||
![]() |
790fef342b | ||
![]() |
8a5732fcb3 | ||
![]() |
77c3a39299 | ||
![]() |
8cfdb5436d | ||
![]() |
f6036c0aeb | ||
![]() |
689e06516b | ||
![]() |
33de006e12 | ||
![]() |
9b5488054b | ||
![]() |
04c016d79f | ||
![]() |
b8ca9108ac | ||
![]() |
e56f79c0c6 | ||
![]() |
12222e6fbd | ||
![]() |
9b65ad49d3 | ||
![]() |
3f991d5092 | ||
![]() |
b422bc1181 | ||
![]() |
6fc5119423 | ||
![]() |
0a158f3506 | ||
![]() |
50d7a85154 | ||
![]() |
2733482d8e | ||
![]() |
3d57708c91 | ||
![]() |
abccfd7968 | ||
![]() |
823ef44f01 | ||
![]() |
d72cda543c | ||
![]() |
3c67eeca51 | ||
![]() |
b60656ecdc | ||
![]() |
c64655d058 | ||
![]() |
8b7b99c1db | ||
![]() |
62c027d4df | ||
![]() |
e9e9801a84 | ||
![]() |
0c2388cdae | ||
![]() |
9cb84c4cb9 | ||
![]() |
8c542ad9df | ||
![]() |
2abaf81e0f | ||
![]() |
ad0245bb96 | ||
![]() |
1f974dd2a9 | ||
![]() |
3ec225dd41 | ||
![]() |
36bd1bbd54 | ||
![]() |
0406deb1ca | ||
![]() |
5f5f98a1a9 | ||
![]() |
f10c6bb603 | ||
![]() |
f16427e58e | ||
![]() |
6aff792b66 | ||
![]() |
ed8840a36f | ||
![]() |
efdb24e54b | ||
![]() |
1f20bc1e85 | ||
![]() |
bbab57105b | ||
![]() |
a1a81cc2ac | ||
![]() |
c3a1d8424c | ||
![]() |
eda0f47f46 | ||
![]() |
3848c73ab4 | ||
![]() |
dd8db8105c | ||
![]() |
763c77e628 | ||
![]() |
840af2eda6 | ||
![]() |
8a354b41e9 | ||
![]() |
0fe598d2f6 | ||
![]() |
cbf8c64b58 | ||
![]() |
6a42bc1c8e | ||
![]() |
9e32b6f1ad | ||
![]() |
cc0e959722 | ||
![]() |
403422674d | ||
![]() |
bfb0abe4d9 | ||
![]() |
081e6751ab | ||
![]() |
103f8346e3 | ||
![]() |
723b2d9f2e | ||
![]() |
b7ea74c97d | ||
![]() |
8c3fdb0ac1 | ||
![]() |
a37d483651 | ||
![]() |
3796518809 | ||
![]() |
8ca01083d6 | ||
![]() |
cd03aaf7bf | ||
![]() |
c4bd411c35 | ||
![]() |
2224c8ea7b | ||
![]() |
e2bb5e7512 | ||
![]() |
d6e13b2acd | ||
![]() |
c2e2cd2ec5 | ||
![]() |
c3f209178b | ||
![]() |
dbe3e0c43e | ||
![]() |
2f753e260c | ||
![]() |
f5d5f5ae0e | ||
![]() |
3676fd324a | ||
![]() |
28c0f8895e | ||
![]() |
87378bc21d | ||
![]() |
6c6f7d105a | ||
![]() |
6842c58adc | ||
![]() |
a6fc80300f | ||
![]() |
5e8b45c436 | ||
![]() |
6dd99ca9c8 | ||
![]() |
52ee167644 | ||
![]() |
eb6767273a | ||
![]() |
9f734b13f4 | ||
![]() |
3cec1a16f5 | ||
![]() |
50bd1abdb1 | ||
![]() |
2dd5630eae | ||
![]() |
b9155ce3fd | ||
![]() |
2c0aee56a0 | ||
![]() |
301f7a1429 | ||
![]() |
386707c6d1 | ||
![]() |
216387f6f7 | ||
![]() |
b9e811fa99 | ||
![]() |
cdbb8ec7aa | ||
![]() |
72fa126446 | ||
![]() |
5df8e982e2 | ||
![]() |
a40189cf88 | ||
![]() |
8da8257d0b | ||
![]() |
27e8b99287 | ||
![]() |
62a56d4fcc | ||
![]() |
3342fafa60 | ||
![]() |
3f0f1d5579 | ||
![]() |
dcefbc7dcd | ||
![]() |
1f0221fad7 | ||
![]() |
a627bd26a3 | ||
![]() |
82ae623ec9 | ||
![]() |
9c0d5c77bf | ||
![]() |
8439534daa | ||
![]() |
70d122aac4 | ||
![]() |
0a882b5787 | ||
![]() |
fef895aa28 | ||
![]() |
43b4141839 | ||
![]() |
6a94d14567 | ||
![]() |
0e13545712 | ||
![]() |
eddf902320 | ||
![]() |
85acd919b9 | ||
![]() |
e79085a172 | ||
![]() |
81a65de25d | ||
![]() |
702a07e716 | ||
![]() |
7b2224cb6e | ||
![]() |
ee7967eea4 | ||
![]() |
a54a0562c5 | ||
![]() |
94429a335b | ||
![]() |
1ceaa83a84 | ||
![]() |
b66ed71131 | ||
![]() |
7734cda20c | ||
![]() |
2fc5ddff18 | ||
![]() |
8033c96f32 | ||
![]() |
d3d1baadb4 | ||
![]() |
a294c1bcb6 | ||
![]() |
ceb327789b | ||
![]() |
1ef8882814 | ||
![]() |
58eedced25 | ||
![]() |
1d89a5db66 | ||
![]() |
43446b735d | ||
![]() |
6c059f8f5b | ||
![]() |
f5d48df418 | ||
![]() |
9730362202 | ||
![]() |
7cb7afb43d | ||
![]() |
1bd4214a42 | ||
![]() |
6d55a14c58 | ||
![]() |
8440326590 | ||
![]() |
b729fff4a3 | ||
![]() |
c36c09f004 | ||
![]() |
a873893279 | ||
![]() |
47f18784e4 | ||
![]() |
d4fb621429 | ||
![]() |
fb6312a9f9 | ||
![]() |
ddc842bf06 | ||
![]() |
46924bd877 | ||
![]() |
8da397423e | ||
![]() |
7292c861b1 | ||
![]() |
c1effe1bbf | ||
![]() |
f8110669f0 | ||
![]() |
fbff8986e7 | ||
![]() |
8c552ddf5b | ||
![]() |
b363e01e6b | ||
![]() |
0a181e1665 | ||
![]() |
e4b59e5583 | ||
![]() |
35cbe7640b | ||
![]() |
eb5cdf0c64 | ||
![]() |
0c29ab2b31 | ||
![]() |
5a8b04137f | ||
![]() |
87c14c528a | ||
![]() |
5756fcab2f | ||
![]() |
047737496a | ||
![]() |
b9c62013ef | ||
![]() |
287fb89248 | ||
![]() |
2b667e4923 | ||
![]() |
070a616b82 | ||
![]() |
da7a1e79af | ||
![]() |
eed640dbe8 | ||
![]() |
d55c4f32fc | ||
![]() |
238e7646a8 | ||
![]() |
d21eae44e7 | ||
![]() |
1cc02f0395 | ||
![]() |
a710317d2f | ||
![]() |
339ef1ec97 | ||
![]() |
0e60f06b7c | ||
![]() |
a066d49b01 | ||
![]() |
05f3788b7a | ||
![]() |
90e288241d | ||
![]() |
fca68966b2 | ||
![]() |
a4f7ea0d11 | ||
![]() |
41db297e63 | ||
![]() |
0da9cf38cd | ||
![]() |
d14caad2e9 | ||
![]() |
c2ac10b502 | ||
![]() |
c86cf4b7e4 | ||
![]() |
981560ae60 | ||
![]() |
d5a80e0944 | ||
![]() |
5a13159bfc | ||
![]() |
ae1b45a046 | ||
![]() |
187694b9ec | ||
![]() |
3484a760f4 | ||
![]() |
715423c8d6 | ||
![]() |
d57dc304c4 | ||
![]() |
8a2033d77f | ||
![]() |
932d7ac5e9 | ||
![]() |
f9accb9df2 | ||
![]() |
7a4e497b62 | ||
![]() |
0207529f27 | ||
![]() |
a08f60352c | ||
![]() |
0bddb27e75 | ||
![]() |
a67ddd4b9f | ||
![]() |
a7e9d7bfc2 | ||
![]() |
28c3a2f9f9 | ||
![]() |
df0773c1b9 | ||
![]() |
902dbe619e | ||
![]() |
0f59bbb5b6 | ||
![]() |
9ca5f1bdc8 | ||
![]() |
9f01d0d665 | ||
![]() |
da544d7d3e | ||
![]() |
ea8d0b9408 | ||
![]() |
9287447cef | ||
![]() |
d35a3a826e | ||
![]() |
e23fedc9de | ||
![]() |
cd3f5bb507 | ||
![]() |
b0270a9e47 | ||
![]() |
52cbf46f30 | ||
![]() |
d61b42c81d | ||
![]() |
8fd9c16642 | ||
![]() |
e22ea758e4 | ||
![]() |
f22c0ac2a5 | ||
![]() |
4f547b7177 | ||
![]() |
c4fe32016c | ||
![]() |
1be5c22e5c | ||
![]() |
956c0599e6 | ||
![]() |
97c8fbb949 | ||
![]() |
a50ce74850 | ||
![]() |
8973ee17bb | ||
![]() |
2e31b96a5a | ||
![]() |
0222124801 | ||
![]() |
61b23d59b1 | ||
![]() |
cc1fa5df3a | ||
![]() |
cc5664ddad | ||
![]() |
e209df47c4 | ||
![]() |
585f8b49b5 | ||
![]() |
4491fa237f | ||
![]() |
59d3ef11ed | ||
![]() |
6bc7fc80da | ||
![]() |
5b03469a93 | ||
![]() |
f5b9abde98 | ||
![]() |
340c9b237b | ||
![]() |
fb2bd00859 | ||
![]() |
5109688803 | ||
![]() |
8fdd2fcef6 | ||
![]() |
e7625063dc | ||
![]() |
24f40e321c | ||
![]() |
0bb898a885 | ||
![]() |
61a2d8a2a7 | ||
![]() |
af96543688 | ||
![]() |
34f5449736 | ||
![]() |
484a48e221 | ||
![]() |
cc5226bf2a | ||
![]() |
8fbb563f4e | ||
![]() |
65e6d5a34f | ||
![]() |
47be2e7c3a | ||
![]() |
4d694dadd8 | ||
![]() |
59397f985e | ||
![]() |
cc1d4d0dbc | ||
![]() |
070434c045 | ||
![]() |
0dc882d7c3 | ||
![]() |
c3ac9a507a | ||
![]() |
a6afebc718 | ||
![]() |
d41915dc2a | ||
![]() |
5a5ad7a5fa | ||
![]() |
9dad5e37ae | ||
![]() |
adde7b5c1e | ||
![]() |
3bdde42e40 | ||
![]() |
6b4dee12f5 | ||
![]() |
355b90387b | ||
![]() |
f512ca7625 | ||
![]() |
16ee3e9870 | ||
![]() |
c8444775b1 | ||
![]() |
784d80b509 | ||
![]() |
98aacb16c3 | ||
![]() |
8a35e25852 | ||
![]() |
97eb073189 | ||
![]() |
28534bd47a | ||
![]() |
2053a26873 | ||
![]() |
736a230890 | ||
![]() |
3926448598 | ||
![]() |
11130874d4 | ||
![]() |
ef5a57119a | ||
![]() |
31f4e52842 | ||
![]() |
0e1aad158a | ||
![]() |
5f5d6d637b | ||
![]() |
a2336bcf05 | ||
![]() |
20e6003290 | ||
![]() |
54c633b810 | ||
![]() |
f0c2cc32b1 | ||
![]() |
8709982e22 | ||
![]() |
686d45dcfd | ||
![]() |
8502e1ff25 | ||
![]() |
603c9fd959 | ||
![]() |
86946fdc03 | ||
![]() |
af4c99b21a | ||
![]() |
97d2d68428 | ||
![]() |
ce5d7cb7aa | ||
![]() |
c4ff4e7167 | ||
![]() |
b94d24eb25 | ||
![]() |
379d0160ea | ||
![]() |
23c2ea38a6 | ||
![]() |
d486eb18c5 | ||
![]() |
a10d488a32 | ||
![]() |
25d754e86d | ||
![]() |
bba85637d7 | ||
![]() |
94c3a45f4c | ||
![]() |
221be3def1 | ||
![]() |
1daf8980dd | ||
![]() |
5945408a93 | ||
![]() |
9a8c568e3c | ||
![]() |
fb05477e11 | ||
![]() |
df68ef4d5e | ||
![]() |
d857ed275e | ||
![]() |
14181b7f48 | ||
![]() |
6916ec5fa9 | ||
![]() |
acb4822f6b | ||
![]() |
79fb836d66 | ||
![]() |
010110a0be | ||
![]() |
756f873a25 | ||
![]() |
e2d740ae04 | ||
![]() |
ff244b6181 | ||
![]() |
d3494d172c | ||
![]() |
2922c07e67 | ||
![]() |
c03a949a0d | ||
![]() |
377e3ca5e6 | ||
![]() |
f320728911 | ||
![]() |
b4a5d88e0a | ||
![]() |
7ea0b3b9e2 | ||
![]() |
aa3725c860 | ||
![]() |
8aa84c7fce | ||
![]() |
453ceae85f | ||
![]() |
1f5a0b9fa6 | ||
![]() |
820a8d1de9 | ||
![]() |
6bb02b28a1 | ||
![]() |
60ba227d57 | ||
![]() |
175e21f5e1 | ||
![]() |
97db6709e4 | ||
![]() |
c0fc0dfc45 | ||
![]() |
f3eadd1737 | ||
![]() |
c4ec48281c | ||
![]() |
1a006390d9 | ||
![]() |
953f265513 | ||
![]() |
468877578a | ||
![]() |
ff14eeb4f2 | ||
![]() |
5f3eabf4cd | ||
![]() |
bbc70d2471 | ||
![]() |
a0cafa3d0b | ||
![]() |
58219ca22f | ||
![]() |
50b28f3bf2 | ||
![]() |
0f8345abf7 | ||
![]() |
4f213e08aa | ||
![]() |
8493de3cee | ||
![]() |
fee6e7428f | ||
![]() |
d10616d364 | ||
![]() |
85d143a273 | ||
![]() |
6e72bc46d3 | ||
![]() |
b8eed1d830 | ||
![]() |
a64ecdfa5b | ||
![]() |
bcfc0ce5f6 | ||
![]() |
8bc0719dde | ||
![]() |
185cd6c058 | ||
![]() |
afb77541b4 | ||
![]() |
c4a5c2de26 | ||
![]() |
87bc4b08ff | ||
![]() |
65cdb3dfa8 | ||
![]() |
cc411ae004 | ||
![]() |
f521b99b09 | ||
![]() |
b08f330d62 | ||
![]() |
41ffb1c950 | ||
![]() |
ebe3ea3204 | ||
![]() |
d94c4516c6 | ||
![]() |
b0f8d9bb97 | ||
![]() |
04dfe7b3f6 | ||
![]() |
547afcfc74 | ||
![]() |
48afdb4eef | ||
![]() |
9ee96e3ba9 | ||
![]() |
0311f5412e | ||
![]() |
e734eba51e | ||
![]() |
7ed40716cb | ||
![]() |
155889b318 | ||
![]() |
4dd011f6d0 | ||
![]() |
e45a5d3a32 | ||
![]() |
80a1050237 | ||
![]() |
54592bba4d | ||
![]() |
902d4d109a | ||
![]() |
d8daacf157 | ||
![]() |
0da5bcb414 | ||
![]() |
ac6555fa3c | ||
![]() |
2af7ef63c3 | ||
![]() |
6da5b35fca | ||
![]() |
abd68eb92b | ||
![]() |
bf451ffc9a | ||
![]() |
be734f5592 | ||
![]() |
9f0c080847 | ||
![]() |
3a1ba773b0 | ||
![]() |
849a1ab845 | ||
![]() |
940de5ab02 | ||
![]() |
dd9578f379 | ||
![]() |
0ce807691b | ||
![]() |
4f8ea5eede | ||
![]() |
7869e676af | ||
![]() |
af0a726689 | ||
![]() |
8d9263fca6 | ||
![]() |
d6a0cbaade | ||
![]() |
2302a4d04f | ||
![]() |
8f9a2d08ea | ||
![]() |
30c73195b5 | ||
![]() |
097485195c | ||
![]() |
c5f6fa110a | ||
![]() |
90cfcecc09 | ||
![]() |
dee0e2ed0f | ||
![]() |
5ad9884ff1 | ||
![]() |
188eb6b426 | ||
![]() |
8361f64dbf | ||
![]() |
2a6227941e | ||
![]() |
a582b8f840 | ||
![]() |
5316f66005 | ||
![]() |
f86905457a | ||
![]() |
abb211c4e8 | ||
![]() |
bb56c39d16 | ||
![]() |
77237196c7 | ||
![]() |
a310a3b398 | ||
![]() |
e0f6c7d90b | ||
![]() |
a1587302aa | ||
![]() |
cc0bff446b | ||
![]() |
9b8ddff5b7 | ||
![]() |
ac4942e26b | ||
![]() |
2c55e3e917 | ||
![]() |
db082802c6 | ||
![]() |
b367fb5ac6 | ||
![]() |
e9ab2f8d94 | ||
![]() |
a845cca037 | ||
![]() |
3ab6ef0aa1 | ||
![]() |
198ed18b9e | ||
![]() |
9110473f93 | ||
![]() |
97313e0aab | ||
![]() |
8876e74e43 | ||
![]() |
510227e39e | ||
![]() |
7a1f214166 | ||
![]() |
5913dd10f1 | ||
![]() |
087ebd80da | ||
![]() |
bc9267e3a6 | ||
![]() |
a019c335c9 | ||
![]() |
ed49c8c1b6 | ||
![]() |
2a243fc074 | ||
![]() |
47045ce402 | ||
![]() |
d6e67586bf | ||
![]() |
6e9783bd25 | ||
![]() |
8dc3729522 | ||
![]() |
7aad4e7fb4 | ||
![]() |
930af7d50b | ||
![]() |
0f544f62d6 | ||
![]() |
398c212955 | ||
![]() |
2ec1fc60c3 | ||
![]() |
c01ee053b1 | ||
![]() |
b0baee5e36 | ||
![]() |
b55295cb12 | ||
![]() |
5928ee97ca | ||
![]() |
2445ad4331 | ||
![]() |
93d6d9d835 | ||
![]() |
d207e6a6ad | ||
![]() |
df6f3f404a | ||
![]() |
357c1c8c53 | ||
![]() |
44827ccad8 | ||
![]() |
0d1a2dd7a9 | ||
![]() |
471c9b47fe | ||
![]() |
23b9a2fda0 | ||
![]() |
7d6103ad6c | ||
![]() |
ec39f8f8d7 | ||
![]() |
a2cde53c87 | ||
![]() |
13714e87f2 | ||
![]() |
9101d75316 | ||
![]() |
233edbf415 | ||
![]() |
bd209f75fa | ||
![]() |
27854a478e | ||
![]() |
f12a87a96c | ||
![]() |
cb4358ddbb | ||
![]() |
c4819d78ba | ||
![]() |
0b721cd4c4 | ||
![]() |
b025757328 | ||
![]() |
4bd73b6947 | ||
![]() |
f3c42680db | ||
![]() |
c10066205d | ||
![]() |
21b7aaa428 | ||
![]() |
d7225fdfce | ||
![]() |
deb870c77d | ||
![]() |
c05538959b | ||
![]() |
f6c761dda1 | ||
![]() |
877b08d6d2 | ||
![]() |
a69064328b | ||
![]() |
01b9566e50 | ||
![]() |
ca3a100be6 | ||
![]() |
1655e4ddb0 | ||
![]() |
526f839764 | ||
![]() |
1a86bd2a09 | ||
![]() |
610e7b5bd6 | ||
![]() |
86f6c04d84 | ||
![]() |
fb3a1da4bb | ||
![]() |
525efcbb7b | ||
![]() |
ea4340e1ec | ||
![]() |
91f3864fbd | ||
![]() |
14fa704caf | ||
![]() |
ad1f8180a5 | ||
![]() |
e364f899af | ||
![]() |
40683870ea | ||
![]() |
7569d7c069 | ||
![]() |
c87ddbb3ce | ||
![]() |
793fedcf57 | ||
![]() |
74fd86a69e | ||
![]() |
f234091207 | ||
![]() |
772b72139a | ||
![]() |
6e6a844baf | ||
![]() |
2f2f80273b | ||
![]() |
353d8860ac | ||
![]() |
fab96cb72a | ||
![]() |
2203e41900 | ||
![]() |
e16f2bc5f7 | ||
![]() |
2381cf3269 | ||
![]() |
7e3a82cd9c | ||
![]() |
115817d118 | ||
![]() |
5cfea4fc98 | ||
![]() |
a87c870f99 | ||
![]() |
b9d671326b | ||
![]() |
8e4e070151 | ||
![]() |
4607e1386f | ||
![]() |
9686172872 | ||
![]() |
8563ac1664 | ||
![]() |
9a80a35f4b | ||
![]() |
4cde19b0c9 | ||
![]() |
230e8b436f | ||
![]() |
dbb86efac3 | ||
![]() |
e8d28e1b1c | ||
![]() |
a3a5d0d1f4 | ||
![]() |
4cf1ca4338 | ||
![]() |
f174f27096 | ||
![]() |
1a15762c59 | ||
![]() |
fec6a4ca4e | ||
![]() |
bcc878bb81 | ||
![]() |
df61a00acc | ||
![]() |
878fea5403 | ||
![]() |
804cc98cd1 | ||
![]() |
6e00020a9f | ||
![]() |
2aac9a1fa3 | ||
![]() |
5aa8676122 | ||
![]() |
ea88d94dcf | ||
![]() |
eaa1b0a5f2 | ||
![]() |
de5c932283 | ||
![]() |
3b673e0fb0 | ||
![]() |
83b84d65c2 | ||
![]() |
c31e04e2f8 | ||
![]() |
a460e00574 | ||
![]() |
c593d488f9 | ||
![]() |
44a7c89e02 | ||
![]() |
88bbbfa567 | ||
![]() |
e3f9ce59eb | ||
![]() |
12f0c2f580 | ||
![]() |
6099e57b07 | ||
![]() |
e53ecd35c0 | ||
![]() |
8397b45b20 | ||
![]() |
bcb1b414ed | ||
![]() |
bef02a89ea | ||
![]() |
1aae1bf9fd | ||
![]() |
078f2aecfb | ||
![]() |
c87f913eb9 | ||
![]() |
a5fc3eb9d4 | ||
![]() |
780dc06584 | ||
![]() |
365cddf35f | ||
![]() |
c099ea497a | ||
![]() |
336b43d278 | ||
![]() |
08e585d948 | ||
![]() |
7aacd895ee | ||
![]() |
3130af0e2b | ||
![]() |
02a58af3c0 | ||
![]() |
86645a3f19 | ||
![]() |
edc3994cfd | ||
![]() |
71f29b701d | ||
![]() |
b4b853b4c5 | ||
![]() |
d5483f3352 | ||
![]() |
2522de8594 | ||
![]() |
e5e60564cf | ||
![]() |
bf2dabe6f1 | ||
![]() |
70c873bcac | ||
![]() |
5aabf5b8eb | ||
![]() |
20e82ae2a2 | ||
![]() |
e890cb118c | ||
![]() |
275d1aa94e | ||
![]() |
f748fda0ed | ||
![]() |
87480bf6d4 | ||
![]() |
bd6f1edea8 | ||
![]() |
ed4c9fc4e9 | ||
![]() |
8f8be84024 | ||
![]() |
ead562ed05 | ||
![]() |
8cf8726c7c | ||
![]() |
b83df4e711 | ||
![]() |
7e64470a71 | ||
![]() |
fd3d717df5 | ||
![]() |
d4ebb803fa | ||
![]() |
5d276731e6 | ||
![]() |
6dcfbc479d | ||
![]() |
d8bf20d9ac | ||
![]() |
38453101f0 | ||
![]() |
8e46375186 | ||
![]() |
c75d7fb32e | ||
![]() |
6e0cf087ad | ||
![]() |
af9a41d770 | ||
![]() |
d6dc43db7d | ||
![]() |
4c49647788 | ||
![]() |
3de7bde0e1 | ||
![]() |
dc38e24fed | ||
![]() |
a61724c004 | ||
![]() |
29b738b4e6 | ||
![]() |
602d314ba0 | ||
![]() |
a68974409c | ||
![]() |
5d67107c79 | ||
![]() |
da9b591621 | ||
![]() |
2e8aa25844 | ||
![]() |
6611322a8b | ||
![]() |
948c6ee88d | ||
![]() |
b7a9d80f28 | ||
![]() |
277f6fbe49 | ||
![]() |
e05080f5a8 | ||
![]() |
4de250dd75 | ||
![]() |
8f2f7f431c | ||
![]() |
4f67b78853 | ||
![]() |
4b14b35208 | ||
![]() |
bc2ab12f99 | ||
![]() |
c3166b2a48 | ||
![]() |
1eef1e5b2f | ||
![]() |
8191965555 | ||
![]() |
f1c9244dfd | ||
![]() |
58155a9921 | ||
![]() |
5d398a69fb | ||
![]() |
4560de58f4 | ||
![]() |
7f9f605781 | ||
![]() |
41cad5fbed | ||
![]() |
e4f15b0f0e | ||
![]() |
d4e3ef6eae | ||
![]() |
eda90ace80 | ||
![]() |
0c127348e1 | ||
![]() |
eb6b59af64 | ||
![]() |
11066e33f8 | ||
![]() |
51a32d64d8 | ||
![]() |
77a9f59487 | ||
![]() |
1814c4e45b | ||
![]() |
722f5fd8d4 | ||
![]() |
e9c8dcf96c | ||
![]() |
89e0d95883 | ||
![]() |
aeb9906717 | ||
![]() |
368971ec8b | ||
![]() |
0112826daf | ||
![]() |
9023e8f7bb | ||
![]() |
48fac4e8ce | ||
![]() |
edeccce619 | ||
![]() |
60668aa210 | ||
![]() |
455e8a4281 | ||
![]() |
5d7fe7a718 | ||
![]() |
64ca95e375 | ||
![]() |
837eecbc91 | ||
![]() |
26cc10a00c | ||
![]() |
f12abe957d | ||
![]() |
caaf688582 | ||
![]() |
3dfd0cd62a | ||
![]() |
18bd86f154 | ||
![]() |
338f465019 | ||
![]() |
ac13f5e6f9 | ||
![]() |
1b6f6d80ea | ||
![]() |
18b078414a | ||
![]() |
f6ce318061 | ||
![]() |
a21c94e3dc | ||
![]() |
38b92d56e7 | ||
![]() |
a08d95b971 | ||
![]() |
339416b38b | ||
![]() |
7e2f07486a | ||
![]() |
a3e569cdda | ||
![]() |
d68d8d82e6 | ||
![]() |
997b4a544d | ||
![]() |
176d2b622e | ||
![]() |
3a9ab23713 | ||
![]() |
9e88fcd58c | ||
![]() |
39ffc1c3c7 | ||
![]() |
69d0e44295 | ||
![]() |
d2d5e540ac | ||
![]() |
d7bd2d2b2c | ||
![]() |
ddf5fc8a42 | ||
![]() |
0841c63e0d | ||
![]() |
a4d439b975 | ||
![]() |
8de509a837 | ||
![]() |
219760639a | ||
![]() |
38ed8795ab | ||
![]() |
55697d7dc9 | ||
![]() |
a7fb782aea | ||
![]() |
d91c64e428 | ||
![]() |
4aa911abc6 | ||
![]() |
64c72bb919 | ||
![]() |
fec191d3cc | ||
![]() |
7430bcbc44 | ||
![]() |
eba11d2ba5 | ||
![]() |
a3a724f805 | ||
![]() |
a770d71890 | ||
![]() |
1de866cd09 | ||
![]() |
54380f53a2 | ||
![]() |
7d870524d3 | ||
![]() |
d28aad9a58 | ||
![]() |
8be63adbc8 | ||
![]() |
7d8f352e0a | ||
![]() |
587382c0ba | ||
![]() |
0f714ca6bc | ||
![]() |
63da1df6fe | ||
![]() |
bbe589da44 | ||
![]() |
b278e91338 | ||
![]() |
f2609e133d | ||
![]() |
e14fdbbddb | ||
![]() |
a162155919 | ||
![]() |
4d7ae382a8 | ||
![]() |
0c86eb2dc7 | ||
![]() |
70c2db8b9f | ||
![]() |
c1dd118d2c | ||
![]() |
2d21d91abd | ||
![]() |
e5ee05dc0d | ||
![]() |
c0d53e176b | ||
![]() |
b26d188190 | ||
![]() |
0a6382e2af | ||
![]() |
1214d8cd26 | ||
![]() |
65a30ab0a2 | ||
![]() |
61616abef2 | ||
![]() |
bb1fcd1ba8 | ||
![]() |
6d65121993 | ||
![]() |
ecf0bffb79 | ||
![]() |
af2ea0a1f2 | ||
![]() |
286467db82 | ||
![]() |
6b60a31ebf | ||
![]() |
54028e5943 | ||
![]() |
0c062e839d | ||
![]() |
0fcbf05b6d | ||
![]() |
f4276c36c9 | ||
![]() |
ba05bddf92 | ||
![]() |
7a63d75a83 | ||
![]() |
da3f74a70e | ||
![]() |
5f26656fc5 | ||
![]() |
2f76e90d1a | ||
![]() |
1296329f02 | ||
![]() |
e38b432846 | ||
![]() |
549a5101e7 | ||
![]() |
031a8648cb | ||
![]() |
a8476a8404 | ||
![]() |
25c8491fc8 | ||
![]() |
d0d637dd47 | ||
![]() |
977c6bd44c | ||
![]() |
89ad3aa168 | ||
![]() |
55b921dab2 | ||
![]() |
92d0fe938f | ||
![]() |
d07e9b03c4 | ||
![]() |
6cbd1cba68 | ||
![]() |
3b8df1f143 | ||
![]() |
85f7d0a8d5 | ||
![]() |
556450a2ff | ||
![]() |
6048b12510 | ||
![]() |
8cafc1e1ac | ||
![]() |
51807d7608 | ||
![]() |
e104df5bb7 | ||
![]() |
c6df7e5899 | ||
![]() |
d0a4300dde | ||
![]() |
d8865433f9 | ||
![]() |
9c2bd642ba | ||
![]() |
09883db208 | ||
![]() |
f7f68f7160 | ||
![]() |
31f744a8c0 | ||
![]() |
bc66c96275 | ||
![]() |
87c2acdeae | ||
![]() |
6b90023764 | ||
![]() |
e502bca962 | ||
![]() |
c4d44b72e8 | ||
![]() |
e7324bb94f | ||
![]() |
8431b2c190 | ||
![]() |
7d376ccd8c | ||
![]() |
382410249d | ||
![]() |
bfb5132362 | ||
![]() |
4489dbc630 | ||
![]() |
5c31bc8ffc | ||
![]() |
baee5f46cf | ||
![]() |
66ab7ffa15 | ||
![]() |
32df7eb346 | ||
![]() |
576b532b45 | ||
![]() |
b520414d5a | ||
![]() |
b54fd5c588 | ||
![]() |
d9b4c01719 | ||
![]() |
84d5d968a6 | ||
![]() |
9c8717e42f | ||
![]() |
3215e97b17 | ||
![]() |
975e721432 | ||
![]() |
b8bccdd081 | ||
![]() |
4310a4d813 | ||
![]() |
b96b342561 | ||
![]() |
eb1cd11d57 | ||
![]() |
a55c72890d | ||
![]() |
247e230581 | ||
![]() |
1586ea6fe9 | ||
![]() |
ae505c50b0 | ||
![]() |
fce1b4b1fb | ||
![]() |
c6bcbf4951 | ||
![]() |
6ed6086da5 | ||
![]() |
9f7b16ad19 | ||
![]() |
fc70a92071 | ||
![]() |
ccaaab2898 | ||
![]() |
8d36e630f2 | ||
![]() |
eb1f347bca | ||
![]() |
7db798186c | ||
![]() |
a1cd94bfbb | ||
![]() |
d9d2a6f6d9 | ||
![]() |
b8c4b82d18 | ||
![]() |
b8f615d7a1 | ||
![]() |
35d97eb5c5 | ||
![]() |
fc15b2e479 | ||
![]() |
936df0d290 | ||
![]() |
3236beddf8 | ||
![]() |
c13f8f10e6 | ||
![]() |
d8b530b93c | ||
![]() |
2296f211e8 | ||
![]() |
a5136b8863 | ||
![]() |
913bc38217 | ||
![]() |
4b7dca3d2c | ||
![]() |
5c58e3ee31 | ||
![]() |
49f304bd07 | ||
![]() |
c95be42221 | ||
![]() |
dbc07e13bb | ||
![]() |
5ca40ebc22 | ||
![]() |
a8e07274ae | ||
![]() |
af99dba018 | ||
![]() |
03dfa028d2 | ||
![]() |
541b47ac2a | ||
![]() |
507a35a9be | ||
![]() |
1eddb5463e | ||
![]() |
d91769efd4 | ||
![]() |
134a8eb272 | ||
![]() |
930be98598 | ||
![]() |
28e3cb3e93 | ||
![]() |
6328671ef8 | ||
![]() |
fab1959d00 | ||
![]() |
5ab788cd84 | ||
![]() |
ce2a6d3739 | ||
![]() |
40dd10dfb2 | ||
![]() |
e41076e082 | ||
![]() |
582fec4e11 | ||
![]() |
42ae02aa08 | ||
![]() |
79e3fc64c4 | ||
![]() |
b188d671d1 | ||
![]() |
5ecf1b53ea | ||
![]() |
0636311d37 | ||
![]() |
219d3b449f | ||
![]() |
22eaa89c5a | ||
![]() |
79e28a4c2e | ||
![]() |
db05b1eb2b | ||
![]() |
d20666a228 | ||
![]() |
9cc7b03503 | ||
![]() |
b38f12d519 | ||
![]() |
e736f1ead9 | ||
![]() |
b56c1f6023 | ||
![]() |
268f0d64fc | ||
![]() |
b3ea17736b | ||
![]() |
963daeaec5 | ||
![]() |
249bd44ebc | ||
![]() |
04a1b1c123 | ||
![]() |
3922e7afc3 | ||
![]() |
f0a97a0d80 | ||
![]() |
88713fd590 | ||
![]() |
394759e0c8 | ||
![]() |
c229f65dcf | ||
![]() |
f929861609 | ||
![]() |
f024ce7675 | ||
![]() |
f3fcf00392 | ||
![]() |
08313ef870 | ||
![]() |
911c469d69 | ||
![]() |
07c089ee04 | ||
![]() |
dadc944810 | ||
![]() |
80663032a9 | ||
![]() |
67c75ee7f0 | ||
![]() |
62626737a5 | ||
![]() |
e404eed318 | ||
![]() |
3c115428ea | ||
![]() |
db40ca4aca | ||
![]() |
f456d0d6bb | ||
![]() |
06fe17eb9f | ||
![]() |
7945bdb88f | ||
![]() |
f7794ec181 | ||
![]() |
16851b3eb3 | ||
![]() |
c72d8d4d29 | ||
![]() |
2b7436558e | ||
![]() |
e59c47d5b1 | ||
![]() |
c1523ad16d | ||
![]() |
d0be8e27de | ||
![]() |
5c66b81289 | ||
![]() |
1a42cb2013 | ||
![]() |
cf2978cbbb | ||
![]() |
8a9733e777 | ||
![]() |
ba880c5501 | ||
![]() |
788f962fbd | ||
![]() |
12f8283560 | ||
![]() |
4d27f6b77b | ||
![]() |
413ed28246 | ||
![]() |
ad084f559a | ||
![]() |
3832ab1c21 | ||
![]() |
999bceb413 | ||
![]() |
e8f6605642 | ||
![]() |
3148c65323 | ||
![]() |
0a3d2cc68b | ||
![]() |
11cf76edb3 | ||
![]() |
8833ad415c | ||
![]() |
bc290d8e6c | ||
![]() |
9c5b3a4060 | ||
![]() |
04bbba55c7 | ||
![]() |
40b70d5373 | ||
![]() |
833d32646e | ||
![]() |
6cdefb3cac | ||
![]() |
f959d3ee7a | ||
![]() |
b0952eabc7 | ||
![]() |
43bb4ba4bf | ||
![]() |
c2de22abeb | ||
![]() |
a0113ee049 | ||
![]() |
05db10fda3 | ||
![]() |
948ee23a2a | ||
![]() |
271a2931b6 | ||
![]() |
9fe05edd47 | ||
![]() |
c2573702cf | ||
![]() |
b8e76b586e | ||
![]() |
11a89964b9 | ||
![]() |
b5bfcbae59 | ||
![]() |
efe95a6953 | ||
![]() |
e88a5eca8b | ||
![]() |
2e3980e1de | ||
![]() |
0ff85c6923 | ||
![]() |
e3358d1839 | ||
![]() |
f5eac0c7fa | ||
![]() |
6034592a27 | ||
![]() |
7b00d826d3 | ||
![]() |
52ef3586b9 | ||
![]() |
4118fcdd14 | ||
![]() |
d9e18047d3 | ||
![]() |
734f320ade | ||
![]() |
79f25cdeb2 | ||
![]() |
413f3db617 | ||
![]() |
4db11d5143 | ||
![]() |
78d28c6b96 | ||
![]() |
24df7333a2 | ||
![]() |
8694cd8bf5 |
81
.appveyor.yml
Normal file
81
.appveyor.yml
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
version: 1.6.x-{build}
|
||||||
|
|
||||||
|
branches:
|
||||||
|
except:
|
||||||
|
- /libpng[0-1][0-8]/
|
||||||
|
- /v[0-1][.][0-8][.][0-9]+/
|
||||||
|
|
||||||
|
image:
|
||||||
|
- Visual Studio 2022
|
||||||
|
|
||||||
|
shallow_clone: true
|
||||||
|
|
||||||
|
environment:
|
||||||
|
matrix:
|
||||||
|
- TOOLCHAIN: vstudio
|
||||||
|
AUTOMATION: cmake
|
||||||
|
ARCH: x86
|
||||||
|
- TOOLCHAIN: vstudio
|
||||||
|
AUTOMATION: cmake
|
||||||
|
ARCH: x64
|
||||||
|
- TOOLCHAIN: vstudio
|
||||||
|
AUTOMATION: cmake
|
||||||
|
ARCH: arm64
|
||||||
|
- TOOLCHAIN: llvm
|
||||||
|
AUTOMATION: cmake
|
||||||
|
ARCH: x64
|
||||||
|
- TOOLCHAIN: msys2
|
||||||
|
AUTOMATION: cmake
|
||||||
|
ARCH: i686
|
||||||
|
- TOOLCHAIN: msys2
|
||||||
|
AUTOMATION: cmake
|
||||||
|
ARCH: x86_64
|
||||||
|
- TOOLCHAIN: msys2
|
||||||
|
AUTOMATION: configure
|
||||||
|
ARCH: i686
|
||||||
|
- TOOLCHAIN: msys2
|
||||||
|
AUTOMATION: configure
|
||||||
|
ARCH: x86_64
|
||||||
|
- TOOLCHAIN: msys2
|
||||||
|
AUTOMATION: makefiles
|
||||||
|
ARCH: i686
|
||||||
|
- TOOLCHAIN: msys2
|
||||||
|
AUTOMATION: makefiles
|
||||||
|
ARCH: x86_64
|
||||||
|
|
||||||
|
install:
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" C:\tools\vcpkg\vcpkg.exe install zlib:%ARCH%-windows'
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" C:\tools\vcpkg\vcpkg.exe integrate install'
|
||||||
|
- 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe install zlib:%ARCH%-windows'
|
||||||
|
- 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe integrate install'
|
||||||
|
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-ninja'
|
||||||
|
|
||||||
|
before_build:
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" set CI_CMAKE_GENERATOR=Visual Studio 17 2022'
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" set CI_CMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake'
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="x86" set CI_CMAKE_GENERATOR_PLATFORM=Win32'
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="x64" set CI_CMAKE_GENERATOR_PLATFORM=x64'
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="arm64" set CI_CMAKE_GENERATOR_PLATFORM=ARM64'
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="arm64" set CI_CMAKE_VARS=-DPNG_TESTS=0'
|
||||||
|
- 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_GENERATOR=Ninja'
|
||||||
|
- 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake'
|
||||||
|
- 'if "%TOOLCHAIN%"=="llvm" set CI_CC=clang'
|
||||||
|
- 'if "%TOOLCHAIN%"=="msys2" set CI_CMAKE_GENERATOR=Ninja'
|
||||||
|
- 'if "%TOOLCHAIN%"=="msys2" set CI_CC=gcc'
|
||||||
|
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="i686" set MSYSTEM=MINGW32'
|
||||||
|
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="x86_64" set MSYSTEM=MINGW64'
|
||||||
|
- 'set CI_CMAKE_BUILD_FLAGS=-j2'
|
||||||
|
- 'set CI_CTEST_FLAGS=-j2'
|
||||||
|
- 'set CI_MAKE_FLAGS=-j2'
|
||||||
|
- 'set CI_MAKEFILES=scripts/makefile.gcc scripts/makefile.msys scripts/makefile.std'
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"'
|
||||||
|
- 'if "%TOOLCHAIN%"=="llvm" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"'
|
||||||
|
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"'
|
||||||
|
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="configure" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_configure.sh"'
|
||||||
|
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="makefiles" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_makefiles.sh"'
|
||||||
|
|
||||||
|
cache:
|
||||||
|
- 'C:\tools\vcpkg\installed'
|
||||||
|
- 'C:\msys64\var\cache\pacman'
|
94
.cmake-format.yaml
Normal file
94
.cmake-format.yaml
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
# https://pypi.org/project/cmakelang
|
||||||
|
# https://github.com/cheshirekow/cmake_format
|
||||||
|
|
||||||
|
# ----------------------
|
||||||
|
# Options for formatting
|
||||||
|
# ----------------------
|
||||||
|
|
||||||
|
# How wide to allow formatted cmake files
|
||||||
|
# TODO: Reflow the CMake files to allow setting the maximum line width to 100.
|
||||||
|
line_width: 255
|
||||||
|
|
||||||
|
# How many spaces to tab for indent
|
||||||
|
tab_size: 2
|
||||||
|
|
||||||
|
# If true, lines are indented using tab characters (utf-8 0x09) instead of
|
||||||
|
# <tab_size> space characters (utf-8 0x20). In cases where the layout would
|
||||||
|
# require a fractional tab character, the behavior of the fractional
|
||||||
|
# indentation is governed by <fractional_tab_policy>
|
||||||
|
use_tabchars: false
|
||||||
|
|
||||||
|
# If <use_tabchars> is True, then the value of this variable indicates how
|
||||||
|
# fractional indentions are handled during whitespace replacement. If set to
|
||||||
|
# 'use-space', fractional indentation is left as spaces (utf-8 0x20). If set
|
||||||
|
# to `round-up` fractional indentation is replaced with a single tab character
|
||||||
|
# (utf-8 0x09) effectively shifting the column to the next tabstop
|
||||||
|
fractional_tab_policy: "use-space"
|
||||||
|
|
||||||
|
# Enable comment markup parsing and reflow
|
||||||
|
enable_markup: false
|
||||||
|
|
||||||
|
# -------------------
|
||||||
|
# Options for linting
|
||||||
|
# -------------------
|
||||||
|
|
||||||
|
# Lint codes to disable
|
||||||
|
disabled_codes: [
|
||||||
|
# TODO:
|
||||||
|
# Reconcile the CMake variable names with the patterns below, then
|
||||||
|
# re-enable the "invalid variable name XXX" messages.
|
||||||
|
"C0103",
|
||||||
|
|
||||||
|
# TODO:
|
||||||
|
# Add brief COMMENT arguments to the `add_custom_target` commands.
|
||||||
|
"C0113",
|
||||||
|
]
|
||||||
|
|
||||||
|
# Regular expression pattern describing valid function names
|
||||||
|
function_pattern: "[0-9a-z_]+"
|
||||||
|
|
||||||
|
# Regular expression pattern describing valid macro names
|
||||||
|
macro_pattern: "[0-9A-Z_]+"
|
||||||
|
|
||||||
|
# Regular expression pattern describing valid names for variables with global
|
||||||
|
# (cache) scope
|
||||||
|
global_var_pattern: "[A-Z][0-9A-Z_]+"
|
||||||
|
|
||||||
|
# Regular expression pattern describing valid names for variables with global
|
||||||
|
# scope (but internal semantic)
|
||||||
|
internal_var_pattern: "_[A-Z][0-9A-Z_]+"
|
||||||
|
|
||||||
|
# Regular expression pattern describing valid names for variables with local
|
||||||
|
# scope
|
||||||
|
local_var_pattern: "[a-z][a-z0-9_]+"
|
||||||
|
|
||||||
|
# Regular expression pattern describing valid names for privatedirectory
|
||||||
|
# variables
|
||||||
|
private_var_pattern: "_[0-9a-z_]+"
|
||||||
|
|
||||||
|
# Regular expression pattern describing valid names for public directory
|
||||||
|
# variables
|
||||||
|
public_var_pattern: "[A-Z][0-9A-Z_]+"
|
||||||
|
|
||||||
|
# Regular expression pattern describing valid names for function/macro
|
||||||
|
# arguments and loop variables.
|
||||||
|
argument_var_pattern: "[a-z][a-z0-9_]+"
|
||||||
|
|
||||||
|
# Regular expression pattern describing valid names for keywords used in
|
||||||
|
# functions or macros
|
||||||
|
keyword_pattern: "[A-Z][0-9A-Z_]+"
|
||||||
|
|
||||||
|
# In the heuristic for C0201, how many conditionals to match within a loop in
|
||||||
|
# before considering the loop a parser
|
||||||
|
max_conditionals_custom_parser: 2
|
||||||
|
|
||||||
|
# Require at least this many newlines between statements;
|
||||||
|
# require no more than this many newlines between statements;
|
||||||
|
# etc.
|
||||||
|
min_statement_spacing: 1
|
||||||
|
max_statement_spacing: 2
|
||||||
|
max_returns: 6
|
||||||
|
max_branches: 12
|
||||||
|
max_arguments: 5
|
||||||
|
max_localvars: 15
|
||||||
|
max_statements: 50
|
55
.editorconfig
Normal file
55
.editorconfig
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
# https://editorconfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.txt]
|
||||||
|
indent_size = unset
|
||||||
|
indent_style = space
|
||||||
|
|
||||||
|
[*.[chS]]
|
||||||
|
indent_size = 3
|
||||||
|
indent_style = space
|
||||||
|
max_doc_length = 80
|
||||||
|
max_line_length = 80
|
||||||
|
|
||||||
|
[*.dfa]
|
||||||
|
indent_size = 3
|
||||||
|
indent_style = space
|
||||||
|
max_doc_length = 80
|
||||||
|
max_line_length = 80
|
||||||
|
|
||||||
|
[*.awk]
|
||||||
|
indent_size = 3
|
||||||
|
indent_style = space
|
||||||
|
max_doc_length = 80
|
||||||
|
max_line_length = 100
|
||||||
|
|
||||||
|
[*.cmake]
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
max_doc_length = 80
|
||||||
|
max_line_length = 100
|
||||||
|
|
||||||
|
[*.sh]
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
max_doc_length = 100
|
||||||
|
max_line_length = 100
|
||||||
|
|
||||||
|
[{Makefile.in,aclocal.m4,ltmain.sh}]
|
||||||
|
indent_size = unset
|
||||||
|
indent_style = unset
|
||||||
|
insert_final_newline = unset
|
||||||
|
max_doc_length = unset
|
||||||
|
max_line_length = unset
|
||||||
|
trim_trailing_whitespace = unset
|
||||||
|
|
||||||
|
[COMMIT_EDITMSG]
|
||||||
|
indent_style = space
|
||||||
|
max_doc_length = unset
|
||||||
|
max_line_length = 72
|
9
.editorconfig-checker.json
Normal file
9
.editorconfig-checker.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"Disable": {
|
||||||
|
"IndentSize": true
|
||||||
|
},
|
||||||
|
"Exclude": [
|
||||||
|
".git/",
|
||||||
|
"out/"
|
||||||
|
]
|
||||||
|
}
|
31
.github/workflows/lint.yml
vendored
Normal file
31
.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
name: Linting libpng
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- libpng16
|
||||||
|
- libpng18
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- libpng16
|
||||||
|
- libpng18
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 5
|
||||||
|
steps:
|
||||||
|
- name: Set up the cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/pip.txt') }}
|
||||||
|
restore-keys: ${{ runner.os }}-pip-
|
||||||
|
- name: Install yamllint
|
||||||
|
run: pip install yamllint
|
||||||
|
- name: Install editorconfig-checker
|
||||||
|
uses: editorconfig-checker/action-editorconfig-checker@main
|
||||||
|
- name: Check out the code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Run the linting script
|
||||||
|
run: bash ./ci/ci_lint.sh
|
159
.gitignore
vendored
Normal file
159
.gitignore
vendored
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
# Prerequisites
|
||||||
|
*.d
|
||||||
|
|
||||||
|
# Precompiled headers
|
||||||
|
*.gch
|
||||||
|
*.pch
|
||||||
|
|
||||||
|
# Object files
|
||||||
|
*.slo
|
||||||
|
*.lo
|
||||||
|
*.o
|
||||||
|
*.obj
|
||||||
|
|
||||||
|
# Linker output files
|
||||||
|
*.exp
|
||||||
|
*.ilk
|
||||||
|
*.map
|
||||||
|
|
||||||
|
# Compiled dynamic libraries
|
||||||
|
*.dll
|
||||||
|
*.dylib
|
||||||
|
*.so
|
||||||
|
*.so.*
|
||||||
|
|
||||||
|
# Compiled static libraries
|
||||||
|
*.a
|
||||||
|
*.la
|
||||||
|
*.lai
|
||||||
|
*.lib
|
||||||
|
|
||||||
|
# Compiled executables
|
||||||
|
*.app/
|
||||||
|
*.exe
|
||||||
|
a.out
|
||||||
|
|
||||||
|
# Debug files
|
||||||
|
*.dSYM/
|
||||||
|
*.idb
|
||||||
|
*.pdb
|
||||||
|
*.su
|
||||||
|
|
||||||
|
# Tag files
|
||||||
|
TAGS
|
||||||
|
.TAGS
|
||||||
|
!TAGS/
|
||||||
|
tags
|
||||||
|
.tags
|
||||||
|
!tags/
|
||||||
|
gtags.files
|
||||||
|
GTAGS
|
||||||
|
GRTAGS
|
||||||
|
GPATH
|
||||||
|
GSYMS
|
||||||
|
cscope.files
|
||||||
|
cscope.out
|
||||||
|
cscope.*.out
|
||||||
|
|
||||||
|
# Text editing and text processing artifacts
|
||||||
|
\#*\#
|
||||||
|
.\#*
|
||||||
|
[._]*.sw[a-p]
|
||||||
|
[._]sw[a-p]
|
||||||
|
*.bak
|
||||||
|
*.orig
|
||||||
|
*.rej
|
||||||
|
*.tmp
|
||||||
|
*~
|
||||||
|
|
||||||
|
# IDE files and directories
|
||||||
|
## Eclipse
|
||||||
|
.cproject/
|
||||||
|
.project/
|
||||||
|
.settings/
|
||||||
|
## Embarcadero RAD Studio
|
||||||
|
*.cbproj.*
|
||||||
|
__recovery/
|
||||||
|
## JetBrains
|
||||||
|
.idea/
|
||||||
|
## NetBeans
|
||||||
|
nbbuild/
|
||||||
|
nbdist/
|
||||||
|
nbproject/
|
||||||
|
## Visual Studio
|
||||||
|
.vs/
|
||||||
|
### Visual Studio user files
|
||||||
|
*.rsuser
|
||||||
|
*.sln.docstates
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userprefs
|
||||||
|
### Visual Studio cache files (for older versions)
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.VC.db
|
||||||
|
*.VC.opendb
|
||||||
|
ipch/
|
||||||
|
## Visual Studio Code
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/extensions.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
## (Various)
|
||||||
|
*.*cache
|
||||||
|
*.cache*
|
||||||
|
[._]*_history
|
||||||
|
.history/
|
||||||
|
[Bb]ackup*/
|
||||||
|
|
||||||
|
# Build, test and CI output directories
|
||||||
|
*[Dd]ebug/
|
||||||
|
[Dd]ebug*/
|
||||||
|
*[Rr]elease/
|
||||||
|
[Rr]elease*/
|
||||||
|
[._]build*/
|
||||||
|
/[Bb]uild*/
|
||||||
|
/[Oo]ut/
|
||||||
|
|
||||||
|
# Libpng configuration and auxiliary build artifacts
|
||||||
|
*.out
|
||||||
|
*out.png
|
||||||
|
[._]deps/
|
||||||
|
[._]libs/
|
||||||
|
.dirstamp
|
||||||
|
/Makefile
|
||||||
|
/autom4te.cache/
|
||||||
|
/config*~
|
||||||
|
/config.h
|
||||||
|
/config.log
|
||||||
|
/config.status
|
||||||
|
/install*~
|
||||||
|
/libpng*-config
|
||||||
|
/libpng*.pc
|
||||||
|
/libpng.vers
|
||||||
|
/libtool
|
||||||
|
/stamp-h1
|
||||||
|
CMake*.json
|
||||||
|
!CMakePresets.json
|
||||||
|
CMakeLists.txt.*
|
||||||
|
pnglibconf.[ch]
|
||||||
|
pnglibconf.dfn
|
||||||
|
pnglibconf.pre
|
||||||
|
pngprefix.h
|
||||||
|
|
||||||
|
# Libpng test programs, scripts and artifacts
|
||||||
|
/test-suite.log
|
||||||
|
/tests/*.log
|
||||||
|
/tests/*.trs
|
||||||
|
/png-fix-itxt
|
||||||
|
/pngcp
|
||||||
|
/pngfix
|
||||||
|
/pngimage
|
||||||
|
/pngstest
|
||||||
|
/pngtest
|
||||||
|
/pngunknown
|
||||||
|
/pngvalid
|
||||||
|
/timepng
|
7
.yamllint.yml
Normal file
7
.yamllint.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
extends: default
|
||||||
|
rules:
|
||||||
|
document-start: disable
|
||||||
|
document-end: disable
|
||||||
|
line-length: disable
|
||||||
|
truthy:
|
||||||
|
check-keys: false
|
69
ANNOUNCE
69
ANNOUNCE
@ -1,48 +1,53 @@
|
|||||||
Libpng 1.6.35 - July 15, 2018
|
libpng 1.6.51.git
|
||||||
|
=================
|
||||||
|
|
||||||
|
This is a development version, not intended to be a public release.
|
||||||
|
It will be replaced by a public release, or by another development
|
||||||
|
version, at a later time.
|
||||||
|
|
||||||
|
|
||||||
|
libpng 1.6.50 - July 1, 2025
|
||||||
|
============================
|
||||||
|
|
||||||
This is a public release of libpng, intended for use in production code.
|
This is a public release of libpng, intended for use in production code.
|
||||||
|
|
||||||
Files available for download:
|
|
||||||
|
Files available for download
|
||||||
|
----------------------------
|
||||||
|
|
||||||
Source files with LF line endings (for Unix/Linux):
|
Source files with LF line endings (for Unix/Linux):
|
||||||
|
|
||||||
libpng-1.6.35.tar.xz (LZMA-compressed, recommended)
|
* libpng-1.6.50.tar.xz (LZMA-compressed, recommended)
|
||||||
libpng-1.6.35.tar.gz
|
* libpng-1.6.50.tar.gz (deflate-compressed)
|
||||||
|
|
||||||
Source files with CRLF line endings (for Windows):
|
Source files with CRLF line endings (for Windows):
|
||||||
|
|
||||||
lp1635.7z (LZMA-compressed, recommended)
|
* lpng1650.7z (LZMA-compressed, recommended)
|
||||||
lp1635.zip
|
* lpng1650.zip (deflate-compressed)
|
||||||
|
|
||||||
Other information:
|
Other information:
|
||||||
|
|
||||||
libpng-1.6.35-README.txt
|
* README.md
|
||||||
libpng-1.6.35-LICENSE.txt
|
* LICENSE.md
|
||||||
|
* AUTHORS.md
|
||||||
|
* TRADEMARK.md
|
||||||
|
|
||||||
Changes since the last public release (1.6.34):
|
|
||||||
|
|
||||||
Restored 21 of the contrib/pngsuite/i*.png, which do not cause test
|
Changes from version 1.6.49 to version 1.6.50
|
||||||
failures. Placed the remainder in contrib/pngsuite/interlaced/i*.png.
|
---------------------------------------------
|
||||||
Added calls to png_set_*() transforms commonly used by browsers to
|
|
||||||
the fuzzer.
|
|
||||||
Removed some unnecessary brackets in pngrtran.c
|
|
||||||
Fixed miscellaneous typos (Patch by github user "luzpaz").
|
|
||||||
Change "ASM C" to "C ASM" in CMakeLists.txt
|
|
||||||
Fixed incorrect handling of bKGD chunk in sub-8-bit files (Cosmin)
|
|
||||||
Added hardware optimization directories to zip and 7z distributions.
|
|
||||||
Fixed incorrect bitmask for options.
|
|
||||||
Fixed many spelling typos.
|
|
||||||
Make png_get_iCCP consistent with man page (allow compression-type argument
|
|
||||||
to be NULL, bug report by Lenard Szolnoki).
|
|
||||||
Replaced the remaining uses of png_size_t with size_t (Cosmin)
|
|
||||||
Fixed the calculation of row_factor in png_check_chunk_length
|
|
||||||
(reported by Thuan Pham in SourceForge issue #278)
|
|
||||||
Added missing parentheses to a macro definition
|
|
||||||
(suggested by "irwir" in GitHub issue #216)
|
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
* Improved the detection of the RVV Extension on the RISC-V platform.
|
||||||
(subscription required; visit
|
(Contributed by Filip Wasil)
|
||||||
|
* Replaced inline ASM with C intrinsics in the RVV code.
|
||||||
|
(Contributed by Filip Wasil)
|
||||||
|
* Fixed a decoder defect in which unknown chunks trailing IDAT, set
|
||||||
|
to go through the unknown chunk handler, incorrectly triggered
|
||||||
|
out-of-place IEND errors.
|
||||||
|
(Contributed by John Bowler)
|
||||||
|
* Fixed the CMake file for cross-platform builds that require `libm`.
|
||||||
|
|
||||||
|
|
||||||
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
|
||||||
|
Subscription is required; visit
|
||||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||||
to subscribe).
|
to subscribe.
|
||||||
|
|
||||||
Glenn R-P
|
|
||||||
|
66
AUTHORS
Normal file
66
AUTHORS
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
PNG REFERENCE LIBRARY AUTHORS
|
||||||
|
=============================
|
||||||
|
|
||||||
|
This is the list of PNG Reference Library ("libpng") Contributing
|
||||||
|
Authors, for copyright and licensing purposes.
|
||||||
|
|
||||||
|
* Adam Richter
|
||||||
|
* Andreas Dilger
|
||||||
|
* Chris Blume
|
||||||
|
* Cosmin Truta
|
||||||
|
* Dave Martindale
|
||||||
|
* Eric S. Raymond
|
||||||
|
* Gilles Vollant
|
||||||
|
* Glenn Randers-Pehrson
|
||||||
|
* Greg Roelofs
|
||||||
|
* Guy Eric Schalnat
|
||||||
|
* James Yu
|
||||||
|
* John Bowler
|
||||||
|
* Kevin Bracey
|
||||||
|
* Lucas Chollet
|
||||||
|
* Magnus Holmgren
|
||||||
|
* Mandar Sahastrabuddhe
|
||||||
|
* Manfred Schlaegl
|
||||||
|
* Mans Rullgard
|
||||||
|
* Matt Sarett
|
||||||
|
* Mike Klein
|
||||||
|
* Pascal Massimino
|
||||||
|
* Paul Schmidt
|
||||||
|
* Philippe Antoine
|
||||||
|
* Qiang Zhou
|
||||||
|
* Sam Bushell
|
||||||
|
* Samuel Williams
|
||||||
|
* Simon-Pierre Cadieux
|
||||||
|
* Tim Wegner
|
||||||
|
* Tom Lane
|
||||||
|
* Tom Tanner
|
||||||
|
* Vadim Barkov
|
||||||
|
* Willem van Schaik
|
||||||
|
* Zhijie Liang
|
||||||
|
* Apple Inc.
|
||||||
|
- Zixu Wang (王子旭)
|
||||||
|
* Arm Holdings
|
||||||
|
- Richard Townsend
|
||||||
|
* Google LLC
|
||||||
|
- Dan Field
|
||||||
|
- Dragoș Tiselice
|
||||||
|
- Leon Scroggins III
|
||||||
|
- Matt Sarett
|
||||||
|
- Mike Klein
|
||||||
|
- Sami Boukortt
|
||||||
|
- Wan-Teh Chang
|
||||||
|
* Loongson Technology Corporation Ltd.
|
||||||
|
- GuXiWei (顾希伟)
|
||||||
|
- JinBo (金波)
|
||||||
|
- ZhangLixia (张利霞)
|
||||||
|
* Samsung Group
|
||||||
|
- Filip Wasil
|
||||||
|
|
||||||
|
The build projects, the build scripts, the test scripts, and other
|
||||||
|
files in the "projects", "scripts" and "tests" directories, have
|
||||||
|
other copyright owners, but are released under the libpng license.
|
||||||
|
|
||||||
|
Some files in the "ci" and "contrib" directories, as well as some
|
||||||
|
of the tools-generated files that are distributed with libpng, have
|
||||||
|
other copyright owners, and are released under other open source
|
||||||
|
licenses.
|
249
CHANGES
249
CHANGES
@ -204,7 +204,7 @@ Version 0.97 [January, 1998]
|
|||||||
Added simple sRGB support (Glenn R-P)
|
Added simple sRGB support (Glenn R-P)
|
||||||
Easier conditional compiling, e.g.,
|
Easier conditional compiling, e.g.,
|
||||||
define PNG_READ/WRITE_NOT_FULLY_SUPPORTED;
|
define PNG_READ/WRITE_NOT_FULLY_SUPPORTED;
|
||||||
all configurable options can be selected from command-line instead
|
all configurable options can be selected from command line instead
|
||||||
of having to edit pngconf.h (Glenn R-P)
|
of having to edit pngconf.h (Glenn R-P)
|
||||||
Fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P)
|
Fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P)
|
||||||
Added more conditions for png_do_background, to avoid changing
|
Added more conditions for png_do_background, to avoid changing
|
||||||
@ -942,7 +942,7 @@ Version 1.0.8 [July 24, 2000]
|
|||||||
Version 1.0.9beta1 [November 10, 2000]
|
Version 1.0.9beta1 [November 10, 2000]
|
||||||
Fixed typo in scripts/makefile.hpux
|
Fixed typo in scripts/makefile.hpux
|
||||||
Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser)
|
Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser)
|
||||||
Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser)
|
Fixed sequence-point bug in contrib/pngminus/png2pnm (Martin Zinser)
|
||||||
Changed "cdrom.com" in documentation to "libpng.org"
|
Changed "cdrom.com" in documentation to "libpng.org"
|
||||||
Revised pnggccrd.c to get it all working, and updated makefile.gcmmx (Greg).
|
Revised pnggccrd.c to get it all working, and updated makefile.gcmmx (Greg).
|
||||||
Changed type of "params" from voidp to png_voidp in png_read|write_png().
|
Changed type of "params" from voidp to png_voidp in png_read|write_png().
|
||||||
@ -2295,7 +2295,7 @@ Version 1.4.0beta58 [May 14, 2009]
|
|||||||
Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri)
|
Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri)
|
||||||
|
|
||||||
Version 1.4.0beta59 [May 15, 2009]
|
Version 1.4.0beta59 [May 15, 2009]
|
||||||
Reformated sources in libpng style (3-space intentation, comment format)
|
Reformatted sources in libpng style (3-space indentation, comment format)
|
||||||
Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG)
|
Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG)
|
||||||
Added sections about the git repository and our coding style to the
|
Added sections about the git repository and our coding style to the
|
||||||
documentation
|
documentation
|
||||||
@ -2661,7 +2661,7 @@ Version 1.4.1beta06 [January 28, 2010]
|
|||||||
|
|
||||||
Version 1.4.1beta07 [February 6, 2010]
|
Version 1.4.1beta07 [February 6, 2010]
|
||||||
Folded some long lines in the source files.
|
Folded some long lines in the source files.
|
||||||
Added defineable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX,
|
Added definable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX,
|
||||||
and a PNG_USER_LIMITS_SUPPORTED flag.
|
and a PNG_USER_LIMITS_SUPPORTED flag.
|
||||||
Eliminated use of png_ptr->irowbytes and reused the slot in png_ptr as
|
Eliminated use of png_ptr->irowbytes and reused the slot in png_ptr as
|
||||||
png_ptr->png_user_chunk_malloc_max.
|
png_ptr->png_user_chunk_malloc_max.
|
||||||
@ -3886,7 +3886,7 @@ Version 1.6.0beta06 [January 24, 2012]
|
|||||||
Version 1.6.0beta07 [January 28, 2012]
|
Version 1.6.0beta07 [January 28, 2012]
|
||||||
Eliminated Intel icc/icl compiler warnings. The Intel (GCC derived)
|
Eliminated Intel icc/icl compiler warnings. The Intel (GCC derived)
|
||||||
compiler issues slightly different warnings from those issued by the
|
compiler issues slightly different warnings from those issued by the
|
||||||
current vesions of GCC. This eliminates those warnings by
|
current versions of GCC. This eliminates those warnings by
|
||||||
adding/removing casts and small code rewrites.
|
adding/removing casts and small code rewrites.
|
||||||
Updated configure.ac from autoupdate: added --enable-werror option.
|
Updated configure.ac from autoupdate: added --enable-werror option.
|
||||||
Also some layout regularization and removal of introduced tab characters
|
Also some layout regularization and removal of introduced tab characters
|
||||||
@ -3919,7 +3919,7 @@ Version 1.6.0beta08 [February 1, 2012]
|
|||||||
version checking to configure.ac
|
version checking to configure.ac
|
||||||
Improved pngstest speed by not doing redundant tests and add const to
|
Improved pngstest speed by not doing redundant tests and add const to
|
||||||
the background parameter of png_image_finish_read. The --background
|
the background parameter of png_image_finish_read. The --background
|
||||||
option is now done automagically only when required, so that commandline
|
option is now done automagically only when required, so that command-line
|
||||||
option no longer exists.
|
option no longer exists.
|
||||||
Cleaned up pngpriv.h to consistently declare all functions and data.
|
Cleaned up pngpriv.h to consistently declare all functions and data.
|
||||||
Also eliminated PNG_CONST_DATA, which is apparently not needed but we
|
Also eliminated PNG_CONST_DATA, which is apparently not needed but we
|
||||||
@ -4052,7 +4052,7 @@ Version 1.6.0beta16 [March 6, 2012]
|
|||||||
(in fact this is harmless, but the PNG data produced may be sub-optimal).
|
(in fact this is harmless, but the PNG data produced may be sub-optimal).
|
||||||
|
|
||||||
Version 1.6.0beta17 [March 10, 2012]
|
Version 1.6.0beta17 [March 10, 2012]
|
||||||
Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
|
Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
|
||||||
Reject all iCCP chunks after the first, even if the first one is invalid.
|
Reject all iCCP chunks after the first, even if the first one is invalid.
|
||||||
Deflate/inflate was reworked to move common zlib calls into single
|
Deflate/inflate was reworked to move common zlib calls into single
|
||||||
functions [rw]util.c. A new shared keyword check routine was also added
|
functions [rw]util.c. A new shared keyword check routine was also added
|
||||||
@ -4962,7 +4962,7 @@ Version 1.6.13beta01 [July 4, 2014]
|
|||||||
Changed "if defined(__ARM_NEON__)" to
|
Changed "if defined(__ARM_NEON__)" to
|
||||||
"if (defined(__ARM_NEON__) || defined(__ARM_NEON))" (James Wu).
|
"if (defined(__ARM_NEON__) || defined(__ARM_NEON))" (James Wu).
|
||||||
Fixed clang no-warning builds: png_digit was defined but never used.
|
Fixed clang no-warning builds: png_digit was defined but never used.
|
||||||
|
|
||||||
Version 1.6.13beta02 [July 21, 2014]
|
Version 1.6.13beta02 [July 21, 2014]
|
||||||
Fixed an incorrect separator ("/" should be "\") in scripts/makefile.vcwin32
|
Fixed an incorrect separator ("/" should be "\") in scripts/makefile.vcwin32
|
||||||
(bug report from Wolfgang S. Kechel). Bug was introduced in libpng-1.6.11.
|
(bug report from Wolfgang S. Kechel). Bug was introduced in libpng-1.6.11.
|
||||||
@ -5453,7 +5453,7 @@ Version 1.6.21beta01 [December 11, 2015]
|
|||||||
Version 1.6.21beta02 [December 14, 2015]
|
Version 1.6.21beta02 [December 14, 2015]
|
||||||
Moved png_check_keyword() from pngwutil.c to pngset.c
|
Moved png_check_keyword() from pngwutil.c to pngset.c
|
||||||
Removed LE/BE dependencies in pngvalid, to 'fix' the current problem
|
Removed LE/BE dependencies in pngvalid, to 'fix' the current problem
|
||||||
in the BigEndian tests by not testing it, making the BE code the same
|
in the BigEndian tests by not testing it, making the BE code the same
|
||||||
as the LE version.
|
as the LE version.
|
||||||
Fixes to pngvalid for various reduced build configurations (eliminate unused
|
Fixes to pngvalid for various reduced build configurations (eliminate unused
|
||||||
statics) and a fix for the case in rgb_to_gray when the digitize option
|
statics) and a fix for the case in rgb_to_gray when the digitize option
|
||||||
@ -5517,7 +5517,7 @@ Version 1.6.22beta03 [March 9, 2016]
|
|||||||
Added a common-law trademark notice and export control information
|
Added a common-law trademark notice and export control information
|
||||||
to the LICENSE file, png.h, and the man page.
|
to the LICENSE file, png.h, and the man page.
|
||||||
Restored "& 0xff" in png_save_uint_16() and png_save_uint_32() that
|
Restored "& 0xff" in png_save_uint_16() and png_save_uint_32() that
|
||||||
were accidentally removed from libpng-1.6.17.
|
were accidentally removed from libpng-1.6.17.
|
||||||
Changed PNG_INFO_cHNK and PNG_FREE_cHNK from 0xnnnn to 0xnnnnU in png.h
|
Changed PNG_INFO_cHNK and PNG_FREE_cHNK from 0xnnnn to 0xnnnnU in png.h
|
||||||
(Robert C. Seacord).
|
(Robert C. Seacord).
|
||||||
Removed dubious "#if INT_MAX" test from png.h that was added to
|
Removed dubious "#if INT_MAX" test from png.h that was added to
|
||||||
@ -5927,7 +5927,7 @@ Version 1.6.32beta03 [August 2, 2017]
|
|||||||
(Bug report from the OSS-fuzz project).
|
(Bug report from the OSS-fuzz project).
|
||||||
|
|
||||||
Version 1.6.32beta04 [August 2, 2017]
|
Version 1.6.32beta04 [August 2, 2017]
|
||||||
Replaced local eXIf_buf with info_ptr-eXIf_buf in png_handle_eXIf().
|
Replaced local eXIf_buf with info_ptr->eXIf_buf in png_handle_eXIf().
|
||||||
Update libpng.3 and libpng-manual.txt about eXIf functions.
|
Update libpng.3 and libpng-manual.txt about eXIf functions.
|
||||||
|
|
||||||
Version 1.6.32beta05 [August 2, 2017]
|
Version 1.6.32beta05 [August 2, 2017]
|
||||||
@ -5950,7 +5950,7 @@ Version 1.6.32beta09 [August 3, 2017]
|
|||||||
Require cmake-2.8.8 in CMakeLists.txt. Revised symlink creation,
|
Require cmake-2.8.8 in CMakeLists.txt. Revised symlink creation,
|
||||||
no longer using deprecated cmake LOCATION feature (Clifford Yapp).
|
no longer using deprecated cmake LOCATION feature (Clifford Yapp).
|
||||||
Fixed five-byte error in the calculation of IDAT maximum possible size.
|
Fixed five-byte error in the calculation of IDAT maximum possible size.
|
||||||
|
|
||||||
Version 1.6.32beta10 [August 5, 2017]
|
Version 1.6.32beta10 [August 5, 2017]
|
||||||
Moved chunk-length check into a png_check_chunk_length() private
|
Moved chunk-length check into a png_check_chunk_length() private
|
||||||
function (Suggested by Max Stepin).
|
function (Suggested by Max Stepin).
|
||||||
@ -6063,9 +6063,224 @@ Version 1.6.35 [July 15, 2018]
|
|||||||
Added missing parentheses to a macro definition
|
Added missing parentheses to a macro definition
|
||||||
(suggested by "irwir" in GitHub issue #216)
|
(suggested by "irwir" in GitHub issue #216)
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Version 1.6.36 [December 1, 2018]
|
||||||
(subscription required; visit
|
Optimized png_do_expand_palette for ARM processors.
|
||||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
Improved performance by around 10-22% on a recent ARM Chromebook.
|
||||||
to subscribe).
|
(Contributed by Richard Townsend, ARM Holdings)
|
||||||
|
Fixed manipulation of machine-specific optimization options.
|
||||||
|
(Contributed by Vicki Pfau)
|
||||||
|
Used memcpy instead of manual pointer arithmetic on Intel SSE2.
|
||||||
|
(Contributed by Samuel Williams)
|
||||||
|
Fixed build errors with MSVC on ARM64.
|
||||||
|
(Contributed by Zhijie Liang)
|
||||||
|
Fixed detection of libm in CMakeLists.
|
||||||
|
(Contributed by Cameron Cawley)
|
||||||
|
Fixed incorrect creation of pkg-config file in CMakeLists.
|
||||||
|
(Contributed by Kyle Bentley)
|
||||||
|
Fixed the CMake build on Windows MSYS by avoiding symlinks.
|
||||||
|
Fixed a build warning on OpenBSD.
|
||||||
|
(Contributed by Theo Buehler)
|
||||||
|
Fixed various typos in comments.
|
||||||
|
(Contributed by "luz.paz")
|
||||||
|
Raised the minimum required CMake version from 3.0.2 to 3.1.
|
||||||
|
Removed yet more of the vestigial support for pre-ANSI C compilers.
|
||||||
|
Removed ancient makefiles for ancient systems that have been broken
|
||||||
|
across all previous libpng-1.6.x versions.
|
||||||
|
Removed the Y2K compliance statement and the export control
|
||||||
|
information.
|
||||||
|
Applied various code style and documentation fixes.
|
||||||
|
|
||||||
Glenn R-P
|
Version 1.6.37 [April 14, 2019]
|
||||||
|
Fixed a use-after-free vulnerability (CVE-2019-7317) in png_image_free.
|
||||||
|
Fixed a memory leak in the ARM NEON implementation of png_do_expand_palette.
|
||||||
|
Fixed a memory leak in pngtest.c.
|
||||||
|
Fixed two vulnerabilities (CVE-2018-14048, CVE-2018-14550) in
|
||||||
|
contrib/pngminus; refactor.
|
||||||
|
Changed the license of contrib/pngminus to MIT; refresh makefile and docs.
|
||||||
|
(Contributed by Willem van Schaik)
|
||||||
|
Fixed a typo in the libpng license v2.
|
||||||
|
(Contributed by Miguel Ojeda)
|
||||||
|
Added makefiles for AddressSanitizer-enabled builds.
|
||||||
|
Cleaned up various makefiles.
|
||||||
|
|
||||||
|
Version 1.6.38 [September 14, 2022]
|
||||||
|
Added configurations and scripts for continuous integration.
|
||||||
|
Fixed various errors in the handling of tRNS, hIST and eXIf.
|
||||||
|
Implemented many stability improvements across all platforms.
|
||||||
|
Updated the internal documentation.
|
||||||
|
|
||||||
|
Version 1.6.39 [November 20, 2022]
|
||||||
|
Changed the error handler of oversized chunks (i.e. larger than
|
||||||
|
PNG_USER_CHUNK_MALLOC_MAX) from png_chunk_error to png_benign_error.
|
||||||
|
Fixed a buffer overflow error in contrib/tools/pngfix.
|
||||||
|
Fixed a memory leak (CVE-2019-6129) in contrib/tools/pngcp.
|
||||||
|
Disabled the ARM Neon optimizations by default in the CMake file,
|
||||||
|
following the default behavior of the configure script.
|
||||||
|
Allowed configure.ac to work with the trunk version of autoconf.
|
||||||
|
Removed the support for "install" targets from the legacy makefiles;
|
||||||
|
removed the obsolete makefile.cegcc.
|
||||||
|
Cleaned up the code and updated the internal documentation.
|
||||||
|
|
||||||
|
Version 1.6.40 [June 21, 2023]
|
||||||
|
Fixed the eXIf chunk multiplicity checks.
|
||||||
|
Fixed a memory leak in pCAL processing.
|
||||||
|
Corrected the validity report about tRNS inside png_get_valid().
|
||||||
|
Fixed various build issues on *BSD, Mac and Windows.
|
||||||
|
Updated the configurations and the scripts for continuous integration.
|
||||||
|
Cleaned up the code, the build scripts, and the documentation.
|
||||||
|
|
||||||
|
Version 1.6.41 [January 24, 2024]
|
||||||
|
Added SIMD-optimized code for the LoongArch LSX hardware.
|
||||||
|
(Contributed by GuXiWei, JinBo and ZhangLixia)
|
||||||
|
Fixed the run-time discovery of MIPS MSA hardware.
|
||||||
|
(Contributed by Sui Jingfeng)
|
||||||
|
Fixed an off-by-one error in the function png_do_check_palette_indexes(),
|
||||||
|
which failed to recognize errors that might have existed in the first
|
||||||
|
column of a broken palette-encoded image. This was a benign regression
|
||||||
|
accidentally introduced in libpng-1.6.33. No pixel was harmed.
|
||||||
|
(Contributed by Adam Richter; reviewed by John Bowler)
|
||||||
|
Fixed, improved and modernized the contrib/pngminus programs, i.e.,
|
||||||
|
png2pnm.c and pnm2png.c
|
||||||
|
Removed old and peculiar portability hacks that were meant to silence
|
||||||
|
warnings issued by gcc version 7.1 alone.
|
||||||
|
(Contributed by John Bowler)
|
||||||
|
Fixed and modernized the CMake file, and raised the minimum required
|
||||||
|
CMake version from 3.1 to 3.6.
|
||||||
|
(Contributed by Clinton Ingram, Timothy Lyanguzov, Tyler Kropp, et al.)
|
||||||
|
Allowed the configure script to disable the building of auxiliary tools
|
||||||
|
and tests, thus catching up with the CMake file.
|
||||||
|
(Contributed by Carlo Bramini)
|
||||||
|
Fixed a build issue on Mac.
|
||||||
|
(Contributed by Zixu Wang)
|
||||||
|
Moved the Autoconf macro files to scripts/autoconf.
|
||||||
|
Moved the CMake files (except for the main CMakeLists.txt) to
|
||||||
|
scripts/cmake and moved the list of their contributing authors to
|
||||||
|
scripts/cmake/AUTHORS.md
|
||||||
|
Updated the CI configurations and scripts.
|
||||||
|
Relicensed the CI scripts to the MIT License.
|
||||||
|
Improved the test coverage.
|
||||||
|
(Contributed by John Bowler)
|
||||||
|
|
||||||
|
Version 1.6.42 [January 29, 2024]
|
||||||
|
Fixed the implementation of the macro function png_check_sig().
|
||||||
|
This was an API regression, introduced in libpng-1.6.41.
|
||||||
|
(Reported by Matthieu Darbois)
|
||||||
|
Fixed and updated the libpng manual.
|
||||||
|
|
||||||
|
Version 1.6.43 [February 23, 2024]
|
||||||
|
Fixed the row width check in png_check_IHDR().
|
||||||
|
This corrected a bug that was specific to the 16-bit platforms,
|
||||||
|
and removed a spurious compiler warning from the 64-bit builds.
|
||||||
|
(Reported by Jacek Caban; fixed by John Bowler)
|
||||||
|
Added eXIf chunk support to the push-mode reader in pngpread.c.
|
||||||
|
(Contributed by Chris Blume)
|
||||||
|
Added contrib/pngexif for the benefit of the users who would like
|
||||||
|
to inspect the content of eXIf chunks.
|
||||||
|
Added contrib/conftest/basic.dfa, a basic build-time configuration.
|
||||||
|
(Contributed by John Bowler)
|
||||||
|
Fixed a preprocessor condition in pngread.c that broke build-time
|
||||||
|
configurations like contrib/conftest/pngcp.dfa.
|
||||||
|
(Contributed by John Bowler)
|
||||||
|
Added CMake build support for LoongArch LSX.
|
||||||
|
(Contributed by GuXiWei)
|
||||||
|
Fixed a CMake build error that occurred under a peculiar state of the
|
||||||
|
dependency tree. This was a regression introduced in libpng-1.6.41.
|
||||||
|
(Contributed by Dan Rosser)
|
||||||
|
Marked the installed libpng headers as system headers in CMake.
|
||||||
|
(Contributed by Benjamin Buch)
|
||||||
|
Updated the build support for RISCOS.
|
||||||
|
(Contributed by Cameron Cawley)
|
||||||
|
Updated the makefiles to allow cross-platform builds to initialize
|
||||||
|
conventional make variables like AR and ARFLAGS.
|
||||||
|
Added various improvements to the CI scripts in areas like version
|
||||||
|
consistency verification and text linting.
|
||||||
|
Added version consistency verification to pngtest.c also.
|
||||||
|
|
||||||
|
Version 1.6.44 [September 12, 2024]
|
||||||
|
Hardened calculations in chroma handling to prevent overflows, and
|
||||||
|
relaxed a constraint in cHRM validation to accomodate the standard
|
||||||
|
ACES AP1 set of color primaries.
|
||||||
|
(Contributed by John Bowler)
|
||||||
|
Removed the ASM implementation of ARM Neon optimizations and updated
|
||||||
|
the build accordingly. Only the remaining C implementation shall be
|
||||||
|
used from now on, thus ensuring the support of the PAC/BTI security
|
||||||
|
features on ARM64.
|
||||||
|
(Contributed by Ross Burton and John Bowler)
|
||||||
|
Fixed the pickup of the PNG_HARDWARE_OPTIMIZATIONS option in the
|
||||||
|
CMake build on FreeBSD/amd64. This is an important performance fix
|
||||||
|
on this platform.
|
||||||
|
Applied various fixes and improvements to the CMake build.
|
||||||
|
(Contributed by Eric Riff, Benjamin Buch and Erik Scholz)
|
||||||
|
Added fuzzing targets for the simplified read API.
|
||||||
|
(Contributed by Mikhail Khachayants)
|
||||||
|
Fixed a build error involving pngtest.c under a custom config.
|
||||||
|
This was a regression introduced in a code cleanup in libpng-1.6.43.
|
||||||
|
(Contributed by Ben Wagner)
|
||||||
|
Fixed and improved the config files for AppVeyor CI and Travis CI.
|
||||||
|
|
||||||
|
Version 1.6.45 [January 7, 2025]
|
||||||
|
Added support for the cICP chunk.
|
||||||
|
(Contributed by Lucas Chollet and John Bowler)
|
||||||
|
Adjusted and improved various checks in colorspace calculations.
|
||||||
|
(Contributed by John Bowler)
|
||||||
|
Rearranged the write order of colorspace chunks for better conformance
|
||||||
|
with the PNG v3 draft specification.
|
||||||
|
(Contributed by John Bowler)
|
||||||
|
Raised the minimum required CMake version from 3.6 to 3.14.
|
||||||
|
Forked off a development branch for libpng version 1.8.
|
||||||
|
|
||||||
|
Version 1.6.46 [January 23, 2025]
|
||||||
|
Added support for the mDCV and cLLI chunks.
|
||||||
|
(Contributed by John Bowler)
|
||||||
|
Fixed a build issue affecting C89 compilers.
|
||||||
|
This was a regression introduced in libpng-1.6.45.
|
||||||
|
(Contributed by John Bowler)
|
||||||
|
Added makefile.c89, specifically for testing C89 compilers.
|
||||||
|
Cleaned up contrib/pngminus: corrected an old typo, removed an old
|
||||||
|
workaround, and updated the CMake file.
|
||||||
|
|
||||||
|
Version 1.6.47 [February 18, 2025]
|
||||||
|
Modified the behaviour of colorspace chunks in order to adhere
|
||||||
|
to the new precedence rules formulated in the latest draft of
|
||||||
|
the PNG Specification.
|
||||||
|
(Contributed by John Bowler)
|
||||||
|
Fixed a latent bug in `png_write_iCCP`.
|
||||||
|
This would have been a read-beyond-end-of-malloc vulnerability,
|
||||||
|
introduced early in the libpng-1.6.0 development, yet (fortunately!)
|
||||||
|
it was inaccessible before the above-mentioned modification of the
|
||||||
|
colorspace precedence rules, due to pre-existing colorspace checks.
|
||||||
|
(Reported by Bob Friesenhahn; fixed by John Bowler)
|
||||||
|
|
||||||
|
Version 1.6.48 [April 30, 2025]
|
||||||
|
Fixed the floating-point version of the mDCv setter `png_set_mDCv`.
|
||||||
|
(Reported by Mohit Bakshi; fixed by John Bowler)
|
||||||
|
Added #error directives to discourage the inclusion of private
|
||||||
|
libpng implementation header files in PNG-supporting applications.
|
||||||
|
Added the CMake build option `PNG_LIBCONF_HEADER`, to be used as an
|
||||||
|
alternative to `DFA_XTRA`.
|
||||||
|
Removed the Travis CI configuration files, with heartfelt thanks for
|
||||||
|
their generous support of our project over the past five years!
|
||||||
|
|
||||||
|
Version 1.6.49 [June 12, 2025]
|
||||||
|
Added SIMD-optimized code for the RISC-V Vector Extension (RVV).
|
||||||
|
(Contributed by Manfred Schlaegl, Dragos Tiselice and Filip Wasil)
|
||||||
|
Added various fixes and improvements to the build scripts and to
|
||||||
|
the sample code.
|
||||||
|
|
||||||
|
Version 1.6.50 [July 1, 2025]
|
||||||
|
Improved the detection of the RVV Extension on the RISC-V platform.
|
||||||
|
(Contributed by Filip Wasil)
|
||||||
|
Replaced inline ASM with C intrinsics in the RVV code.
|
||||||
|
(Contributed by Filip Wasil)
|
||||||
|
Fixed a decoder defect in which unknown chunks trailing IDAT, set
|
||||||
|
to go through the unknown chunk handler, incorrectly triggered
|
||||||
|
out-of-place IEND errors.
|
||||||
|
(Contributed by John Bowler)
|
||||||
|
Fixed the CMake file for cross-platform builds that require `libm`.
|
||||||
|
|
||||||
|
Version 1.6.51 [TODO]
|
||||||
|
|
||||||
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
|
||||||
|
Subscription is required; visit
|
||||||
|
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||||
|
to subscribe.
|
||||||
|
1583
CMakeLists.txt
1583
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
98
INSTALL
98
INSTALL
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
Installing libpng
|
Installing libpng
|
||||||
|
|
||||||
Contents
|
Contents
|
||||||
@ -128,16 +127,18 @@ Your directory structure should look like this:
|
|||||||
README
|
README
|
||||||
*.h, *.c => libpng source files
|
*.h, *.c => libpng source files
|
||||||
CMakeLists.txt => "cmake" script
|
CMakeLists.txt => "cmake" script
|
||||||
|
ci
|
||||||
|
ci_*.sh
|
||||||
configuration files:
|
configuration files:
|
||||||
configure.ac, configure, Makefile.am, Makefile.in,
|
configure.ac, configure, Makefile.am, Makefile.in,
|
||||||
autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in,
|
autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in,
|
||||||
libpng-config.in, aclocal.m4, config.h.in, config.sub,
|
libpng-config.in, aclocal.m4, config.h.in, config.sub,
|
||||||
depcomp, install-sh, mkinstalldirs, test-pngtest.sh
|
depcomp, install-sh, mkinstalldirs, test-pngtest.sh, etc.
|
||||||
contrib
|
contrib
|
||||||
arm-neon, conftest, examples, gregbook, libtests, pngminim,
|
arm-neon, conftest, examples, gregbook, libtests, pngminim,
|
||||||
pngminus, pngsuite, tools, visupng
|
pngminus, pngsuite, tools, visupng, riscv-rvv
|
||||||
projects
|
projects
|
||||||
cbuilder5, owatcom, visualc71, vstudio, xcode
|
owatcom, visualc71, vstudio
|
||||||
scripts
|
scripts
|
||||||
makefile.*
|
makefile.*
|
||||||
*.def (module definition files)
|
*.def (module definition files)
|
||||||
@ -145,7 +146,7 @@ Your directory structure should look like this:
|
|||||||
pngtest.png
|
pngtest.png
|
||||||
etc.
|
etc.
|
||||||
zlib
|
zlib
|
||||||
README, *.h, *.c contrib, etc.
|
README, *.h, *.c, contrib, etc.
|
||||||
|
|
||||||
If the line endings in the files look funny, you may wish to get the other
|
If the line endings in the files look funny, you may wish to get the other
|
||||||
distribution of libpng. It is available in both tar.gz (UNIX style line
|
distribution of libpng. It is available in both tar.gz (UNIX style line
|
||||||
@ -153,28 +154,27 @@ endings) and zip (DOS style line endings) formats.
|
|||||||
|
|
||||||
VI. Building with project files
|
VI. Building with project files
|
||||||
|
|
||||||
If you are building libpng with MSVC, you can enter the
|
If you are building libpng with Microsoft Visual Studio, you can enter
|
||||||
libpng projects\visualc71 or vstudio directory and follow the instructions
|
the directory projects\visualc71 or projects\vstudio and follow the
|
||||||
in README.txt.
|
instructions in README.txt.
|
||||||
|
|
||||||
Otherwise enter the zlib directory and follow the instructions in zlib/README,
|
Otherwise, enter the zlib directory and follow the instructions in
|
||||||
then come back here and run "configure" or choose the appropriate
|
zlib/README, then come back here and run "configure" or choose the
|
||||||
makefile.sys in the scripts directory.
|
appropriate makefile in the scripts directory.
|
||||||
|
|
||||||
VII. Building with makefiles
|
VII. Building with makefiles
|
||||||
|
|
||||||
Copy the file (or files) that you need from the
|
Copy the file (or files) that you need from the
|
||||||
scripts directory into this directory, for example
|
scripts directory into this directory, for example
|
||||||
|
|
||||||
MSDOS example:
|
|
||||||
|
|
||||||
copy scripts\makefile.msc makefile
|
|
||||||
copy scripts\pnglibconf.h.prebuilt pnglibconf.h
|
|
||||||
|
|
||||||
UNIX example:
|
UNIX example:
|
||||||
|
|
||||||
cp scripts/makefile.std makefile
|
cp scripts/makefile.std Makefile
|
||||||
cp scripts/pnglibconf.h.prebuilt pnglibconf.h
|
make
|
||||||
|
|
||||||
|
Windows example:
|
||||||
|
|
||||||
|
nmake -f scripts\makefile.vcwin32
|
||||||
|
|
||||||
Read the makefile to see if you need to change any source or
|
Read the makefile to see if you need to change any source or
|
||||||
target directories to match your preferences.
|
target directories to match your preferences.
|
||||||
@ -191,36 +191,33 @@ test. For more confidence, you can run another test by typing
|
|||||||
Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare
|
Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare
|
||||||
your output with the result shown in contrib/pngsuite/README.
|
your output with the result shown in contrib/pngsuite/README.
|
||||||
|
|
||||||
Most of the makefiles will allow you to run "make install" to
|
Most of the makefiles used to allow you to run "make install" to put
|
||||||
put the library in its final resting place (if you want to
|
the library in its final resting place, but that feature is no longer
|
||||||
do that, run "make install" in the zlib directory first if necessary).
|
supported. The only tested and supported manners to install libpng are
|
||||||
Some also allow you to run "make test-installed" after you have
|
the conventional build and install procedures driven by the configure
|
||||||
run "make install".
|
script or by the CMake file.
|
||||||
|
|
||||||
VIII. Configuring libpng for 16-bit platforms
|
VIII. Configuring for DOS and other 16-bit platforms
|
||||||
|
|
||||||
You will want to look into zconf.h to tell zlib (and thus libpng) that
|
Officially, the support for 16-bit platforms has been removed.
|
||||||
it cannot allocate more than 64K at a time. Even if you can, the memory
|
|
||||||
won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K.
|
|
||||||
|
|
||||||
IX. Configuring for DOS
|
|
||||||
|
|
||||||
For DOS users who only have access to the lower 640K, you will
|
For DOS users who only have access to the lower 640K, you will
|
||||||
have to limit zlib's memory usage via a png_set_compression_mem_level()
|
have to limit zlib's memory usage via a png_set_compression_mem_level()
|
||||||
call. See zlib.h or zconf.h in the zlib library for more information.
|
call. See zlib.h or zconf.h in the zlib library for more information.
|
||||||
|
|
||||||
X. Configuring for Medium Model
|
You may be or may not be in luck if you target the "large" memory model,
|
||||||
|
but all the smaller models ("small", "compact" and "medium") are known
|
||||||
|
to be unworkable. For DOS users who have access beyond the lower 640K,
|
||||||
|
a "flat" 32-bit DOS model (such as DJGPP) is strongly recommended.
|
||||||
|
|
||||||
Libpng's support for medium model has been tested on most of the popular
|
For DOS users who only have access to the lower 640K, you will have to
|
||||||
compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets
|
limit zlib's memory usage via a png_set_compression_mem_level() call.
|
||||||
defined, and FAR gets defined to far in pngconf.h, and you should be
|
You will also have to look into zconf.h to tell zlib (and thus libpng)
|
||||||
all set. Everything in the library (except for zlib's structure) is
|
that it cannot allocate more than 64K at a time. Even if you can, the
|
||||||
expecting far data. You must use the typedefs with the p or pp on
|
memory won't be accessible. Therefore, you should limit zlib and libpng
|
||||||
the end for pointers (or at least look at them and be careful). Make
|
to 64K by defining MAXSEG_64K.
|
||||||
note that the rows of data are defined as png_bytepp, which is
|
|
||||||
an "unsigned char far * far *".
|
|
||||||
|
|
||||||
XI. Prepending a prefix to exported symbols
|
IX. Prepending a prefix to exported symbols
|
||||||
|
|
||||||
Starting with libpng-1.6.0, you can configure libpng (when using the
|
Starting with libpng-1.6.0, you can configure libpng (when using the
|
||||||
"configure" script) to prefix all exported symbols by means of the
|
"configure" script) to prefix all exported symbols by means of the
|
||||||
@ -231,7 +228,7 @@ identifier). This creates a set of macros in pnglibconf.h, so this is
|
|||||||
transparent to applications; their function calls get transformed by
|
transparent to applications; their function calls get transformed by
|
||||||
the macros to use the modified names.
|
the macros to use the modified names.
|
||||||
|
|
||||||
XII. Configuring for compiler xxx:
|
X. Configuring for compiler xxx:
|
||||||
|
|
||||||
All includes for libpng are in pngconf.h. If you need to add, change
|
All includes for libpng are in pngconf.h. If you need to add, change
|
||||||
or delete an include, this is the place to do it.
|
or delete an include, this is the place to do it.
|
||||||
@ -243,7 +240,7 @@ As of libpng-1.5.0, pngpriv.h also includes three other private header
|
|||||||
files, pngstruct.h, pnginfo.h, and pngdebug.h, which contain material
|
files, pngstruct.h, pnginfo.h, and pngdebug.h, which contain material
|
||||||
that previously appeared in the public headers.
|
that previously appeared in the public headers.
|
||||||
|
|
||||||
XIII. Removing unwanted object code
|
XI. Removing unwanted object code
|
||||||
|
|
||||||
There are a bunch of #define's in pngconf.h that control what parts of
|
There are a bunch of #define's in pngconf.h that control what parts of
|
||||||
libpng are compiled. All the defines end in _SUPPORTED. If you are
|
libpng are compiled. All the defines end in _SUPPORTED. If you are
|
||||||
@ -282,7 +279,7 @@ library to fail if they call functions not available in your library.
|
|||||||
The size of the library itself should not be an issue, because only
|
The size of the library itself should not be an issue, because only
|
||||||
those sections that are actually used will be loaded into memory.
|
those sections that are actually used will be loaded into memory.
|
||||||
|
|
||||||
XIV. Enabling or disabling hardware optimizations
|
XII. Enabling or disabling hardware optimizations
|
||||||
|
|
||||||
Certain hardware capabilities, such as the Intel SSE instructions,
|
Certain hardware capabilities, such as the Intel SSE instructions,
|
||||||
are normally detected at run time. Enable them with configure options
|
are normally detected at run time. Enable them with configure options
|
||||||
@ -292,6 +289,7 @@ such as one of
|
|||||||
--enable-mips-msa=yes
|
--enable-mips-msa=yes
|
||||||
--enable-intel-sse=yes
|
--enable-intel-sse=yes
|
||||||
--enable-powerpc-vsx=yes
|
--enable-powerpc-vsx=yes
|
||||||
|
--enable-riscv-rvv=yes
|
||||||
|
|
||||||
or enable them all at once with
|
or enable them all at once with
|
||||||
|
|
||||||
@ -304,6 +302,7 @@ or more of
|
|||||||
CPPFLAGS += "-DPNG_MIPS_MSA"
|
CPPFLAGS += "-DPNG_MIPS_MSA"
|
||||||
CPPFLAGS += "-DPNG_INTEL_SSE"
|
CPPFLAGS += "-DPNG_INTEL_SSE"
|
||||||
CPPFLAGS += "-DPNG_POWERPC_VSX"
|
CPPFLAGS += "-DPNG_POWERPC_VSX"
|
||||||
|
CPPFLAGS += "-DPNG_RISCV_RVV"
|
||||||
|
|
||||||
See for example scripts/makefile.linux-opt
|
See for example scripts/makefile.linux-opt
|
||||||
|
|
||||||
@ -320,19 +319,21 @@ to disable a particular one,
|
|||||||
or via compiler-command options such as
|
or via compiler-command options such as
|
||||||
|
|
||||||
CPPFLAGS += "-DPNG_ARM_NEON_OPT=0, -DPNG_MIPS_MSA_OPT=0,
|
CPPFLAGS += "-DPNG_ARM_NEON_OPT=0, -DPNG_MIPS_MSA_OPT=0,
|
||||||
-DPNG_INTEL_SSE_OPT=0, -DPNG_POWERPC_VSX_OPT=0"
|
-DPNG_INTEL_SSE_OPT=0, -DPNG_POWERPC_VSX_OPT=0,
|
||||||
|
-DPNG_RISCV_RVV_OPT=0"
|
||||||
|
|
||||||
If you are using cmake, hardware optimizations are "on"
|
If you are using cmake, hardware optimizations are "on"
|
||||||
by default. To disable them, use
|
by default. To disable them, use
|
||||||
|
|
||||||
cmake . -DPNG_ARM_NEON=no -DPNG_INTEL_SSE=no \
|
cmake . -DPNG_ARM_NEON=no -DPNG_INTEL_SSE=no \
|
||||||
-DPNG_MIPS_MSA=no -DPNG_POWERPC_VSX=no
|
-DPNG_MIPS_MSA=no -DPNG_POWERPC_VSX=no \
|
||||||
|
-DPNG_RISCV_RVV=no
|
||||||
|
|
||||||
or disable them all at once with
|
or disable them all at once with
|
||||||
|
|
||||||
cmake . -DPNG_HARDWARE_OPTIMIZATIONS=no
|
cmake . -DPNG_HARDWARE_OPTIMIZATIONS=no
|
||||||
|
|
||||||
XV. Changes to the build and configuration of libpng in libpng-1.5.x
|
XIII. Changes to the build and configuration of libpng in libpng-1.5.x
|
||||||
|
|
||||||
Details of internal changes to the library code can be found in the CHANGES
|
Details of internal changes to the library code can be found in the CHANGES
|
||||||
file and in the GIT repository logs. These will be of no concern to the vast
|
file and in the GIT repository logs. These will be of no concern to the vast
|
||||||
@ -423,7 +424,7 @@ $PREFIX/include directory). Do not edit pnglibconf.h after you have built
|
|||||||
libpng, because than the settings would not accurately reflect the settings
|
libpng, because than the settings would not accurately reflect the settings
|
||||||
that were used to build libpng.
|
that were used to build libpng.
|
||||||
|
|
||||||
XVI. Setjmp/longjmp issues
|
XIV. Setjmp/longjmp issues
|
||||||
|
|
||||||
Libpng uses setjmp()/longjmp() for error handling. Unfortunately setjmp()
|
Libpng uses setjmp()/longjmp() for error handling. Unfortunately setjmp()
|
||||||
is known to be not thread-safe on some platforms and we don't know of
|
is known to be not thread-safe on some platforms and we don't know of
|
||||||
@ -441,7 +442,7 @@ This requires setjmp/longjmp, so you must either build the library
|
|||||||
with PNG_SETJMP_SUPPORTED defined, or with PNG_SIMPLIFIED_READ_SUPPORTED
|
with PNG_SETJMP_SUPPORTED defined, or with PNG_SIMPLIFIED_READ_SUPPORTED
|
||||||
and PNG_SIMPLIFIED_WRITE_SUPPORTED undefined.
|
and PNG_SIMPLIFIED_WRITE_SUPPORTED undefined.
|
||||||
|
|
||||||
XVII. Common linking failures
|
XV. Common linking failures
|
||||||
|
|
||||||
If your application fails to find libpng or zlib entries while linking:
|
If your application fails to find libpng or zlib entries while linking:
|
||||||
|
|
||||||
@ -453,12 +454,13 @@ If your application fails to find libpng or zlib entries while linking:
|
|||||||
If you are using the vstudio project, observe the WARNING in
|
If you are using the vstudio project, observe the WARNING in
|
||||||
project/vstudio/README.txt.
|
project/vstudio/README.txt.
|
||||||
|
|
||||||
XVIII. Other sources of information about libpng:
|
XVI. Other sources of information about libpng:
|
||||||
|
|
||||||
Further information can be found in the README and libpng-manual.txt
|
Further information can be found in the README and libpng-manual.txt
|
||||||
files, in the individual makefiles, in png.h, and the manual pages
|
files, in the individual makefiles, in png.h, and the manual pages
|
||||||
libpng.3 and png.5.
|
libpng.3 and png.5.
|
||||||
|
|
||||||
|
Copyright (c) 2022 Cosmin Truta
|
||||||
Copyright (c) 1998-2002,2006-2016 Glenn Randers-Pehrson
|
Copyright (c) 1998-2002,2006-2016 Glenn Randers-Pehrson
|
||||||
This document is released under the libpng license.
|
This document is released under the libpng license.
|
||||||
For conditions of distribution and use, see the disclaimer
|
For conditions of distribution and use, see the disclaimer
|
||||||
|
175
LICENSE
175
LICENSE
@ -1,53 +1,82 @@
|
|||||||
|
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
|
||||||
|
=========================================
|
||||||
|
|
||||||
This copy of the libpng notices is provided for your convenience. In case of
|
PNG Reference Library License version 2
|
||||||
any discrepancy between this copy and the notices in the file png.h that is
|
---------------------------------------
|
||||||
included in the libpng distribution, the latter shall prevail.
|
|
||||||
|
|
||||||
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
* Copyright (c) 1995-2025 The PNG Reference Library Authors.
|
||||||
|
* Copyright (c) 2018-2025 Cosmin Truta.
|
||||||
|
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
|
||||||
|
* Copyright (c) 1996-1997 Andreas Dilger.
|
||||||
|
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
|
|
||||||
If you modify libpng you may insert additional notices immediately following
|
The software is supplied "as is", without warranty of any kind,
|
||||||
this sentence.
|
express or implied, including, without limitation, the warranties
|
||||||
|
of merchantability, fitness for a particular purpose, title, and
|
||||||
|
non-infringement. In no event shall the Copyright owners, or
|
||||||
|
anyone distributing the software, be liable for any damages or
|
||||||
|
other liability, whether in contract, tort or otherwise, arising
|
||||||
|
from, out of, or in connection with the software, or the use or
|
||||||
|
other dealings in the software, even if advised of the possibility
|
||||||
|
of such damage.
|
||||||
|
|
||||||
This code is released under the libpng license.
|
Permission is hereby granted to use, copy, modify, and distribute
|
||||||
|
this software, or portions hereof, for any purpose, without fee,
|
||||||
|
subject to the following restrictions:
|
||||||
|
|
||||||
libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
|
1. The origin of this software must not be misrepresented; you
|
||||||
|
must not claim that you wrote the original software. If you
|
||||||
|
use this software in a product, an acknowledgment in the product
|
||||||
|
documentation would be appreciated, but is not required.
|
||||||
|
|
||||||
|
2. Altered source versions must be plainly marked as such, and must
|
||||||
|
not be misrepresented as being the original software.
|
||||||
|
|
||||||
|
3. This Copyright notice may not be removed or altered from any
|
||||||
|
source or altered source distribution.
|
||||||
|
|
||||||
|
|
||||||
|
PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are
|
||||||
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
|
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
|
||||||
derived from libpng-1.0.6, and are distributed according to the same
|
derived from libpng-1.0.6, and are distributed according to the same
|
||||||
disclaimer and license as libpng-1.0.6 with the following individuals
|
disclaimer and license as libpng-1.0.6 with the following individuals
|
||||||
added to the list of Contributing Authors:
|
added to the list of Contributing Authors:
|
||||||
|
|
||||||
Simon-Pierre Cadieux
|
Simon-Pierre Cadieux
|
||||||
Eric S. Raymond
|
Eric S. Raymond
|
||||||
Mans Rullgard
|
Mans Rullgard
|
||||||
Cosmin Truta
|
Cosmin Truta
|
||||||
Gilles Vollant
|
Gilles Vollant
|
||||||
James Yu
|
James Yu
|
||||||
Mandar Sahastrabuddhe
|
Mandar Sahastrabuddhe
|
||||||
Google Inc.
|
Google Inc.
|
||||||
Vadim Barkov
|
Vadim Barkov
|
||||||
|
|
||||||
and with the following additions to the disclaimer:
|
and with the following additions to the disclaimer:
|
||||||
|
|
||||||
There is no warranty against interference with your enjoyment of the
|
There is no warranty against interference with your enjoyment of
|
||||||
library or against infringement. There is no warranty that our
|
the library or against infringement. There is no warranty that our
|
||||||
efforts or the library will fulfill any of your particular purposes
|
efforts or the library will fulfill any of your particular purposes
|
||||||
or needs. This library is provided with all faults, and the entire
|
or needs. This library is provided with all faults, and the entire
|
||||||
risk of satisfactory quality, performance, accuracy, and effort is with
|
risk of satisfactory quality, performance, accuracy, and effort is
|
||||||
the user.
|
with the user.
|
||||||
|
|
||||||
Some files in the "contrib" directory and some configure-generated
|
Some files in the "contrib" directory and some configure-generated
|
||||||
files that are distributed with libpng have other copyright owners and
|
files that are distributed with libpng have other copyright owners, and
|
||||||
are released under other open source licenses.
|
are released under other open source licenses.
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
|
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
|
||||||
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
|
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
|
||||||
libpng-0.96, and are distributed according to the same disclaimer and
|
libpng-0.96, and are distributed according to the same disclaimer and
|
||||||
license as libpng-0.96, with the following individuals added to the list
|
license as libpng-0.96, with the following individuals added to the
|
||||||
of Contributing Authors:
|
list of Contributing Authors:
|
||||||
|
|
||||||
Tom Lane
|
Tom Lane
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
Willem van Schaik
|
Willem van Schaik
|
||||||
|
|
||||||
libpng versions 0.89, June 1996, through 0.96, May 1997, are
|
libpng versions 0.89, June 1996, through 0.96, May 1997, are
|
||||||
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
|
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
|
||||||
@ -55,14 +84,14 @@ and are distributed according to the same disclaimer and license as
|
|||||||
libpng-0.88, with the following individuals added to the list of
|
libpng-0.88, with the following individuals added to the list of
|
||||||
Contributing Authors:
|
Contributing Authors:
|
||||||
|
|
||||||
John Bowler
|
John Bowler
|
||||||
Kevin Bracey
|
Kevin Bracey
|
||||||
Sam Bushell
|
Sam Bushell
|
||||||
Magnus Holmgren
|
Magnus Holmgren
|
||||||
Greg Roelofs
|
Greg Roelofs
|
||||||
Tom Tanner
|
Tom Tanner
|
||||||
|
|
||||||
Some files in the "scripts" directory have other copyright owners
|
Some files in the "scripts" directory have other copyright owners,
|
||||||
but are released under this license.
|
but are released under this license.
|
||||||
|
|
||||||
libpng versions 0.5, May 1995, through 0.88, January 1996, are
|
libpng versions 0.5, May 1995, through 0.88, January 1996, are
|
||||||
@ -71,63 +100,35 @@ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
|||||||
For the purposes of this copyright and license, "Contributing Authors"
|
For the purposes of this copyright and license, "Contributing Authors"
|
||||||
is defined as the following set of individuals:
|
is defined as the following set of individuals:
|
||||||
|
|
||||||
Andreas Dilger
|
Andreas Dilger
|
||||||
Dave Martindale
|
Dave Martindale
|
||||||
Guy Eric Schalnat
|
Guy Eric Schalnat
|
||||||
Paul Schmidt
|
Paul Schmidt
|
||||||
Tim Wegner
|
Tim Wegner
|
||||||
|
|
||||||
The PNG Reference Library is supplied "AS IS". The Contributing Authors
|
The PNG Reference Library is supplied "AS IS". The Contributing
|
||||||
and Group 42, Inc. disclaim all warranties, expressed or implied,
|
Authors and Group 42, Inc. disclaim all warranties, expressed or
|
||||||
including, without limitation, the warranties of merchantability and of
|
implied, including, without limitation, the warranties of
|
||||||
fitness for any purpose. The Contributing Authors and Group 42, Inc.
|
merchantability and of fitness for any purpose. The Contributing
|
||||||
assume no liability for direct, indirect, incidental, special, exemplary,
|
Authors and Group 42, Inc. assume no liability for direct, indirect,
|
||||||
or consequential damages, which may result from the use of the PNG
|
incidental, special, exemplary, or consequential damages, which may
|
||||||
Reference Library, even if advised of the possibility of such damage.
|
result from the use of the PNG Reference Library, even if advised of
|
||||||
|
the possibility of such damage.
|
||||||
|
|
||||||
Permission is hereby granted to use, copy, modify, and distribute this
|
Permission is hereby granted to use, copy, modify, and distribute this
|
||||||
source code, or portions hereof, for any purpose, without fee, subject
|
source code, or portions hereof, for any purpose, without fee, subject
|
||||||
to the following restrictions:
|
to the following restrictions:
|
||||||
|
|
||||||
1. The origin of this source code must not be misrepresented.
|
1. The origin of this source code must not be misrepresented.
|
||||||
|
|
||||||
2. Altered versions must be plainly marked as such and must not
|
2. Altered versions must be plainly marked as such and must not
|
||||||
be misrepresented as being the original source.
|
be misrepresented as being the original source.
|
||||||
|
|
||||||
3. This Copyright notice may not be removed or altered from any
|
3. This Copyright notice may not be removed or altered from any
|
||||||
source or altered source distribution.
|
source or altered source distribution.
|
||||||
|
|
||||||
The Contributing Authors and Group 42, Inc. specifically permit, without
|
The Contributing Authors and Group 42, Inc. specifically permit,
|
||||||
fee, and encourage the use of this source code as a component to
|
without fee, and encourage the use of this source code as a component
|
||||||
supporting the PNG file format in commercial products. If you use this
|
to supporting the PNG file format in commercial products. If you use
|
||||||
source code in a product, acknowledgment is not required but would be
|
this source code in a product, acknowledgment is not required but would
|
||||||
appreciated.
|
be appreciated.
|
||||||
|
|
||||||
END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
|
|
||||||
|
|
||||||
TRADEMARK:
|
|
||||||
|
|
||||||
The name "libpng" has not been registered by the Copyright owner
|
|
||||||
as a trademark in any jurisdiction. However, because libpng has
|
|
||||||
been distributed and maintained world-wide, continually since 1995,
|
|
||||||
the Copyright owner claims "common-law trademark protection" in any
|
|
||||||
jurisdiction where common-law trademark is recognized.
|
|
||||||
|
|
||||||
OSI CERTIFICATION:
|
|
||||||
|
|
||||||
Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
|
|
||||||
a certification mark of the Open Source Initiative. OSI has not addressed
|
|
||||||
the additional disclaimers inserted at version 1.0.7.
|
|
||||||
|
|
||||||
EXPORT CONTROL:
|
|
||||||
|
|
||||||
The Copyright owner believes that the Export Control Classification
|
|
||||||
Number (ECCN) for libpng is EAR99, which means not subject to export
|
|
||||||
controls or International Traffic in Arms Regulations (ITAR) because
|
|
||||||
it is open source, publicly available software, that does not contain
|
|
||||||
any encryption software. See the EAR, paragraphs 734.3(b)(3) and
|
|
||||||
734.7(b).
|
|
||||||
|
|
||||||
Glenn Randers-Pehrson
|
|
||||||
glennrp at users.sourceforge.net
|
|
||||||
July 15, 2018
|
|
||||||
|
67
Makefile.am
67
Makefile.am
@ -1,7 +1,7 @@
|
|||||||
# Makefile.am, the source file for Makefile.in (and hence Makefile), is
|
# Makefile.am, the source file for Makefile.in (and hence Makefile), is
|
||||||
#
|
#
|
||||||
|
# Copyright (c) 2018-2025 Cosmin Truta
|
||||||
# Copyright (c) 2004-2016 Glenn Randers-Pehrson
|
# Copyright (c) 2004-2016 Glenn Randers-Pehrson
|
||||||
# Last changed in libpng 1.6.25 [September 1, 2016]
|
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
# For conditions of distribution and use, see the disclaimer
|
# For conditions of distribution and use, see the disclaimer
|
||||||
@ -9,16 +9,24 @@
|
|||||||
|
|
||||||
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
|
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I scripts
|
ACLOCAL_AMFLAGS = -I scripts/autoconf
|
||||||
|
|
||||||
# test programs - run on make check, make distcheck
|
# test programs - run on make check, make distcheck
|
||||||
|
if ENABLE_TESTS
|
||||||
check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage pngcp
|
check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage pngcp
|
||||||
if HAVE_CLOCK_GETTIME
|
if HAVE_CLOCK_GETTIME
|
||||||
check_PROGRAMS += timepng
|
check_PROGRAMS += timepng
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
check_PROGRAMS=
|
||||||
|
endif
|
||||||
|
|
||||||
# Utilities - installed
|
# Utilities - installed
|
||||||
|
if ENABLE_TOOLS
|
||||||
bin_PROGRAMS= pngfix png-fix-itxt
|
bin_PROGRAMS= pngfix png-fix-itxt
|
||||||
|
else
|
||||||
|
bin_PROGRAMS=
|
||||||
|
endif
|
||||||
|
|
||||||
# This ensures that pnglibconf.h gets built at the start of 'make all' or
|
# This ensures that pnglibconf.h gets built at the start of 'make all' or
|
||||||
# 'make check', but it does not add dependencies to the individual programs,
|
# 'make check', but it does not add dependencies to the individual programs,
|
||||||
@ -30,6 +38,7 @@ bin_PROGRAMS= pngfix png-fix-itxt
|
|||||||
# always wrong and always very confusing.
|
# always wrong and always very confusing.
|
||||||
BUILT_SOURCES = pnglibconf.h
|
BUILT_SOURCES = pnglibconf.h
|
||||||
|
|
||||||
|
if ENABLE_TESTS
|
||||||
pngtest_SOURCES = pngtest.c
|
pngtest_SOURCES = pngtest.c
|
||||||
pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
|
|
||||||
@ -48,19 +57,22 @@ pngimage_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
|||||||
timepng_SOURCES = contrib/libtests/timepng.c
|
timepng_SOURCES = contrib/libtests/timepng.c
|
||||||
timepng_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
timepng_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
|
|
||||||
|
pngcp_SOURCES = contrib/tools/pngcp.c
|
||||||
|
pngcp_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ENABLE_TOOLS
|
||||||
pngfix_SOURCES = contrib/tools/pngfix.c
|
pngfix_SOURCES = contrib/tools/pngfix.c
|
||||||
pngfix_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
pngfix_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
|
|
||||||
png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c
|
png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c
|
||||||
|
endif
|
||||||
pngcp_SOURCES = contrib/tools/pngcp.c
|
|
||||||
pngcp_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
|
||||||
|
|
||||||
# Generally these are single line shell scripts to run a test with a particular
|
# Generally these are single line shell scripts to run a test with a particular
|
||||||
# set of parameters:
|
# set of parameters:
|
||||||
|
if ENABLE_TESTS
|
||||||
TESTS =\
|
TESTS =\
|
||||||
tests/pngtest\
|
tests/pngtest-all\
|
||||||
tests/pngtest-badpngs\
|
|
||||||
tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\
|
tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\
|
||||||
tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\
|
tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\
|
||||||
tests/pngvalid-gamma-expand16-background\
|
tests/pngvalid-gamma-expand16-background\
|
||||||
@ -76,6 +88,7 @@ TESTS =\
|
|||||||
tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\
|
tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\
|
||||||
tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\
|
tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\
|
||||||
tests/pngimage-quick tests/pngimage-full
|
tests/pngimage-quick tests/pngimage-full
|
||||||
|
endif
|
||||||
|
|
||||||
# man pages
|
# man pages
|
||||||
dist_man_MANS= libpng.3 libpngpf.3 png.5
|
dist_man_MANS= libpng.3 libpngpf.3 png.5
|
||||||
@ -95,7 +108,8 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\
|
|||||||
|
|
||||||
if PNG_ARM_NEON
|
if PNG_ARM_NEON
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/arm_init.c\
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/arm_init.c\
|
||||||
arm/filter_neon.S arm/filter_neon_intrinsics.c
|
arm/filter_neon_intrinsics.c \
|
||||||
|
arm/palette_neon_intrinsics.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if PNG_MIPS_MSA
|
if PNG_MIPS_MSA
|
||||||
@ -103,6 +117,13 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/mips_init.c\
|
|||||||
mips/filter_msa_intrinsics.c
|
mips/filter_msa_intrinsics.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if PNG_MIPS_MMI
|
||||||
|
if !PNG_MIPS_MSA
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/mips_init.c
|
||||||
|
endif
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/filter_mmi_inline_assembly.c
|
||||||
|
endif
|
||||||
|
|
||||||
if PNG_INTEL_SSE
|
if PNG_INTEL_SSE
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += intel/intel_init.c\
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += intel/intel_init.c\
|
||||||
intel/filter_sse2_intrinsics.c
|
intel/filter_sse2_intrinsics.c
|
||||||
@ -113,6 +134,22 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += powerpc/powerpc_init.c\
|
|||||||
powerpc/filter_vsx_intrinsics.c
|
powerpc/filter_vsx_intrinsics.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if PNG_RISCV_RVV
|
||||||
|
noinst_LTLIBRARIES= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_SOURCES = riscv/riscv_init.c\
|
||||||
|
riscv/filter_rvv_intrinsics.c
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_CFLAGS = -march=rv64gv
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la
|
||||||
|
endif
|
||||||
|
|
||||||
|
if PNG_LOONGARCH_LSX
|
||||||
|
noinst_LTLIBRARIES= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES = loongarch/loongarch_lsx_init.c\
|
||||||
|
loongarch/filter_lsx_intrinsics.c
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS = -mlsx
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
||||||
|
endif
|
||||||
|
|
||||||
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
|
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
|
||||||
|
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \
|
||||||
@ -133,6 +170,14 @@ else
|
|||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if PNG_RISCV_RVV
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES += libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la
|
||||||
|
endif
|
||||||
|
|
||||||
|
if PNG_LOONGARCH_LSX
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES += libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
||||||
|
endif
|
||||||
|
|
||||||
#distribute headers in /usr/include/libpng/*
|
#distribute headers in /usr/include/libpng/*
|
||||||
pkgincludedir= $(includedir)/$(PNGLIB_BASENAME)
|
pkgincludedir= $(includedir)/$(PNGLIB_BASENAME)
|
||||||
pkginclude_HEADERS= png.h pngconf.h
|
pkginclude_HEADERS= png.h pngconf.h
|
||||||
@ -147,9 +192,9 @@ pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc
|
|||||||
# from those directories being included. This only works if the configure is
|
# from those directories being included. This only works if the configure is
|
||||||
# not done in the source directory!
|
# not done in the source directory!
|
||||||
EXTRA_DIST= \
|
EXTRA_DIST= \
|
||||||
ANNOUNCE CHANGES INSTALL LICENSE README TODO \
|
ANNOUNCE AUTHORS CHANGES INSTALL LICENSE README TODO TRADEMARK \
|
||||||
pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
|
pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
|
||||||
${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \
|
${srcdir}/ci ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \
|
||||||
$(TESTS) $(XFAIL_TESTS) tests/pngstest \
|
$(TESTS) $(XFAIL_TESTS) tests/pngstest \
|
||||||
CMakeLists.txt example.c libpng-manual.txt
|
CMakeLists.txt example.c libpng-manual.txt
|
||||||
|
|
||||||
@ -165,7 +210,7 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
|
|||||||
config.sub configure depcomp install-sh ltmain.sh missing
|
config.sub configure depcomp install-sh ltmain.sh missing
|
||||||
|
|
||||||
# PNG_COPTS give extra options for the C compiler to be used on all compilation
|
# PNG_COPTS give extra options for the C compiler to be used on all compilation
|
||||||
# steps (unless targe_CFLAGS is specified; that will take precedence over
|
# steps (unless target_CFLAGS is specified; that will take precedence over
|
||||||
# AM_CFLAGS)
|
# AM_CFLAGS)
|
||||||
PNG_COPTS = @PNG_COPTS@
|
PNG_COPTS = @PNG_COPTS@
|
||||||
AM_CFLAGS = ${PNG_COPTS}
|
AM_CFLAGS = ${PNG_COPTS}
|
||||||
|
677
Makefile.in
677
Makefile.in
File diff suppressed because it is too large
Load Diff
350
README
350
README
@ -1,56 +1,88 @@
|
|||||||
README for libpng version 1.6.35 - July 15, 2018 (shared library 16.0)
|
README for libpng version 1.6.51.git
|
||||||
See the note about version numbers near the top of png.h
|
====================================
|
||||||
|
|
||||||
See INSTALL for instructions on how to install libpng.
|
See the note about version numbers near the top of `png.h`.
|
||||||
|
See `INSTALL` for instructions on how to install libpng.
|
||||||
|
|
||||||
Libpng comes in several distribution formats. Get libpng-*.tar.gz or
|
Libpng comes in several distribution formats. Get `libpng-*.tar.gz`
|
||||||
libpng-*.tar.xz or if you want UNIX-style line endings in the text files,
|
or `libpng-*.tar.xz` if you want UNIX-style line endings in the text
|
||||||
or lpng*.7z or lpng*.zip if you want DOS-style line endings.
|
files, or `lpng*.7z` or `lpng*.zip` if you want DOS-style line endings.
|
||||||
|
|
||||||
Version 0.89 was the first official release of libpng. Don't let the
|
For a detailed description on using libpng, read `libpng-manual.txt`.
|
||||||
fact that it's the first release fool you. The libpng library has been in
|
For examples of libpng in a program, see `example.c` and `pngtest.c`.
|
||||||
extensive use and testing since mid-1995. By late 1997 it had
|
For usage information and restrictions (what little they are) on libpng,
|
||||||
finally gotten to the stage where there hadn't been significant
|
see `png.h`. For a description on using zlib (the compression library
|
||||||
changes to the API in some time, and people have a bad feeling about
|
used by libpng) and zlib's restrictions, see `zlib.h`.
|
||||||
libraries with versions < 1.0. Version 1.0.0 was released in
|
|
||||||
March 1998.
|
|
||||||
|
|
||||||
****
|
You should use zlib 1.0.4 or later to run this, but it _may_ work with
|
||||||
Note that some of the changes to the png_info structure render this
|
versions as old as zlib 0.95. Even so, there are bugs in older zlib
|
||||||
|
versions which can cause the output of invalid compression streams for
|
||||||
|
some images.
|
||||||
|
|
||||||
|
You should also note that zlib is a compression library that is useful
|
||||||
|
for more things than just PNG files. You can use zlib as a drop-in
|
||||||
|
replacement for `fread()` and `fwrite()`, if you are so inclined.
|
||||||
|
|
||||||
|
zlib should be available at the same place that libpng is, or at
|
||||||
|
https://zlib.net .
|
||||||
|
|
||||||
|
You may also want a copy of the PNG specification. It is available
|
||||||
|
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
|
||||||
|
these at http://www.libpng.org/pub/png/pngdocs.html .
|
||||||
|
|
||||||
|
This code is currently being archived at https://libpng.sourceforge.io
|
||||||
|
in the download area, and at http://libpng.download/src .
|
||||||
|
|
||||||
|
This release, based in a large way on Glenn's, Guy's and Andreas'
|
||||||
|
earlier work, was created and will be supported by myself and the PNG
|
||||||
|
development group.
|
||||||
|
|
||||||
|
Send comments, corrections and commendations to `png-mng-implement`
|
||||||
|
at `lists.sourceforge.net`. (Subscription is required; visit
|
||||||
|
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||||
|
to subscribe.)
|
||||||
|
|
||||||
|
Send general questions about the PNG specification to `png-mng-misc`
|
||||||
|
at `lists.sourceforge.net`. (Subscription is required; visit
|
||||||
|
https://lists.sourceforge.net/lists/listinfo/png-mng-misc
|
||||||
|
to subscribe.)
|
||||||
|
|
||||||
|
Historical notes
|
||||||
|
----------------
|
||||||
|
|
||||||
|
The libpng library has been in extensive use and testing since mid-1995.
|
||||||
|
Version 0.89, published a year later, was the first official release.
|
||||||
|
By late 1997, it had finally gotten to the stage where there hadn't
|
||||||
|
been significant changes to the API in some time, and people have a bad
|
||||||
|
feeling about libraries with versions below 1.0. Version 1.0.0 was
|
||||||
|
released in March 1998.
|
||||||
|
|
||||||
|
Note that some of the changes to the `png_info` structure render this
|
||||||
version of the library binary incompatible with libpng-0.89 or
|
version of the library binary incompatible with libpng-0.89 or
|
||||||
earlier versions if you are using a shared library. The type of the
|
earlier versions if you are using a shared library. The type of the
|
||||||
"filler" parameter for png_set_filler() has changed from png_byte to
|
`filler` parameter for `png_set_filler()` has changed from `png_byte`
|
||||||
png_uint_32, which will affect shared-library applications that use
|
to `png_uint_32`, which will affect shared-library applications that
|
||||||
this function.
|
use this function.
|
||||||
|
|
||||||
To avoid problems with changes to the internals of the png info_struct,
|
To avoid problems with changes to the internals of the `info_struct`,
|
||||||
new APIs have been made available in 0.95 to avoid direct application
|
new APIs have been made available in 0.95 to avoid direct application
|
||||||
access to info_ptr. These functions are the png_set_<chunk> and
|
access to `info_ptr`. These functions are the `png_set_<chunk>` and
|
||||||
png_get_<chunk> functions. These functions should be used when
|
`png_get_<chunk>` functions. These functions should be used when
|
||||||
accessing/storing the info_struct data, rather than manipulating it
|
accessing/storing the `info_struct` data, rather than manipulating it
|
||||||
directly, to avoid such problems in the future.
|
directly, to avoid such problems in the future.
|
||||||
|
|
||||||
It is important to note that the APIs did not make current programs
|
It is important to note that the APIs did not make current programs
|
||||||
that access the info struct directly incompatible with the new
|
that access the info struct directly incompatible with the new
|
||||||
library, through libpng-1.2.x. In libpng-1.4.x, which was meant to
|
library, through libpng-1.2.x. In libpng-1.4.x, which was meant to
|
||||||
be a transitional release, members of the png_struct and the
|
be a transitional release, members of the `png_struct` and the
|
||||||
info_struct can still be accessed, but the compiler will issue a
|
`info_struct` can still be accessed, but the compiler will issue a
|
||||||
warning about deprecated usage. Since libpng-1.5.0, direct access
|
warning about deprecated usage. Since libpng-1.5.0, direct access
|
||||||
to these structs is not allowed, and the definitions of the structs
|
to these structs is not allowed, and the definitions of the structs
|
||||||
reside in private pngstruct.h and pnginfo.h header files that are not
|
reside in private `pngstruct.h` and `pnginfo.h` header files that are
|
||||||
accessible to applications. It is strongly suggested that new
|
not accessible to applications. It is strongly suggested that new
|
||||||
programs use the new APIs (as shown in example.c and pngtest.c), and
|
programs use the new APIs (as shown in `example.c` and `pngtest.c`),
|
||||||
older programs be converted to the new format, to facilitate upgrades
|
and older programs be converted to the new format, to facilitate
|
||||||
in the future.
|
upgrades in the future.
|
||||||
****
|
|
||||||
|
|
||||||
Additions since 0.90 include the ability to compile libpng as a
|
|
||||||
Windows DLL, and new APIs for accessing data in the info struct.
|
|
||||||
Experimental functions include the ability to set weighting and cost
|
|
||||||
factors for row filter selection, direct reads of integers from buffers
|
|
||||||
on big-endian processors that support misaligned data access, faster
|
|
||||||
methods of doing alpha composition, and more accurate 16->8 bit color
|
|
||||||
conversion.
|
|
||||||
|
|
||||||
The additions since 0.89 include the ability to read from a PNG stream
|
The additions since 0.89 include the ability to read from a PNG stream
|
||||||
which has had some (or all) of the signature bytes read by the calling
|
which has had some (or all) of the signature bytes read by the calling
|
||||||
@ -60,163 +92,93 @@ the library action on the detection of chunk CRC errors. It is possible
|
|||||||
to set different actions based on whether the CRC error occurred in a
|
to set different actions based on whether the CRC error occurred in a
|
||||||
critical or an ancillary chunk.
|
critical or an ancillary chunk.
|
||||||
|
|
||||||
The changes made to the library, and bugs fixed are based on discussions
|
The additions since 0.90 include the ability to compile libpng as a
|
||||||
on the PNG-implement mailing list and not on material submitted
|
Windows DLL, and new APIs for accessing data in the `info_struct`.
|
||||||
privately to Guy, Andreas, or Glenn. They will forward any good
|
Experimental functions included the ability to set weighting and cost
|
||||||
suggestions to the list.
|
factors for row filter selection, direct reads of integers from buffers
|
||||||
|
on big-endian processors that support misaligned data access, faster
|
||||||
|
methods of doing alpha composition, and more accurate 16-to-8 bit color
|
||||||
|
conversion. Some of these experimental functions, such as the weighted
|
||||||
|
filter heuristics, have since been removed.
|
||||||
|
|
||||||
For a detailed description on using libpng, read libpng-manual.txt. For
|
Files included in this distribution
|
||||||
examples of libpng in a program, see example.c and pngtest.c. For usage
|
-----------------------------------
|
||||||
information and restrictions (what little they are) on libpng, see
|
|
||||||
png.h. For a description on using zlib (the compression library used by
|
|
||||||
libpng) and zlib's restrictions, see zlib.h
|
|
||||||
|
|
||||||
I have included a general makefile, as well as several machine and
|
ANNOUNCE => Announcement of this version, with recent changes
|
||||||
compiler specific ones, but you may have to modify one for your own needs.
|
AUTHORS => List of contributing authors
|
||||||
|
CHANGES => Description of changes between libpng versions
|
||||||
|
INSTALL => Instructions to install libpng
|
||||||
|
LICENSE => License to use and redistribute libpng
|
||||||
|
README => This file
|
||||||
|
TODO => Things not implemented in the current library
|
||||||
|
TRADEMARK => Trademark information
|
||||||
|
example.c => Example code for using libpng functions
|
||||||
|
libpng.3 => Manual page for libpng (includes libpng-manual.txt)
|
||||||
|
libpng-manual.txt => Description of libpng and its functions
|
||||||
|
libpngpf.3 => Manual page for libpng's private functions (deprecated)
|
||||||
|
png.5 => Manual page for the PNG format
|
||||||
|
png.c => Basic interface functions common to library
|
||||||
|
png.h => Library function and interface declarations (public)
|
||||||
|
pngpriv.h => Library function and interface declarations (private)
|
||||||
|
pngconf.h => System specific library configuration (public)
|
||||||
|
pngstruct.h => png_struct declaration (private)
|
||||||
|
pnginfo.h => png_info struct declaration (private)
|
||||||
|
pngdebug.h => debugging macros (private)
|
||||||
|
pngerror.c => Error/warning message I/O functions
|
||||||
|
pngget.c => Functions for retrieving info from struct
|
||||||
|
pngmem.c => Memory handling functions
|
||||||
|
pngbar.png => PNG logo, 88x31
|
||||||
|
pngnow.png => PNG logo, 98x31
|
||||||
|
pngpread.c => Progressive reading functions
|
||||||
|
pngread.c => Read data/helper high-level functions
|
||||||
|
pngrio.c => Lowest-level data read I/O functions
|
||||||
|
pngrtran.c => Read data transformation functions
|
||||||
|
pngrutil.c => Read data utility functions
|
||||||
|
pngset.c => Functions for storing data into the info_struct
|
||||||
|
pngtest.c => Library test program
|
||||||
|
pngtest.png => Library test sample image
|
||||||
|
pngtrans.c => Common data transformation functions
|
||||||
|
pngwio.c => Lowest-level write I/O functions
|
||||||
|
pngwrite.c => High-level write functions
|
||||||
|
pngwtran.c => Write data transformations
|
||||||
|
pngwutil.c => Write utility functions
|
||||||
|
arm/ => Optimized code for ARM Neon
|
||||||
|
intel/ => Optimized code for INTEL SSE2
|
||||||
|
loongarch/ => Optimized code for LoongArch LSX
|
||||||
|
mips/ => Optimized code for MIPS MSA and MIPS MMI
|
||||||
|
powerpc/ => Optimized code for PowerPC VSX
|
||||||
|
riscv/ => Optimized code for the RISC-V platform
|
||||||
|
ci/ => Scripts for continuous integration
|
||||||
|
contrib/ => External contributions
|
||||||
|
arm-neon/ => Optimized code for the ARM-NEON platform
|
||||||
|
mips-msa/ => Optimized code for the MIPS-MSA platform
|
||||||
|
powerpc-vsx/ => Optimized code for the POWERPC-VSX platform
|
||||||
|
examples/ => Examples of libpng usage
|
||||||
|
gregbook/ => Source code for PNG reading and writing, from
|
||||||
|
"PNG: The Definitive Guide" by Greg Roelofs,
|
||||||
|
O'Reilly, 1999
|
||||||
|
libtests/ => Test programs
|
||||||
|
pngexif/ => Program to inspect the EXIF information in PNG files
|
||||||
|
pngminim/ => Minimal decoder, encoder, and progressive decoder
|
||||||
|
programs demonstrating the use of pngusr.dfa
|
||||||
|
pngminus/ => Simple pnm2png and png2pnm programs
|
||||||
|
pngsuite/ => Test images
|
||||||
|
riscv-rvv/ => Optimized code for the RISC-V Vector platform
|
||||||
|
testpngs/ => Test images
|
||||||
|
tools/ => Various tools
|
||||||
|
visupng/ => VisualPng, a Windows viewer for PNG images
|
||||||
|
projects/ => Project files and workspaces for various IDEs
|
||||||
|
owatcom/ => OpenWatcom project
|
||||||
|
visualc71/ => Microsoft Visual C++ 7.1 workspace
|
||||||
|
vstudio/ => Microsoft Visual Studio workspace
|
||||||
|
scripts/ => Scripts and makefiles for building libpng
|
||||||
|
(see scripts/README.txt for the complete list)
|
||||||
|
tests/ => Test scripts
|
||||||
|
|
||||||
You should use zlib 1.0.4 or later to run this, but it MAY work with
|
Good luck, and happy coding!
|
||||||
versions as old as zlib 0.95. Even so, there are bugs in older zlib
|
|
||||||
versions which can cause the output of invalid compression streams for
|
|
||||||
some images. You will definitely need zlib 1.0.4 or later if you are
|
|
||||||
taking advantage of the MS-DOS "far" structure allocation for the small
|
|
||||||
and medium memory models. You should also note that zlib is a
|
|
||||||
compression library that is useful for more things than just PNG files.
|
|
||||||
You can use zlib as a drop-in replacement for fread() and fwrite() if
|
|
||||||
you are so inclined.
|
|
||||||
|
|
||||||
zlib should be available at the same place that libpng is, or at zlib.net.
|
* Cosmin Truta (current maintainer, since 2018)
|
||||||
|
* Glenn Randers-Pehrson (former maintainer, 1998-2018)
|
||||||
You may also want a copy of the PNG specification. It is available
|
* Andreas Eric Dilger (former maintainer, 1996-1997)
|
||||||
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
|
* Guy Eric Schalnat (original author and former maintainer, 1995-1996)
|
||||||
these at http://www.libpng.org/pub/png/pngdocs.html .
|
(formerly of Group 42, Inc.)
|
||||||
|
|
||||||
This code is currently being archived at libpng.sourceforge.io in the
|
|
||||||
[DOWNLOAD] area, and at http://libpng.download/src . If you
|
|
||||||
can't find it in any of those places, e-mail me, and I'll help you find it.
|
|
||||||
|
|
||||||
I am not a lawyer, but I believe that the Export Control Classification
|
|
||||||
Number (ECCN) for libpng is EAR99, which means not subject to export
|
|
||||||
controls or International Traffic in Arms Regulations (ITAR) because it
|
|
||||||
is open source, publicly available software, that does not contain any
|
|
||||||
encryption software. See the EAR, paragraphs 734.3(b)(3) and 734.7(b).
|
|
||||||
|
|
||||||
If you have any code changes, requests, problems, etc., please e-mail
|
|
||||||
them to me. Also, I'd appreciate any make files or project files,
|
|
||||||
and any modifications you needed to make to get libpng to compile,
|
|
||||||
along with a #define variable to tell what compiler/system you are on.
|
|
||||||
If you needed to add transformations to libpng, or wish libpng would
|
|
||||||
provide the image in a different way, drop me a note (and code, if
|
|
||||||
possible), so I can consider supporting the transformation.
|
|
||||||
Finally, if you get any warning messages when compiling libpng
|
|
||||||
(note: not zlib), and they are easy to fix, I'd appreciate the
|
|
||||||
fix. Please mention "libpng" somewhere in the subject line. Thanks.
|
|
||||||
|
|
||||||
This release was created and will be supported by myself (of course
|
|
||||||
based in a large way on Guy's and Andreas' earlier work), and the PNG
|
|
||||||
development group.
|
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at
|
|
||||||
lists.sourceforge.net (subscription required; visit
|
|
||||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
|
||||||
to subscribe).
|
|
||||||
|
|
||||||
You can't reach Guy, the original libpng author, at the addresses
|
|
||||||
given in previous versions of this document. He and Andreas will
|
|
||||||
read mail addressed to the png-implement list, however.
|
|
||||||
|
|
||||||
Please do not send general questions about PNG. Send them to
|
|
||||||
png-mng-misc at lists.sf.net (subscription required; visit
|
|
||||||
https://lists.sourceforge.net/lists/listinfo/png-mng-misc to
|
|
||||||
subscribe). If you have a question about something
|
|
||||||
in the PNG specification that is related to using libpng, send it
|
|
||||||
to me. Send me any questions that start with "I was using libpng,
|
|
||||||
and ...". If in doubt, send questions to me. I'll bounce them
|
|
||||||
to others, if necessary.
|
|
||||||
|
|
||||||
Please do not send suggestions on how to change PNG. We have
|
|
||||||
been discussing PNG for twenty years now, and it is official and
|
|
||||||
finished. If you have suggestions for libpng, however, I'll
|
|
||||||
gladly listen. Even if your suggestion is not used immediately,
|
|
||||||
it may be used later.
|
|
||||||
|
|
||||||
Files in this distribution:
|
|
||||||
|
|
||||||
ANNOUNCE => Announcement of this version, with recent changes
|
|
||||||
CHANGES => Description of changes between libpng versions
|
|
||||||
KNOWNBUG => List of known bugs and deficiencies
|
|
||||||
LICENSE => License to use and redistribute libpng
|
|
||||||
README => This file
|
|
||||||
TODO => Things not implemented in the current library
|
|
||||||
Y2KINFO => Statement of Y2K compliance
|
|
||||||
example.c => Example code for using libpng functions
|
|
||||||
libpng.3 => manual page for libpng (includes libpng-manual.txt)
|
|
||||||
libpng-manual.txt => Description of libpng and its functions
|
|
||||||
libpngpf.3 => manual page for libpng's private functions
|
|
||||||
png.5 => manual page for the PNG format
|
|
||||||
png.c => Basic interface functions common to library
|
|
||||||
png.h => Library function and interface declarations (public)
|
|
||||||
pngpriv.h => Library function and interface declarations (private)
|
|
||||||
pngconf.h => System specific library configuration (public)
|
|
||||||
pngstruct.h => png_struct declaration (private)
|
|
||||||
pnginfo.h => png_info struct declaration (private)
|
|
||||||
pngdebug.h => debugging macros (private)
|
|
||||||
pngerror.c => Error/warning message I/O functions
|
|
||||||
pngget.c => Functions for retrieving info from struct
|
|
||||||
pngmem.c => Memory handling functions
|
|
||||||
pngbar.png => PNG logo, 88x31
|
|
||||||
pngnow.png => PNG logo, 98x31
|
|
||||||
pngpread.c => Progressive reading functions
|
|
||||||
pngread.c => Read data/helper high-level functions
|
|
||||||
pngrio.c => Lowest-level data read I/O functions
|
|
||||||
pngrtran.c => Read data transformation functions
|
|
||||||
pngrutil.c => Read data utility functions
|
|
||||||
pngset.c => Functions for storing data into the info_struct
|
|
||||||
pngtest.c => Library test program
|
|
||||||
pngtest.png => Library test sample image
|
|
||||||
pngtrans.c => Common data transformation functions
|
|
||||||
pngwio.c => Lowest-level write I/O functions
|
|
||||||
pngwrite.c => High-level write functions
|
|
||||||
pngwtran.c => Write data transformations
|
|
||||||
pngwutil.c => Write utility functions
|
|
||||||
arm => Contains optimized code for the ARM platform
|
|
||||||
powerpc => Contains optimized code for the PowerPC platform
|
|
||||||
contrib => Contributions
|
|
||||||
arm-neon => Optimized code for ARM-NEON platform
|
|
||||||
powerpc-vsx => Optimized code for POWERPC-VSX platform
|
|
||||||
examples => Example programs
|
|
||||||
gregbook => source code for PNG reading and writing, from
|
|
||||||
Greg Roelofs' "PNG: The Definitive Guide",
|
|
||||||
O'Reilly, 1999
|
|
||||||
libtests => Test programs
|
|
||||||
mips-msa => Optimized code for MIPS-MSA platform
|
|
||||||
pngminim => Minimal decoder, encoder, and progressive decoder
|
|
||||||
programs demonstrating use of pngusr.dfa
|
|
||||||
pngminus => Simple pnm2png and png2pnm programs
|
|
||||||
pngsuite => Test images
|
|
||||||
testpngs
|
|
||||||
tools => Various tools
|
|
||||||
visupng => Contains a MSVC workspace for VisualPng
|
|
||||||
intel => Optimized code for INTEL-SSE2 platform
|
|
||||||
mips => Optimized code for MIPS platform
|
|
||||||
projects => Contains project files and workspaces for
|
|
||||||
building a DLL
|
|
||||||
owatcom => Contains a WATCOM project for building libpng
|
|
||||||
visualc71 => Contains a Microsoft Visual C++ (MSVC)
|
|
||||||
workspace for building libpng and zlib
|
|
||||||
vstudio => Contains a Microsoft Visual C++ (MSVC)
|
|
||||||
workspace for building libpng and zlib
|
|
||||||
scripts => Directory containing scripts for building libpng:
|
|
||||||
(see scripts/README.txt for the list of scripts)
|
|
||||||
|
|
||||||
Good luck, and happy coding.
|
|
||||||
|
|
||||||
-Glenn Randers-Pehrson (current maintainer, since 1998)
|
|
||||||
Internet: glennrp at users.sourceforge.net
|
|
||||||
|
|
||||||
-Andreas Eric Dilger (former maintainer, 1996-1997)
|
|
||||||
Internet: adilger at enel.ucalgary.ca
|
|
||||||
Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/
|
|
||||||
|
|
||||||
-Guy Eric Schalnat (original author and former maintainer, 1995-1996)
|
|
||||||
(formerly of Group 42, Inc)
|
|
||||||
Internet: gschal at infinet.com
|
|
||||||
|
50
TODO
50
TODO
@ -1,30 +1,22 @@
|
|||||||
/*
|
TODO list for libpng
|
||||||
TODO - list of things to do for libpng:
|
--------------------
|
||||||
|
|
||||||
Final bug fixes.
|
* Fix all defects (duh!)
|
||||||
Better C++ wrapper/full C++ implementation?
|
* cHRM transformation.
|
||||||
Fix problem with C++ and EXTERN "C".
|
* Palette creation.
|
||||||
cHRM transformation.
|
* "grayscale->palette" transformation and "palette->grayscale" detection.
|
||||||
Remove setjmp/longjmp usage in favor of returning error codes. As a start on
|
* Improved dithering.
|
||||||
this, minimize the use of png_error(), replacing them with
|
* Multi-lingual error and warning message support.
|
||||||
png_warning(); return(0); or similar.
|
* Complete sRGB transformation. (Currently it simply uses gamma=0.45455.)
|
||||||
Palette creation.
|
* Man pages for function calls.
|
||||||
Add "grayscale->palette" transformation and "palette->grayscale" detection.
|
* Better documentation.
|
||||||
Improved dithering.
|
* Better filter selection
|
||||||
Multi-lingual error and warning message support.
|
(e.g., counting huffman bits/precompression; filter inertia; filter costs).
|
||||||
Complete sRGB transformation (presently it simply uses gamma=0.45455).
|
* Histogram creation.
|
||||||
Man pages for function calls.
|
* Text conversion between different code pages (e.g., Latin-1 to Mac).
|
||||||
Better documentation.
|
* Avoid building gamma tables whenever possible.
|
||||||
Better filter selection
|
* Greater precision in changing to linear gamma for compositing against
|
||||||
(counting huffman bits/precompression? filter inertia? filter costs?).
|
background, and in doing rgb-to-gray transformations.
|
||||||
Histogram creation.
|
* Investigate pre-incremented loop counters and other loop constructions.
|
||||||
Text conversion between different code pages (Latin-1 -> Mac and DOS).
|
* Interpolated method of handling interlacing.
|
||||||
Avoid building gamma tables whenever possible.
|
* More validations for libpng transformations.
|
||||||
Use greater precision when changing to linear gamma for compositing against
|
|
||||||
background and doing rgb-to-gray transformation.
|
|
||||||
Investigate pre-incremented loop counters and other loop constructions.
|
|
||||||
Add interpolated method of handling interlacing.
|
|
||||||
Extend pngvalid.c to validate more of the libpng transformations.
|
|
||||||
Refactor preprocessor conditionals to compile entire statements
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
8
TRADEMARK
Normal file
8
TRADEMARK
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
TRADEMARK
|
||||||
|
=========
|
||||||
|
|
||||||
|
The name "libpng" has not been registered by the Copyright owners
|
||||||
|
as a trademark in any jurisdiction. However, because libpng has
|
||||||
|
been distributed and maintained world-wide, continually since 1995,
|
||||||
|
the Copyright owners claim "common-law trademark protection" in any
|
||||||
|
jurisdiction where common-law trademark is recognized.
|
476
aclocal.m4
vendored
476
aclocal.m4
vendored
@ -1,6 +1,6 @@
|
|||||||
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
|
# generated automatically by aclocal 1.18.1 -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -14,13 +14,13 @@
|
|||||||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
|
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],,
|
||||||
[m4_warning([this file was generated for autoconf 2.69.
|
[m4_warning([this file was generated for autoconf 2.72.
|
||||||
You have another version of autoconf. It may work, but is not guaranteed to.
|
You have another version of autoconf. It may work, but is not guaranteed to.
|
||||||
If you have problems, you may need to regenerate the build system entirely.
|
If you have problems, you may need to regenerate the build system entirely.
|
||||||
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
||||||
|
|
||||||
# Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
# Copyright (C) 2002-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
|
|||||||
# generated from the m4 files accompanying Automake X.Y.
|
# generated from the m4 files accompanying Automake X.Y.
|
||||||
# (This private macro should not be called outside this file.)
|
# (This private macro should not be called outside this file.)
|
||||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||||
[am__api_version='1.16'
|
[am__api_version='1.18'
|
||||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||||
dnl require some minimum version. Point them to the right macro.
|
dnl require some minimum version. Point them to the right macro.
|
||||||
m4_if([$1], [1.16.1], [],
|
m4_if([$1], [1.18.1], [],
|
||||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
|
|||||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||||
[AM_AUTOMAKE_VERSION([1.16.1])dnl
|
[AM_AUTOMAKE_VERSION([1.18.1])dnl
|
||||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||||
|
|
||||||
# Figure out how to run the assembler. -*- Autoconf -*-
|
# Figure out how to run the assembler. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -78,7 +78,7 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
|
|||||||
|
|
||||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -130,7 +130,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
|||||||
|
|
||||||
# AM_CONDITIONAL -*- Autoconf -*-
|
# AM_CONDITIONAL -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1997-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -161,7 +161,7 @@ AC_CONFIG_COMMANDS_PRE(
|
|||||||
Usually this means the macro was only invoked conditionally.]])
|
Usually this means the macro was only invoked conditionally.]])
|
||||||
fi])])
|
fi])])
|
||||||
|
|
||||||
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -293,7 +293,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
|
|||||||
# icc doesn't choke on unknown options, it will just issue warnings
|
# icc doesn't choke on unknown options, it will just issue warnings
|
||||||
# or remarks (even with -Werror). So we grep stderr for any message
|
# or remarks (even with -Werror). So we grep stderr for any message
|
||||||
# that says an option was ignored or not supported.
|
# that says an option was ignored or not supported.
|
||||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
# When given -MP, icc 7.0 and 7.1 complain thus:
|
||||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||||
# The diagnosis changed in icc 8.0:
|
# The diagnosis changed in icc 8.0:
|
||||||
# icc: Command line remark: option '-MP' not supported
|
# icc: Command line remark: option '-MP' not supported
|
||||||
@ -352,7 +352,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
|
|||||||
|
|
||||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -391,7 +391,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||||||
done
|
done
|
||||||
if test $am_rc -ne 0; then
|
if test $am_rc -ne 0; then
|
||||||
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
|
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
|
||||||
for automatic dependency tracking. Try re-running configure with the
|
for automatic dependency tracking. If GNU make was not used, consider
|
||||||
|
re-running the configure script with MAKE="gmake" (or whatever is
|
||||||
|
necessary). You can also try re-running configure with the
|
||||||
'--disable-dependency-tracking' option to at least be able to build
|
'--disable-dependency-tracking' option to at least be able to build
|
||||||
the package (albeit without support for automatic dependency tracking).])
|
the package (albeit without support for automatic dependency tracking).])
|
||||||
fi
|
fi
|
||||||
@ -418,7 +420,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||||||
|
|
||||||
# Do all the work for Automake. -*- Autoconf -*-
|
# Do all the work for Automake. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -446,6 +448,10 @@ m4_defn([AC_PROG_CC])
|
|||||||
# release and drop the old call support.
|
# release and drop the old call support.
|
||||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||||
[AC_PREREQ([2.65])dnl
|
[AC_PREREQ([2.65])dnl
|
||||||
|
m4_ifdef([_$0_ALREADY_INIT],
|
||||||
|
[m4_fatal([$0 expanded multiple times
|
||||||
|
]m4_defn([_$0_ALREADY_INIT]))],
|
||||||
|
[m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
|
||||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||||
dnl the ones we care about.
|
dnl the ones we care about.
|
||||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||||
@ -482,7 +488,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
|||||||
[_AM_SET_OPTIONS([$1])dnl
|
[_AM_SET_OPTIONS([$1])dnl
|
||||||
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
||||||
m4_if(
|
m4_if(
|
||||||
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
|
m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
|
||||||
[ok:ok],,
|
[ok:ok],,
|
||||||
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
||||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||||
@ -514,8 +520,9 @@ AC_REQUIRE([AC_PROG_AWK])dnl
|
|||||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||||
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||||
[_AM_PROG_TAR([v7])])])
|
[_AM_IF_OPTION([tar-v7], [_AM_PROG_TAR([v7])],
|
||||||
|
[_AM_PROG_TAR([ustar])])])])
|
||||||
_AM_IF_OPTION([no-dependencies],,
|
_AM_IF_OPTION([no-dependencies],,
|
||||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||||
[_AM_DEPENDENCIES([CC])],
|
[_AM_DEPENDENCIES([CC])],
|
||||||
@ -534,7 +541,21 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
|
|||||||
[m4_define([AC_PROG_OBJCXX],
|
[m4_define([AC_PROG_OBJCXX],
|
||||||
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
|
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
|
||||||
])
|
])
|
||||||
AC_REQUIRE([AM_SILENT_RULES])dnl
|
# Variables for tags utilities; see am/tags.am
|
||||||
|
if test -z "$CTAGS"; then
|
||||||
|
CTAGS=ctags
|
||||||
|
fi
|
||||||
|
AC_SUBST([CTAGS])
|
||||||
|
if test -z "$ETAGS"; then
|
||||||
|
ETAGS=etags
|
||||||
|
fi
|
||||||
|
AC_SUBST([ETAGS])
|
||||||
|
if test -z "$CSCOPE"; then
|
||||||
|
CSCOPE=cscope
|
||||||
|
fi
|
||||||
|
AC_SUBST([CSCOPE])
|
||||||
|
|
||||||
|
AC_REQUIRE([_AM_SILENT_RULES])dnl
|
||||||
dnl The testsuite driver may need to know about EXEEXT, so add the
|
dnl The testsuite driver may need to know about EXEEXT, so add the
|
||||||
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
|
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
|
||||||
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
||||||
@ -542,47 +563,9 @@ AC_CONFIG_COMMANDS_PRE(dnl
|
|||||||
[m4_provide_if([_AM_COMPILER_EXEEXT],
|
[m4_provide_if([_AM_COMPILER_EXEEXT],
|
||||||
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
||||||
|
|
||||||
# POSIX will say in a future version that running "rm -f" with no argument
|
AC_REQUIRE([_AM_PROG_RM_F])
|
||||||
# is OK; and we want to be able to make that assumption in our Makefile
|
AC_REQUIRE([_AM_PROG_XARGS_N])
|
||||||
# recipes. So use an aggressive probe to check that the usage we want is
|
|
||||||
# actually supported "in the wild" to an acceptable degree.
|
|
||||||
# See automake bug#10828.
|
|
||||||
# To make any issue more visible, cause the running configure to be aborted
|
|
||||||
# by default if the 'rm' program in use doesn't match our expectations; the
|
|
||||||
# user can still override this though.
|
|
||||||
if rm -f && rm -fr && rm -rf; then : OK; else
|
|
||||||
cat >&2 <<'END'
|
|
||||||
Oops!
|
|
||||||
|
|
||||||
Your 'rm' program seems unable to run without file operands specified
|
|
||||||
on the command line, even when the '-f' option is present. This is contrary
|
|
||||||
to the behaviour of most rm programs out there, and not conforming with
|
|
||||||
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
|
|
||||||
|
|
||||||
Please tell bug-automake@gnu.org about your system, including the value
|
|
||||||
of your $PATH and any error possibly output before this message. This
|
|
||||||
can help us improve future automake versions.
|
|
||||||
|
|
||||||
END
|
|
||||||
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
|
|
||||||
echo 'Configuration will proceed anyway, since you have set the' >&2
|
|
||||||
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
|
|
||||||
echo >&2
|
|
||||||
else
|
|
||||||
cat >&2 <<'END'
|
|
||||||
Aborting the configuration process, to ensure you take notice of the issue.
|
|
||||||
|
|
||||||
You can download and install GNU coreutils to get an 'rm' implementation
|
|
||||||
that behaves properly: <https://www.gnu.org/software/coreutils/>.
|
|
||||||
|
|
||||||
If you want to complete the configuration process using your problematic
|
|
||||||
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
|
|
||||||
to "yes", and re-run configure.
|
|
||||||
|
|
||||||
END
|
|
||||||
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
dnl The trailing newline in this macro's definition is deliberate, for
|
dnl The trailing newline in this macro's definition is deliberate, for
|
||||||
dnl backward compatibility and to allow trailing 'dnl'-style comments
|
dnl backward compatibility and to allow trailing 'dnl'-style comments
|
||||||
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
|
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
|
||||||
@ -615,7 +598,7 @@ for _am_header in $config_headers :; do
|
|||||||
done
|
done
|
||||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||||
|
|
||||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -636,7 +619,7 @@ if test x"${install_sh+set}" != xset; then
|
|||||||
fi
|
fi
|
||||||
AC_SUBST([install_sh])])
|
AC_SUBST([install_sh])])
|
||||||
|
|
||||||
# Copyright (C) 2003-2018 Free Software Foundation, Inc.
|
# Copyright (C) 2003-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -658,7 +641,7 @@ AC_SUBST([am__leading_dot])])
|
|||||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||||
# From Jim Meyering
|
# From Jim Meyering
|
||||||
|
|
||||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -693,7 +676,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
|||||||
|
|
||||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -736,7 +719,7 @@ AC_SUBST([am__quote])])
|
|||||||
|
|
||||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1997-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -757,12 +740,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
|
|||||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
AC_REQUIRE_AUX_FILE([missing])dnl
|
AC_REQUIRE_AUX_FILE([missing])dnl
|
||||||
if test x"${MISSING+set}" != xset; then
|
if test x"${MISSING+set}" != xset; then
|
||||||
case $am_aux_dir in
|
MISSING="\${SHELL} '$am_aux_dir/missing'"
|
||||||
*\ * | *\ *)
|
|
||||||
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
|
|
||||||
*)
|
|
||||||
MISSING="\${SHELL} $am_aux_dir/missing" ;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
# Use eval to expand $SHELL
|
# Use eval to expand $SHELL
|
||||||
if eval "$MISSING --is-lightweight"; then
|
if eval "$MISSING --is-lightweight"; then
|
||||||
@ -775,7 +753,7 @@ fi
|
|||||||
|
|
||||||
# Helper functions for option handling. -*- Autoconf -*-
|
# Helper functions for option handling. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -804,7 +782,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
|
|||||||
AC_DEFUN([_AM_IF_OPTION],
|
AC_DEFUN([_AM_IF_OPTION],
|
||||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||||
|
|
||||||
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -836,7 +814,10 @@ AC_CACHE_CHECK(
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
rm -f core conftest*
|
# aligned with autoconf, so not including core; see bug#72225.
|
||||||
|
rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \
|
||||||
|
conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \
|
||||||
|
conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM
|
||||||
unset am_i])
|
unset am_i])
|
||||||
if test "$am_cv_prog_cc_c_o" != yes; then
|
if test "$am_cv_prog_cc_c_o" != yes; then
|
||||||
# Losing compiler, so override with the script.
|
# Losing compiler, so override with the script.
|
||||||
@ -851,7 +832,23 @@ AC_LANG_POP([C])])
|
|||||||
# For backward compatibility.
|
# For backward compatibility.
|
||||||
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
||||||
|
|
||||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
# Copyright (C) 2022-2025 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# _AM_PROG_RM_F
|
||||||
|
# ---------------
|
||||||
|
# Check whether 'rm -f' without any arguments works.
|
||||||
|
# https://bugs.gnu.org/10828
|
||||||
|
AC_DEFUN([_AM_PROG_RM_F],
|
||||||
|
[am__rm_f_notfound=
|
||||||
|
AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""'])
|
||||||
|
AC_SUBST(am__rm_f_notfound)
|
||||||
|
])
|
||||||
|
|
||||||
|
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -870,26 +867,181 @@ AC_DEFUN([AM_RUN_LOG],
|
|||||||
|
|
||||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# _AM_SLEEP_FRACTIONAL_SECONDS
|
||||||
|
# ----------------------------
|
||||||
|
AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl
|
||||||
|
AC_CACHE_CHECK([whether sleep supports fractional seconds],
|
||||||
|
am_cv_sleep_fractional_seconds, [dnl
|
||||||
|
AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes],
|
||||||
|
[am_cv_sleep_fractional_seconds=no])
|
||||||
|
])])
|
||||||
|
|
||||||
|
# _AM_FILESYSTEM_TIMESTAMP_RESOLUTION
|
||||||
|
# -----------------------------------
|
||||||
|
# Determine the filesystem's resolution for file modification
|
||||||
|
# timestamps. The coarsest we know of is FAT, with a resolution
|
||||||
|
# of only two seconds, even with the most recent "exFAT" extensions.
|
||||||
|
# The finest (e.g. ext4 with large inodes, XFS, ZFS) is one
|
||||||
|
# nanosecond, matching clock_gettime. However, it is probably not
|
||||||
|
# possible to delay execution of a shell script for less than one
|
||||||
|
# millisecond, due to process creation overhead and scheduling
|
||||||
|
# granularity, so we don't check for anything finer than that. (See below.)
|
||||||
|
AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl
|
||||||
|
AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS])
|
||||||
|
AC_CACHE_CHECK([filesystem timestamp resolution],
|
||||||
|
am_cv_filesystem_timestamp_resolution, [dnl
|
||||||
|
# Default to the worst case.
|
||||||
|
am_cv_filesystem_timestamp_resolution=2
|
||||||
|
|
||||||
|
# Only try to go finer than 1 sec if sleep can do it.
|
||||||
|
# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work,
|
||||||
|
# - 1 sec is not much of a win compared to 2 sec, and
|
||||||
|
# - it takes 2 seconds to perform the test whether 1 sec works.
|
||||||
|
#
|
||||||
|
# Instead, just use the default 2s on platforms that have 1s resolution,
|
||||||
|
# accept the extra 1s delay when using $sleep in the Automake tests, in
|
||||||
|
# exchange for not incurring the 2s delay for running the test for all
|
||||||
|
# packages.
|
||||||
|
#
|
||||||
|
am_try_resolutions=
|
||||||
|
if test "$am_cv_sleep_fractional_seconds" = yes; then
|
||||||
|
# Even a millisecond often causes a bunch of false positives,
|
||||||
|
# so just try a hundredth of a second. The time saved between .001 and
|
||||||
|
# .01 is not terribly consequential.
|
||||||
|
am_try_resolutions="0.01 0.1 $am_try_resolutions"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# In order to catch current-generation FAT out, we must *modify* files
|
||||||
|
# that already exist; the *creation* timestamp is finer. Use names
|
||||||
|
# that make ls -t sort them differently when they have equal
|
||||||
|
# timestamps than when they have distinct timestamps, keeping
|
||||||
|
# in mind that ls -t prints the *newest* file first.
|
||||||
|
rm -f conftest.ts?
|
||||||
|
: > conftest.ts1
|
||||||
|
: > conftest.ts2
|
||||||
|
: > conftest.ts3
|
||||||
|
|
||||||
|
# Make sure ls -t actually works. Do 'set' in a subshell so we don't
|
||||||
|
# clobber the current shell's arguments. (Outer-level square brackets
|
||||||
|
# are removed by m4; they're present so that m4 does not expand
|
||||||
|
# <dollar><star>; be careful, easy to get confused.)
|
||||||
|
if (
|
||||||
|
set X `[ls -t conftest.ts[12]]` &&
|
||||||
|
{
|
||||||
|
test "$[]*" != "X conftest.ts1 conftest.ts2" ||
|
||||||
|
test "$[]*" != "X conftest.ts2 conftest.ts1";
|
||||||
|
}
|
||||||
|
); then :; else
|
||||||
|
# If neither matched, then we have a broken ls. This can happen
|
||||||
|
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||||
|
# broken ls alias from the environment. This has actually
|
||||||
|
# happened. Such a system could not be considered "sane".
|
||||||
|
_AS_ECHO_UNQUOTED(
|
||||||
|
["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""],
|
||||||
|
[AS_MESSAGE_LOG_FD])
|
||||||
|
AC_MSG_FAILURE([ls -t produces unexpected output.
|
||||||
|
Make sure there is not a broken ls alias in your environment.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
for am_try_res in $am_try_resolutions; do
|
||||||
|
# Any one fine-grained sleep might happen to cross the boundary
|
||||||
|
# between two values of a coarser actual resolution, but if we do
|
||||||
|
# two fine-grained sleeps in a row, at least one of them will fall
|
||||||
|
# entirely within a coarse interval.
|
||||||
|
echo alpha > conftest.ts1
|
||||||
|
sleep $am_try_res
|
||||||
|
echo beta > conftest.ts2
|
||||||
|
sleep $am_try_res
|
||||||
|
echo gamma > conftest.ts3
|
||||||
|
|
||||||
|
# We assume that 'ls -t' will make use of high-resolution
|
||||||
|
# timestamps if the operating system supports them at all.
|
||||||
|
if (set X `ls -t conftest.ts?` &&
|
||||||
|
test "$[]2" = conftest.ts3 &&
|
||||||
|
test "$[]3" = conftest.ts2 &&
|
||||||
|
test "$[]4" = conftest.ts1); then
|
||||||
|
#
|
||||||
|
# Ok, ls -t worked. If we're at a resolution of 1 second, we're done,
|
||||||
|
# because we don't need to test make.
|
||||||
|
make_ok=true
|
||||||
|
if test $am_try_res != 1; then
|
||||||
|
# But if we've succeeded so far with a subsecond resolution, we
|
||||||
|
# have one more thing to check: make. It can happen that
|
||||||
|
# everything else supports the subsecond mtimes, but make doesn't;
|
||||||
|
# notably on macOS, which ships make 3.81 from 2006 (the last one
|
||||||
|
# released under GPLv2). https://bugs.gnu.org/68808
|
||||||
|
#
|
||||||
|
# We test $MAKE if it is defined in the environment, else "make".
|
||||||
|
# It might get overridden later, but our hope is that in practice
|
||||||
|
# it does not matter: it is the system "make" which is (by far)
|
||||||
|
# the most likely to be broken, whereas if the user overrides it,
|
||||||
|
# probably they did so with a better, or at least not worse, make.
|
||||||
|
# https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html
|
||||||
|
#
|
||||||
|
# Create a Makefile (real tab character here):
|
||||||
|
rm -f conftest.mk
|
||||||
|
echo 'conftest.ts1: conftest.ts2' >conftest.mk
|
||||||
|
echo ' touch conftest.ts2' >>conftest.mk
|
||||||
|
#
|
||||||
|
# Now, running
|
||||||
|
# touch conftest.ts1; touch conftest.ts2; make
|
||||||
|
# should touch ts1 because ts2 is newer. This could happen by luck,
|
||||||
|
# but most often, it will fail if make's support is insufficient. So
|
||||||
|
# test for several consecutive successes.
|
||||||
|
#
|
||||||
|
# (We reuse conftest.ts[12] because we still want to modify existing
|
||||||
|
# files, not create new ones, per above.)
|
||||||
|
n=0
|
||||||
|
make=${MAKE-make}
|
||||||
|
until test $n -eq 3; do
|
||||||
|
echo one > conftest.ts1
|
||||||
|
sleep $am_try_res
|
||||||
|
echo two > conftest.ts2 # ts2 should now be newer than ts1
|
||||||
|
if $make -f conftest.mk | grep 'up to date' >/dev/null; then
|
||||||
|
make_ok=false
|
||||||
|
break # out of $n loop
|
||||||
|
fi
|
||||||
|
n=`expr $n + 1`
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
if $make_ok; then
|
||||||
|
# Everything we know to check worked out, so call this resolution good.
|
||||||
|
am_cv_filesystem_timestamp_resolution=$am_try_res
|
||||||
|
break # out of $am_try_res loop
|
||||||
|
fi
|
||||||
|
# Otherwise, we'll go on to check the next resolution.
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rm -f conftest.ts?
|
||||||
|
# (end _am_filesystem_timestamp_resolution)
|
||||||
|
])])
|
||||||
|
|
||||||
# AM_SANITY_CHECK
|
# AM_SANITY_CHECK
|
||||||
# ---------------
|
# ---------------
|
||||||
AC_DEFUN([AM_SANITY_CHECK],
|
AC_DEFUN([AM_SANITY_CHECK],
|
||||||
[AC_MSG_CHECKING([whether build environment is sane])
|
[AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION])
|
||||||
|
# This check should not be cached, as it may vary across builds of
|
||||||
|
# different projects.
|
||||||
|
AC_MSG_CHECKING([whether build environment is sane])
|
||||||
# Reject unsafe characters in $srcdir or the absolute working directory
|
# Reject unsafe characters in $srcdir or the absolute working directory
|
||||||
# name. Accept space and tab only in the latter.
|
# name. Accept space and tab only in the latter.
|
||||||
am_lf='
|
am_lf='
|
||||||
'
|
'
|
||||||
case `pwd` in
|
case `pwd` in
|
||||||
*[[\\\"\#\$\&\'\`$am_lf]]*)
|
*[[\\\"\#\$\&\'\`$am_lf]]*)
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
AC_MSG_ERROR([unsafe absolute working directory name]);;
|
AC_MSG_ERROR([unsafe absolute working directory name]);;
|
||||||
esac
|
esac
|
||||||
case $srcdir in
|
case $srcdir in
|
||||||
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
|
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
|
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -898,49 +1050,40 @@ esac
|
|||||||
# symlink; some systems play weird games with the mod time of symlinks
|
# symlink; some systems play weird games with the mod time of symlinks
|
||||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||||
# directory).
|
# directory).
|
||||||
if (
|
am_build_env_is_sane=no
|
||||||
am_has_slept=no
|
am_has_slept=no
|
||||||
for am_try in 1 2; do
|
rm -f conftest.file
|
||||||
echo "timestamp, slept: $am_has_slept" > conftest.file
|
for am_try in 1 2; do
|
||||||
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
|
echo "timestamp, slept: $am_has_slept" > conftest.file
|
||||||
if test "$[*]" = "X"; then
|
if (
|
||||||
# -L didn't work.
|
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
|
||||||
set X `ls -t "$srcdir/configure" conftest.file`
|
if test "$[]*" = "X"; then
|
||||||
fi
|
# -L didn't work.
|
||||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
set X `ls -t "$srcdir/configure" conftest.file`
|
||||||
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
fi
|
||||||
|
test "$[]2" = conftest.file
|
||||||
|
); then
|
||||||
|
am_build_env_is_sane=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
# Just in case.
|
||||||
|
sleep "$am_cv_filesystem_timestamp_resolution"
|
||||||
|
am_has_slept=yes
|
||||||
|
done
|
||||||
|
|
||||||
# If neither matched, then we have a broken ls. This can happen
|
AC_MSG_RESULT([$am_build_env_is_sane])
|
||||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
if test "$am_build_env_is_sane" = no; then
|
||||||
# broken ls alias from the environment. This has actually
|
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||||
# happened. Such a system could not be considered "sane".
|
|
||||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
|
||||||
alias in your environment])
|
|
||||||
fi
|
|
||||||
if test "$[2]" = conftest.file || test $am_try -eq 2; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
# Just in case.
|
|
||||||
sleep 1
|
|
||||||
am_has_slept=yes
|
|
||||||
done
|
|
||||||
test "$[2]" = conftest.file
|
|
||||||
)
|
|
||||||
then
|
|
||||||
# Ok.
|
|
||||||
:
|
|
||||||
else
|
|
||||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
|
||||||
Check your system clock])
|
Check your system clock])
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
# If we didn't sleep, we still need to ensure time stamps of config.status and
|
# If we didn't sleep, we still need to ensure time stamps of config.status and
|
||||||
# generated files are strictly newer.
|
# generated files are strictly newer.
|
||||||
am_sleep_pid=
|
am_sleep_pid=
|
||||||
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
|
AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl
|
||||||
( sleep 1 ) &
|
( sleep "$am_cv_filesystem_timestamp_resolution" ) &
|
||||||
am_sleep_pid=$!
|
am_sleep_pid=$!
|
||||||
fi
|
])
|
||||||
AC_CONFIG_COMMANDS_PRE(
|
AC_CONFIG_COMMANDS_PRE(
|
||||||
[AC_MSG_CHECKING([that generated files are newer than configure])
|
[AC_MSG_CHECKING([that generated files are newer than configure])
|
||||||
if test -n "$am_sleep_pid"; then
|
if test -n "$am_sleep_pid"; then
|
||||||
@ -951,18 +1094,18 @@ AC_CONFIG_COMMANDS_PRE(
|
|||||||
rm -f conftest.file
|
rm -f conftest.file
|
||||||
])
|
])
|
||||||
|
|
||||||
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
|
# Copyright (C) 2009-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
# AM_SILENT_RULES([DEFAULT])
|
# _AM_SILENT_RULES
|
||||||
# --------------------------
|
# ----------------
|
||||||
# Enable less verbose build rules; with the default set to DEFAULT
|
# Enable less verbose build rules support.
|
||||||
# ("yes" being less verbose, "no" or empty being verbose).
|
AC_DEFUN([_AM_SILENT_RULES],
|
||||||
AC_DEFUN([AM_SILENT_RULES],
|
[AM_DEFAULT_VERBOSITY=1
|
||||||
[AC_ARG_ENABLE([silent-rules], [dnl
|
AC_ARG_ENABLE([silent-rules], [dnl
|
||||||
AS_HELP_STRING(
|
AS_HELP_STRING(
|
||||||
[--enable-silent-rules],
|
[--enable-silent-rules],
|
||||||
[less verbose build output (undo: "make V=1")])
|
[less verbose build output (undo: "make V=1")])
|
||||||
@ -970,11 +1113,6 @@ AS_HELP_STRING(
|
|||||||
[--disable-silent-rules],
|
[--disable-silent-rules],
|
||||||
[verbose build output (undo: "make V=0")])dnl
|
[verbose build output (undo: "make V=0")])dnl
|
||||||
])
|
])
|
||||||
case $enable_silent_rules in @%:@ (((
|
|
||||||
yes) AM_DEFAULT_VERBOSITY=0;;
|
|
||||||
no) AM_DEFAULT_VERBOSITY=1;;
|
|
||||||
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
|
|
||||||
esac
|
|
||||||
dnl
|
dnl
|
||||||
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
|
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
|
||||||
dnl do not support nested variable expansions.
|
dnl do not support nested variable expansions.
|
||||||
@ -993,14 +1131,6 @@ am__doit:
|
|||||||
else
|
else
|
||||||
am_cv_make_support_nested_variables=no
|
am_cv_make_support_nested_variables=no
|
||||||
fi])
|
fi])
|
||||||
if test $am_cv_make_support_nested_variables = yes; then
|
|
||||||
dnl Using '$V' instead of '$(V)' breaks IRIX make.
|
|
||||||
AM_V='$(V)'
|
|
||||||
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
|
|
||||||
else
|
|
||||||
AM_V=$AM_DEFAULT_VERBOSITY
|
|
||||||
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
|
|
||||||
fi
|
|
||||||
AC_SUBST([AM_V])dnl
|
AC_SUBST([AM_V])dnl
|
||||||
AM_SUBST_NOTMAKE([AM_V])dnl
|
AM_SUBST_NOTMAKE([AM_V])dnl
|
||||||
AC_SUBST([AM_DEFAULT_V])dnl
|
AC_SUBST([AM_DEFAULT_V])dnl
|
||||||
@ -1009,9 +1139,37 @@ AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
|
|||||||
AM_BACKSLASH='\'
|
AM_BACKSLASH='\'
|
||||||
AC_SUBST([AM_BACKSLASH])dnl
|
AC_SUBST([AM_BACKSLASH])dnl
|
||||||
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
||||||
|
dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls
|
||||||
|
dnl to AM_SILENT_RULES to change the default value.
|
||||||
|
AC_CONFIG_COMMANDS_PRE([dnl
|
||||||
|
case $enable_silent_rules in @%:@ (((
|
||||||
|
yes) AM_DEFAULT_VERBOSITY=0;;
|
||||||
|
no) AM_DEFAULT_VERBOSITY=1;;
|
||||||
|
esac
|
||||||
|
if test $am_cv_make_support_nested_variables = yes; then
|
||||||
|
dnl Using '$V' instead of '$(V)' breaks IRIX make.
|
||||||
|
AM_V='$(V)'
|
||||||
|
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
|
||||||
|
else
|
||||||
|
AM_V=$AM_DEFAULT_VERBOSITY
|
||||||
|
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
|
||||||
|
fi
|
||||||
|
])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
# AM_SILENT_RULES([DEFAULT])
|
||||||
|
# --------------------------
|
||||||
|
# Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or
|
||||||
|
# empty being verbose).
|
||||||
|
AC_DEFUN([AM_SILENT_RULES],
|
||||||
|
[AC_REQUIRE([_AM_SILENT_RULES])
|
||||||
|
AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])m4_newline
|
||||||
|
dnl We intentionally force a newline after the assignment, since a) nothing
|
||||||
|
dnl good can come of more text following, and b) that was the behavior
|
||||||
|
dnl before 1.17. See https://bugs.gnu.org/72267.
|
||||||
|
])
|
||||||
|
|
||||||
|
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -1039,7 +1197,7 @@ fi
|
|||||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||||
|
|
||||||
# Copyright (C) 2006-2018 Free Software Foundation, Inc.
|
# Copyright (C) 2006-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -1058,7 +1216,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
|||||||
|
|
||||||
# Check how to create a tarball. -*- Autoconf -*-
|
# Check how to create a tarball. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2004-2018 Free Software Foundation, Inc.
|
# Copyright (C) 2004-2025 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@ -1104,15 +1262,19 @@ m4_if([$1], [v7],
|
|||||||
am_uid=`id -u || echo unknown`
|
am_uid=`id -u || echo unknown`
|
||||||
am_gid=`id -g || echo unknown`
|
am_gid=`id -g || echo unknown`
|
||||||
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
|
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
|
||||||
if test $am_uid -le $am_max_uid; then
|
if test x$am_uid = xunknown; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work])
|
||||||
|
elif test $am_uid -le $am_max_uid; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
_am_tools=none
|
_am_tools=none
|
||||||
fi
|
fi
|
||||||
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
|
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
|
||||||
if test $am_gid -le $am_max_gid; then
|
if test x$gm_gid = xunknown; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work])
|
||||||
|
elif test $am_gid -le $am_max_gid; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
_am_tools=none
|
_am_tools=none
|
||||||
@ -1189,8 +1351,28 @@ AC_SUBST([am__tar])
|
|||||||
AC_SUBST([am__untar])
|
AC_SUBST([am__untar])
|
||||||
]) # _AM_PROG_TAR
|
]) # _AM_PROG_TAR
|
||||||
|
|
||||||
m4_include([scripts/libtool.m4])
|
# Copyright (C) 2022-2025 Free Software Foundation, Inc.
|
||||||
m4_include([scripts/ltoptions.m4])
|
#
|
||||||
m4_include([scripts/ltsugar.m4])
|
# This file is free software; the Free Software Foundation
|
||||||
m4_include([scripts/ltversion.m4])
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
m4_include([scripts/lt~obsolete.m4])
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# _AM_PROG_XARGS_N
|
||||||
|
# ----------------
|
||||||
|
# Check whether 'xargs -n' works. It should work everywhere, so the fallback
|
||||||
|
# is not optimized at all as we never expect to use it.
|
||||||
|
AC_DEFUN([_AM_PROG_XARGS_N],
|
||||||
|
[AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl
|
||||||
|
AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
|
||||||
|
3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])])
|
||||||
|
AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl
|
||||||
|
am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }'
|
||||||
|
])dnl
|
||||||
|
AC_SUBST(am__xargs_n)
|
||||||
|
])
|
||||||
|
|
||||||
|
m4_include([scripts/autoconf/libtool.m4])
|
||||||
|
m4_include([scripts/autoconf/ltoptions.m4])
|
||||||
|
m4_include([scripts/autoconf/ltsugar.m4])
|
||||||
|
m4_include([scripts/autoconf/ltversion.m4])
|
||||||
|
m4_include([scripts/autoconf/lt~obsolete.m4])
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
|
|
||||||
/* arm_init.c - NEON optimised filter functions
|
/* arm_init.c - NEON optimised filter functions
|
||||||
*
|
*
|
||||||
|
* Copyright (c) 2018-2022 Cosmin Truta
|
||||||
* Copyright (c) 2014,2016 Glenn Randers-Pehrson
|
* Copyright (c) 2014,2016 Glenn Randers-Pehrson
|
||||||
* Written by Mans Rullgard, 2011.
|
* Written by Mans Rullgard, 2011.
|
||||||
* Last changed in libpng 1.6.22 [May 26, 2016]
|
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
* and license in png.h
|
* and license in png.h
|
||||||
*/
|
*/
|
||||||
/* Below, after checking __linux__, various non-C90 POSIX 1003.1 functions are
|
|
||||||
* called.
|
/* This module requires POSIX 1003.1 functions. */
|
||||||
*/
|
|
||||||
#define _POSIX_SOURCE 1
|
#define _POSIX_SOURCE 1
|
||||||
|
|
||||||
#include "../pngpriv.h"
|
#include "../pngpriv.h"
|
||||||
@ -32,25 +30,30 @@
|
|||||||
* has partial support is contrib/arm-neon/linux.c - a generic Linux
|
* has partial support is contrib/arm-neon/linux.c - a generic Linux
|
||||||
* implementation which reads /proc/cpufino.
|
* implementation which reads /proc/cpufino.
|
||||||
*/
|
*/
|
||||||
|
#include <signal.h> /* for sig_atomic_t */
|
||||||
|
|
||||||
#ifndef PNG_ARM_NEON_FILE
|
#ifndef PNG_ARM_NEON_FILE
|
||||||
# ifdef __linux__
|
# if defined(__aarch64__) || defined(_M_ARM64)
|
||||||
# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
|
/* ARM Neon is expected to be unconditionally available on ARM64. */
|
||||||
|
# error PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on ARM64
|
||||||
|
# elif defined(__ARM_NEON__) || defined(__ARM_NEON)
|
||||||
|
/* ARM Neon is expected to be available on the target CPU architecture. */
|
||||||
|
# error PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this CPU arch
|
||||||
|
# elif defined(__linux__)
|
||||||
|
# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
|
||||||
|
# else
|
||||||
|
# error No support for run-time ARM Neon checking; use compile-time options
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_ARM_NEON_FILE
|
|
||||||
|
|
||||||
#include <signal.h> /* for sig_atomic_t */
|
|
||||||
static int png_have_neon(png_structp png_ptr);
|
static int png_have_neon(png_structp png_ptr);
|
||||||
#include PNG_ARM_NEON_FILE
|
#ifdef PNG_ARM_NEON_FILE
|
||||||
|
# include PNG_ARM_NEON_FILE
|
||||||
#else /* PNG_ARM_NEON_FILE */
|
#endif
|
||||||
# error "PNG_ARM_NEON_FILE undefined: no support for run-time ARM NEON checks"
|
|
||||||
#endif /* PNG_ARM_NEON_FILE */
|
|
||||||
#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
|
#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
|
||||||
|
|
||||||
#ifndef PNG_ALIGNED_MEMORY_SUPPORTED
|
#ifndef PNG_ALIGNED_MEMORY_SUPPORTED
|
||||||
# error "ALIGNED_MEMORY is required; set: -DPNG_ALIGNED_MEMORY_SUPPORTED"
|
# error ALIGNED_MEMORY is required; please define PNG_ALIGNED_MEMORY_SUPPORTED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1,253 +1,60 @@
|
|||||||
|
/* filter_neon.S - placeholder file
|
||||||
/* filter_neon.S - NEON optimised filter functions
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014,2017 Glenn Randers-Pehrson
|
* Copyright (c) 2024 Cosmin Truta
|
||||||
* Written by Mans Rullgard, 2011.
|
|
||||||
* Last changed in libpng 1.6.31 [July 27, 2017]
|
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
* and license in png.h
|
* and license in png.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* IMPORTANT NOTE:
|
||||||
|
*
|
||||||
|
* Historically, the hand-coded assembler implementation of Neon optimizations
|
||||||
|
* in this module had not been in sync with the intrinsics-based implementation
|
||||||
|
* in filter_neon_intrinsics.c and palette_neon_intrinsics.c, at least since
|
||||||
|
* the introduction of riffled palette optimizations. Moreover, the assembler
|
||||||
|
* code used to work on 32-bit ARM only, and it caused problems, even if empty,
|
||||||
|
* on 64-bit ARM.
|
||||||
|
*
|
||||||
|
* All references to this module from our internal build scripts and projects
|
||||||
|
* have been removed.
|
||||||
|
*
|
||||||
|
* For the external projects that might still expect this module to be present,
|
||||||
|
* we leave this stub in place, for the remaining lifetime of libpng-1.6.x.
|
||||||
|
* Everything should continue to function normally, as long as there are no
|
||||||
|
* deliberate attempts to use the old hand-made assembler code. A build error
|
||||||
|
* will be raised otherwise.
|
||||||
|
*/
|
||||||
|
|
||||||
/* This is required to get the symbol renames, which are #defines, and the
|
/* This is required to get the symbol renames, which are #defines, and the
|
||||||
* definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION.
|
* definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION.
|
||||||
*/
|
*/
|
||||||
#define PNG_VERSION_INFO_ONLY
|
#define PNG_VERSION_INFO_ONLY
|
||||||
#include "../pngpriv.h"
|
#include "../pngpriv.h"
|
||||||
|
|
||||||
#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__)
|
|
||||||
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_SUPPORTED
|
#ifdef PNG_READ_SUPPORTED
|
||||||
|
|
||||||
/* Assembler NEON support - only works for 32-bit ARM (i.e. it does not work for
|
|
||||||
* ARM64). The code in arm/filter_neon_intrinsics.c supports ARM64, however it
|
|
||||||
* only works if -mfpu=neon is specified on the GCC command line. See pngpriv.h
|
|
||||||
* for the logic which sets PNG_USE_ARM_NEON_ASM:
|
|
||||||
*/
|
|
||||||
#if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */
|
#if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */
|
||||||
|
|
||||||
#if PNG_ARM_NEON_OPT > 0
|
#if PNG_ARM_NEON_OPT > 0
|
||||||
|
|
||||||
#ifdef __ELF__
|
#if defined(__clang__)
|
||||||
# define ELF
|
#define GNUC_VERSION 0 /* not gcc, although it might pretend to be */
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#define GNUC_MAJOR (__GNUC__ + 0)
|
||||||
|
#define GNUC_MINOR (__GNUC_MINOR__ + 0)
|
||||||
|
#define GNUC_PATCHLEVEL (__GNUC_PATCHLEVEL__ + 0)
|
||||||
|
#define GNUC_VERSION (GNUC_MAJOR * 10000 + GNUC_MINOR * 100 + GNUC_PATCHLEVEL)
|
||||||
#else
|
#else
|
||||||
# define ELF @
|
#define GNUC_VERSION 0 /* not gcc */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.arch armv7-a
|
#if (GNUC_VERSION > 0) && (GNUC_VERSION < 40300)
|
||||||
.fpu neon
|
#error "PNG_ARM_NEON is not supported with gcc versions earlier than 4.3.0"
|
||||||
|
#elif GNUC_VERSION == 40504
|
||||||
|
#error "PNG_ARM_NEON is not supported with gcc version 4.5.4"
|
||||||
|
#else
|
||||||
|
#error "Please use 'arm/*_neon_intrinsics.c' for PNG_ARM_NEON support"
|
||||||
|
#endif
|
||||||
|
|
||||||
.macro func name, export=0
|
|
||||||
.macro endfunc
|
|
||||||
ELF .size \name, . - \name
|
|
||||||
.endfunc
|
|
||||||
.purgem endfunc
|
|
||||||
.endm
|
|
||||||
.text
|
|
||||||
|
|
||||||
/* Explicitly specifying alignment here because some versions of
|
|
||||||
* GAS don't align code correctly. This is harmless in correctly
|
|
||||||
* written versions of GAS.
|
|
||||||
*/
|
|
||||||
.align 2
|
|
||||||
|
|
||||||
.if \export
|
|
||||||
.global \name
|
|
||||||
.endif
|
|
||||||
ELF .type \name, STT_FUNC
|
|
||||||
.func \name
|
|
||||||
\name:
|
|
||||||
.endm
|
|
||||||
|
|
||||||
func png_read_filter_row_sub4_neon, export=1
|
|
||||||
ldr r3, [r0, #4] @ rowbytes
|
|
||||||
vmov.i8 d3, #0
|
|
||||||
1:
|
|
||||||
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
|
||||||
vadd.u8 d0, d3, d4
|
|
||||||
vadd.u8 d1, d0, d5
|
|
||||||
vadd.u8 d2, d1, d6
|
|
||||||
vadd.u8 d3, d2, d7
|
|
||||||
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
|
||||||
subs r3, r3, #16
|
|
||||||
bgt 1b
|
|
||||||
|
|
||||||
bx lr
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
func png_read_filter_row_sub3_neon, export=1
|
|
||||||
ldr r3, [r0, #4] @ rowbytes
|
|
||||||
vmov.i8 d3, #0
|
|
||||||
mov r0, r1
|
|
||||||
mov r2, #3
|
|
||||||
mov r12, #12
|
|
||||||
vld1.8 {q11}, [r0], r12
|
|
||||||
1:
|
|
||||||
vext.8 d5, d22, d23, #3
|
|
||||||
vadd.u8 d0, d3, d22
|
|
||||||
vext.8 d6, d22, d23, #6
|
|
||||||
vadd.u8 d1, d0, d5
|
|
||||||
vext.8 d7, d23, d23, #1
|
|
||||||
vld1.8 {q11}, [r0], r12
|
|
||||||
vst1.32 {d0[0]}, [r1,:32], r2
|
|
||||||
vadd.u8 d2, d1, d6
|
|
||||||
vst1.32 {d1[0]}, [r1], r2
|
|
||||||
vadd.u8 d3, d2, d7
|
|
||||||
vst1.32 {d2[0]}, [r1], r2
|
|
||||||
vst1.32 {d3[0]}, [r1], r2
|
|
||||||
subs r3, r3, #12
|
|
||||||
bgt 1b
|
|
||||||
|
|
||||||
bx lr
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
func png_read_filter_row_up_neon, export=1
|
|
||||||
ldr r3, [r0, #4] @ rowbytes
|
|
||||||
1:
|
|
||||||
vld1.8 {q0}, [r1,:128]
|
|
||||||
vld1.8 {q1}, [r2,:128]!
|
|
||||||
vadd.u8 q0, q0, q1
|
|
||||||
vst1.8 {q0}, [r1,:128]!
|
|
||||||
subs r3, r3, #16
|
|
||||||
bgt 1b
|
|
||||||
|
|
||||||
bx lr
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
func png_read_filter_row_avg4_neon, export=1
|
|
||||||
ldr r12, [r0, #4] @ rowbytes
|
|
||||||
vmov.i8 d3, #0
|
|
||||||
1:
|
|
||||||
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
|
||||||
vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]!
|
|
||||||
vhadd.u8 d0, d3, d16
|
|
||||||
vadd.u8 d0, d0, d4
|
|
||||||
vhadd.u8 d1, d0, d17
|
|
||||||
vadd.u8 d1, d1, d5
|
|
||||||
vhadd.u8 d2, d1, d18
|
|
||||||
vadd.u8 d2, d2, d6
|
|
||||||
vhadd.u8 d3, d2, d19
|
|
||||||
vadd.u8 d3, d3, d7
|
|
||||||
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
|
||||||
subs r12, r12, #16
|
|
||||||
bgt 1b
|
|
||||||
|
|
||||||
bx lr
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
func png_read_filter_row_avg3_neon, export=1
|
|
||||||
push {r4,lr}
|
|
||||||
ldr r12, [r0, #4] @ rowbytes
|
|
||||||
vmov.i8 d3, #0
|
|
||||||
mov r0, r1
|
|
||||||
mov r4, #3
|
|
||||||
mov lr, #12
|
|
||||||
vld1.8 {q11}, [r0], lr
|
|
||||||
1:
|
|
||||||
vld1.8 {q10}, [r2], lr
|
|
||||||
vext.8 d5, d22, d23, #3
|
|
||||||
vhadd.u8 d0, d3, d20
|
|
||||||
vext.8 d17, d20, d21, #3
|
|
||||||
vadd.u8 d0, d0, d22
|
|
||||||
vext.8 d6, d22, d23, #6
|
|
||||||
vhadd.u8 d1, d0, d17
|
|
||||||
vext.8 d18, d20, d21, #6
|
|
||||||
vadd.u8 d1, d1, d5
|
|
||||||
vext.8 d7, d23, d23, #1
|
|
||||||
vld1.8 {q11}, [r0], lr
|
|
||||||
vst1.32 {d0[0]}, [r1,:32], r4
|
|
||||||
vhadd.u8 d2, d1, d18
|
|
||||||
vst1.32 {d1[0]}, [r1], r4
|
|
||||||
vext.8 d19, d21, d21, #1
|
|
||||||
vadd.u8 d2, d2, d6
|
|
||||||
vhadd.u8 d3, d2, d19
|
|
||||||
vst1.32 {d2[0]}, [r1], r4
|
|
||||||
vadd.u8 d3, d3, d7
|
|
||||||
vst1.32 {d3[0]}, [r1], r4
|
|
||||||
subs r12, r12, #12
|
|
||||||
bgt 1b
|
|
||||||
|
|
||||||
pop {r4,pc}
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
.macro paeth rx, ra, rb, rc
|
|
||||||
vaddl.u8 q12, \ra, \rb @ a + b
|
|
||||||
vaddl.u8 q15, \rc, \rc @ 2*c
|
|
||||||
vabdl.u8 q13, \rb, \rc @ pa
|
|
||||||
vabdl.u8 q14, \ra, \rc @ pb
|
|
||||||
vabd.u16 q15, q12, q15 @ pc
|
|
||||||
vcle.u16 q12, q13, q14 @ pa <= pb
|
|
||||||
vcle.u16 q13, q13, q15 @ pa <= pc
|
|
||||||
vcle.u16 q14, q14, q15 @ pb <= pc
|
|
||||||
vand q12, q12, q13 @ pa <= pb && pa <= pc
|
|
||||||
vmovn.u16 d28, q14
|
|
||||||
vmovn.u16 \rx, q12
|
|
||||||
vbsl d28, \rb, \rc
|
|
||||||
vbsl \rx, \ra, d28
|
|
||||||
.endm
|
|
||||||
|
|
||||||
func png_read_filter_row_paeth4_neon, export=1
|
|
||||||
ldr r12, [r0, #4] @ rowbytes
|
|
||||||
vmov.i8 d3, #0
|
|
||||||
vmov.i8 d20, #0
|
|
||||||
1:
|
|
||||||
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
|
||||||
vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]!
|
|
||||||
paeth d0, d3, d16, d20
|
|
||||||
vadd.u8 d0, d0, d4
|
|
||||||
paeth d1, d0, d17, d16
|
|
||||||
vadd.u8 d1, d1, d5
|
|
||||||
paeth d2, d1, d18, d17
|
|
||||||
vadd.u8 d2, d2, d6
|
|
||||||
paeth d3, d2, d19, d18
|
|
||||||
vmov d20, d19
|
|
||||||
vadd.u8 d3, d3, d7
|
|
||||||
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
|
||||||
subs r12, r12, #16
|
|
||||||
bgt 1b
|
|
||||||
|
|
||||||
bx lr
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
func png_read_filter_row_paeth3_neon, export=1
|
|
||||||
push {r4,lr}
|
|
||||||
ldr r12, [r0, #4] @ rowbytes
|
|
||||||
vmov.i8 d3, #0
|
|
||||||
vmov.i8 d4, #0
|
|
||||||
mov r0, r1
|
|
||||||
mov r4, #3
|
|
||||||
mov lr, #12
|
|
||||||
vld1.8 {q11}, [r0], lr
|
|
||||||
1:
|
|
||||||
vld1.8 {q10}, [r2], lr
|
|
||||||
paeth d0, d3, d20, d4
|
|
||||||
vext.8 d5, d22, d23, #3
|
|
||||||
vadd.u8 d0, d0, d22
|
|
||||||
vext.8 d17, d20, d21, #3
|
|
||||||
paeth d1, d0, d17, d20
|
|
||||||
vst1.32 {d0[0]}, [r1,:32], r4
|
|
||||||
vext.8 d6, d22, d23, #6
|
|
||||||
vadd.u8 d1, d1, d5
|
|
||||||
vext.8 d18, d20, d21, #6
|
|
||||||
paeth d2, d1, d18, d17
|
|
||||||
vext.8 d7, d23, d23, #1
|
|
||||||
vld1.8 {q11}, [r0], lr
|
|
||||||
vst1.32 {d1[0]}, [r1], r4
|
|
||||||
vadd.u8 d2, d2, d6
|
|
||||||
vext.8 d19, d21, d21, #1
|
|
||||||
paeth d3, d2, d19, d18
|
|
||||||
vst1.32 {d2[0]}, [r1], r4
|
|
||||||
vmov d4, d19
|
|
||||||
vadd.u8 d3, d3, d7
|
|
||||||
vst1.32 {d3[0]}, [r1], r4
|
|
||||||
subs r12, r12, #12
|
|
||||||
bgt 1b
|
|
||||||
|
|
||||||
pop {r4,pc}
|
|
||||||
endfunc
|
|
||||||
#endif /* PNG_ARM_NEON_OPT > 0 */
|
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||||
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 (assembler) */
|
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 */
|
||||||
#endif /* READ */
|
#endif /* READ */
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
|
|
||||||
/* filter_neon_intrinsics.c - NEON optimised filter functions
|
/* filter_neon_intrinsics.c - NEON optimised filter functions
|
||||||
*
|
*
|
||||||
|
* Copyright (c) 2018 Cosmin Truta
|
||||||
* Copyright (c) 2014,2016 Glenn Randers-Pehrson
|
* Copyright (c) 2014,2016 Glenn Randers-Pehrson
|
||||||
* Written by James Yu <james.yu at linaro.org>, October 2013.
|
* Written by James Yu <james.yu at linaro.org>, October 2013.
|
||||||
* Based on filter_neon.S, written by Mans Rullgard, 2011.
|
* Based on filter_neon.S, written by Mans Rullgard, 2011.
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.22 [May 26, 2016]
|
|
||||||
*
|
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
* and license in png.h
|
* and license in png.h
|
||||||
@ -19,7 +17,11 @@
|
|||||||
/* This code requires -mfpu=neon on the command line: */
|
/* This code requires -mfpu=neon on the command line: */
|
||||||
#if PNG_ARM_NEON_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */
|
#if PNG_ARM_NEON_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */
|
||||||
|
|
||||||
#include <arm_neon.h>
|
#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64)
|
||||||
|
# include <arm64_neon.h>
|
||||||
|
#else
|
||||||
|
# include <arm_neon.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* libpng row pointers are not necessarily aligned to any particular boundary,
|
/* libpng row pointers are not necessarily aligned to any particular boundary,
|
||||||
* however this code will only work with appropriate alignment. arm/arm_init.c
|
* however this code will only work with appropriate alignment. arm/arm_init.c
|
||||||
@ -33,6 +35,11 @@
|
|||||||
* 'type'. This is written this way just to hide the GCC strict aliasing
|
* 'type'. This is written this way just to hide the GCC strict aliasing
|
||||||
* warning; note that the code is safe because there never is an alias between
|
* warning; note that the code is safe because there never is an alias between
|
||||||
* the input and output pointers.
|
* the input and output pointers.
|
||||||
|
*
|
||||||
|
* When compiling with MSVC ARM64, the png_ldr macro can't be passed directly
|
||||||
|
* to vst4_lane_u32, because of an internal compiler error inside MSVC.
|
||||||
|
* To avoid this compiler bug, we use a temporary variable (vdest_val) to store
|
||||||
|
* the result of png_ldr.
|
||||||
*/
|
*/
|
||||||
#define png_ldr(type,pointer)\
|
#define png_ldr(type,pointer)\
|
||||||
(temp_pointer = png_ptr(type,pointer), *temp_pointer)
|
(temp_pointer = png_ptr(type,pointer), *temp_pointer)
|
||||||
@ -125,12 +132,15 @@ png_read_filter_row_sub4_neon(png_row_infop row_info, png_bytep row,
|
|||||||
uint8x8x4_t *vrpt = png_ptr(uint8x8x4_t,&vtmp);
|
uint8x8x4_t *vrpt = png_ptr(uint8x8x4_t,&vtmp);
|
||||||
uint8x8x4_t vrp = *vrpt;
|
uint8x8x4_t vrp = *vrpt;
|
||||||
uint32x2x4_t *temp_pointer;
|
uint32x2x4_t *temp_pointer;
|
||||||
|
uint32x2x4_t vdest_val;
|
||||||
|
|
||||||
vdest.val[0] = vadd_u8(vdest.val[3], vrp.val[0]);
|
vdest.val[0] = vadd_u8(vdest.val[3], vrp.val[0]);
|
||||||
vdest.val[1] = vadd_u8(vdest.val[0], vrp.val[1]);
|
vdest.val[1] = vadd_u8(vdest.val[0], vrp.val[1]);
|
||||||
vdest.val[2] = vadd_u8(vdest.val[1], vrp.val[2]);
|
vdest.val[2] = vadd_u8(vdest.val[1], vrp.val[2]);
|
||||||
vdest.val[3] = vadd_u8(vdest.val[2], vrp.val[3]);
|
vdest.val[3] = vadd_u8(vdest.val[2], vrp.val[3]);
|
||||||
vst4_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2x4_t,&vdest), 0);
|
|
||||||
|
vdest_val = png_ldr(uint32x2x4_t, &vdest);
|
||||||
|
vst4_lane_u32(png_ptr(uint32_t,rp), vdest_val, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
PNG_UNUSED(prev_row)
|
PNG_UNUSED(prev_row)
|
||||||
@ -223,6 +233,7 @@ png_read_filter_row_avg4_neon(png_row_infop row_info, png_bytep row,
|
|||||||
uint8x8x4_t *vrpt, *vppt;
|
uint8x8x4_t *vrpt, *vppt;
|
||||||
uint8x8x4_t vrp, vpp;
|
uint8x8x4_t vrp, vpp;
|
||||||
uint32x2x4_t *temp_pointer;
|
uint32x2x4_t *temp_pointer;
|
||||||
|
uint32x2x4_t vdest_val;
|
||||||
|
|
||||||
vtmp = vld4_u32(png_ptr(uint32_t,rp));
|
vtmp = vld4_u32(png_ptr(uint32_t,rp));
|
||||||
vrpt = png_ptr(uint8x8x4_t,&vtmp);
|
vrpt = png_ptr(uint8x8x4_t,&vtmp);
|
||||||
@ -240,7 +251,8 @@ png_read_filter_row_avg4_neon(png_row_infop row_info, png_bytep row,
|
|||||||
vdest.val[3] = vhadd_u8(vdest.val[2], vpp.val[3]);
|
vdest.val[3] = vhadd_u8(vdest.val[2], vpp.val[3]);
|
||||||
vdest.val[3] = vadd_u8(vdest.val[3], vrp.val[3]);
|
vdest.val[3] = vadd_u8(vdest.val[3], vrp.val[3]);
|
||||||
|
|
||||||
vst4_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2x4_t,&vdest), 0);
|
vdest_val = png_ldr(uint32x2x4_t, &vdest);
|
||||||
|
vst4_lane_u32(png_ptr(uint32_t,rp), vdest_val, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -359,6 +371,7 @@ png_read_filter_row_paeth4_neon(png_row_infop row_info, png_bytep row,
|
|||||||
uint8x8x4_t *vrpt, *vppt;
|
uint8x8x4_t *vrpt, *vppt;
|
||||||
uint8x8x4_t vrp, vpp;
|
uint8x8x4_t vrp, vpp;
|
||||||
uint32x2x4_t *temp_pointer;
|
uint32x2x4_t *temp_pointer;
|
||||||
|
uint32x2x4_t vdest_val;
|
||||||
|
|
||||||
vtmp = vld4_u32(png_ptr(uint32_t,rp));
|
vtmp = vld4_u32(png_ptr(uint32_t,rp));
|
||||||
vrpt = png_ptr(uint8x8x4_t,&vtmp);
|
vrpt = png_ptr(uint8x8x4_t,&vtmp);
|
||||||
@ -378,7 +391,8 @@ png_read_filter_row_paeth4_neon(png_row_infop row_info, png_bytep row,
|
|||||||
|
|
||||||
vlast = vpp.val[3];
|
vlast = vpp.val[3];
|
||||||
|
|
||||||
vst4_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2x4_t,&vdest), 0);
|
vdest_val = png_ldr(uint32x2x4_t, &vdest);
|
||||||
|
vst4_lane_u32(png_ptr(uint32_t,rp), vdest_val, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
150
arm/palette_neon_intrinsics.c
Normal file
150
arm/palette_neon_intrinsics.c
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
/* palette_neon_intrinsics.c - NEON optimised palette expansion functions
|
||||||
|
*
|
||||||
|
* Copyright (c) 2018-2019 Cosmin Truta
|
||||||
|
* Copyright (c) 2017-2018 Arm Holdings. All rights reserved.
|
||||||
|
* Written by Richard Townsend <Richard.Townsend@arm.com>, February 2017.
|
||||||
|
*
|
||||||
|
* This code is released under the libpng license.
|
||||||
|
* For conditions of distribution and use, see the disclaimer
|
||||||
|
* and license in png.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../pngpriv.h"
|
||||||
|
|
||||||
|
#if PNG_ARM_NEON_IMPLEMENTATION == 1
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64)
|
||||||
|
# include <arm64_neon.h>
|
||||||
|
#else
|
||||||
|
# include <arm_neon.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Build an RGBA8 palette from the separate RGB and alpha palettes. */
|
||||||
|
void
|
||||||
|
png_riffle_palette_neon(png_structrp png_ptr)
|
||||||
|
{
|
||||||
|
png_const_colorp palette = png_ptr->palette;
|
||||||
|
png_bytep riffled_palette = png_ptr->riffled_palette;
|
||||||
|
png_const_bytep trans_alpha = png_ptr->trans_alpha;
|
||||||
|
int num_trans = png_ptr->num_trans;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* Initially black, opaque. */
|
||||||
|
uint8x16x4_t w = {{
|
||||||
|
vdupq_n_u8(0x00),
|
||||||
|
vdupq_n_u8(0x00),
|
||||||
|
vdupq_n_u8(0x00),
|
||||||
|
vdupq_n_u8(0xff),
|
||||||
|
}};
|
||||||
|
|
||||||
|
png_debug(1, "in png_riffle_palette_neon");
|
||||||
|
|
||||||
|
/* First, riffle the RGB colours into an RGBA8 palette.
|
||||||
|
* The alpha component is set to opaque for now.
|
||||||
|
*/
|
||||||
|
for (i = 0; i < 256; i += 16)
|
||||||
|
{
|
||||||
|
uint8x16x3_t v = vld3q_u8((png_const_bytep)(palette + i));
|
||||||
|
w.val[0] = v.val[0];
|
||||||
|
w.val[1] = v.val[1];
|
||||||
|
w.val[2] = v.val[2];
|
||||||
|
vst4q_u8(riffled_palette + (i << 2), w);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fix up the missing transparency values. */
|
||||||
|
for (i = 0; i < num_trans; i++)
|
||||||
|
riffled_palette[(i << 2) + 3] = trans_alpha[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Expands a palettized row into RGBA8. */
|
||||||
|
int
|
||||||
|
png_do_expand_palette_rgba8_neon(png_structrp png_ptr, png_row_infop row_info,
|
||||||
|
png_const_bytep row, png_bytepp ssp, png_bytepp ddp)
|
||||||
|
{
|
||||||
|
png_uint_32 row_width = row_info->width;
|
||||||
|
const png_uint_32 *riffled_palette =
|
||||||
|
png_aligncastconst(png_const_uint_32p, png_ptr->riffled_palette);
|
||||||
|
const png_uint_32 pixels_per_chunk = 4;
|
||||||
|
png_uint_32 i;
|
||||||
|
|
||||||
|
png_debug(1, "in png_do_expand_palette_rgba8_neon");
|
||||||
|
|
||||||
|
PNG_UNUSED(row)
|
||||||
|
if (row_width < pixels_per_chunk)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* This function originally gets the last byte of the output row.
|
||||||
|
* The NEON part writes forward from a given position, so we have
|
||||||
|
* to seek this back by 4 pixels x 4 bytes.
|
||||||
|
*/
|
||||||
|
*ddp = *ddp - ((pixels_per_chunk * sizeof(png_uint_32)) - 1);
|
||||||
|
|
||||||
|
for (i = 0; i < row_width; i += pixels_per_chunk)
|
||||||
|
{
|
||||||
|
uint32x4_t cur;
|
||||||
|
png_bytep sp = *ssp - i, dp = *ddp - (i << 2);
|
||||||
|
cur = vld1q_dup_u32 (riffled_palette + *(sp - 3));
|
||||||
|
cur = vld1q_lane_u32(riffled_palette + *(sp - 2), cur, 1);
|
||||||
|
cur = vld1q_lane_u32(riffled_palette + *(sp - 1), cur, 2);
|
||||||
|
cur = vld1q_lane_u32(riffled_palette + *(sp - 0), cur, 3);
|
||||||
|
vst1q_u32((void *)dp, cur);
|
||||||
|
}
|
||||||
|
if (i != row_width)
|
||||||
|
{
|
||||||
|
/* Remove the amount that wasn't processed. */
|
||||||
|
i -= pixels_per_chunk;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Decrement output pointers. */
|
||||||
|
*ssp = *ssp - i;
|
||||||
|
*ddp = *ddp - (i << 2);
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Expands a palettized row into RGB8. */
|
||||||
|
int
|
||||||
|
png_do_expand_palette_rgb8_neon(png_structrp png_ptr, png_row_infop row_info,
|
||||||
|
png_const_bytep row, png_bytepp ssp, png_bytepp ddp)
|
||||||
|
{
|
||||||
|
png_uint_32 row_width = row_info->width;
|
||||||
|
png_const_bytep palette = (png_const_bytep)png_ptr->palette;
|
||||||
|
const png_uint_32 pixels_per_chunk = 8;
|
||||||
|
png_uint_32 i;
|
||||||
|
|
||||||
|
png_debug(1, "in png_do_expand_palette_rgb8_neon");
|
||||||
|
|
||||||
|
PNG_UNUSED(row)
|
||||||
|
if (row_width <= pixels_per_chunk)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Seeking this back by 8 pixels x 3 bytes. */
|
||||||
|
*ddp = *ddp - ((pixels_per_chunk * sizeof(png_color)) - 1);
|
||||||
|
|
||||||
|
for (i = 0; i < row_width; i += pixels_per_chunk)
|
||||||
|
{
|
||||||
|
uint8x8x3_t cur;
|
||||||
|
png_bytep sp = *ssp - i, dp = *ddp - ((i << 1) + i);
|
||||||
|
cur = vld3_dup_u8(palette + sizeof(png_color) * (*(sp - 7)));
|
||||||
|
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 6)), cur, 1);
|
||||||
|
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 5)), cur, 2);
|
||||||
|
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 4)), cur, 3);
|
||||||
|
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 3)), cur, 4);
|
||||||
|
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 2)), cur, 5);
|
||||||
|
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 1)), cur, 6);
|
||||||
|
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 0)), cur, 7);
|
||||||
|
vst3_u8((void *)dp, cur);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i != row_width)
|
||||||
|
{
|
||||||
|
/* Remove the amount that wasn't processed. */
|
||||||
|
i -= pixels_per_chunk;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Decrement output pointers. */
|
||||||
|
*ssp = *ssp - i;
|
||||||
|
*ddp = *ddp - ((i << 1) + i);
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* PNG_ARM_NEON_IMPLEMENTATION */
|
@ -77,13 +77,14 @@ libpng_autotools_files="Makefile.in aclocal.m4 config.guess config.h.in
|
|||||||
config.sub configure depcomp install-sh ltmain.sh missing\
|
config.sub configure depcomp install-sh ltmain.sh missing\
|
||||||
test-driver"
|
test-driver"
|
||||||
#
|
#
|
||||||
# Files generated by versions of configue >2.68 or automake >1.13 (i.e. later
|
# Files generated by versions of autoconf >2.68 or automake >1.13 (i.e. later
|
||||||
# versions than those required by configure.ac):
|
# versions than those required by configure.ac):
|
||||||
libpng_autotools_extra="compile config.h.in~"
|
libpng_autotools_extra="compile config.h.in~"
|
||||||
#
|
#
|
||||||
# These are separate because 'maintainer-clean' does not remove them.
|
# These are separate because 'maintainer-clean' does not remove them.
|
||||||
libpng_libtool_files="scripts/libtool.m4 scripts/ltoptions.m4\
|
libpng_libtool_files="scripts/autoconf/libtool.m4 scripts/autoconf/ltoptions.m4\
|
||||||
scripts/ltsugar.m4 scripts/ltversion.m4 scripts/lt~obsolete.m4"
|
scripts/autoconf/ltsugar.m4 scripts/autoconf/ltversion.m4\
|
||||||
|
scripts/autoconf/lt~obsolete.m4"
|
||||||
|
|
||||||
libpng_autotools_dirs="autom4te.cache" # not required
|
libpng_autotools_dirs="autom4te.cache" # not required
|
||||||
#
|
#
|
||||||
|
11
ci/.shellcheckrc
Normal file
11
ci/.shellcheckrc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Disable the "expressions don't expand in single quotes, use double quotes"
|
||||||
|
# advice. We need the regular expressions to remain uninterpolated.
|
||||||
|
disable=SC2016
|
||||||
|
|
||||||
|
# Disable the "variable appears unused" warning caused by the use of getopts
|
||||||
|
# with an obligatory (but unused) variable name in the main function.
|
||||||
|
disable=SC2034
|
||||||
|
|
||||||
|
# Disable all the "quote to prevent globbing or word splitting" advice.
|
||||||
|
# We need word splitting for well-known variables like MAKEFLAGS and CFLAGS.
|
||||||
|
disable=SC2086,SC2206
|
19
ci/LICENSE_MIT.txt
Normal file
19
ci/LICENSE_MIT.txt
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
25
ci/README.md
Normal file
25
ci/README.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
Scripts for the Continuous Integration of the PNG Reference Library
|
||||||
|
===================================================================
|
||||||
|
|
||||||
|
Copyright Notice
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Copyright (c) 2019-2025 Cosmin Truta.
|
||||||
|
|
||||||
|
Use, modification and distribution are subject to the MIT License.
|
||||||
|
Please see the accompanying file `LICENSE_MIT.txt` or visit
|
||||||
|
https://opensource.org/license/mit
|
||||||
|
|
||||||
|
File List
|
||||||
|
---------
|
||||||
|
|
||||||
|
LICENSE_MIT.txt ==> The License file
|
||||||
|
README.md ==> This file
|
||||||
|
ci_lint.sh ==> Lint the source code
|
||||||
|
ci_shellify.sh ==> Convert select definitions to shell syntax
|
||||||
|
ci_verify_cmake.sh ==> Verify the build driven by CMakeLists.txt
|
||||||
|
ci_verify_configure.sh ==> Verify the build driven by configure
|
||||||
|
ci_verify_makefiles.sh ==> Verify the build driven by scripts/makefile.*
|
||||||
|
ci_verify_version.sh ==> Verify the consistency of version definitions
|
||||||
|
lib/ci.lib.sh ==> Shell utilities for the main ci_*.sh scripts
|
||||||
|
targets/*/ci_env.*.sh ==> Shell environments for cross-platform testing
|
142
ci/ci_lint.sh
Executable file
142
ci/ci_lint.sh
Executable file
@ -0,0 +1,142 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -o errexit -o pipefail -o posix
|
||||||
|
|
||||||
|
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
# shellcheck source=ci/lib/ci.lib.sh
|
||||||
|
source "$(dirname "$0")/lib/ci.lib.sh"
|
||||||
|
cd "$CI_TOPLEVEL_DIR"
|
||||||
|
|
||||||
|
# Initialize the global constants CI_{...}{CHECK,CHECKER,LINT}.
|
||||||
|
CI_SHELLCHECK="${CI_SHELLCHECK:-shellcheck}"
|
||||||
|
CI_EDITORCONFIG_CHECKER="${CI_EDITORCONFIG_CHECKER:-editorconfig-checker}"
|
||||||
|
CI_YAMLLINT="${CI_YAMLLINT:-yamllint}"
|
||||||
|
|
||||||
|
# Initialize the global lint status.
|
||||||
|
CI_LINT_STATUS=0
|
||||||
|
|
||||||
|
function ci_init_lint {
|
||||||
|
ci_info "## START OF LINTING ##"
|
||||||
|
local my_program
|
||||||
|
# Complete the initialization of CI_SHELLCHECK.
|
||||||
|
# Set it to the empty string if the shellcheck program is unavailable.
|
||||||
|
my_program="$(command -v "$CI_SHELLCHECK")" || {
|
||||||
|
ci_warn "program not found: '$CI_SHELLCHECK'"
|
||||||
|
}
|
||||||
|
CI_SHELLCHECK="$my_program"
|
||||||
|
# Complete the initialization of CI_EDITORCONFIG_CHECKER.
|
||||||
|
# Set it to the empty string if the editorconfig-checker program is unavailable.
|
||||||
|
my_program="$(command -v "$CI_EDITORCONFIG_CHECKER")" || {
|
||||||
|
ci_warn "program not found: '$CI_EDITORCONFIG_CHECKER'"
|
||||||
|
}
|
||||||
|
CI_EDITORCONFIG_CHECKER="$my_program"
|
||||||
|
# Complete the initialization of CI_YAMLLINT.
|
||||||
|
# Set it to the empty string if the yamllint program is unavailable.
|
||||||
|
my_program="$(command -v "$CI_YAMLLINT")" || {
|
||||||
|
ci_warn "program not found: '$CI_YAMLLINT'"
|
||||||
|
}
|
||||||
|
CI_YAMLLINT="$my_program"
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_finish_lint {
|
||||||
|
ci_info "## END OF LINTING ##"
|
||||||
|
if [[ $CI_LINT_STATUS -eq 0 ]]
|
||||||
|
then
|
||||||
|
ci_info "## SUCCESS ##"
|
||||||
|
else
|
||||||
|
ci_info "linting failed"
|
||||||
|
fi
|
||||||
|
return "$CI_LINT_STATUS"
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_lint_ci_scripts {
|
||||||
|
[[ -x $CI_SHELLCHECK ]] || {
|
||||||
|
ci_warn "## NOT LINTING: CI scripts ##"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
ci_info "## LINTING: CI scripts ##"
|
||||||
|
ci_spawn "$CI_SHELLCHECK" --version
|
||||||
|
find ./ci -name "ci_*.sh" -not -name "ci_env.*.sh" | {
|
||||||
|
local my_file
|
||||||
|
while IFS="" read -r my_file
|
||||||
|
do
|
||||||
|
ci_spawn "$CI_SHELLCHECK" -x "$my_file" || {
|
||||||
|
# Linting failed.
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
done
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_lint_text_files {
|
||||||
|
[[ -x $CI_EDITORCONFIG_CHECKER ]] || {
|
||||||
|
ci_warn "## NOT LINTING: text files ##"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
ci_info "## LINTING: text files ##"
|
||||||
|
ci_spawn "$CI_EDITORCONFIG_CHECKER" --version
|
||||||
|
ci_spawn "$CI_EDITORCONFIG_CHECKER" --config .editorconfig-checker.json || {
|
||||||
|
# Linting failed.
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_lint_yaml_files {
|
||||||
|
[[ -x $CI_YAMLLINT ]] || {
|
||||||
|
ci_warn "## NOT LINTING: YAML files ##"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
ci_info "## LINTING: YAML files ##"
|
||||||
|
ci_spawn "$CI_YAMLLINT" --version
|
||||||
|
# Considering that the YAML format is an extension of the JSON format,
|
||||||
|
# we can lint both the YAML files and the plain JSON files here.
|
||||||
|
find . \( -iname "*.yml" -o -iname "*.yaml" -o -iname "*.json" \) -not -path "./out/*" | {
|
||||||
|
local my_file
|
||||||
|
while IFS="" read -r my_file
|
||||||
|
do
|
||||||
|
ci_spawn "$CI_YAMLLINT" --strict "$my_file" || {
|
||||||
|
# Linting failed.
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
done
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_lint {
|
||||||
|
ci_init_lint
|
||||||
|
ci_lint_ci_scripts || CI_LINT_STATUS=1
|
||||||
|
ci_lint_text_files || CI_LINT_STATUS=1
|
||||||
|
ci_lint_yaml_files || CI_LINT_STATUS=1
|
||||||
|
# TODO: ci_lint_png_files, etc.
|
||||||
|
ci_finish_lint
|
||||||
|
}
|
||||||
|
|
||||||
|
function usage {
|
||||||
|
echo "usage: $CI_SCRIPT_NAME [<options>]"
|
||||||
|
echo "options: -?|-h|--help"
|
||||||
|
exit "${@:-0}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function main {
|
||||||
|
local opt
|
||||||
|
while getopts ":" opt
|
||||||
|
do
|
||||||
|
# This ain't a while-loop. It only pretends to be.
|
||||||
|
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||||
|
ci_err "unknown option: '$1'"
|
||||||
|
done
|
||||||
|
shift $((OPTIND - 1))
|
||||||
|
[[ $# -eq 0 ]] || {
|
||||||
|
echo >&2 "error: unexpected argument: '$1'"
|
||||||
|
usage 2
|
||||||
|
}
|
||||||
|
# And... go!
|
||||||
|
ci_lint
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
209
ci/ci_verify_cmake.sh
Executable file
209
ci/ci_verify_cmake.sh
Executable file
@ -0,0 +1,209 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -o errexit -o pipefail -o posix
|
||||||
|
|
||||||
|
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
# shellcheck source=ci/lib/ci.lib.sh
|
||||||
|
source "$(dirname "$0")/lib/ci.lib.sh"
|
||||||
|
cd "$CI_TOPLEVEL_DIR"
|
||||||
|
|
||||||
|
CI_SRC_DIR="$CI_TOPLEVEL_DIR"
|
||||||
|
CI_OUT_DIR="$CI_TOPLEVEL_DIR/out"
|
||||||
|
CI_BUILD_DIR="$CI_OUT_DIR/ci_verify_cmake.$CI_TARGET_SYSTEM.$CI_TARGET_ARCH.build"
|
||||||
|
CI_INSTALL_DIR="$CI_OUT_DIR/ci_verify_cmake.$CI_TARGET_SYSTEM.$CI_TARGET_ARCH.install"
|
||||||
|
|
||||||
|
function ci_init_build {
|
||||||
|
# Ensure that the mandatory variables are initialized.
|
||||||
|
CI_CMAKE="${CI_CMAKE:-cmake}"
|
||||||
|
CI_CTEST="${CI_CTEST:-ctest}"
|
||||||
|
CI_CMAKE_BUILD_TYPE="${CI_CMAKE_BUILD_TYPE:-Release}"
|
||||||
|
if [[ $CI_CMAKE_GENERATOR == "Visual Studio"* ]]
|
||||||
|
then
|
||||||
|
# Clean up incidental mixtures of Windows and Bash-on-Windows
|
||||||
|
# environment variables, to avoid confusing MSBuild.
|
||||||
|
[[ $TEMP && ( $Temp || $temp ) ]] && unset TEMP
|
||||||
|
[[ $TMP && ( $Tmp || $tmp ) ]] && unset TMP
|
||||||
|
# Ensure that CI_CMAKE_GENERATOR_PLATFORM is initialized for this generator.
|
||||||
|
[[ $CI_CMAKE_GENERATOR_PLATFORM ]] || {
|
||||||
|
ci_err_internal "missing \$CI_CMAKE_GENERATOR_PLATFORM"
|
||||||
|
}
|
||||||
|
elif [[ -x $(command -v ninja) ]]
|
||||||
|
then
|
||||||
|
CI_CMAKE_GENERATOR="${CI_CMAKE_GENERATOR:-Ninja}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_trace_build {
|
||||||
|
ci_info "## START OF CONFIGURATION ##"
|
||||||
|
ci_info "build arch: $CI_BUILD_ARCH"
|
||||||
|
ci_info "build system: $CI_BUILD_SYSTEM"
|
||||||
|
[[ "$CI_TARGET_SYSTEM.$CI_TARGET_ARCH" != "$CI_BUILD_SYSTEM.$CI_BUILD_ARCH" ]] && {
|
||||||
|
ci_info "target arch: $CI_TARGET_ARCH"
|
||||||
|
ci_info "target system: $CI_TARGET_SYSTEM"
|
||||||
|
}
|
||||||
|
ci_info "source directory: $CI_SRC_DIR"
|
||||||
|
ci_info "build directory: $CI_BUILD_DIR"
|
||||||
|
ci_info "install directory: $CI_INSTALL_DIR"
|
||||||
|
ci_info "environment option: \$CI_CMAKE: '$CI_CMAKE'"
|
||||||
|
ci_info "environment option: \$CI_CMAKE_GENERATOR: '$CI_CMAKE_GENERATOR'"
|
||||||
|
ci_info "environment option: \$CI_CMAKE_GENERATOR_PLATFORM: '$CI_CMAKE_GENERATOR_PLATFORM'"
|
||||||
|
ci_info "environment option: \$CI_CMAKE_BUILD_TYPE: '$CI_CMAKE_BUILD_TYPE'"
|
||||||
|
ci_info "environment option: \$CI_CMAKE_BUILD_FLAGS: '$CI_CMAKE_BUILD_FLAGS'"
|
||||||
|
ci_info "environment option: \$CI_CMAKE_TOOLCHAIN_FILE: '$CI_CMAKE_TOOLCHAIN_FILE'"
|
||||||
|
ci_info "environment option: \$CI_CMAKE_VARS: '$CI_CMAKE_VARS'"
|
||||||
|
ci_info "environment option: \$CI_CTEST: '$CI_CTEST'"
|
||||||
|
ci_info "environment option: \$CI_CTEST_FLAGS: '$CI_CTEST_FLAGS'"
|
||||||
|
ci_info "environment option: \$CI_CC: '$CI_CC'"
|
||||||
|
ci_info "environment option: \$CI_CC_FLAGS: '$CI_CC_FLAGS'"
|
||||||
|
ci_info "environment option: \$CI_AR: '$CI_AR'"
|
||||||
|
ci_info "environment option: \$CI_RANLIB: '$CI_RANLIB'"
|
||||||
|
ci_info "environment option: \$CI_SANITIZERS: '$CI_SANITIZERS'"
|
||||||
|
ci_info "environment option: \$CI_FORCE: '$CI_FORCE'"
|
||||||
|
ci_info "environment option: \$CI_NO_BUILD: '$CI_NO_BUILD'"
|
||||||
|
ci_info "environment option: \$CI_NO_TEST: '$CI_NO_TEST'"
|
||||||
|
ci_info "environment option: \$CI_NO_INSTALL: '$CI_NO_INSTALL'"
|
||||||
|
ci_info "environment option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'"
|
||||||
|
ci_info "executable: \$CI_CMAKE: $(command -V "$CI_CMAKE")"
|
||||||
|
ci_info "executable: \$CI_CTEST: $(command -V "$CI_CTEST")"
|
||||||
|
[[ $CI_CC ]] && {
|
||||||
|
ci_info "executable: \$CI_CC: $(command -V "$CI_CC")"
|
||||||
|
}
|
||||||
|
[[ $CI_AR ]] && {
|
||||||
|
ci_info "executable: \$CI_AR: $(command -V "$CI_AR")"
|
||||||
|
}
|
||||||
|
[[ $CI_RANLIB ]] && {
|
||||||
|
ci_info "executable: \$CI_RANLIB: $(command -V "$CI_RANLIB")"
|
||||||
|
}
|
||||||
|
ci_info "## END OF CONFIGURATION ##"
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_cleanup_old_build {
|
||||||
|
ci_info "## START OF PRE-BUILD CLEANUP ##"
|
||||||
|
[[ ! -e $CI_BUILD_DIR && ! -e $CI_INSTALL_DIR ]] || {
|
||||||
|
ci_spawn rm -fr "$CI_BUILD_DIR"
|
||||||
|
ci_spawn rm -fr "$CI_INSTALL_DIR"
|
||||||
|
}
|
||||||
|
ci_info "## END OF PRE-BUILD CLEANUP ##"
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_build {
|
||||||
|
ci_info "## START OF BUILD ##"
|
||||||
|
# Adjust the CI environment variables, as needed.
|
||||||
|
CI_CMAKE="$(command -v "$CI_CMAKE")" || ci_err "bad or missing \$CI_CMAKE"
|
||||||
|
ci_spawn "$CI_CMAKE" --version
|
||||||
|
CI_CTEST="$(command -v "$CI_CTEST")" || ci_err "bad or missing \$CI_CTEST"
|
||||||
|
ci_spawn "$CI_CTEST" --version
|
||||||
|
[[ $CI_CMAKE_GENERATOR == *"Ninja"* ]] && {
|
||||||
|
CI_NINJA="$(command -v ninja)" || ci_err "bad or missing ninja, no pun intended"
|
||||||
|
ci_spawn "$CI_NINJA" --version
|
||||||
|
}
|
||||||
|
[[ $CI_AR ]] && {
|
||||||
|
# Use the full path of CI_AR to work around a mysterious CMake error.
|
||||||
|
CI_AR="$(command -v "$CI_AR")" || ci_err "bad or missing \$CI_AR"
|
||||||
|
}
|
||||||
|
[[ $CI_RANLIB ]] && {
|
||||||
|
# Use the full path of CI_RANLIB to work around a mysterious CMake error.
|
||||||
|
CI_RANLIB="$(command -v "$CI_RANLIB")" || ci_err "bad or missing \$CI_RANLIB"
|
||||||
|
}
|
||||||
|
# Export the CMake environment variables.
|
||||||
|
[[ $CI_CMAKE_GENERATOR ]] && {
|
||||||
|
ci_spawn export CMAKE_GENERATOR="$CI_CMAKE_GENERATOR"
|
||||||
|
}
|
||||||
|
[[ $CI_CMAKE_GENERATOR_PLATFORM ]] && {
|
||||||
|
ci_spawn export CMAKE_GENERATOR_PLATFORM="$CI_CMAKE_GENERATOR_PLATFORM"
|
||||||
|
}
|
||||||
|
# Initialize and populate the local arrays.
|
||||||
|
local all_cmake_vars=()
|
||||||
|
local all_cmake_build_flags=()
|
||||||
|
local all_ctest_flags=()
|
||||||
|
[[ $CI_CMAKE_TOOLCHAIN_FILE ]] && {
|
||||||
|
all_cmake_vars+=("-DCMAKE_TOOLCHAIN_FILE=$CI_CMAKE_TOOLCHAIN_FILE")
|
||||||
|
}
|
||||||
|
[[ $CI_CC ]] && {
|
||||||
|
all_cmake_vars+=("-DCMAKE_C_COMPILER=$CI_CC")
|
||||||
|
}
|
||||||
|
[[ $CI_CC_FLAGS || $CI_SANITIZERS ]] && {
|
||||||
|
[[ $CI_SANITIZERS ]] && CI_CC_FLAGS+="${CI_CC_FLAGS:+" "}-fsanitize=$CI_SANITIZERS"
|
||||||
|
all_cmake_vars+=("-DCMAKE_C_FLAGS=$CI_CC_FLAGS")
|
||||||
|
}
|
||||||
|
[[ $CI_AR ]] && {
|
||||||
|
all_cmake_vars+=("-DCMAKE_AR=$CI_AR")
|
||||||
|
}
|
||||||
|
[[ $CI_RANLIB ]] && {
|
||||||
|
all_cmake_vars+=("-DCMAKE_RANLIB=$CI_RANLIB")
|
||||||
|
}
|
||||||
|
all_cmake_vars+=("-DCMAKE_BUILD_TYPE=$CI_CMAKE_BUILD_TYPE")
|
||||||
|
all_cmake_vars+=("-DCMAKE_VERBOSE_MAKEFILE=ON")
|
||||||
|
all_cmake_vars+=($CI_CMAKE_VARS)
|
||||||
|
all_cmake_build_flags+=($CI_CMAKE_BUILD_FLAGS)
|
||||||
|
all_ctest_flags+=($CI_CTEST_FLAGS)
|
||||||
|
# And... build!
|
||||||
|
ci_spawn mkdir -p "$CI_BUILD_DIR"
|
||||||
|
# Spawn "cmake ...".
|
||||||
|
ci_spawn "$CI_CMAKE" -B "$CI_BUILD_DIR" \
|
||||||
|
-S . \
|
||||||
|
-DCMAKE_INSTALL_PREFIX="$CI_INSTALL_DIR" \
|
||||||
|
"${all_cmake_vars[@]}"
|
||||||
|
ci_expr $((CI_NO_BUILD)) || {
|
||||||
|
# Spawn "cmake --build ...".
|
||||||
|
ci_spawn "$CI_CMAKE" --build "$CI_BUILD_DIR" \
|
||||||
|
--config "$CI_CMAKE_BUILD_TYPE" \
|
||||||
|
"${all_cmake_build_flags[@]}"
|
||||||
|
}
|
||||||
|
ci_expr $((CI_NO_TEST)) || {
|
||||||
|
# Spawn "ctest" if testing is not disabled.
|
||||||
|
ci_spawn pushd "$CI_BUILD_DIR"
|
||||||
|
ci_spawn "$CI_CTEST" --build-config "$CI_CMAKE_BUILD_TYPE" \
|
||||||
|
"${all_ctest_flags[@]}"
|
||||||
|
ci_spawn popd
|
||||||
|
}
|
||||||
|
ci_expr $((CI_NO_INSTALL)) || {
|
||||||
|
# Spawn "cmake --build ... --target install" if installation is not disabled.
|
||||||
|
ci_spawn "$CI_CMAKE" --build "$CI_BUILD_DIR" \
|
||||||
|
--config "$CI_CMAKE_BUILD_TYPE" \
|
||||||
|
--target install \
|
||||||
|
"${all_cmake_build_flags[@]}"
|
||||||
|
}
|
||||||
|
ci_expr $((CI_NO_CLEAN)) || {
|
||||||
|
# Spawn "make --build ... --target clean" if cleaning is not disabled.
|
||||||
|
ci_spawn "$CI_CMAKE" --build "$CI_BUILD_DIR" \
|
||||||
|
--config "$CI_CMAKE_BUILD_TYPE" \
|
||||||
|
--target clean \
|
||||||
|
"${all_cmake_build_flags[@]}"
|
||||||
|
}
|
||||||
|
ci_info "## END OF BUILD ##"
|
||||||
|
}
|
||||||
|
|
||||||
|
function usage {
|
||||||
|
echo "usage: $CI_SCRIPT_NAME [<options>]"
|
||||||
|
echo "options: -?|-h|--help"
|
||||||
|
exit "${@:-0}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function main {
|
||||||
|
local opt
|
||||||
|
while getopts ":" opt
|
||||||
|
do
|
||||||
|
# This ain't a while-loop. It only pretends to be.
|
||||||
|
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||||
|
ci_err "unknown option: '$1'"
|
||||||
|
done
|
||||||
|
shift $((OPTIND - 1))
|
||||||
|
# And... go!
|
||||||
|
ci_init_build
|
||||||
|
ci_trace_build
|
||||||
|
[[ $# -eq 0 ]] || {
|
||||||
|
echo >&2 "error: unexpected argument: '$1'"
|
||||||
|
echo >&2 "note: this program accepts environment options only"
|
||||||
|
usage 2
|
||||||
|
}
|
||||||
|
ci_cleanup_old_build
|
||||||
|
ci_build
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
182
ci/ci_verify_configure.sh
Executable file
182
ci/ci_verify_configure.sh
Executable file
@ -0,0 +1,182 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -o errexit -o pipefail -o posix
|
||||||
|
|
||||||
|
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
# shellcheck source=ci/lib/ci.lib.sh
|
||||||
|
source "$(dirname "$0")/lib/ci.lib.sh"
|
||||||
|
cd "$CI_TOPLEVEL_DIR"
|
||||||
|
|
||||||
|
CI_SRC_DIR="$CI_TOPLEVEL_DIR"
|
||||||
|
CI_OUT_DIR="$CI_TOPLEVEL_DIR/out"
|
||||||
|
CI_BUILD_DIR="$CI_OUT_DIR/ci_verify_configure.$CI_TARGET_SYSTEM.$CI_TARGET_ARCH.build"
|
||||||
|
CI_INSTALL_DIR="$CI_OUT_DIR/ci_verify_configure.$CI_TARGET_SYSTEM.$CI_TARGET_ARCH.install"
|
||||||
|
|
||||||
|
function ci_init_build {
|
||||||
|
# Ensure that the mandatory variables are initialized.
|
||||||
|
CI_MAKE="${CI_MAKE:-make}"
|
||||||
|
[[ "$CI_TARGET_SYSTEM.$CI_TARGET_ARCH" != "$CI_BUILD_SYSTEM.$CI_BUILD_ARCH" ]] || {
|
||||||
|
# For native builds, set CI_CC to "cc" by default if the cc command is available.
|
||||||
|
# The configure script defaults CC to "gcc", which is not always a good idea.
|
||||||
|
[[ -x $(command -v cc) ]] && CI_CC="${CI_CC:-cc}"
|
||||||
|
}
|
||||||
|
# Ensure that the CI_ variables that cannot be customized reliably are not initialized.
|
||||||
|
[[ ! $CI_CONFIGURE_VARS ]] || {
|
||||||
|
ci_err "unsupported: \$CI_CONFIGURE_VARS='$CI_CONFIGURE_VARS'"
|
||||||
|
}
|
||||||
|
[[ ! $CI_MAKE_VARS ]] || {
|
||||||
|
ci_err "unsupported: \$CI_MAKE_VARS='$CI_MAKE_VARS'"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_trace_build {
|
||||||
|
ci_info "## START OF CONFIGURATION ##"
|
||||||
|
ci_info "build arch: $CI_BUILD_ARCH"
|
||||||
|
ci_info "build system: $CI_BUILD_SYSTEM"
|
||||||
|
[[ "$CI_TARGET_SYSTEM.$CI_TARGET_ARCH" != "$CI_BUILD_SYSTEM.$CI_BUILD_ARCH" ]] && {
|
||||||
|
ci_info "target arch: $CI_TARGET_ARCH"
|
||||||
|
ci_info "target system: $CI_TARGET_SYSTEM"
|
||||||
|
}
|
||||||
|
ci_info "source directory: $CI_SRC_DIR"
|
||||||
|
ci_info "build directory: $CI_BUILD_DIR"
|
||||||
|
ci_info "install directory: $CI_INSTALL_DIR"
|
||||||
|
ci_info "environment option: \$CI_CONFIGURE_FLAGS: '$CI_CONFIGURE_FLAGS'"
|
||||||
|
ci_info "environment option: \$CI_MAKE: '$CI_MAKE'"
|
||||||
|
ci_info "environment option: \$CI_MAKE_FLAGS: '$CI_MAKE_FLAGS'"
|
||||||
|
ci_info "environment option: \$CI_CC: '$CI_CC'"
|
||||||
|
ci_info "environment option: \$CI_CC_FLAGS: '$CI_CC_FLAGS'"
|
||||||
|
ci_info "environment option: \$CI_CPP: '$CI_CPP'"
|
||||||
|
ci_info "environment option: \$CI_CPP_FLAGS: '$CI_CPP_FLAGS'"
|
||||||
|
ci_info "environment option: \$CI_AR: '$CI_AR'"
|
||||||
|
ci_info "environment option: \$CI_RANLIB: '$CI_RANLIB'"
|
||||||
|
ci_info "environment option: \$CI_LD: '$CI_LD'"
|
||||||
|
ci_info "environment option: \$CI_LD_FLAGS: '$CI_LD_FLAGS'"
|
||||||
|
ci_info "environment option: \$CI_SANITIZERS: '$CI_SANITIZERS'"
|
||||||
|
ci_info "environment option: \$CI_FORCE: '$CI_FORCE'"
|
||||||
|
ci_info "environment option: \$CI_NO_BUILD: '$CI_NO_BUILD'"
|
||||||
|
ci_info "environment option: \$CI_NO_TEST: '$CI_NO_TEST'"
|
||||||
|
ci_info "environment option: \$CI_NO_INSTALL: '$CI_NO_INSTALL'"
|
||||||
|
ci_info "environment option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'"
|
||||||
|
ci_info "executable: \$CI_MAKE: $(command -V "$CI_MAKE")"
|
||||||
|
[[ $CI_CC ]] && {
|
||||||
|
ci_info "executable: \$CI_CC: $(command -V "$CI_CC")"
|
||||||
|
}
|
||||||
|
[[ $CI_CPP ]] && {
|
||||||
|
ci_info "executable: \$CI_CPP: $(command -V "$CI_CPP")"
|
||||||
|
}
|
||||||
|
[[ $CI_AR ]] && {
|
||||||
|
ci_info "executable: \$CI_AR: $(command -V "$CI_AR")"
|
||||||
|
}
|
||||||
|
[[ $CI_RANLIB ]] && {
|
||||||
|
ci_info "executable: \$CI_RANLIB: $(command -V "$CI_RANLIB")"
|
||||||
|
}
|
||||||
|
[[ $CI_LD ]] && {
|
||||||
|
ci_info "executable: \$CI_LD: $(command -V "$CI_LD")"
|
||||||
|
}
|
||||||
|
ci_info "## END OF CONFIGURATION ##"
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_cleanup_old_build {
|
||||||
|
ci_info "## START OF PRE-BUILD CLEANUP ##"
|
||||||
|
[[ ! -e $CI_BUILD_DIR && ! -e $CI_INSTALL_DIR ]] || {
|
||||||
|
ci_spawn rm -fr "$CI_BUILD_DIR"
|
||||||
|
ci_spawn rm -fr "$CI_INSTALL_DIR"
|
||||||
|
}
|
||||||
|
[[ ! -e "$CI_SRC_DIR/config.status" ]] || {
|
||||||
|
ci_warn "unexpected build configuration file: '$CI_SRC_DIR/config.status'"
|
||||||
|
if ci_expr $((CI_FORCE))
|
||||||
|
then
|
||||||
|
# Delete the old config and (possibly) the old build.
|
||||||
|
ci_info "note: forcing an in-tree build cleanup"
|
||||||
|
if [[ -f $CI_SRC_DIR/Makefile ]]
|
||||||
|
then
|
||||||
|
ci_spawn make -C "$CI_SRC_DIR" distclean
|
||||||
|
else
|
||||||
|
ci_spawn rm -fr "$CI_SRC_DIR"/config.{log,status}
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Alert the user, but do not delete their files.
|
||||||
|
ci_warn "the configure script might fail"
|
||||||
|
ci_info "hint: consider using the option \$CI_FORCE=1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
ci_info "## END OF PRE-BUILD CLEANUP ##"
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_build {
|
||||||
|
ci_info "## START OF BUILD ##"
|
||||||
|
# Export the configure build environment.
|
||||||
|
[[ $CI_CC ]] && ci_spawn export CC="$CI_CC"
|
||||||
|
[[ $CI_CC_FLAGS ]] && ci_spawn export CFLAGS="$CI_CC_FLAGS"
|
||||||
|
[[ $CI_CPP ]] && ci_spawn export CPP="$CI_CPP"
|
||||||
|
[[ $CI_CPP_FLAGS ]] && ci_spawn export CPPFLAGS="$CI_CPP_FLAGS"
|
||||||
|
[[ $CI_AR ]] && ci_spawn export AR="$CI_AR"
|
||||||
|
[[ $CI_RANLIB ]] && ci_spawn export RANLIB="$CI_RANLIB"
|
||||||
|
[[ $CI_LD ]] && ci_spawn export LD="$CI_LD"
|
||||||
|
[[ $CI_LD_FLAGS ]] && ci_spawn export LDFLAGS="$CI_LD_FLAGS"
|
||||||
|
[[ $CI_SANITIZERS ]] && {
|
||||||
|
ci_spawn export CFLAGS="${CFLAGS:-"-O2"} -fsanitize=$CI_SANITIZERS"
|
||||||
|
ci_spawn export LDFLAGS="${LDFLAGS}${LDFLAGS:+" "}-fsanitize=$CI_SANITIZERS"
|
||||||
|
}
|
||||||
|
# Spawn "autogen.sh" if the configure script is not available.
|
||||||
|
[[ -x "$CI_SRC_DIR/configure" ]] || {
|
||||||
|
ci_spawn "$CI_SRC_DIR/autogen.sh" --maintainer
|
||||||
|
}
|
||||||
|
# And... build!
|
||||||
|
ci_spawn mkdir -p "$CI_BUILD_DIR"
|
||||||
|
ci_spawn cd "$CI_BUILD_DIR"
|
||||||
|
# Spawn "configure".
|
||||||
|
ci_spawn "$CI_SRC_DIR/configure" --prefix="$CI_INSTALL_DIR" $CI_CONFIGURE_FLAGS
|
||||||
|
ci_expr $((CI_NO_BUILD)) || {
|
||||||
|
# Spawn "make".
|
||||||
|
ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS
|
||||||
|
}
|
||||||
|
ci_expr $((CI_NO_TEST)) || {
|
||||||
|
# Spawn "make test" if testing is not disabled.
|
||||||
|
ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS test
|
||||||
|
}
|
||||||
|
ci_expr $((CI_NO_INSTALL)) || {
|
||||||
|
# Spawn "make install" if installation is not disabled.
|
||||||
|
ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS install
|
||||||
|
}
|
||||||
|
ci_expr $((CI_NO_CLEAN)) || {
|
||||||
|
# Spawn "make clean" and "make distclean" if cleaning is not disabled.
|
||||||
|
ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS clean
|
||||||
|
ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS distclean
|
||||||
|
}
|
||||||
|
ci_info "## END OF BUILD ##"
|
||||||
|
}
|
||||||
|
|
||||||
|
function usage {
|
||||||
|
echo "usage: $CI_SCRIPT_NAME [<options>]"
|
||||||
|
echo "options: -?|-h|--help"
|
||||||
|
exit "${@:-0}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function main {
|
||||||
|
local opt
|
||||||
|
while getopts ":" opt
|
||||||
|
do
|
||||||
|
# This ain't a while-loop. It only pretends to be.
|
||||||
|
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||||
|
ci_err "unknown option: '$1'"
|
||||||
|
done
|
||||||
|
shift $((OPTIND - 1))
|
||||||
|
# And... go!
|
||||||
|
ci_init_build
|
||||||
|
ci_trace_build
|
||||||
|
[[ $# -eq 0 ]] || {
|
||||||
|
echo >&2 "error: unexpected argument: '$1'"
|
||||||
|
echo >&2 "note: this program accepts environment options only"
|
||||||
|
usage 2
|
||||||
|
}
|
||||||
|
ci_cleanup_old_build
|
||||||
|
ci_build
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
200
ci/ci_verify_makefiles.sh
Executable file
200
ci/ci_verify_makefiles.sh
Executable file
@ -0,0 +1,200 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -o errexit -o pipefail -o posix
|
||||||
|
|
||||||
|
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
# shellcheck source=ci/lib/ci.lib.sh
|
||||||
|
source "$(dirname "$0")/lib/ci.lib.sh"
|
||||||
|
cd "$CI_TOPLEVEL_DIR"
|
||||||
|
|
||||||
|
CI_SRC_DIR="$CI_TOPLEVEL_DIR"
|
||||||
|
|
||||||
|
function ci_init_build {
|
||||||
|
# Ensure that the mandatory variables are initialized.
|
||||||
|
CI_MAKE="${CI_MAKE:-make}"
|
||||||
|
case "$CI_CC" in
|
||||||
|
( *clang* )
|
||||||
|
CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.clang"}" ;;
|
||||||
|
( *gcc* )
|
||||||
|
CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.gcc"}" ;;
|
||||||
|
( * )
|
||||||
|
CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.std"}" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_trace_build {
|
||||||
|
ci_info "## START OF CONFIGURATION ##"
|
||||||
|
ci_info "build arch: $CI_BUILD_ARCH"
|
||||||
|
ci_info "build system: $CI_BUILD_SYSTEM"
|
||||||
|
[[ "$CI_TARGET_SYSTEM.$CI_TARGET_ARCH" != "$CI_BUILD_SYSTEM.$CI_BUILD_ARCH" ]] && {
|
||||||
|
ci_info "target arch: $CI_TARGET_ARCH"
|
||||||
|
ci_info "target system: $CI_TARGET_SYSTEM"
|
||||||
|
}
|
||||||
|
ci_info "source directory: $CI_SRC_DIR"
|
||||||
|
ci_info "environment option: \$CI_MAKEFILES: '$CI_MAKEFILES'"
|
||||||
|
ci_info "environment option: \$CI_MAKE: '$CI_MAKE'"
|
||||||
|
ci_info "environment option: \$CI_MAKE_FLAGS: '$CI_MAKE_FLAGS'"
|
||||||
|
ci_info "environment option: \$CI_MAKE_VARS: '$CI_MAKE_VARS'"
|
||||||
|
ci_info "environment option: \$CI_CC: '$CI_CC'"
|
||||||
|
ci_info "environment option: \$CI_CC_FLAGS: '$CI_CC_FLAGS'"
|
||||||
|
ci_info "environment option: \$CI_CPP: '$CI_CPP'"
|
||||||
|
ci_info "environment option: \$CI_CPP_FLAGS: '$CI_CPP_FLAGS'"
|
||||||
|
ci_info "environment option: \$CI_AR: '$CI_AR'"
|
||||||
|
ci_info "environment option: \$CI_RANLIB: '$CI_RANLIB'"
|
||||||
|
ci_info "environment option: \$CI_LD: '$CI_LD'"
|
||||||
|
ci_info "environment option: \$CI_LD_FLAGS: '$CI_LD_FLAGS'"
|
||||||
|
ci_info "environment option: \$CI_LIBS: '$CI_LIBS'"
|
||||||
|
ci_info "environment option: \$CI_SANITIZERS: '$CI_SANITIZERS'"
|
||||||
|
ci_info "environment option: \$CI_FORCE: '$CI_FORCE'"
|
||||||
|
ci_info "environment option: \$CI_NO_BUILD: '$CI_NO_BUILD'"
|
||||||
|
ci_info "environment option: \$CI_NO_TEST: '$CI_NO_TEST'"
|
||||||
|
ci_info "environment option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'"
|
||||||
|
ci_info "executable: \$CI_MAKE: $(command -V "$CI_MAKE")"
|
||||||
|
[[ $CI_CC ]] && {
|
||||||
|
ci_info "executable: \$CI_CC: $(command -V "$CI_CC")"
|
||||||
|
}
|
||||||
|
[[ $CI_CPP ]] && {
|
||||||
|
ci_info "executable: \$CI_CPP: $(command -V "$CI_CPP")"
|
||||||
|
}
|
||||||
|
[[ $CI_AR ]] && {
|
||||||
|
ci_info "executable: \$CI_AR: $(command -V "$CI_AR")"
|
||||||
|
}
|
||||||
|
[[ $CI_RANLIB ]] && {
|
||||||
|
ci_info "executable: \$CI_RANLIB: $(command -V "$CI_RANLIB")"
|
||||||
|
}
|
||||||
|
[[ $CI_LD ]] && {
|
||||||
|
ci_info "executable: \$CI_LD: $(command -V "$CI_LD")"
|
||||||
|
}
|
||||||
|
ci_info "## END OF CONFIGURATION ##"
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_cleanup_old_build {
|
||||||
|
# Any old makefile-based build will most likely leave a mess
|
||||||
|
# of object files behind if interrupted, e.g., via Ctrl+C.
|
||||||
|
# There may be other files behind, depending on what makefile
|
||||||
|
# had been used. We cannot easily enumerate all of those.
|
||||||
|
# Fortunately, for a clean makefiles-based build, it should be
|
||||||
|
# sufficient to remove the old object files only.
|
||||||
|
ci_info "## START OF PRE-BUILD CLEANUP ##"
|
||||||
|
local find_args=(-maxdepth 1 \( -iname "*.o" -o -iname "*.obj" \))
|
||||||
|
[[ ! $(find "$CI_SRC_DIR" "${find_args[@]}" | head -n1) ]] || {
|
||||||
|
ci_warn "unexpected build found in '$CI_SRC_DIR'"
|
||||||
|
if ci_expr $((CI_FORCE))
|
||||||
|
then
|
||||||
|
# Delete the old build.
|
||||||
|
local my_file
|
||||||
|
find "$CI_SRC_DIR" "${find_args[@]}" |
|
||||||
|
while IFS="" read -r my_file
|
||||||
|
do
|
||||||
|
ci_spawn rm -fr "$my_file"
|
||||||
|
done
|
||||||
|
ci_info "## END OF PRE-BUILD CLEANUP ##"
|
||||||
|
else
|
||||||
|
# Alert the user, but do not delete their existing files,
|
||||||
|
# and do not mess up their existing build.
|
||||||
|
ci_info "hint: consider using the option \$CI_FORCE=1"
|
||||||
|
ci_err "unable to continue"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_build {
|
||||||
|
ci_info "## START OF BUILD ##"
|
||||||
|
# Initialize and populate the local arrays.
|
||||||
|
local all_make_flags=()
|
||||||
|
local all_make_vars=()
|
||||||
|
[[ $CI_MAKE_FLAGS ]] && {
|
||||||
|
all_make_flags+=($CI_MAKE_FLAGS)
|
||||||
|
}
|
||||||
|
[[ $CI_CC ]] && {
|
||||||
|
all_make_vars+=("CC=$CI_CC")
|
||||||
|
}
|
||||||
|
[[ $CI_CC_FLAGS || $CI_SANITIZERS ]] && {
|
||||||
|
[[ $CI_SANITIZERS ]] && CI_CC_FLAGS="${CI_CC_FLAGS:-"-O2"} -fsanitize=$CI_SANITIZERS"
|
||||||
|
all_make_vars+=("CFLAGS=$CI_CC_FLAGS")
|
||||||
|
}
|
||||||
|
[[ $CI_CPP ]] && {
|
||||||
|
all_make_vars+=("CPP=$CI_CPP")
|
||||||
|
}
|
||||||
|
[[ $CI_CPP_FLAGS ]] && {
|
||||||
|
all_make_vars+=("CPPFLAGS=$CI_CPP_FLAGS")
|
||||||
|
}
|
||||||
|
[[ $CI_AR ]] && {
|
||||||
|
all_make_vars+=("AR=$CI_AR")
|
||||||
|
}
|
||||||
|
[[ $CI_RANLIB ]] && {
|
||||||
|
all_make_vars+=("RANLIB=$CI_RANLIB")
|
||||||
|
}
|
||||||
|
[[ $CI_LD ]] && {
|
||||||
|
all_make_vars+=("LD=$CI_LD")
|
||||||
|
}
|
||||||
|
[[ $CI_LD_FLAGS || $CI_SANITIZERS ]] && {
|
||||||
|
[[ $CI_SANITIZERS ]] && CI_LD_FLAGS+="${CI_LD_FLAGS:+" "}-fsanitize=$CI_SANITIZERS"
|
||||||
|
all_make_vars+=("LDFLAGS=$CI_LD_FLAGS")
|
||||||
|
}
|
||||||
|
[[ $CI_LIBS ]] && {
|
||||||
|
all_make_vars+=("LIBS=$CI_LIBS")
|
||||||
|
}
|
||||||
|
all_make_vars+=($CI_MAKE_VARS)
|
||||||
|
# And... build!
|
||||||
|
local my_makefile
|
||||||
|
for my_makefile in $CI_MAKEFILES
|
||||||
|
do
|
||||||
|
ci_info "using makefile: $my_makefile"
|
||||||
|
ci_expr $((CI_NO_BUILD)) || {
|
||||||
|
# Spawn "make".
|
||||||
|
ci_spawn "$CI_MAKE" -f "$my_makefile" \
|
||||||
|
"${all_make_flags[@]}" \
|
||||||
|
"${all_make_vars[@]}"
|
||||||
|
}
|
||||||
|
ci_expr $((CI_NO_TEST)) || {
|
||||||
|
# Spawn "make test" if testing is not disabled.
|
||||||
|
ci_spawn "$CI_MAKE" -f "$my_makefile" \
|
||||||
|
"${all_make_flags[@]}" \
|
||||||
|
"${all_make_vars[@]}" \
|
||||||
|
test
|
||||||
|
}
|
||||||
|
ci_expr $((CI_NO_CLEAN)) || {
|
||||||
|
# Spawn "make clean" if cleaning is not disabled.
|
||||||
|
ci_spawn "$CI_MAKE" -f "$my_makefile" \
|
||||||
|
"${all_make_flags[@]}" \
|
||||||
|
"${all_make_vars[@]}" \
|
||||||
|
clean
|
||||||
|
}
|
||||||
|
done
|
||||||
|
ci_info "## END OF BUILD ##"
|
||||||
|
}
|
||||||
|
|
||||||
|
function usage {
|
||||||
|
echo "usage: $CI_SCRIPT_NAME [<options>]"
|
||||||
|
echo "options: -?|-h|--help"
|
||||||
|
exit "${@:-0}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function main {
|
||||||
|
local opt
|
||||||
|
while getopts ":" opt
|
||||||
|
do
|
||||||
|
# This ain't a while-loop. It only pretends to be.
|
||||||
|
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||||
|
ci_err "unknown option: '$1'"
|
||||||
|
done
|
||||||
|
shift $((OPTIND - 1))
|
||||||
|
# And... go!
|
||||||
|
ci_init_build
|
||||||
|
ci_trace_build
|
||||||
|
[[ $# -eq 0 ]] || {
|
||||||
|
echo >&2 "error: unexpected argument: '$1'"
|
||||||
|
echo >&2 "note: this program accepts environment options only"
|
||||||
|
usage 2
|
||||||
|
}
|
||||||
|
ci_cleanup_old_build
|
||||||
|
ci_build
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
191
ci/ci_verify_version.sh
Executable file
191
ci/ci_verify_version.sh
Executable file
@ -0,0 +1,191 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -o errexit -o pipefail -o posix
|
||||||
|
|
||||||
|
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
# shellcheck source=ci/lib/ci.lib.sh
|
||||||
|
source "$(dirname "$0")/lib/ci.lib.sh"
|
||||||
|
cd "$CI_TOPLEVEL_DIR"
|
||||||
|
|
||||||
|
# Declare the global environments collected from various sources.
|
||||||
|
declare CI_ENV_LIBPNG_VER # collected from png.h
|
||||||
|
declare CI_ENV_AUTOCONF_VER # collected from configure.ac
|
||||||
|
declare CI_ENV_CMAKE_VER # collected from CMakeLists.txt
|
||||||
|
declare CI_ENV_LIBPNGCONFIG_VER # collected from scripts/libpng-config-head.in
|
||||||
|
|
||||||
|
function ci_run_shellify {
|
||||||
|
local my_script my_result
|
||||||
|
my_script="$CI_SCRIPT_DIR/libexec/ci_shellify_${1#--}.sh"
|
||||||
|
shift 1
|
||||||
|
[[ -f $my_script ]] || {
|
||||||
|
ci_err_internal "missing script: '$my_script'"
|
||||||
|
}
|
||||||
|
ci_info "shellifying:" "$@"
|
||||||
|
"$BASH" "$my_script" "$@"
|
||||||
|
echo "$my_result" | "$BASH" --posix || ci_err "bad shellify output"
|
||||||
|
echo "$my_result"
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_init_version_verification {
|
||||||
|
ci_info "## START OF VERIFICATION ##"
|
||||||
|
CI_ENV_LIBPNG_VER="$(ci_run_shellify --c png.h)"
|
||||||
|
echo "$CI_ENV_LIBPNG_VER"
|
||||||
|
CI_ENV_AUTOCONF_VER="$(ci_run_shellify --autoconf configure.ac)"
|
||||||
|
echo "$CI_ENV_AUTOCONF_VER"
|
||||||
|
CI_ENV_CMAKE_VER="$(ci_run_shellify --cmake CMakeLists.txt)"
|
||||||
|
echo "$CI_ENV_CMAKE_VER"
|
||||||
|
CI_ENV_LIBPNGCONFIG_VER="$(ci_run_shellify --shell scripts/libpng-config-head.in)"
|
||||||
|
echo "$CI_ENV_LIBPNGCONFIG_VER"
|
||||||
|
}
|
||||||
|
|
||||||
|
# shellcheck disable=SC2154
|
||||||
|
function ci_do_version_verification {
|
||||||
|
local my_expect
|
||||||
|
ci_info "## VERIFYING: version definitions in 'png.h' ##"
|
||||||
|
eval "$CI_ENV_LIBPNG_VER"
|
||||||
|
my_expect="${PNG_LIBPNG_VER_MAJOR}.${PNG_LIBPNG_VER_MINOR}.${PNG_LIBPNG_VER_RELEASE}"
|
||||||
|
if [[ "$PNG_LIBPNG_VER_STRING" == "$my_expect"* ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$PNG_LIBPNG_VER_STRING == $my_expect*"
|
||||||
|
else
|
||||||
|
ci_err "mismatched: \$PNG_LIBPNG_VER_STRING != $my_expect*"
|
||||||
|
fi
|
||||||
|
my_expect=$((PNG_LIBPNG_VER_MAJOR*10000 + PNG_LIBPNG_VER_MINOR*100 + PNG_LIBPNG_VER_RELEASE))
|
||||||
|
if [[ "$PNG_LIBPNG_VER" == "$my_expect" ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$PNG_LIBPNG_VER == $my_expect"
|
||||||
|
else
|
||||||
|
ci_err "mismatched: \$PNG_LIBPNG_VER != $my_expect"
|
||||||
|
fi
|
||||||
|
my_expect=$((PNG_LIBPNG_VER_MAJOR*10 + PNG_LIBPNG_VER_MINOR))
|
||||||
|
if [[ "$PNG_LIBPNG_VER_SHAREDLIB" == "$my_expect" ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$PNG_LIBPNG_VER_SHAREDLIB == $my_expect"
|
||||||
|
else
|
||||||
|
ci_err "mismatched: \$PNG_LIBPNG_VER_SHAREDLIB != $my_expect"
|
||||||
|
fi
|
||||||
|
if [[ "$PNG_LIBPNG_VER_SONUM" == "$my_expect" ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$PNG_LIBPNG_VER_SONUM == $my_expect"
|
||||||
|
else
|
||||||
|
ci_err "mismatched: \$PNG_LIBPNG_VER_SONUM != $my_expect"
|
||||||
|
fi
|
||||||
|
if [[ "$PNG_LIBPNG_VER_DLLNUM" == "$my_expect" ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$PNG_LIBPNG_VER_DLLNUM == $my_expect"
|
||||||
|
else
|
||||||
|
ci_err "mismatched: \$PNG_LIBPNG_VER_DLLNUM != $my_expect"
|
||||||
|
fi
|
||||||
|
if [[ "$PNG_LIBPNG_VER_BUILD" == [01] ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$PNG_LIBPNG_VER_BUILD == [01]"
|
||||||
|
else
|
||||||
|
ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD != [01]"
|
||||||
|
fi
|
||||||
|
ci_info "## VERIFYING: build definitions in 'png.h' ##"
|
||||||
|
my_expect="${PNG_LIBPNG_VER_MAJOR}.${PNG_LIBPNG_VER_MINOR}.${PNG_LIBPNG_VER_RELEASE}"
|
||||||
|
if [[ "$PNG_LIBPNG_VER_STRING" == "$my_expect" ]]
|
||||||
|
then
|
||||||
|
if [[ $PNG_LIBPNG_VER_BUILD -eq 0 ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$PNG_LIBPNG_VER_BUILD -eq 0"
|
||||||
|
else
|
||||||
|
ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD -ne 0"
|
||||||
|
fi
|
||||||
|
if [[ $PNG_LIBPNG_BUILD_BASE_TYPE -eq $PNG_LIBPNG_BUILD_STABLE ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$PNG_LIBPNG_BUILD_BASE_TYPE -eq \$PNG_LIBPNG_BUILD_STABLE"
|
||||||
|
else
|
||||||
|
ci_err "mismatched: \$PNG_LIBPNG_BUILD_BASE_TYPE -ne \$PNG_LIBPNG_BUILD_STABLE"
|
||||||
|
fi
|
||||||
|
elif [[ "$PNG_LIBPNG_VER_STRING" == "$my_expect".git ]]
|
||||||
|
then
|
||||||
|
if [[ $PNG_LIBPNG_VER_BUILD -ne 0 ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$PNG_LIBPNG_VER_BUILD -ne 0"
|
||||||
|
else
|
||||||
|
ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD -eq 0"
|
||||||
|
fi
|
||||||
|
if [[ $PNG_LIBPNG_BUILD_BASE_TYPE -ne $PNG_LIBPNG_BUILD_STABLE ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$PNG_LIBPNG_BUILD_BASE_TYPE -ne \$PNG_LIBPNG_BUILD_STABLE"
|
||||||
|
else
|
||||||
|
ci_err "mismatched: \$PNG_LIBPNG_BUILD_BASE_TYPE -eq \$PNG_LIBPNG_BUILD_STABLE"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ci_err "unexpected: \$PNG_LIBPNG_VER_STRING == '$PNG_LIBPNG_VER_STRING'"
|
||||||
|
fi
|
||||||
|
ci_info "## VERIFYING: type definitions in 'png.h' ##"
|
||||||
|
my_expect="$(echo "png_libpng_version_${PNG_LIBPNG_VER_STRING}" | tr . _)"
|
||||||
|
ci_spawn grep -w -e "$my_expect" png.h
|
||||||
|
ci_info "## VERIFYING: version definitions in 'configure.ac' ##"
|
||||||
|
eval "$CI_ENV_AUTOCONF_VER"
|
||||||
|
if [[ "$PNGLIB_VERSION" == "$PNG_LIBPNG_VER_STRING" ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$PNGLIB_VERSION == \$PNG_LIBPNG_VER_STRING"
|
||||||
|
else
|
||||||
|
ci_err "mismatched: \$PNGLIB_VERSION != \$PNG_LIBPNG_VER_STRING"
|
||||||
|
fi
|
||||||
|
ci_info "## VERIFYING: version definitions in 'CMakeLists.txt' ##"
|
||||||
|
eval "$CI_ENV_CMAKE_VER"
|
||||||
|
if [[ "$PNGLIB_VERSION" == "$PNG_LIBPNG_VER_STRING" && "$PNGLIB_SUBREVISION" == 0 ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$PNGLIB_VERSION == \$PNG_LIBPNG_VER_STRING"
|
||||||
|
ci_info "matched: \$PNGLIB_SUBREVISION == 0"
|
||||||
|
elif [[ "$PNGLIB_VERSION.$PNGLIB_SUBREVISION" == "$PNG_LIBPNG_VER_STRING" ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$PNGLIB_VERSION.\$PNGLIB_SUBREVISION == \$PNG_LIBPNG_VER_STRING"
|
||||||
|
else
|
||||||
|
ci_err "mismatched: \$PNGLIB_VERSION != \$PNG_LIBPNG_VER_STRING"
|
||||||
|
fi
|
||||||
|
ci_info "## VERIFYING: version definitions in 'scripts/libpng-config-head.in' ##"
|
||||||
|
eval "$CI_ENV_LIBPNGCONFIG_VER"
|
||||||
|
if [[ "$version" == "$PNG_LIBPNG_VER_STRING" ]]
|
||||||
|
then
|
||||||
|
ci_info "matched: \$version == \$PNG_LIBPNG_VER_STRING"
|
||||||
|
else
|
||||||
|
ci_err "mismatched: \$version != \$PNG_LIBPNG_VER_STRING"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_finish_version_verification {
|
||||||
|
ci_info "## END OF VERIFICATION ##"
|
||||||
|
# Relying on "set -o errexit" to not reach here in case of error.
|
||||||
|
ci_info "## SUCCESS ##"
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_verify_version {
|
||||||
|
ci_init_version_verification
|
||||||
|
ci_do_version_verification
|
||||||
|
ci_finish_version_verification
|
||||||
|
}
|
||||||
|
|
||||||
|
function usage {
|
||||||
|
echo "usage: $CI_SCRIPT_NAME [<options>]"
|
||||||
|
echo "options: -?|-h|--help"
|
||||||
|
exit "${@:-0}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function main {
|
||||||
|
local opt
|
||||||
|
while getopts ":" opt
|
||||||
|
do
|
||||||
|
# This ain't a while-loop. It only pretends to be.
|
||||||
|
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||||
|
ci_err "unknown option: '$1'"
|
||||||
|
done
|
||||||
|
shift $((OPTIND - 1))
|
||||||
|
[[ $# -eq 0 ]] || {
|
||||||
|
echo >&2 "error: unexpected argument: '$1'"
|
||||||
|
usage 2
|
||||||
|
}
|
||||||
|
# And... go!
|
||||||
|
ci_verify_version
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
111
ci/lib/ci.lib.sh
Normal file
111
ci/lib/ci.lib.sh
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
test -f "$BASH_SOURCE" || {
|
||||||
|
echo >&2 "warning: this module requires Bash version 3 or newer"
|
||||||
|
}
|
||||||
|
test "${#BASH_SOURCE[@]}" -gt 1 || {
|
||||||
|
echo >&2 "warning: this module should be sourced from a Bash script"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Reset the locale to avoid surprises from locale-dependent commands.
|
||||||
|
export LC_ALL=C
|
||||||
|
export LANG=C
|
||||||
|
export LANGUAGE=C
|
||||||
|
|
||||||
|
# Reset CDPATH to avoid surprises from the "cd" command.
|
||||||
|
export CDPATH=""
|
||||||
|
|
||||||
|
# Initialize the global constants CI_SCRIPT_{NAME,DIR} and CI_TOPLEVEL_DIR.
|
||||||
|
CI_SCRIPT_NAME="$(basename -- "$0")"
|
||||||
|
CI_SCRIPT_DIR="$(cd "$(dirname -- "$0")" && pwd)"
|
||||||
|
CI_TOPLEVEL_DIR="$(cd "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||||
|
|
||||||
|
# Initialize the global constants CI_BUILD_{...} for the host build platform.
|
||||||
|
CI_BUILD_ARCH="${CI_BUILD_ARCH:-"$(uname -m | tr 'A-Z/\.-' 'a-z____')"}"
|
||||||
|
CI_BUILD_SYSTEM="${CI_BUILD_SYSTEM:-"$(uname -s | tr 'A-Z/\.-' 'a-z____')"}"
|
||||||
|
|
||||||
|
# Initialize the global constants CI_TARGET_{...} for the target platform.
|
||||||
|
CI_TARGET_ARCH="${CI_TARGET_ARCH:-"$CI_BUILD_ARCH"}"
|
||||||
|
CI_TARGET_SYSTEM="${CI_TARGET_SYSTEM:-"$CI_BUILD_SYSTEM"}"
|
||||||
|
|
||||||
|
function ci_info {
|
||||||
|
printf >&2 "%s: %s\\n" "$CI_SCRIPT_NAME" "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_warn {
|
||||||
|
printf >&2 "%s: warning: %s\\n" "$CI_SCRIPT_NAME" "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_err {
|
||||||
|
printf >&2 "%s: error: %s\\n" "$CI_SCRIPT_NAME" "$*"
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_err_internal {
|
||||||
|
printf >&2 "%s: internal error: %s\\n" "$CI_SCRIPT_NAME" "$*"
|
||||||
|
printf >&2 "ABORTED\\n"
|
||||||
|
# Exit with the conventional SIGABRT code.
|
||||||
|
exit 134
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_expr {
|
||||||
|
if [[ ${*:-0} == [0-9] ]]
|
||||||
|
then
|
||||||
|
# This is the same as in the else-branch below, albeit much faster
|
||||||
|
# for our intended use cases.
|
||||||
|
return $((!$1))
|
||||||
|
else
|
||||||
|
# The funny-looking compound command "... && return $? || return $?"
|
||||||
|
# allows the execution to continue uninterrupted under "set -e".
|
||||||
|
expr >/dev/null "$@" && return $? || return $?
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function ci_spawn {
|
||||||
|
printf >&2 "%s: executing:" "$CI_SCRIPT_NAME"
|
||||||
|
printf >&2 " %q" "$@"
|
||||||
|
printf >&2 "\\n"
|
||||||
|
"$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ensure that the internal initialization is correct.
|
||||||
|
[[ $CI_TOPLEVEL_DIR/ci/lib/ci.lib.sh -ef ${BASH_SOURCE[0]} ]] || {
|
||||||
|
ci_err_internal "bad or missing \$CI_TOPLEVEL_DIR"
|
||||||
|
}
|
||||||
|
[[ $CI_SCRIPT_DIR/$CI_SCRIPT_NAME -ef $0 ]] || {
|
||||||
|
ci_err_internal "bad or missing \$CI_SCRIPT_DIR/\$CI_SCRIPT_NAME"
|
||||||
|
}
|
||||||
|
[[ $CI_BUILD_ARCH && $CI_BUILD_SYSTEM ]] || {
|
||||||
|
ci_err_internal "missing \$CI_BUILD_ARCH or \$CI_BUILD_SYSTEM"
|
||||||
|
}
|
||||||
|
[[ $CI_TARGET_ARCH && $CI_TARGET_SYSTEM ]] || {
|
||||||
|
ci_err_internal "missing \$CI_TARGET_ARCH or \$CI_TARGET_SYSTEM"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ensure that the user initialization is correct.
|
||||||
|
[[ ${CI_FORCE:-0} == [01] ]] || {
|
||||||
|
ci_err "bad boolean option: \$CI_FORCE: '$CI_FORCE'"
|
||||||
|
}
|
||||||
|
[[ ${CI_NO_BUILD:-0} == [01] ]] || {
|
||||||
|
ci_err "bad boolean option: \$CI_NO_BUILD: '$CI_NO_BUILD'"
|
||||||
|
}
|
||||||
|
[[ ${CI_NO_TEST:-0} == [01] ]] || {
|
||||||
|
ci_err "bad boolean option: \$CI_NO_TEST: '$CI_NO_TEST'"
|
||||||
|
}
|
||||||
|
[[ ${CI_NO_INSTALL:-0} == [01] ]] || {
|
||||||
|
ci_err "bad boolean option: \$CI_NO_INSTALL: '$CI_NO_INSTALL'"
|
||||||
|
}
|
||||||
|
[[ ${CI_NO_CLEAN:-0} == [01] ]] || {
|
||||||
|
ci_err "bad boolean option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'"
|
||||||
|
}
|
||||||
|
if ci_expr $((CI_NO_BUILD))
|
||||||
|
then
|
||||||
|
ci_expr $((CI_NO_TEST && CI_NO_INSTALL)) || {
|
||||||
|
ci_err "\$CI_NO_BUILD requires \$CI_NO_TEST and \$CI_NO_INSTALL"
|
||||||
|
}
|
||||||
|
fi
|
48
ci/libexec/ci_shellify_autoconf.sh
Executable file
48
ci/libexec/ci_shellify_autoconf.sh
Executable file
@ -0,0 +1,48 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -o errexit -o pipefail -o posix
|
||||||
|
|
||||||
|
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
# shellcheck source=ci/lib/ci.lib.sh
|
||||||
|
source "$(dirname "$0")/../lib/ci.lib.sh"
|
||||||
|
|
||||||
|
function ci_shellify_autoconf {
|
||||||
|
# Convert autoconf (M4) text, specifically originating
|
||||||
|
# from configure.ac, to shell scripting text.
|
||||||
|
# Select only the easy-to-parse definitions of PNGLIB_*.
|
||||||
|
sed -n -e '/^ *PNGLIB_[^ ]*=[$"0-9A-Za-z_]/ p' |
|
||||||
|
sed -e 's/^ *PNG\([0-9A-Za-z_]*\)=\([^# ]*\).*$/PNG\1=\2/' \
|
||||||
|
-e 's/^\([^ ]*=[^ ]*\).*$/export \1;/'
|
||||||
|
}
|
||||||
|
|
||||||
|
function usage {
|
||||||
|
echo "usage: $CI_SCRIPT_NAME [<options>] configure.ac"
|
||||||
|
echo "options: -?|-h|--help"
|
||||||
|
exit "${@:-0}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function main {
|
||||||
|
local opt
|
||||||
|
while getopts ":" opt
|
||||||
|
do
|
||||||
|
# This ain't a while-loop. It only pretends to be.
|
||||||
|
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||||
|
ci_err "unknown option: '$1'"
|
||||||
|
done
|
||||||
|
shift $((OPTIND - 1))
|
||||||
|
[[ $# -eq 0 ]] && usage 2
|
||||||
|
[[ $# -eq 1 ]] || ci_err "too many operands"
|
||||||
|
# And... go!
|
||||||
|
test -e "$1" || ci_err "no such file: '$1'"
|
||||||
|
[[ $(basename -- "$1") == configure.ac ]] || {
|
||||||
|
ci_err "incorrect operand: '$1' (expecting: 'configure.ac')"
|
||||||
|
}
|
||||||
|
ci_shellify_autoconf <"$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
49
ci/libexec/ci_shellify_c.sh
Executable file
49
ci/libexec/ci_shellify_c.sh
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -o errexit -o pipefail -o posix
|
||||||
|
|
||||||
|
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
# shellcheck source=ci/lib/ci.lib.sh
|
||||||
|
source "$(dirname "$0")/../lib/ci.lib.sh"
|
||||||
|
|
||||||
|
function ci_shellify_c {
|
||||||
|
# Convert C preprocessor text, specifically originating
|
||||||
|
# from png.h, to shell scripting text.
|
||||||
|
# Select only the easy-to-parse definitions of PNG_LIBPNG_*.
|
||||||
|
sed -n -e '/^\# *define * PNG_LIBPNG_[^ ]* * ["0-9A-Za-z_]/ p' |
|
||||||
|
sed -e 's/^\# *define * PNG\([^ ]*\) * \([^ ]*\)/PNG\1=\2/' \
|
||||||
|
-e 's/=PNG\([0-9A-Za-z_]*\)/=\${PNG\1}/' \
|
||||||
|
-e 's/^\([^ ]*=[^ ]*\).*$/export \1;/'
|
||||||
|
}
|
||||||
|
|
||||||
|
function usage {
|
||||||
|
echo "usage: $CI_SCRIPT_NAME [<options>] png.h"
|
||||||
|
echo "options: -?|-h|--help"
|
||||||
|
exit "${@:-0}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function main {
|
||||||
|
local opt
|
||||||
|
while getopts ":" opt
|
||||||
|
do
|
||||||
|
# This ain't a while-loop. It only pretends to be.
|
||||||
|
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||||
|
ci_err "unknown option: '$1'"
|
||||||
|
done
|
||||||
|
shift $((OPTIND - 1))
|
||||||
|
[[ $# -eq 0 ]] && usage 2
|
||||||
|
[[ $# -eq 1 ]] || ci_err "too many operands"
|
||||||
|
# And... go!
|
||||||
|
test -e "$1" || ci_err "no such file: '$1'"
|
||||||
|
[[ $(basename -- "$1") == png.h ]] || {
|
||||||
|
ci_err "incorrect operand: '$1' (expecting: 'png.h')"
|
||||||
|
}
|
||||||
|
ci_shellify_c <"$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
49
ci/libexec/ci_shellify_cmake.sh
Executable file
49
ci/libexec/ci_shellify_cmake.sh
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -o errexit -o pipefail -o posix
|
||||||
|
|
||||||
|
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
# shellcheck source=ci/lib/ci.lib.sh
|
||||||
|
source "$(dirname "$0")/../lib/ci.lib.sh"
|
||||||
|
|
||||||
|
function ci_shellify_cmake {
|
||||||
|
# Convert CMake lists text, specifically originating
|
||||||
|
# from CMakeLists.txt, to shell scripting text.
|
||||||
|
# Select only the easy-to-parse definitions of PNGLIB_*.
|
||||||
|
sed -n -e '/^ *set *(PNGLIB_[^ ]* * [$"0-9A-Za-z_].*)/ p' |
|
||||||
|
sed -e 's/^ *set *(PNG\([^ ]*\) * \([^() ]*\)).*$/PNG\1=\2/' \
|
||||||
|
-e 's/^\([^ ]*=[^ ]*\).*$/export \1;/'
|
||||||
|
}
|
||||||
|
|
||||||
|
function usage {
|
||||||
|
echo "usage: $CI_SCRIPT_NAME [<options>] CMakeLists.txt"
|
||||||
|
echo "options: -?|-h|--help"
|
||||||
|
exit "${@:-0}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function main {
|
||||||
|
local opt
|
||||||
|
while getopts ":" opt
|
||||||
|
do
|
||||||
|
# This ain't a while-loop. It only pretends to be.
|
||||||
|
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||||
|
ci_err "unknown option: '$1'"
|
||||||
|
done
|
||||||
|
shift $((OPTIND - 1))
|
||||||
|
[[ $# -eq 0 ]] && usage 2
|
||||||
|
[[ $# -eq 1 ]] || ci_err "too many operands"
|
||||||
|
# And... go!
|
||||||
|
test -e "$1" || ci_err "no such file: '$1'"
|
||||||
|
filename="$(basename -- "$1")"
|
||||||
|
[[ $filename == [Cc][Mm]ake[Ll]ists.txt ]] || {
|
||||||
|
ci_err "incorrect operand: '$1' (expecting: 'CMakeLists.txt')"
|
||||||
|
}
|
||||||
|
ci_shellify_cmake <"$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
46
ci/libexec/ci_shellify_shell.sh
Executable file
46
ci/libexec/ci_shellify_shell.sh
Executable file
@ -0,0 +1,46 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -o errexit -o pipefail -o posix
|
||||||
|
|
||||||
|
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
# shellcheck source=ci/lib/ci.lib.sh
|
||||||
|
source "$(dirname "$0")/../lib/ci.lib.sh"
|
||||||
|
|
||||||
|
function ci_shellify_shell {
|
||||||
|
# Convert shell scripting text to shell scripting text.
|
||||||
|
# Select only the easy-to-parse version definitions.
|
||||||
|
sed -n -e '/^ *[A-Za-z_][0-9A-Za-z_]*=[0-9][^ #]* *$/ p' |
|
||||||
|
sed -e 's/^ *\([^ ]*=[^ ]*\) *$/export \1;/'
|
||||||
|
}
|
||||||
|
|
||||||
|
function usage {
|
||||||
|
echo "usage: $CI_SCRIPT_NAME [<options>] libpng-config-head.in"
|
||||||
|
echo "options: -?|-h|--help"
|
||||||
|
exit "${@:-0}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function main {
|
||||||
|
local opt
|
||||||
|
while getopts ":" opt
|
||||||
|
do
|
||||||
|
# This ain't a while-loop. It only pretends to be.
|
||||||
|
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||||
|
ci_err "unknown option: '$1'"
|
||||||
|
done
|
||||||
|
shift $((OPTIND - 1))
|
||||||
|
[[ $# -eq 0 ]] && usage 2
|
||||||
|
[[ $# -eq 1 ]] || ci_err "too many operands"
|
||||||
|
# And... go!
|
||||||
|
test -e "$1" || ci_err "no such file: '$1'"
|
||||||
|
[[ $(basename -- "$1") == libpng-config-head.in ]] || {
|
||||||
|
ci_err "incorrect operand: '$1' (expecting: 'libpng-config-head.in')"
|
||||||
|
}
|
||||||
|
ci_shellify_shell <"$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
16
ci/targets/android/ci_env.aarch64-linux-android.sh
Normal file
16
ci/targets/android/ci_env.aarch64-linux-android.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=aarch64
|
||||||
|
export CI_TARGET_ARCHVER=aarch64
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=android
|
||||||
|
export CI_TARGET_ABIVER=android29
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
|
||||||
|
export CI_AR="llvm-ar"
|
||||||
|
export CI_RANLIB="llvm-ranlib"
|
16
ci/targets/android/ci_env.armv7a-linux-androideabi.sh
Normal file
16
ci/targets/android/ci_env.armv7a-linux-androideabi.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=arm
|
||||||
|
export CI_TARGET_ARCHVER=armv7a
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=androideabi
|
||||||
|
export CI_TARGET_ABIVER=androideabi29
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
|
||||||
|
export CI_AR="llvm-ar"
|
||||||
|
export CI_RANLIB="llvm-ranlib"
|
16
ci/targets/android/ci_env.i686-linux-android.sh
Normal file
16
ci/targets/android/ci_env.i686-linux-android.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=i686
|
||||||
|
export CI_TARGET_ARCHVER=i686
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=android
|
||||||
|
export CI_TARGET_ABIVER=android29
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
|
||||||
|
export CI_AR="llvm-ar"
|
||||||
|
export CI_RANLIB="llvm-ranlib"
|
16
ci/targets/android/ci_env.x86_64-linux-android.sh
Normal file
16
ci/targets/android/ci_env.x86_64-linux-android.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=x86_64
|
||||||
|
export CI_TARGET_ARCHVER=x86_64
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=android
|
||||||
|
export CI_TARGET_ABIVER=android29
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
|
||||||
|
export CI_AR="llvm-ar"
|
||||||
|
export CI_RANLIB="llvm-ranlib"
|
18
ci/targets/cygwin/ci_env.i686-pc-cygwin.sh
Normal file
18
ci/targets/cygwin/ci_env.i686-pc-cygwin.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=i686
|
||||||
|
export CI_TARGET_SYSTEM=cygwin
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc"
|
||||||
|
export CI_AR="$CI_CC-ar"
|
||||||
|
export CI_RANLIB="$CI_CC-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=CYGWIN
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
18
ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh
Normal file
18
ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=x86_64
|
||||||
|
export CI_TARGET_SYSTEM=cygwin
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc"
|
||||||
|
export CI_AR="$CI_CC-ar"
|
||||||
|
export CI_RANLIB="$CI_CC-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=CYGWIN
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
15
ci/targets/darwin/ci_env.arm64-apple-darwin.sh
Normal file
15
ci/targets/darwin/ci_env.arm64-apple-darwin.sh
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=arm64
|
||||||
|
export CI_TARGET_SYSTEM=darwin
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Darwin
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
-DCMAKE_OSX_ARCHITECTURES=$CI_TARGET_ARCH
|
||||||
|
"
|
15
ci/targets/darwin/ci_env.x86_64-apple-darwin.sh
Normal file
15
ci/targets/darwin/ci_env.x86_64-apple-darwin.sh
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=x86_64
|
||||||
|
export CI_TARGET_SYSTEM=darwin
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Darwin
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
-DCMAKE_OSX_ARCHITECTURES=$CI_TARGET_ARCH
|
||||||
|
"
|
14
ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh
Normal file
14
ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=aarch64
|
||||||
|
export CI_TARGET_SYSTEM=freebsd
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=FreeBSD
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
14
ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh
Normal file
14
ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=i686
|
||||||
|
export CI_TARGET_SYSTEM=freebsd
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=FreeBSD
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
14
ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh
Normal file
14
ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=riscv64
|
||||||
|
export CI_TARGET_SYSTEM=freebsd
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=FreeBSD
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
14
ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh
Normal file
14
ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=x86_64
|
||||||
|
export CI_TARGET_SYSTEM=freebsd
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=FreeBSD
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.aarch64-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.aarch64-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=aarch64
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnu
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.arm-linux-gnueabi.sh
Normal file
21
ci/targets/linux/ci_env.arm-linux-gnueabi.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=arm
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnueabi
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.arm-linux-gnueabihf.sh
Normal file
21
ci/targets/linux/ci_env.arm-linux-gnueabihf.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=arm
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnueabihf
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.i686-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.i686-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=i686
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnu
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.mips-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.mips-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=mips
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnu
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh
Normal file
21
ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=mips64
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnuabi64
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh
Normal file
21
ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=mips64el
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnuabi64
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.mipsel-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.mipsel-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=mipsel
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnu
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=mipsisa32r6
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnu
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=mipsisa32r6el
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnu
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh
Normal file
21
ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=mipsisa64r6
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnuabi64
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh
Normal file
21
ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=mipsisa64r6el
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnuabi64
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.powerpc-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.powerpc-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=powerpc
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnu
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.powerpc64-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.powerpc64-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=powerpc64
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnu
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=powerpc64le
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnu
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.riscv64-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.riscv64-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=riscv64
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnu
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/linux/ci_env.x86_64-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.x86_64-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=x86_64
|
||||||
|
export CI_TARGET_SYSTEM=linux
|
||||||
|
export CI_TARGET_ABI=gnu
|
||||||
|
|
||||||
|
export CI_GCC="${CI_GCC-gcc}"
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||||
|
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||||
|
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
18
ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh
Normal file
18
ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=i386
|
||||||
|
export CI_TARGET_SYSTEM=msdoswatcom
|
||||||
|
|
||||||
|
export CI_CC="wcl386"
|
||||||
|
|
||||||
|
# Open Watcom V2 CMake build
|
||||||
|
# https://github.com/open-watcom/open-watcom-v2/discussions/716
|
||||||
|
export CI_CMAKE_GENERATOR="Watcom WMake"
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=DOS
|
||||||
|
"
|
18
ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh
Normal file
18
ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=i586
|
||||||
|
export CI_TARGET_SYSTEM=msdosdjgpp
|
||||||
|
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc"
|
||||||
|
export CI_AR="$CI_CC-ar"
|
||||||
|
export CI_RANLIB="$CI_CC-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Generic
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
19
ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh
Normal file
19
ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=i86
|
||||||
|
export CI_TARGET_SYSTEM=msdoswatcom
|
||||||
|
|
||||||
|
export CI_CC="wcl"
|
||||||
|
|
||||||
|
# Open Watcom V2 CMake build
|
||||||
|
# https://github.com/open-watcom/open-watcom-v2/discussions/716
|
||||||
|
export CI_CMAKE_GENERATOR="Watcom WMake"
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=DOS
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=I86
|
||||||
|
"
|
18
ci/targets/windows/ci_env.aarch64-windows-llvm.sh
Normal file
18
ci/targets/windows/ci_env.aarch64-windows-llvm.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=aarch64
|
||||||
|
export CI_TARGET_SYSTEM=windows
|
||||||
|
|
||||||
|
export CI_CC="clang"
|
||||||
|
export CI_AR="llvm-ar"
|
||||||
|
export CI_RANLIB="llvm-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Windows
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/windows/ci_env.i686-w64-mingw32.sh
Normal file
21
ci/targets/windows/ci_env.i686-w64-mingw32.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=i686
|
||||||
|
export CI_TARGET_SYSTEM=mingw32
|
||||||
|
|
||||||
|
# The output of `uname -s` on MSYS2 is understandable, and so is
|
||||||
|
# CI_TARGET_SYSTEM above, in simplified form. (See also Cygwin.)
|
||||||
|
# But aside from that, the Mingw-w64 nomenclature is rather messy.
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-w64-mingw32-gcc"
|
||||||
|
export CI_AR="$CI_CC-ar"
|
||||||
|
export CI_RANLIB="$CI_CC-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Windows
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
18
ci/targets/windows/ci_env.i686-windows-llvm.sh
Normal file
18
ci/targets/windows/ci_env.i686-windows-llvm.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=i686
|
||||||
|
export CI_TARGET_SYSTEM=windows
|
||||||
|
|
||||||
|
export CI_CC="clang"
|
||||||
|
export CI_AR="llvm-ar"
|
||||||
|
export CI_RANLIB="llvm-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Windows
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
21
ci/targets/windows/ci_env.x86_64-w64-mingw32.sh
Normal file
21
ci/targets/windows/ci_env.x86_64-w64-mingw32.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=x86_64
|
||||||
|
export CI_TARGET_SYSTEM=mingw64
|
||||||
|
|
||||||
|
# The output of `uname -s` on MSYS2 is understandable, and so is
|
||||||
|
# CI_TARGET_SYSTEM above, in simplified form. (See also Cygwin.)
|
||||||
|
# But aside from that, the Mingw-w64 nomenclature is rather messy.
|
||||||
|
export CI_CC="$CI_TARGET_ARCH-w64-mingw32-gcc"
|
||||||
|
export CI_AR="$CI_CC-ar"
|
||||||
|
export CI_RANLIB="$CI_CC-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Windows
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
18
ci/targets/windows/ci_env.x86_64-windows-llvm.sh
Normal file
18
ci/targets/windows/ci_env.x86_64-windows-llvm.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||||
|
#
|
||||||
|
# Use, modification and distribution are subject to the MIT License.
|
||||||
|
# Please see the accompanying file LICENSE_MIT.txt
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
export CI_TARGET_ARCH=x86_64
|
||||||
|
export CI_TARGET_SYSTEM=windows
|
||||||
|
|
||||||
|
export CI_CC="clang"
|
||||||
|
export CI_AR="llvm-ar"
|
||||||
|
export CI_RANLIB="llvm-ranlib"
|
||||||
|
|
||||||
|
export CI_CMAKE_VARS="
|
||||||
|
-DCMAKE_SYSTEM_NAME=Windows
|
||||||
|
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||||
|
"
|
38
compile
38
compile
@ -1,9 +1,9 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Wrapper for compilers which do not understand '-c -o'.
|
# Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2025-06-18.21; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
|
||||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
@ -37,11 +37,11 @@ IFS=" "" $nl"
|
|||||||
|
|
||||||
file_conv=
|
file_conv=
|
||||||
|
|
||||||
# func_file_conv build_file lazy
|
# func_file_conv build_file unneeded_conversions
|
||||||
# Convert a $build file to $host form and store it in $file
|
# Convert a $build file to $host form and store it in $file
|
||||||
# Currently only supports Windows hosts. If the determined conversion
|
# Currently only supports Windows hosts. If the determined conversion
|
||||||
# type is listed in (the comma separated) LAZY, no conversion will
|
# type is listed in (the comma separated) UNNEEDED_CONVERSIONS, no
|
||||||
# take place.
|
# conversion will take place.
|
||||||
func_file_conv ()
|
func_file_conv ()
|
||||||
{
|
{
|
||||||
file=$1
|
file=$1
|
||||||
@ -51,9 +51,20 @@ func_file_conv ()
|
|||||||
# lazily determine how to convert abs files
|
# lazily determine how to convert abs files
|
||||||
case `uname -s` in
|
case `uname -s` in
|
||||||
MINGW*)
|
MINGW*)
|
||||||
file_conv=mingw
|
if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then
|
||||||
|
# MSYS2 environment.
|
||||||
|
file_conv=cygwin
|
||||||
|
else
|
||||||
|
# Original MinGW environment.
|
||||||
|
file_conv=mingw
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
MSYS*)
|
||||||
|
# Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell.
|
||||||
|
file_conv=cygwin
|
||||||
;;
|
;;
|
||||||
CYGWIN*)
|
CYGWIN*)
|
||||||
|
# Cygwin environment.
|
||||||
file_conv=cygwin
|
file_conv=cygwin
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -63,12 +74,14 @@ func_file_conv ()
|
|||||||
fi
|
fi
|
||||||
case $file_conv/,$2, in
|
case $file_conv/,$2, in
|
||||||
*,$file_conv,*)
|
*,$file_conv,*)
|
||||||
|
# This is the optimization mentioned above:
|
||||||
|
# If UNNEEDED_CONVERSIONS contains $file_conv, don't convert.
|
||||||
;;
|
;;
|
||||||
mingw/*)
|
mingw/*)
|
||||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||||
;;
|
;;
|
||||||
cygwin/*)
|
cygwin/*)
|
||||||
file=`cygpath -m "$file" || echo "$file"`
|
file=`cygpath -w "$file" || echo "$file"`
|
||||||
;;
|
;;
|
||||||
wine/*)
|
wine/*)
|
||||||
file=`winepath -w "$file" || echo "$file"`
|
file=`winepath -w "$file" || echo "$file"`
|
||||||
@ -143,7 +156,7 @@ func_cl_wrapper ()
|
|||||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
eat=1
|
eat=1
|
||||||
case $2 in
|
case $2 in
|
||||||
*.o | *.[oO][bB][jJ])
|
*.o | *.lo | *.[oO][bB][jJ])
|
||||||
func_file_conv "$2"
|
func_file_conv "$2"
|
||||||
set x "$@" -Fo"$file"
|
set x "$@" -Fo"$file"
|
||||||
shift
|
shift
|
||||||
@ -248,14 +261,17 @@ If you are trying to build a whole package this is not the
|
|||||||
right script to run: please start by reading the file 'INSTALL'.
|
right script to run: please start by reading the file 'INSTALL'.
|
||||||
|
|
||||||
Report bugs to <bug-automake@gnu.org>.
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
GNU Automake home page: <https://www.gnu.org/software/automake/>.
|
||||||
|
General help using GNU software: <https://www.gnu.org/gethelp/>.
|
||||||
EOF
|
EOF
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
-v | --v*)
|
-v | --v*)
|
||||||
echo "compile $scriptversion"
|
echo "compile (GNU Automake) $scriptversion"
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
||||||
|
clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
|
||||||
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
||||||
func_cl_wrapper "$@" # Doesn't return...
|
func_cl_wrapper "$@" # Doesn't return...
|
||||||
;;
|
;;
|
||||||
@ -340,9 +356,9 @@ exit $ret
|
|||||||
# Local Variables:
|
# Local Variables:
|
||||||
# mode: shell-script
|
# mode: shell-script
|
||||||
# sh-indentation: 2
|
# sh-indentation: 2
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
|
||||||
# time-stamp-start: "scriptversion="
|
# time-stamp-start: "scriptversion="
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
# time-stamp-format: "%Y-%02m-%02d.%02H"
|
||||||
# time-stamp-time-zone: "UTC0"
|
# time-stamp-time-zone: "UTC0"
|
||||||
# time-stamp-end: "; # UTC"
|
# time-stamp-end: "; # UTC"
|
||||||
# End:
|
# End:
|
||||||
|
1579
config.guess
vendored
1579
config.guess
vendored
File diff suppressed because it is too large
Load Diff
59
config.h.in
59
config.h.in
@ -3,30 +3,27 @@
|
|||||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
#undef HAVE_DLFCN_H
|
#undef HAVE_DLFCN_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `feenableexcept' function. */
|
/* Define to 1 if you have the 'feenableexcept' function. */
|
||||||
#undef HAVE_FEENABLEEXCEPT
|
#undef HAVE_FEENABLEEXCEPT
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
#undef HAVE_INTTYPES_H
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `m' library (-lm). */
|
/* Define to 1 if you have the 'm' library (-lm). */
|
||||||
#undef HAVE_LIBM
|
#undef HAVE_LIBM
|
||||||
|
|
||||||
/* Define to 1 if you have the `z' library (-lz). */
|
/* Define to 1 if you have the 'z' library (-lz). */
|
||||||
#undef HAVE_LIBZ
|
#undef HAVE_LIBZ
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
/* Define to 1 if you have the 'pow' function. */
|
||||||
#undef HAVE_MEMORY_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `memset' function. */
|
|
||||||
#undef HAVE_MEMSET
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `pow' function. */
|
|
||||||
#undef HAVE_POW
|
#undef HAVE_POW
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
#undef HAVE_STDINT_H
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdio.h> header file. */
|
||||||
|
#undef HAVE_STDIO_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
#undef HAVE_STDLIB_H
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
@ -81,6 +78,18 @@
|
|||||||
/* Enable Intel SSE optimizations */
|
/* Enable Intel SSE optimizations */
|
||||||
#undef PNG_INTEL_SSE_OPT
|
#undef PNG_INTEL_SSE_OPT
|
||||||
|
|
||||||
|
/* Enable LOONGARCH LSX optimizations */
|
||||||
|
#undef PNG_LOONGARCH_LSX_OPT
|
||||||
|
|
||||||
|
/* Turn on MIPS MMI optimizations at run-time */
|
||||||
|
#undef PNG_MIPS_MMI_API_SUPPORTED
|
||||||
|
|
||||||
|
/* Check for MIPS MMI support at run-time */
|
||||||
|
#undef PNG_MIPS_MMI_CHECK_SUPPORTED
|
||||||
|
|
||||||
|
/* Enable MIPS MMI optimizations */
|
||||||
|
#undef PNG_MIPS_MMI_OPT
|
||||||
|
|
||||||
/* Turn on MIPS MSA optimizations at run-time */
|
/* Turn on MIPS MSA optimizations at run-time */
|
||||||
#undef PNG_MIPS_MSA_API_SUPPORTED
|
#undef PNG_MIPS_MSA_API_SUPPORTED
|
||||||
|
|
||||||
@ -99,31 +108,31 @@
|
|||||||
/* Enable POWERPC VSX optimizations */
|
/* Enable POWERPC VSX optimizations */
|
||||||
#undef PNG_POWERPC_VSX_OPT
|
#undef PNG_POWERPC_VSX_OPT
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Enable RISCV RVV optimizations */
|
||||||
|
#undef PNG_RISCV_RVV_OPT
|
||||||
|
|
||||||
|
/* Define to 1 if all of the C89 standard headers exist (not just the ones
|
||||||
|
required in a freestanding environment). This macro is provided for
|
||||||
|
backward compatibility; new code need not use it. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
/* Define to 1 if your <sys/time.h> declares 'struct tm'. */
|
||||||
#undef TM_IN_SYS_TIME
|
#undef TM_IN_SYS_TIME
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
|
|
||||||
/* Define to empty if `const' does not conform to ANSI C. */
|
|
||||||
#undef const
|
|
||||||
|
|
||||||
/* Define to the equivalent of the C99 'restrict' keyword, or to
|
/* Define to the equivalent of the C99 'restrict' keyword, or to
|
||||||
nothing if this is not supported. Do not define if restrict is
|
nothing if this is not supported. Do not define if restrict is
|
||||||
supported directly. */
|
supported only directly. */
|
||||||
#undef restrict
|
#undef restrict
|
||||||
/* Work around a bug in Sun C++: it does not support _Restrict or
|
/* Work around a bug in older versions of Sun C++, which did not
|
||||||
__restrict__, even though the corresponding Sun C compiler ends up with
|
#define __restrict__ or support _Restrict or __restrict__
|
||||||
"#define restrict _Restrict" or "#define restrict __restrict__" in the
|
even though the corresponding Sun C compiler ended up with
|
||||||
previous line. Perhaps some future version of Sun C++ will work with
|
"#define restrict _Restrict" or "#define restrict __restrict__"
|
||||||
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
|
in the previous line. This workaround can be removed once
|
||||||
#if defined __SUNPRO_CC && !defined __RESTRICT
|
we assume Oracle Developer Studio 12.5 (2016) or later. */
|
||||||
|
#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__
|
||||||
# define _Restrict
|
# define _Restrict
|
||||||
# define __restrict__
|
# define __restrict__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
|
||||||
#undef size_t
|
|
||||||
|
3325
config.sub
vendored
3325
config.sub
vendored
File diff suppressed because it is too large
Load Diff
428
configure.ac
428
configure.ac
@ -1,7 +1,7 @@
|
|||||||
# configure.ac
|
# configure.ac
|
||||||
|
|
||||||
|
# Copyright (c) 2018-2024 Cosmin Truta
|
||||||
# Copyright (c) 2004-2016 Glenn Randers-Pehrson
|
# Copyright (c) 2004-2016 Glenn Randers-Pehrson
|
||||||
# Last changed in libpng 1.6.25 [September 1, 2016]
|
|
||||||
|
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
# For conditions of distribution and use, see the disclaimer
|
# For conditions of distribution and use, see the disclaimer
|
||||||
@ -25,8 +25,8 @@ AC_PREREQ([2.68])
|
|||||||
|
|
||||||
dnl Version number stuff here:
|
dnl Version number stuff here:
|
||||||
|
|
||||||
AC_INIT([libpng],[1.6.35],[png-mng-implement@lists.sourceforge.net])
|
AC_INIT([libpng],[1.6.51.git],[png-mng-implement@lists.sourceforge.net])
|
||||||
AC_CONFIG_MACRO_DIR([scripts])
|
AC_CONFIG_MACRO_DIR([scripts/autoconf])
|
||||||
|
|
||||||
# libpng does not follow GNU file name conventions (hence 'foreign')
|
# libpng does not follow GNU file name conventions (hence 'foreign')
|
||||||
# color-tests requires automake 1.11 or later
|
# color-tests requires automake 1.11 or later
|
||||||
@ -46,17 +46,17 @@ dnl automake, so the following is not necessary (and is not defined anyway):
|
|||||||
dnl AM_PREREQ([1.11.2])
|
dnl AM_PREREQ([1.11.2])
|
||||||
dnl stop configure from automagically running automake
|
dnl stop configure from automagically running automake
|
||||||
|
|
||||||
PNGLIB_VERSION=1.6.35
|
PNGLIB_VERSION=1.6.51.git
|
||||||
PNGLIB_MAJOR=1
|
PNGLIB_MAJOR=1
|
||||||
PNGLIB_MINOR=6
|
PNGLIB_MINOR=6
|
||||||
PNGLIB_RELEASE=35
|
PNGLIB_RELEASE=51
|
||||||
|
|
||||||
dnl End of version number stuff
|
dnl End of version number stuff
|
||||||
|
|
||||||
AC_CONFIG_SRCDIR([pngget.c])
|
AC_CONFIG_SRCDIR([pngget.c])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
# Checks for programs.
|
# Check the basic programs.
|
||||||
AC_LANG([C])
|
AC_LANG([C])
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AM_PROG_AS
|
AM_PROG_AS
|
||||||
@ -72,16 +72,19 @@ dnl compatible later version may be used
|
|||||||
LT_INIT([win32-dll])
|
LT_INIT([win32-dll])
|
||||||
LT_PREREQ([2.4.2])
|
LT_PREREQ([2.4.2])
|
||||||
|
|
||||||
# Some awks crash when confronted with pnglibconf.dfa, do a test run now
|
dnl Declare the AWK variable.
|
||||||
# to make sure this doesn't happen
|
AC_ARG_VAR(AWK, [AWK language processor])
|
||||||
AC_MSG_CHECKING([that AWK works])
|
|
||||||
|
# Some awk implementations crash when confronted with pnglibconf.dfa.
|
||||||
|
# Run a test now, to make sure this doesn't happen.
|
||||||
|
AC_MSG_CHECKING([if awk ($AWK) works])
|
||||||
if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\
|
if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\
|
||||||
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
||||||
${srcdir}/pngusr.dfa 1>&2
|
${srcdir}/pngusr.dfa 1>&2
|
||||||
then
|
then
|
||||||
AC_MSG_RESULT([ok])
|
AC_MSG_RESULT([yes])
|
||||||
else
|
else
|
||||||
AC_MSG_FAILURE([failed], 1)
|
AC_MSG_FAILURE([no], 1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# This is a remnant of the old cc -E validation, where it may have been
|
# This is a remnant of the old cc -E validation, where it may have been
|
||||||
@ -89,11 +92,29 @@ fi
|
|||||||
DFNCPP="$CPP"
|
DFNCPP="$CPP"
|
||||||
AC_SUBST(DFNCPP)
|
AC_SUBST(DFNCPP)
|
||||||
|
|
||||||
# -Werror cannot be passed to GCC in CFLAGS because configure will fail (it
|
AC_ARG_ENABLE([tests],
|
||||||
# checks the compiler with a program that generates a warning), add the
|
AS_HELP_STRING([--disable-tests],
|
||||||
# following option to deal with this
|
[do not build the test programs (default is to build)]),
|
||||||
|
[enable_tests="$enableval"],
|
||||||
|
[enable_tests=yes])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([ENABLE_TESTS],
|
||||||
|
[test "$enable_tests" != "no"])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([tools],
|
||||||
|
AS_HELP_STRING([--disable-tools],
|
||||||
|
[do not build the auxiliary tools (default is to build)]),
|
||||||
|
[enable_tools="$enableval"],
|
||||||
|
[enable_tools=yes])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([ENABLE_TOOLS],
|
||||||
|
[test "$enable_tools" != "no"])
|
||||||
|
|
||||||
|
# -Werror cannot be passed to GCC in CFLAGS because configure will fail
|
||||||
|
# (it checks the compiler with a program that generates a warning).
|
||||||
|
# Add the following option to deal with this:
|
||||||
AC_ARG_VAR(PNG_COPTS,
|
AC_ARG_VAR(PNG_COPTS,
|
||||||
[additional flags for the C compiler, use this for options that would]
|
[additional flags for the C compiler, to be used for options that would]
|
||||||
[cause configure itself to fail])
|
[cause configure itself to fail])
|
||||||
AC_ARG_ENABLE(werror,
|
AC_ARG_ENABLE(werror,
|
||||||
AS_HELP_STRING([[[--enable-werror[=OPT]]]],
|
AS_HELP_STRING([[[--enable-werror[=OPT]]]],
|
||||||
@ -114,10 +135,10 @@ AC_ARG_ENABLE(werror,
|
|||||||
CFLAGS="$sav_CFLAGS"
|
CFLAGS="$sav_CFLAGS"
|
||||||
fi],)
|
fi],)
|
||||||
|
|
||||||
# For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89
|
# For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89.
|
||||||
# In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining _POSIX_SOURCE to 1
|
# In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining
|
||||||
# This is incompatible with the new default mode, so we test for that and force the
|
# _POSIX_SOURCE to 1. This is incompatible with the new default mode, so
|
||||||
# "-std=c89" compiler option:
|
# we test for that and force the "-std=c89" compiler option:
|
||||||
AC_MSG_CHECKING([if we need to force back C standard to C89])
|
AC_MSG_CHECKING([if we need to force back C standard to C89])
|
||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE(
|
||||||
[AC_LANG_PROGRAM([
|
[AC_LANG_PROGRAM([
|
||||||
@ -133,23 +154,17 @@ AC_COMPILE_IFELSE(
|
|||||||
CFLAGS="$CFLAGS -std=c89"
|
CFLAGS="$CFLAGS -std=c89"
|
||||||
])
|
])
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for structures and compiler characteristics.
|
||||||
AC_HEADER_STDC
|
|
||||||
|
|
||||||
# Checks for typedefs, structures, and compiler characteristics.
|
|
||||||
AC_C_CONST
|
|
||||||
AC_TYPE_SIZE_T
|
|
||||||
AC_STRUCT_TM
|
AC_STRUCT_TM
|
||||||
AC_C_RESTRICT
|
AC_C_RESTRICT
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
AC_FUNC_STRTOD
|
AC_CHECK_FUNCS([pow], ,
|
||||||
AC_CHECK_FUNCS([memset], , AC_MSG_ERROR(memset not found in libc))
|
[AC_CHECK_LIB([m], [pow], , [AC_MSG_ERROR([cannot find pow])])])
|
||||||
AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_MSG_ERROR(cannot find pow)) )
|
|
||||||
|
|
||||||
# Some later POSIX 1003.1 functions are required for test programs, failure here
|
# Some later POSIX 1003.1 functions are required for test programs, failure
|
||||||
# is soft (the corresponding test program is not built).
|
# here is soft (the corresponding test program is not built).
|
||||||
AC_CHECK_FUNC([clock_gettime],,[AC_MSG_WARN([not building timepng])])
|
AC_CHECK_FUNC([clock_gettime], , [AC_MSG_WARN([not building timepng])])
|
||||||
AM_CONDITIONAL([HAVE_CLOCK_GETTIME], [test "$ac_cv_func_clock_gettime" = "yes"])
|
AM_CONDITIONAL([HAVE_CLOCK_GETTIME], [test "$ac_cv_func_clock_gettime" = "yes"])
|
||||||
|
|
||||||
AC_ARG_WITH(zlib-prefix,
|
AC_ARG_WITH(zlib-prefix,
|
||||||
@ -157,8 +172,9 @@ AC_ARG_WITH(zlib-prefix,
|
|||||||
[prefix that may have been used in installed zlib]),
|
[prefix that may have been used in installed zlib]),
|
||||||
[ZPREFIX=${withval}],
|
[ZPREFIX=${withval}],
|
||||||
[ZPREFIX='z_'])
|
[ZPREFIX='z_'])
|
||||||
AC_CHECK_LIB(z, zlibVersion, ,
|
AC_CHECK_LIB([z], [zlibVersion], ,
|
||||||
AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, , AC_MSG_ERROR(zlib not installed)))
|
[AC_CHECK_LIB([z], [${ZPREFIX}zlibVersion], ,
|
||||||
|
[AC_MSG_ERROR([zlib not installed])])])
|
||||||
|
|
||||||
# The following is for pngvalid, to ensure it catches FP errors even on
|
# The following is for pngvalid, to ensure it catches FP errors even on
|
||||||
# platforms that don't enable FP exceptions, the function appears in the math
|
# platforms that don't enable FP exceptions, the function appears in the math
|
||||||
@ -210,9 +226,9 @@ AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
|
|||||||
if test "$have_ld_version_script" = "yes"; then
|
if test "$have_ld_version_script" = "yes"; then
|
||||||
AC_MSG_CHECKING([for symbol prefix])
|
AC_MSG_CHECKING([for symbol prefix])
|
||||||
SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
|
SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
|
||||||
| ${CPP-${CC-gcc} -E} - 2>&1 \
|
| ${CPP:-${CC:-gcc} -E} - 2>&1 \
|
||||||
| ${EGREP-grep} "^PREFIX=" \
|
| ${EGREP:-grep} "^PREFIX=" \
|
||||||
| ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
|
| ${SED:-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
|
||||||
AC_SUBST(SYMBOL_PREFIX)
|
AC_SUBST(SYMBOL_PREFIX)
|
||||||
AC_MSG_RESULT($SYMBOL_PREFIX)
|
AC_MSG_RESULT($SYMBOL_PREFIX)
|
||||||
fi
|
fi
|
||||||
@ -297,7 +313,7 @@ AC_ARG_ENABLE([unversioned-libpng-config],
|
|||||||
AM_CONDITIONAL([DO_INSTALL_LIBPNG_CONFIG],
|
AM_CONDITIONAL([DO_INSTALL_LIBPNG_CONFIG],
|
||||||
[test "$enable_unversioned_libpng_config" != "no"])
|
[test "$enable_unversioned_libpng_config" != "no"])
|
||||||
|
|
||||||
# HOST SPECIFIC OPTIONS
|
# HOST-SPECIFIC OPTIONS
|
||||||
# =====================
|
# =====================
|
||||||
#
|
#
|
||||||
# DEFAULT
|
# DEFAULT
|
||||||
@ -305,7 +321,7 @@ AM_CONDITIONAL([DO_INSTALL_LIBPNG_CONFIG],
|
|||||||
#
|
#
|
||||||
AC_ARG_ENABLE([hardware-optimizations],
|
AC_ARG_ENABLE([hardware-optimizations],
|
||||||
AS_HELP_STRING([[[--enable-hardware-optimizations]]],
|
AS_HELP_STRING([[[--enable-hardware-optimizations]]],
|
||||||
[Enable hardware optimizations: =no/off, yes/on:]),
|
[Enable hardware optimizations: =no/off, yes/on.]),
|
||||||
[case "$enableval" in
|
[case "$enableval" in
|
||||||
no|off)
|
no|off)
|
||||||
# disable hardware optimization on all systems:
|
# disable hardware optimization on all systems:
|
||||||
@ -315,24 +331,36 @@ AC_ARG_ENABLE([hardware-optimizations],
|
|||||||
enable_mips_msa=no
|
enable_mips_msa=no
|
||||||
AC_DEFINE([PNG_MIPS_MSA_OPT], [0],
|
AC_DEFINE([PNG_MIPS_MSA_OPT], [0],
|
||||||
[Disable MIPS_MSA optimizations])
|
[Disable MIPS_MSA optimizations])
|
||||||
|
enable_mips_mmi=no
|
||||||
|
AC_DEFINE([PNG_MIPS_MMI_OPT], [0],
|
||||||
|
[Disable MIPS_MMI optimizations])
|
||||||
enable_powerpc_vsx=no
|
enable_powerpc_vsx=no
|
||||||
AC_DEFINE([PNG_POWERPC_VSX_OPT], [0],
|
AC_DEFINE([PNG_POWERPC_VSX_OPT], [0],
|
||||||
[Disable POWERPC VSX optimizations])
|
[Disable POWERPC VSX optimizations])
|
||||||
enable_intel_sse=no
|
enable_intel_sse=no
|
||||||
AC_DEFINE([PNG_INTEL_SSE_OPT], [0],
|
AC_DEFINE([PNG_INTEL_SSE_OPT], [0],
|
||||||
[Disable INTEL_SSE optimizations])
|
[Disable INTEL_SSE optimizations])
|
||||||
|
enable_loongarch_lsx=no
|
||||||
|
AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [0],
|
||||||
|
[Disable LOONGARCH_LSX optimizations])
|
||||||
|
enable_riscv_rvv=no
|
||||||
|
AC_DEFINE([PNG_RISCV_RVV_OPT], [0],
|
||||||
|
[Disable RISC-V Vector optimizations])
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# allow enabling hardware optimization on any system:
|
# allow enabling hardware optimization on any system:
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
arm*|aarch64*)
|
arm*|aarch64*)
|
||||||
enable_arm_neon=yes
|
enable_arm_neon=yes
|
||||||
AC_DEFINE([PNG_ARM_NEON_OPT], [0],
|
AC_DEFINE([PNG_ARM_NEON_OPT], [2],
|
||||||
[Enable ARM_NEON optimizations])
|
[Enable ARM_NEON optimizations])
|
||||||
;;
|
;;
|
||||||
mipsel*|mips64el*)
|
mipsel*|mips64el*)
|
||||||
|
enable_mips_mmi=yes
|
||||||
enable_mips_msa=yes
|
enable_mips_msa=yes
|
||||||
AC_DEFINE([PNG_MIPS_MSA_OPT], [0],
|
AC_DEFINE([PNG_MIPS_MMI_OPT], [1],
|
||||||
|
[Enable MIPS_MMI optimizations])
|
||||||
|
AC_DEFINE([PNG_MIPS_MSA_OPT], [2],
|
||||||
[Enable MIPS_MSA optimizations])
|
[Enable MIPS_MSA optimizations])
|
||||||
;;
|
;;
|
||||||
i?86|x86_64)
|
i?86|x86_64)
|
||||||
@ -345,21 +373,30 @@ AC_ARG_ENABLE([hardware-optimizations],
|
|||||||
AC_DEFINE([PNG_POWERPC_VSX_OPT], [2],
|
AC_DEFINE([PNG_POWERPC_VSX_OPT], [2],
|
||||||
[Enable POWERPC VSX optimizations])
|
[Enable POWERPC VSX optimizations])
|
||||||
;;
|
;;
|
||||||
|
loongarch*)
|
||||||
|
enable_loongarch_lsx=yes
|
||||||
|
AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1],
|
||||||
|
[Enable LOONGARCH_LSX optimizations])
|
||||||
|
;;
|
||||||
|
riscv64)
|
||||||
|
enable_riscv_rvv=yes
|
||||||
|
AC_DEFINE([PNG_RISCV_RVV_OPT], [2],
|
||||||
|
[Enable RISC-V Vector optimizations])
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
# ARM
|
# ARM NEON
|
||||||
# ===
|
# ========
|
||||||
#
|
|
||||||
# ARM NEON (SIMD) support.
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([arm-neon],
|
AC_ARG_ENABLE([arm-neon],
|
||||||
AS_HELP_STRING([[[--enable-arm-neon]]],
|
AS_HELP_STRING([[[--enable-arm-neon]]],
|
||||||
[Enable ARM NEON optimizations: =no/off, check, api, yes/on:]
|
[Enable ARM NEON optimizations: =no/off, check, api, yes/on.]
|
||||||
[no/off: disable the optimizations; check: use internal checking code]
|
[no/off: disable the optimizations;]
|
||||||
[(deprecated and poorly supported); api: disable by default, enable by]
|
[check: use internal checking code (deprecated and poorly supported);]
|
||||||
[a call to png_set_option; yes/on: turn on unconditionally.]
|
[api: disable by default, enable by a call to png_set_option;]
|
||||||
|
[yes/on: turn on unconditionally.]
|
||||||
[If not specified: determined by the compiler.]),
|
[If not specified: determined by the compiler.]),
|
||||||
[case "$enableval" in
|
[case "$enableval" in
|
||||||
no|off)
|
no|off)
|
||||||
@ -367,7 +404,7 @@ AC_ARG_ENABLE([arm-neon],
|
|||||||
AC_DEFINE([PNG_ARM_NEON_OPT], [0],
|
AC_DEFINE([PNG_ARM_NEON_OPT], [0],
|
||||||
[Disable ARM Neon optimizations])
|
[Disable ARM Neon optimizations])
|
||||||
# Prevent inclusion of the assembler files below:
|
# Prevent inclusion of the assembler files below:
|
||||||
enable_arm_neon=no;;
|
enable_arm_neon=no ;;
|
||||||
check)
|
check)
|
||||||
AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [],
|
AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [],
|
||||||
[Check for ARM Neon support at run-time]);;
|
[Check for ARM Neon support at run-time]);;
|
||||||
@ -377,35 +414,35 @@ AC_ARG_ENABLE([arm-neon],
|
|||||||
yes|on)
|
yes|on)
|
||||||
AC_DEFINE([PNG_ARM_NEON_OPT], [2],
|
AC_DEFINE([PNG_ARM_NEON_OPT], [2],
|
||||||
[Enable ARM Neon optimizations])
|
[Enable ARM Neon optimizations])
|
||||||
AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api', if]
|
AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api';]
|
||||||
[you want the optimizations unconditionally pass -mfpu=neon]
|
[if you want the optimizations unconditionally,]
|
||||||
[to the compiler.]);;
|
[pass '-mfpu=neon' to the compiler.]);;
|
||||||
*)
|
*)
|
||||||
AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}: invalid value])
|
AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}:]
|
||||||
|
[invalid argument])
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
# Add ARM specific files to all builds where the host_cpu is arm ('arm*') or
|
# Add ARM-specific files to all builds where $host_cpu is arm ('arm*') or
|
||||||
# where ARM optimizations were explicitly requested (this allows a fallback if a
|
# where ARM optimizations were explicitly requested. (This allows a fallback
|
||||||
# future host CPU does not match 'arm*')
|
# if a future host CPU does not match 'arm*'.)
|
||||||
|
|
||||||
AM_CONDITIONAL([PNG_ARM_NEON],
|
AM_CONDITIONAL([PNG_ARM_NEON],
|
||||||
[test "$enable_arm_neon" != 'no' &&
|
[test "$enable_arm_neon" != 'no' &&
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
arm*|aarch64*) :;;
|
arm*|aarch64*) : ;;
|
||||||
*) test "$enable_arm_neon" != '';;
|
*) test "$enable_arm_neon" != '' ;;
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
# MIPS
|
# MIPS MSA
|
||||||
# ===
|
# ========
|
||||||
#
|
|
||||||
# MIPS MSA (SIMD) support.
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([mips-msa],
|
AC_ARG_ENABLE([mips-msa],
|
||||||
AS_HELP_STRING([[[--enable-mips-msa]]],
|
AS_HELP_STRING([[[--enable-mips-msa]]],
|
||||||
[Enable MIPS MSA optimizations: =no/off, check, api, yes/on:]
|
[Enable MIPS MSA optimizations: =no/off, check, api, yes/on.]
|
||||||
[no/off: disable the optimizations; check: use internal checking code]
|
[no/off: disable the optimizations;]
|
||||||
[(deprecated and poorly supported); api: disable by default, enable by]
|
[check: use internal checking code (deprecated and poorly supported);]
|
||||||
[a call to png_set_option; yes/on: turn on unconditionally.]
|
[api: disable by default, enable by a call to png_set_option;]
|
||||||
|
[yes/on: turn on unconditionally.]
|
||||||
[If not specified: determined by the compiler.]),
|
[If not specified: determined by the compiler.]),
|
||||||
[case "$enableval" in
|
[case "$enableval" in
|
||||||
no|off)
|
no|off)
|
||||||
@ -413,7 +450,7 @@ AC_ARG_ENABLE([mips-msa],
|
|||||||
AC_DEFINE([PNG_MIPS_MSA_OPT], [0],
|
AC_DEFINE([PNG_MIPS_MSA_OPT], [0],
|
||||||
[Disable MIPS MSA optimizations])
|
[Disable MIPS MSA optimizations])
|
||||||
# Prevent inclusion of the assembler files below:
|
# Prevent inclusion of the assembler files below:
|
||||||
enable_mips_msa=no;;
|
enable_mips_msa=no ;;
|
||||||
check)
|
check)
|
||||||
AC_DEFINE([PNG_MIPS_MSA_CHECK_SUPPORTED], [],
|
AC_DEFINE([PNG_MIPS_MSA_CHECK_SUPPORTED], [],
|
||||||
[Check for MIPS MSA support at run-time]);;
|
[Check for MIPS MSA support at run-time]);;
|
||||||
@ -423,31 +460,75 @@ AC_ARG_ENABLE([mips-msa],
|
|||||||
yes|on)
|
yes|on)
|
||||||
AC_DEFINE([PNG_MIPS_MSA_OPT], [2],
|
AC_DEFINE([PNG_MIPS_MSA_OPT], [2],
|
||||||
[Enable MIPS MSA optimizations])
|
[Enable MIPS MSA optimizations])
|
||||||
AC_MSG_WARN([--enable-mips-msa: please specify 'check' or 'api', if]
|
AC_MSG_WARN([--enable-mips-msa: please specify 'check' or 'api';]
|
||||||
[you want the optimizations unconditionally pass '-mmsa -mfp64']
|
[if you want the optimizations unconditionally,]
|
||||||
[to the compiler.]);;
|
[pass '-mmsa -mfp64' to the compiler.]);;
|
||||||
*)
|
*)
|
||||||
AC_MSG_ERROR([--enable-mips-msa=${enable_mips_msa}: invalid value])
|
AC_MSG_ERROR([--enable-mips-msa=${enable_mips_msa}:]
|
||||||
|
[invalid argument])
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or
|
# Add MIPS-specific files to all builds where $host_cpu is mips ('mips*') or
|
||||||
# where MIPS optimizations were explicitly requested (this allows a fallback if a
|
# where MIPS optimizations were explicitly requested. (This allows a fallback
|
||||||
# future host CPU does not match 'mips*')
|
# if a future host CPU does not match 'mips*'.)
|
||||||
|
|
||||||
AM_CONDITIONAL([PNG_MIPS_MSA],
|
AM_CONDITIONAL([PNG_MIPS_MSA],
|
||||||
[test "$enable_mips_msa" != 'no' &&
|
[test "$enable_mips_msa" != 'no' &&
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
mipsel*|mips64el*) :;;
|
mipsel*|mips64el*) : ;;
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
# INTEL
|
# MIPS MMI
|
||||||
# =====
|
# ========
|
||||||
#
|
|
||||||
# INTEL SSE (SIMD) support.
|
AC_ARG_ENABLE([mips-mmi],
|
||||||
|
AS_HELP_STRING([[[--enable-mips-mmi]]],
|
||||||
|
[Enable MIPS MMI optimizations: =no/off, check, api, yes/on.]
|
||||||
|
[no/off: disable the optimizations;]
|
||||||
|
[check: use internal checking code (deprecated and poorly supported);]
|
||||||
|
[api: disable by default, enable by a call to png_set_option;]
|
||||||
|
[yes/on: turn on unconditionally.]
|
||||||
|
[If not specified: determined by the compiler.]),
|
||||||
|
[case "$enableval" in
|
||||||
|
no|off)
|
||||||
|
# disable the default enabling on __mips_mmi systems:
|
||||||
|
AC_DEFINE([PNG_MIPS_MMI_OPT], [0],
|
||||||
|
[Disable MIPS MMI optimizations])
|
||||||
|
# Prevent inclusion of the assembler files below:
|
||||||
|
enable_mips_mmi=no;;
|
||||||
|
check)
|
||||||
|
AC_DEFINE([PNG_MIPS_MMI_CHECK_SUPPORTED], [],
|
||||||
|
[Check for MIPS MMI support at run-time]);;
|
||||||
|
api)
|
||||||
|
AC_DEFINE([PNG_MIPS_MMI_API_SUPPORTED], [],
|
||||||
|
[Turn on MIPS MMI optimizations at run-time]);;
|
||||||
|
yes|on)
|
||||||
|
AC_DEFINE([PNG_MIPS_MMI_OPT], [1],
|
||||||
|
[Enable MIPS MMI optimizations])
|
||||||
|
AC_MSG_WARN([--enable-mips-mmi: please specify 'check' or 'api';]
|
||||||
|
[if you want the optimizations unconditionally]
|
||||||
|
[pass '-mloongson-mmi -march=loongson3a' to the compiler.]);;
|
||||||
|
*)
|
||||||
|
AC_MSG_ERROR([--enable-mips-mmi=${enable_mips_mmi}:]
|
||||||
|
[invalid argument])
|
||||||
|
esac])
|
||||||
|
|
||||||
|
# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or
|
||||||
|
# where MIPS optimizations were explicitly requested. (This allows a fallback
|
||||||
|
# if a future host CPU does not match 'mips*'.)
|
||||||
|
|
||||||
|
AM_CONDITIONAL([PNG_MIPS_MMI],
|
||||||
|
[test "$enable_mips_mmi" != 'no' &&
|
||||||
|
case "$host_cpu" in
|
||||||
|
mipsel*|mips64el*) : ;;
|
||||||
|
esac])
|
||||||
|
|
||||||
|
# INTEL SSE
|
||||||
|
# =========
|
||||||
|
|
||||||
AC_ARG_ENABLE([intel-sse],
|
AC_ARG_ENABLE([intel-sse],
|
||||||
AS_HELP_STRING([[[--enable-intel-sse]]],
|
AS_HELP_STRING([[[--enable-intel-sse]]],
|
||||||
[Enable Intel SSE optimizations: =no/off, yes/on:]
|
[Enable Intel SSE optimizations: =no/off, yes/on.]
|
||||||
[no/off: disable the optimizations;]
|
[no/off: disable the optimizations;]
|
||||||
[yes/on: enable the optimizations.]
|
[yes/on: enable the optimizations.]
|
||||||
[If not specified: determined by the compiler.]),
|
[If not specified: determined by the compiler.]),
|
||||||
@ -457,34 +538,34 @@ AC_ARG_ENABLE([intel-sse],
|
|||||||
AC_DEFINE([PNG_INTEL_SSE_OPT], [0],
|
AC_DEFINE([PNG_INTEL_SSE_OPT], [0],
|
||||||
[Disable Intel SSE optimizations])
|
[Disable Intel SSE optimizations])
|
||||||
# Prevent inclusion of the assembler files below:
|
# Prevent inclusion of the assembler files below:
|
||||||
enable_intel_sse=no;;
|
enable_intel_sse=no ;;
|
||||||
yes|on)
|
yes|on)
|
||||||
AC_DEFINE([PNG_INTEL_SSE_OPT], [1],
|
AC_DEFINE([PNG_INTEL_SSE_OPT], [1],
|
||||||
[Enable Intel SSE optimizations]);;
|
[Enable Intel SSE optimizations]);;
|
||||||
*)
|
*)
|
||||||
AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}: invalid value])
|
AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}:]
|
||||||
|
[invalid argument])
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
# Add Intel specific files to all builds where the host_cpu is Intel ('x86*')
|
# Add Intel-specific files to all builds where $host_cpu is Intel ('x86*') or
|
||||||
# or where Intel optimizations were explicitly requested (this allows a
|
# where Intel optimizations were explicitly requested. (This allows a fallback
|
||||||
# fallback if a future host CPU does not match 'x86*')
|
# if a future host CPU does not match 'x86*'.)
|
||||||
AM_CONDITIONAL([PNG_INTEL_SSE],
|
AM_CONDITIONAL([PNG_INTEL_SSE],
|
||||||
[test "$enable_intel_sse" != 'no' &&
|
[test "$enable_intel_sse" != 'no' &&
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
i?86|x86_64) :;;
|
i?86|x86_64) : ;;
|
||||||
*) test "$enable_intel_sse" != '';;
|
*) test "$enable_intel_sse" != '' ;;
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
# PowerPC
|
# POWERPC VSX
|
||||||
# ===
|
# ===========
|
||||||
#
|
|
||||||
# PowerPC VSX (SIMD) support.
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([powerpc-vsx],
|
AC_ARG_ENABLE([powerpc-vsx],
|
||||||
AS_HELP_STRING([[[--enable-powerpc-vsx]]],
|
AS_HELP_STRING([[[--enable-powerpc-vsx]]],
|
||||||
[Enable POWERPC VSX optimizations: =no/off, check, api, yes/on:]
|
[Enable POWERPC VSX optimizations: =no/off, check, api, yes/on.]
|
||||||
[no/off: disable the optimizations; check: use internal checking code]
|
[no/off: disable the optimizations;]
|
||||||
[api: disable by default, enable by a call to png_set_option]
|
[check: use internal checking code;]
|
||||||
|
[api: disable by default, enable by a call to png_set_option;]
|
||||||
[yes/on: turn on unconditionally.]
|
[yes/on: turn on unconditionally.]
|
||||||
[If not specified: determined by the compiler.]),
|
[If not specified: determined by the compiler.]),
|
||||||
[case "$enableval" in
|
[case "$enableval" in
|
||||||
@ -492,36 +573,171 @@ AS_HELP_STRING([[[--enable-powerpc-vsx]]],
|
|||||||
# disable the default enabling on __ppc64__ systems:
|
# disable the default enabling on __ppc64__ systems:
|
||||||
AC_DEFINE([PNG_POWERPC_VSX_OPT], [0],
|
AC_DEFINE([PNG_POWERPC_VSX_OPT], [0],
|
||||||
[Disable POWERPC VSX optimizations])
|
[Disable POWERPC VSX optimizations])
|
||||||
# Prevent inclusion of the platform specific files below:
|
# Prevent inclusion of the platform-specific files below:
|
||||||
enable_powerpc_vsx=no;;
|
enable_powerpc_vsx=no ;;
|
||||||
check)
|
check)
|
||||||
AC_DEFINE([PNG_POWERPC_VSX_CHECK_SUPPORTED], [],
|
AC_DEFINE([PNG_POWERPC_VSX_CHECK_SUPPORTED], [],
|
||||||
[Check for POWERPC VSX support at run-time])
|
[Check for POWERPC VSX support at run-time])
|
||||||
AC_MSG_WARN([--enable-powerpc-vsx Please check contrib/powerpc/README file]
|
AC_MSG_WARN([--enable-powerpc-vsx: please see contrib/powerpc/README]
|
||||||
[for the list of supported OSes.]);;
|
[for the list of supported systems.]);;
|
||||||
api)
|
api)
|
||||||
AC_DEFINE([PNG_POWERPC_VSX_API_SUPPORTED], [],
|
AC_DEFINE([PNG_POWERPC_VSX_API_SUPPORTED], [],
|
||||||
[Turn on POWERPC VSX optimizations at run-time]);;
|
[Turn on POWERPC VSX optimizations at run-time]);;
|
||||||
yes|on)
|
yes|on)
|
||||||
AC_DEFINE([PNG_POWERPC_VSX_OPT], [2],
|
AC_DEFINE([PNG_POWERPC_VSX_OPT], [2],
|
||||||
[Enable POWERPC VSX optimizations])
|
[Enable POWERPC VSX optimizations])
|
||||||
AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api', if]
|
AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api';]
|
||||||
[you want the optimizations unconditionally pass '-maltivec -mvsx']
|
[if you want the optimizations unconditionally,]
|
||||||
[or '-mcpu=power8'to the compiler.]);;
|
[pass '-maltivec -mvsx' or '-mcpu=power8' to the compiler.]);;
|
||||||
*)
|
*)
|
||||||
AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value])
|
AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}:]
|
||||||
|
[invalid argument])
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
# Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or
|
# Add PowerPC-specific files to all builds where $host_cpu is powerpc
|
||||||
# where POWERPC optimizations were explicitly requested (this allows a fallback if a
|
# ('powerpc*') or where PowerPC optimizations were explicitly requested.
|
||||||
# future host CPU does not match 'powerpc*')
|
# (This allows a fallback if a future host CPU does not match 'powerpc*'.)
|
||||||
|
|
||||||
AM_CONDITIONAL([PNG_POWERPC_VSX],
|
AM_CONDITIONAL([PNG_POWERPC_VSX],
|
||||||
[test "$enable_powerpc_vsx" != 'no' &&
|
[test "$enable_powerpc_vsx" != 'no' &&
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
powerpc*|ppc64*) :;;
|
powerpc*|ppc64*) : ;;
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
|
# LOONGARCH LSX
|
||||||
|
# =============
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([loongarch-lsx],
|
||||||
|
AS_HELP_STRING([[[--enable-loongarch-lsx]]],
|
||||||
|
[Enable LOONGARCH LSX optimizations: =no/off, yes/on:]
|
||||||
|
[no/off: disable the optimizations;]
|
||||||
|
[yes/on: turn on unconditionally.]
|
||||||
|
[If not specified: determined by the compiler.]),
|
||||||
|
[case "$enableval" in
|
||||||
|
no|off)
|
||||||
|
# disable the default enabling on __loongarch_simd systems:
|
||||||
|
AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [0],
|
||||||
|
[Disable LOONGARCH LSX optimizations])
|
||||||
|
# Prevent inclusion of the assembler files below:
|
||||||
|
enable_loongarch_lsx=no;;
|
||||||
|
yes|on)
|
||||||
|
AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1],
|
||||||
|
[Enable LOONGARCH LSX optimizations])
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_MSG_ERROR([--enable-loongarch-lsx=${enable_loongarch_lsx}:]
|
||||||
|
[invalid argument])
|
||||||
|
esac])
|
||||||
|
|
||||||
|
if test "$enable_loongarch_lsx" != "no" &&
|
||||||
|
case "$host_cpu" in
|
||||||
|
loongarch*) : ;;
|
||||||
|
*) test "$enable_loongarch_lsx" != '' ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
compiler_support_loongarch_lsx=no
|
||||||
|
AC_MSG_CHECKING(whether to use LoongArch LSX intrinsics)
|
||||||
|
save_CFLAGS="$CFLAGS"
|
||||||
|
LSX_CFLAGS="${LSX_CFLAGS:-"-mlsx"}"
|
||||||
|
CFLAGS="$CFLAGS $LSX_CFLAGS"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
#include <lsxintrin.h>
|
||||||
|
int main(){
|
||||||
|
__m128i a, b, c;
|
||||||
|
a = __lsx_vadd_w(b, c);
|
||||||
|
return 0;
|
||||||
|
}]])],compiler_support_loongarch_lsx=yes)
|
||||||
|
CFLAGS="$save_CFLAGS"
|
||||||
|
AC_MSG_RESULT($compiler_support_loongarch_lsx)
|
||||||
|
if test "$compiler_support_loongarch_lsx" = "yes"; then
|
||||||
|
AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1],
|
||||||
|
[Enable LOONGARCH LSX optimizations])
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([Compiler does not support loongarch LSX.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add LoongArch specific files to all builds where the host_cpu is loongarch
|
||||||
|
# ('loongarch*') or where LoongArch optimizations were explicitly requested.
|
||||||
|
# (This allows a fallback if a future host CPU does not match 'loongarch*'.)
|
||||||
|
|
||||||
|
AM_CONDITIONAL([PNG_LOONGARCH_LSX],
|
||||||
|
[test "$enable_loongarch_lsx" != "no" &&
|
||||||
|
test "$compiler_support_loongarch_lsx" = "yes" &&
|
||||||
|
case "$host_cpu" in
|
||||||
|
loongarch*) : ;;
|
||||||
|
*) test "$enable_loongarch_lsx" != '' ;;
|
||||||
|
esac])
|
||||||
|
|
||||||
|
# RISC-V
|
||||||
|
# ======
|
||||||
|
#
|
||||||
|
# RISC-V Vector support.
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([riscv-rvv],
|
||||||
|
AS_HELP_STRING([[[--enable-riscv-rvv]]],
|
||||||
|
[Enable RISC-V Vector optimizations: =no/off, check, api, yes/on:]
|
||||||
|
[no/off: disable the optimizations; check: use internal checking code]
|
||||||
|
[api: disable by default, enable by a call to png_set_option]
|
||||||
|
[yes/on: turn on. If not specified: determined by the compiler.]),
|
||||||
|
[case "$enableval" in
|
||||||
|
no|off)
|
||||||
|
# disable the default enabling on __riscv systems:
|
||||||
|
AC_DEFINE([PNG_RISCV_RVV_OPT], [0],
|
||||||
|
[Disable RISC-V Vector optimizations])
|
||||||
|
# Prevent inclusion of the platform-specific files below:
|
||||||
|
enable_riscv_rvv=no ;;
|
||||||
|
yes|on)
|
||||||
|
AC_DEFINE([PNG_RISCV_RVV_OPT], [2],
|
||||||
|
[Enable RISC-V Vector optimizations])
|
||||||
|
AC_MSG_WARN([--enable-riscv-rvv:]
|
||||||
|
[if you want the optimizations pass e.g. '-march=rv64gv1p0' to the compiler.]);;
|
||||||
|
*)
|
||||||
|
AC_MSG_ERROR([--enable-riscv-rvv=${enable_riscv_rvv}: invalid value])
|
||||||
|
esac])
|
||||||
|
|
||||||
|
if test "$enable_riscv_rvv" != "no" &&
|
||||||
|
case "$host_cpu" in
|
||||||
|
riscv64) : ;;
|
||||||
|
*) test "$enable_riscv_rvv" != '' ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
compiler_support_riscv_rvv=no
|
||||||
|
AC_MSG_CHECKING(whether to use RISC-V RVV intrinsics)
|
||||||
|
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
#include <riscv_vector.h>
|
||||||
|
#include <asm/hwcap.h>
|
||||||
|
#ifndef COMPAT_HWCAP_ISA_V /* added in linux-6.5 */
|
||||||
|
#error "COMPAT_HWCAP_ISA_V is not available"
|
||||||
|
#endif
|
||||||
|
int main() {
|
||||||
|
const float src[] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||||
|
uint64_t ptr[2] = {0x0908060504020100, 0xFFFFFFFF0E0D0C0A};
|
||||||
|
vuint8m1_t a = __riscv_vreinterpret_v_u64m1_u8m1(__riscv_vle64_v_u64m1(ptr, 2));
|
||||||
|
vfloat32m1_t val = __riscv_vle32_v_f32m1((const float*)(src), 4);
|
||||||
|
return (int)__riscv_vfmv_f_s_f32m1_f32(val);
|
||||||
|
}]])],compiler_support_riscv_rvv=yes)
|
||||||
|
AC_MSG_RESULT($compiler_support_riscv_rvv)
|
||||||
|
if test "$compiler_support_riscv_rvv" = "yes"; then
|
||||||
|
AC_DEFINE([PNG_RISCV_RVV_OPT], [1],
|
||||||
|
[Enable RISCV RVV optimizations])
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([Compiler does not support riscv rvv.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add RISC-V-specific files to all builds where $host_cpu is riscv ('riscv64')
|
||||||
|
# or where RISC-V optimizations were explicitly requested (this allows a fallback
|
||||||
|
# if a future host CPU does not match 'riscv64')
|
||||||
|
|
||||||
|
AM_CONDITIONAL([PNG_RISCV_RVV],
|
||||||
|
[test "$enable_riscv_rvv" != "no" &&
|
||||||
|
test "$compiler_support_riscv_rvv" = "yes" &&
|
||||||
|
case "$host_cpu" in
|
||||||
|
riscv64) : ;;
|
||||||
|
*) test "$compiler_support_riscv_rvv" != '' ;;
|
||||||
|
esac])
|
||||||
|
|
||||||
AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]])
|
AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]])
|
||||||
|
|
||||||
|
9
contrib/.editorconfig
Normal file
9
contrib/.editorconfig
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# https://editorconfig.org
|
||||||
|
|
||||||
|
root = false
|
||||||
|
|
||||||
|
[*.[ch]]
|
||||||
|
indent_size = unset
|
||||||
|
indent_style = unset
|
||||||
|
max_doc_length = unset
|
||||||
|
max_line_length = unset
|
@ -1,3 +1,5 @@
|
|||||||
|
External contributions to libpng
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
This "contrib" directory contains contributions which are not necessarily under
|
This "contrib" directory contains contributions which are not necessarily under
|
||||||
the libpng license, although all are open source. They are not part of
|
the libpng license, although all are open source. They are not part of
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2014 Glenn Randers-Pehrson
|
* Copyright (c) 2014 Glenn Randers-Pehrson
|
||||||
* Written by John Bowler, 2014.
|
* Written by John Bowler, 2014.
|
||||||
* Last changed in libpng 1.6.10 [March 6, 2014]
|
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
@ -24,6 +23,7 @@
|
|||||||
* has been compiled only, not linked: no version of the library has been found,
|
* has been compiled only, not linked: no version of the library has been found,
|
||||||
* only the header files exist in the NDK.
|
* only the header files exist in the NDK.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cpu-features.h>
|
#include <cpu-features.h>
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2014 Glenn Randers-Pehrson
|
* Copyright (c) 2014 Glenn Randers-Pehrson
|
||||||
* Written by Mans Rullgard, 2011.
|
* Written by Mans Rullgard, 2011.
|
||||||
* Last changed in libpng 1.6.10 [March 6, 2014]
|
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
@ -22,6 +21,7 @@
|
|||||||
* This generic __linux__ implementation requires reading /proc/self/auxv and
|
* This generic __linux__ implementation requires reading /proc/self/auxv and
|
||||||
* looking at each element for one that records NEON capabilities.
|
* looking at each element for one that records NEON capabilities.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <unistd.h> /* for POSIX 1003.1 */
|
#include <unistd.h> /* for POSIX 1003.1 */
|
||||||
#include <errno.h> /* for EINTR */
|
#include <errno.h> /* for EINTR */
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* contrib/arm-neon/linux.c
|
/* contrib/arm-neon/linux.c
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.31 [July 27, 2017]
|
|
||||||
* Copyright (c) 2014, 2017 Glenn Randers-Pehrson
|
* Copyright (c) 2014, 2017 Glenn Randers-Pehrson
|
||||||
* Written by John Bowler, 2014, 2017.
|
* Written by John Bowler, 2014, 2017.
|
||||||
*
|
*
|
||||||
@ -19,6 +18,7 @@
|
|||||||
* This code is strict ANSI-C and is probably moderately portable; it does
|
* This code is strict ANSI-C and is probably moderately portable; it does
|
||||||
* however use <stdio.h> and it assumes that /proc/cpuinfo is never localized.
|
* however use <stdio.h> and it assumes that /proc/cpuinfo is never localized.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
133
contrib/conftest/basic.dfa
Normal file
133
contrib/conftest/basic.dfa
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
# basic.dfa
|
||||||
|
# Build time configuration of libpng
|
||||||
|
#
|
||||||
|
# Author: John Bowler
|
||||||
|
# Copyright: (c) John Bowler, 2024
|
||||||
|
# Usage rights:
|
||||||
|
# To the extent possible under law, the author has waived all copyright and
|
||||||
|
# related or neighboring rights to this work. This work is published from:
|
||||||
|
# United States.
|
||||||
|
#
|
||||||
|
# Build libpng with basic read and write support. This enables the lowest
|
||||||
|
# level libpng read and write APIs - the "row-by-row" ones.
|
||||||
|
#
|
||||||
|
# Support is enabled only for those transformations that are observed to be
|
||||||
|
# required by widely used apps or are in the v3 specification.
|
||||||
|
#
|
||||||
|
|
||||||
|
everything = off
|
||||||
|
|
||||||
|
# The sequential read code is enabled here; the progressive code can be used
|
||||||
|
# instead but there is no point enabling both.
|
||||||
|
|
||||||
|
option READ on
|
||||||
|
option SEQUENTIAL_READ on
|
||||||
|
option EASY_ACCESS on
|
||||||
|
option SET_USER_LIMITS on
|
||||||
|
option INFO_IMAGE on
|
||||||
|
option READ_16BIT on
|
||||||
|
|
||||||
|
# Errors: these can be disabled but then there won't be any error messages
|
||||||
|
# just failures and the error messages are really needed for apps:
|
||||||
|
option WARNINGS on
|
||||||
|
option ERROR_TEXT on
|
||||||
|
option BENIGN_READ_ERRORS on
|
||||||
|
|
||||||
|
# Required for many display programs such as web browsers:
|
||||||
|
option PROGRESSIVE_READ on
|
||||||
|
|
||||||
|
# Switch on the write code - this makes a minimalist encoder but with
|
||||||
|
# interlace support turned on; otherwise png_read_png..png_write_png will
|
||||||
|
# fail on an interlaced image.
|
||||||
|
option WRITE on
|
||||||
|
option WRITE_INTERLACING on
|
||||||
|
option WRITE_16BIT on
|
||||||
|
|
||||||
|
# Usages of the 'fixed' APIs are relatively rare but they do occur
|
||||||
|
# one or the other for both the API and the internal math.
|
||||||
|
|
||||||
|
#Fixed point:
|
||||||
|
option FIXED_POINT on
|
||||||
|
|
||||||
|
#Floating point:
|
||||||
|
option FLOATING_POINT on
|
||||||
|
option FLOATING_ARITHMETIC on
|
||||||
|
|
||||||
|
# Basic error handling, IO and user memory support. The latter allows the
|
||||||
|
# application program to provide its own implementations of 'malloc' and 'free'.
|
||||||
|
option SETJMP on
|
||||||
|
option STDIO on
|
||||||
|
option USER_MEM on
|
||||||
|
|
||||||
|
# Gamma handling: this needs to be on for the gamma handling
|
||||||
|
option READ_GAMMA on
|
||||||
|
|
||||||
|
# The supported chunks
|
||||||
|
chunk bKGD on
|
||||||
|
chunk cHRM on
|
||||||
|
chunk eXIf on
|
||||||
|
chunk gAMA on
|
||||||
|
chunk iCCP on
|
||||||
|
chunk iTXt on
|
||||||
|
chunk pHYs on
|
||||||
|
chunk sBIT on
|
||||||
|
chunk sRGB on
|
||||||
|
chunk tEXt on
|
||||||
|
chunk tIME on
|
||||||
|
chunk tRNS on
|
||||||
|
chunk zTXt on
|
||||||
|
|
||||||
|
# These don't seem to be used anywhere:
|
||||||
|
# chunk pCAL
|
||||||
|
# chunk sCAL
|
||||||
|
# chunk sPLT
|
||||||
|
|
||||||
|
# The rest of this is app dependent: none of these options are required for
|
||||||
|
# read/write of the full range of PNG files and the normal chunk handling on
|
||||||
|
# read.
|
||||||
|
option WRITE_CUSTOMIZE_ZTXT_COMPRESSION on
|
||||||
|
option WRITE_CUSTOMIZE_COMPRESSION on
|
||||||
|
|
||||||
|
option READ_EXPAND on
|
||||||
|
option READ_FILLER on
|
||||||
|
option READ_GRAY_TO_RGB on
|
||||||
|
option READ_INVERT on
|
||||||
|
option READ_PACK on
|
||||||
|
option READ_RGB_TO_GRAY on
|
||||||
|
option READ_SCALE_16_TO_8 on
|
||||||
|
option READ_SHIFT on
|
||||||
|
option READ_STRIP_16_TO_8 on
|
||||||
|
option READ_STRIP_ALPHA on
|
||||||
|
option READ_SWAP on
|
||||||
|
|
||||||
|
option CONVERT_tIME on
|
||||||
|
|
||||||
|
# optipng
|
||||||
|
option IO_STATE on
|
||||||
|
option STORE_UNKNOWN_CHUNKS on
|
||||||
|
option HANDLE_AS_UNKNOWN on
|
||||||
|
|
||||||
|
# pngcrush
|
||||||
|
option READ_USER_TRANSFORM on
|
||||||
|
option WRITE_FLUSH on
|
||||||
|
|
||||||
|
# pnmtopng
|
||||||
|
chunk hIST on
|
||||||
|
|
||||||
|
# cairo
|
||||||
|
option WRITE_PACKSWAP on
|
||||||
|
option WRITE_USER_TRANSFORM on
|
||||||
|
|
||||||
|
# graphicsmagick
|
||||||
|
option READ_USER_CHUNKS on
|
||||||
|
|
||||||
|
# Qt5.15 qtgui (gentoo package split) Qt6.6 qtbase
|
||||||
|
option READ_BGR on
|
||||||
|
option WRITE_BGR on
|
||||||
|
option READ_SWAP_ALPHA on
|
||||||
|
option WRITE_SWAP_ALPHA on
|
||||||
|
chunk oFFs on
|
||||||
|
|
||||||
|
# ghostscript-gpl
|
||||||
|
option WRITE_INVERT_ALPHA on
|
||||||
|
option WRITE_INVERT on
|
15
contrib/conftest/fixed.dfa
Normal file
15
contrib/conftest/fixed.dfa
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# fixed.dfa
|
||||||
|
# Build time configuration of libpng
|
||||||
|
#
|
||||||
|
# Author: John Bowler
|
||||||
|
# Copyright: (c) John Bowler, 2025
|
||||||
|
# Usage rights:
|
||||||
|
# To the extent possible under law, the author has waived all copyright and
|
||||||
|
# related or neighboring rights to this work. This work is published from:
|
||||||
|
# United States.
|
||||||
|
#
|
||||||
|
# Test the standard libpng configuration without floating point (the internal
|
||||||
|
# fixed point implementations are used instead).
|
||||||
|
#
|
||||||
|
option FLOATING_ARITHMETIC off
|
||||||
|
option FLOATING_POINT off
|
14
contrib/conftest/float-fixed.dfa
Normal file
14
contrib/conftest/float-fixed.dfa
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# fixed-float.dfa
|
||||||
|
# Build time configuration of libpng
|
||||||
|
#
|
||||||
|
# Author: John Bowler
|
||||||
|
# Copyright: (c) John Bowler, 2025
|
||||||
|
# Usage rights:
|
||||||
|
# To the extent possible under law, the author has waived all copyright and
|
||||||
|
# related or neighboring rights to this work. This work is published from:
|
||||||
|
# United States.
|
||||||
|
#
|
||||||
|
# Test the standard libpng configuration with the fixed point internal
|
||||||
|
# implementation in place of the default floating point
|
||||||
|
#
|
||||||
|
option FLOATING_ARITHMETIC off
|
21
contrib/conftest/nocompile-limits.dfa
Normal file
21
contrib/conftest/nocompile-limits.dfa
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# nolimits.dfa
|
||||||
|
# Build time configuration of libpng
|
||||||
|
#
|
||||||
|
# Author: John Bowler
|
||||||
|
# Copyright: (c) John Bowler, 2025
|
||||||
|
#
|
||||||
|
# Usage rights:
|
||||||
|
# To the extent possible under law, the author has waived all copyright and
|
||||||
|
# related or neighboring rights to this work. This work is published from:
|
||||||
|
# United States.
|
||||||
|
#
|
||||||
|
# Build libpng without any limits and without run-time settable limits. Turning
|
||||||
|
# USER_LIMITS off reduces libpng code size by allowing compile-time elimination
|
||||||
|
# of some checking code.
|
||||||
|
#
|
||||||
|
option USER_LIMITS off
|
||||||
|
|
||||||
|
@# define PNG_USER_WIDTH_MAX PNG_UINT_31_MAX
|
||||||
|
@# define PNG_USER_HEIGHT_MAX PNG_UINT_31_MAX
|
||||||
|
@# define PNG_USER_CHUNK_CACHE_MAX 0
|
||||||
|
@# define PNG_USER_CHUNK_MALLOC_MAX 0
|
19
contrib/conftest/nolimits.dfa
Normal file
19
contrib/conftest/nolimits.dfa
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# nolimits.dfa
|
||||||
|
# Build time configuration of libpng
|
||||||
|
#
|
||||||
|
# Author: John Bowler
|
||||||
|
# Copyright: (c) John Bowler, 2025
|
||||||
|
#
|
||||||
|
# Usage rights:
|
||||||
|
# To the extent possible under law, the author has waived all copyright and
|
||||||
|
# related or neighboring rights to this work. This work is published from:
|
||||||
|
# United States.
|
||||||
|
#
|
||||||
|
# Build libpng without any limits. With these settigs run-time limits are still
|
||||||
|
# possible.
|
||||||
|
#
|
||||||
|
@# define PNG_USER_WIDTH_MAX PNG_UINT_31_MAX
|
||||||
|
@# define PNG_USER_HEIGHT_MAX PNG_UINT_31_MAX
|
||||||
|
@# define PNG_USER_CHUNK_CACHE_MAX 0
|
||||||
|
@# define PNG_USER_CHUNK_MALLOC_MAX 0
|
||||||
|
|
@ -52,6 +52,6 @@ option TEXT on
|
|||||||
option USER_LIMITS on
|
option USER_LIMITS on
|
||||||
option SET_USER_LIMITS on
|
option SET_USER_LIMITS on
|
||||||
|
|
||||||
# these are are just required for specific customizations
|
# these are just required for specific customizations
|
||||||
option WRITE_CUSTOMIZE_ZTXT_COMPRESSION on
|
option WRITE_CUSTOMIZE_ZTXT_COMPRESSION on
|
||||||
option WRITE_CUSTOMIZE_COMPRESSION on
|
option WRITE_CUSTOMIZE_COMPRESSION on
|
||||||
|
13
contrib/conftest/read-full.dfa
Normal file
13
contrib/conftest/read-full.dfa
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# read-full.dfa
|
||||||
|
# Build time configuration of libpng
|
||||||
|
#
|
||||||
|
# Author: John Bowler
|
||||||
|
# Copyright: (c) John Bowler, 2025
|
||||||
|
# Usage rights:
|
||||||
|
# To the extent possible under law, the author has waived all copyright and
|
||||||
|
# related or neighboring rights to this work. This work is published from:
|
||||||
|
# United States.
|
||||||
|
#
|
||||||
|
# Build libpng with no write support and full read support.
|
||||||
|
#
|
||||||
|
option WRITE off
|
13
contrib/conftest/write-full.dfa
Normal file
13
contrib/conftest/write-full.dfa
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# write-full.dfa
|
||||||
|
# Build time configuration of libpng
|
||||||
|
#
|
||||||
|
# Author: John Bowler
|
||||||
|
# Copyright: (c) John Bowler, 2025
|
||||||
|
# Usage rights:
|
||||||
|
# To the extent possible under law, the author has waived all copyright and
|
||||||
|
# related or neighboring rights to this work. This work is published from:
|
||||||
|
# United States.
|
||||||
|
#
|
||||||
|
# Build libpng with no read support and full write support.
|
||||||
|
#
|
||||||
|
option READ off
|
143
contrib/examples/.clang-format
Normal file
143
contrib/examples/.clang-format
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
---
|
||||||
|
Language: Cpp
|
||||||
|
AccessModifierOffset: -3
|
||||||
|
AlignAfterOpenBracket: Align
|
||||||
|
AlignArrayOfStructures: None
|
||||||
|
AlignConsecutiveAssignments:
|
||||||
|
Enabled: false
|
||||||
|
AlignConsecutiveBitFields:
|
||||||
|
Enabled: false
|
||||||
|
AlignConsecutiveDeclarations:
|
||||||
|
Enabled: false
|
||||||
|
AlignConsecutiveMacros:
|
||||||
|
Enabled: false
|
||||||
|
AlignConsecutiveShortCaseStatements:
|
||||||
|
Enabled: false
|
||||||
|
AlignEscapedNewlines: DontAlign
|
||||||
|
AlignOperands: false
|
||||||
|
AlignTrailingComments:
|
||||||
|
Kind: Never
|
||||||
|
OverEmptyLines: 0
|
||||||
|
AllowAllArgumentsOnNextLine: true
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: true
|
||||||
|
AllowBreakBeforeNoexceptSpecifier: Never
|
||||||
|
AllowShortBlocksOnASingleLine: Never
|
||||||
|
AllowShortCaseExpressionOnASingleLine: true
|
||||||
|
AllowShortCaseLabelsOnASingleLine: true
|
||||||
|
AllowShortCompoundRequirementOnASingleLine: true
|
||||||
|
AllowShortEnumsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: None
|
||||||
|
AllowShortIfStatementsOnASingleLine: Never
|
||||||
|
AllowShortLambdasOnASingleLine: All
|
||||||
|
AllowShortLoopsOnASingleLine: false
|
||||||
|
AllowShortNamespacesOnASingleLine: false
|
||||||
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
BinPackArguments: true
|
||||||
|
BinPackParameters: BinPack
|
||||||
|
BitFieldColonSpacing: Both
|
||||||
|
BraceWrapping:
|
||||||
|
AfterCaseLabel: true
|
||||||
|
AfterClass: true
|
||||||
|
AfterControlStatement: Always
|
||||||
|
AfterEnum: true
|
||||||
|
AfterExternBlock: false
|
||||||
|
AfterFunction: true
|
||||||
|
AfterNamespace: false
|
||||||
|
AfterObjCDeclaration: true
|
||||||
|
AfterStruct: true
|
||||||
|
AfterUnion: true
|
||||||
|
BeforeCatch: true
|
||||||
|
BeforeElse: true
|
||||||
|
BeforeLambdaBody: false
|
||||||
|
BeforeWhile: false
|
||||||
|
IndentBraces: false
|
||||||
|
SplitEmptyFunction: true
|
||||||
|
SplitEmptyRecord: true
|
||||||
|
SplitEmptyNamespace: true
|
||||||
|
BreakAdjacentStringLiterals: true
|
||||||
|
BreakAfterAttributes: Leave
|
||||||
|
BreakAfterJavaFieldAnnotations: false
|
||||||
|
BreakAfterReturnType: TopLevel
|
||||||
|
BreakArrays: true
|
||||||
|
BreakBeforeBinaryOperators: None
|
||||||
|
BreakBeforeConceptDeclarations: Always
|
||||||
|
BreakBeforeBraces: Custom
|
||||||
|
BreakBeforeTernaryOperators: false
|
||||||
|
BreakStringLiterals: false
|
||||||
|
BreakTemplateDeclarations: MultiLine
|
||||||
|
ColumnLimit: 79
|
||||||
|
ContinuationIndentWidth: 3
|
||||||
|
DerivePointerAlignment: true
|
||||||
|
EmptyLineAfterAccessModifier: Never
|
||||||
|
EmptyLineBeforeAccessModifier: LogicalBlock
|
||||||
|
FixNamespaceComments: true
|
||||||
|
IncludeBlocks: Preserve
|
||||||
|
IndentAccessModifiers: false
|
||||||
|
IndentCaseBlocks: true
|
||||||
|
IndentCaseLabels: true
|
||||||
|
IndentExportBlock: true
|
||||||
|
IndentExternBlock: AfterExternBlock
|
||||||
|
IndentGotoLabels: false
|
||||||
|
IndentPPDirectives: None
|
||||||
|
IndentRequiresClause: true
|
||||||
|
IndentWidth: 3
|
||||||
|
IndentWrappedFunctionNames: false
|
||||||
|
KeepEmptyLines:
|
||||||
|
AtEndOfFile: false
|
||||||
|
AtStartOfBlock: false
|
||||||
|
AtStartOfFile: false
|
||||||
|
KeepFormFeed: false
|
||||||
|
MaxEmptyLinesToKeep: 2
|
||||||
|
NamespaceIndentation: None
|
||||||
|
PackConstructorInitializers: Never
|
||||||
|
PointerAlignment: Left
|
||||||
|
QualifierAlignment: Custom
|
||||||
|
QualifierOrder: [static, inline, constexpr, const, volatile, restrict, type]
|
||||||
|
ReferenceAlignment: Pointer
|
||||||
|
ReflowComments: Never
|
||||||
|
RequiresClausePosition: OwnLine
|
||||||
|
RequiresExpressionIndentation: OuterScope
|
||||||
|
SortIncludes: false
|
||||||
|
SortUsingDeclarations: LexicographicNumeric
|
||||||
|
SpaceAfterCStyleCast: false
|
||||||
|
SpaceAfterLogicalNot: false
|
||||||
|
SpaceAfterTemplateKeyword: true
|
||||||
|
SpaceAroundPointerQualifiers: Default
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceBeforeCaseColon: false
|
||||||
|
SpaceBeforeCpp11BracedList: false
|
||||||
|
SpaceBeforeCtorInitializerColon: true
|
||||||
|
SpaceBeforeInheritanceColon: true
|
||||||
|
SpaceBeforeJsonColon: false
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
SpaceBeforeParensOptions:
|
||||||
|
AfterControlStatements: true
|
||||||
|
AfterFunctionDefinitionName: false
|
||||||
|
AfterFunctionDeclarationName: false
|
||||||
|
AfterOverloadedOperator: false
|
||||||
|
AfterPlacementOperator: true
|
||||||
|
AfterRequiresInClause: false
|
||||||
|
AfterRequiresInExpression: false
|
||||||
|
BeforeNonEmptyParentheses: false
|
||||||
|
SpaceBeforeRangeBasedForLoopColon: true
|
||||||
|
SpaceBeforeSquareBrackets: false
|
||||||
|
SpaceInEmptyBlock: false
|
||||||
|
SpacesBeforeTrailingComments: 1
|
||||||
|
SpacesInAngles: Never
|
||||||
|
SpacesInContainerLiterals: true
|
||||||
|
SpacesInLineCommentPrefix:
|
||||||
|
Minimum: 1
|
||||||
|
Maximum: -1
|
||||||
|
SpacesInParens: Never
|
||||||
|
SpacesInParensOptions:
|
||||||
|
ExceptDoubleParentheses: false
|
||||||
|
InCStyleCasts: false
|
||||||
|
InConditionalStatements: false
|
||||||
|
InEmptyParentheses: false
|
||||||
|
Other: false
|
||||||
|
SpacesInSquareBrackets: false
|
||||||
|
Standard: Latest
|
||||||
|
TabWidth: 8
|
||||||
|
UseTab: Never
|
||||||
|
WrapNamespaceBodyWithEmptyLines: Leave
|
||||||
|
...
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
This directory (contrib/examples) contains examples of libpng usage.
|
This directory (contrib/examples) contains examples of libpng usage.
|
||||||
|
|
||||||
NO COPYRIGHT RIGHTS ARE CLAIMED TO ANY OF THE FILES IN THIS DIRECTORY.
|
NO COPYRIGHT RIGHTS ARE CLAIMED TO ANY OF THE FILES IN THIS DIRECTORY.
|
||||||
|
@ -26,8 +26,9 @@
|
|||||||
|
|
||||||
#include <png.h>
|
#include <png.h>
|
||||||
|
|
||||||
#if defined(PNG_READ_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) && \
|
#if !defined(PNG_iCCP_SUPPORTED) || !defined(PNG_READ_SUPPORTED)
|
||||||
defined (PNG_iCCP_SUPPORTED)
|
#error This program requires libpng supporting the iCCP chunk and the read API
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static int verbose = 1;
|
static int verbose = 1;
|
||||||
@ -36,7 +37,8 @@ static png_byte no_profile[] = "no profile";
|
|||||||
static png_bytep
|
static png_bytep
|
||||||
extract(FILE *fp, png_uint_32 *proflen)
|
extract(FILE *fp, png_uint_32 *proflen)
|
||||||
{
|
{
|
||||||
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0);
|
png_structp png_ptr =
|
||||||
|
png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||||
png_infop info_ptr = NULL;
|
png_infop info_ptr = NULL;
|
||||||
png_bytep result = NULL;
|
png_bytep result = NULL;
|
||||||
|
|
||||||
@ -69,7 +71,7 @@ extract(FILE *fp, png_uint_32 *proflen)
|
|||||||
png_bytep profile;
|
png_bytep profile;
|
||||||
|
|
||||||
if (png_get_iCCP(png_ptr, info_ptr, &name, &compression_type, &profile,
|
if (png_get_iCCP(png_ptr, info_ptr, &name, &compression_type, &profile,
|
||||||
proflen) & PNG_INFO_iCCP)
|
proflen) & PNG_INFO_iCCP)
|
||||||
{
|
{
|
||||||
result = malloc(*proflen);
|
result = malloc(*proflen);
|
||||||
if (result != NULL)
|
if (result != NULL)
|
||||||
@ -80,7 +82,7 @@ extract(FILE *fp, png_uint_32 *proflen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
result = no_profile;
|
result = no_profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
|
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
|
||||||
@ -107,7 +109,7 @@ extract_one_file(const char *filename)
|
|||||||
const char *ep = strrchr(filename, '.');
|
const char *ep = strrchr(filename, '.');
|
||||||
|
|
||||||
if (ep != NULL)
|
if (ep != NULL)
|
||||||
len = ep-filename;
|
len = ep - filename;
|
||||||
|
|
||||||
else
|
else
|
||||||
len = strlen(filename);
|
len = strlen(filename);
|
||||||
@ -119,14 +121,14 @@ extract_one_file(const char *filename)
|
|||||||
FILE *of;
|
FILE *of;
|
||||||
|
|
||||||
memcpy(output, filename, len);
|
memcpy(output, filename, len);
|
||||||
strcpy(output+len, ".icc");
|
strcpy(output + len, ".icc");
|
||||||
|
|
||||||
of = fopen(output, "wb");
|
of = fopen(output, "wb");
|
||||||
if (of != NULL)
|
if (of != NULL)
|
||||||
{
|
{
|
||||||
if (fwrite(profile, proflen, 1, of) == 1 &&
|
if (fwrite(profile, proflen, 1, of) == 1 &&
|
||||||
fflush(of) == 0 &&
|
fflush(of) == 0 &&
|
||||||
fclose(of) == 0)
|
fclose(of) == 0)
|
||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf("%s -> %s\n", filename, output);
|
printf("%s -> %s\n", filename, output);
|
||||||
@ -155,12 +157,15 @@ extract_one_file(const char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if (verbose && profile == no_profile)
|
else if (verbose && profile == no_profile)
|
||||||
printf("%s has no profile\n", filename);
|
printf("%s has no profile\n", filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
fprintf(stderr, "%s: could not open file\n", filename);
|
fprintf(stderr, "%s: could not open file\n", filename);
|
||||||
|
|
||||||
|
if (fp != NULL)
|
||||||
|
fclose(fp);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,7 +175,7 @@ main(int argc, char **argv)
|
|||||||
int i;
|
int i;
|
||||||
int extracted = 0;
|
int extracted = 0;
|
||||||
|
|
||||||
for (i=1; i<argc; ++i)
|
for (i = 1; i < argc; ++i)
|
||||||
{
|
{
|
||||||
if (strcmp(argv[i], "-q") == 0)
|
if (strcmp(argv[i], "-q") == 0)
|
||||||
verbose = 0;
|
verbose = 0;
|
||||||
@ -182,4 +187,3 @@ main(int argc, char **argv)
|
|||||||
/* Exit code is true if any extract succeeds */
|
/* Exit code is true if any extract succeeds */
|
||||||
return extracted == 0;
|
return extracted == 0;
|
||||||
}
|
}
|
||||||
#endif /* READ && STDIO && iCCP */
|
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
* images. Normally you would call png_set_interlace_handling() to have libpng
|
* images. Normally you would call png_set_interlace_handling() to have libpng
|
||||||
* deal with the interlace for you, but that obliges you to buffer half of the
|
* deal with the interlace for you, but that obliges you to buffer half of the
|
||||||
* image to assemble the interlaced rows. In this code
|
* image to assemble the interlaced rows. In this code
|
||||||
* png_set_interlace_handling() is not called and, instead, the code handles the
|
* png_set_interlace_handling() is not called and, instead, the code handles
|
||||||
* interlace passes directly looking for the required pixel.
|
* the interlace passes directly looking for the required pixel.
|
||||||
*/
|
*/
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -27,34 +27,37 @@
|
|||||||
*/
|
*/
|
||||||
#include "../../png.h"
|
#include "../../png.h"
|
||||||
|
|
||||||
#if defined(PNG_READ_SUPPORTED) && defined(PNG_SEQUENTIAL_READ_SUPPORTED)
|
#if !defined(PNG_READ_SUPPORTED) || !defined(PNG_SEQUENTIAL_READ_SUPPORTED)
|
||||||
|
#error This program requires libpng supporting the read and sequential read API
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Return component 'c' of pixel 'x' from the given row. */
|
/* Return component 'c' of pixel 'x' from the given row. */
|
||||||
static unsigned int
|
static unsigned int
|
||||||
component(png_const_bytep row, png_uint_32 x, unsigned int c,
|
component(png_const_bytep row, png_uint_32 x, unsigned int c,
|
||||||
unsigned int bit_depth, unsigned int channels)
|
unsigned int bit_depth, unsigned int channels)
|
||||||
{
|
{
|
||||||
/* PNG images can be up to 2^31 pixels wide, but this means they can be up to
|
/* PNG images can be up to 2^31 pixels wide, which means they can be up to
|
||||||
* 2^37 bits wide (for a 64-bit pixel - the largest possible) and hence 2^34
|
* 2^37 bits wide (for a 64-bit pixel - the largest possible) and hence
|
||||||
* bytes wide. Since the row fitted into memory, however, the following must
|
* 2^34 bytes wide. Since the row fitted into memory, the following must
|
||||||
* work:
|
* work:
|
||||||
*/
|
*/
|
||||||
png_uint_32 bit_offset_hi = bit_depth * ((x >> 6) * channels);
|
png_uint_32 bit_offset_hi = bit_depth * ((x >> 6) * channels);
|
||||||
png_uint_32 bit_offset_lo = bit_depth * ((x & 0x3f) * channels + c);
|
png_uint_32 bit_offset_lo = bit_depth * ((x & 0x3f) * channels + c);
|
||||||
|
|
||||||
row = (png_const_bytep)(((PNG_CONST png_byte (*)[8])row) + bit_offset_hi);
|
row = (png_const_bytep)(((const png_byte(*)[8])row) + bit_offset_hi);
|
||||||
row += bit_offset_lo >> 3;
|
row += bit_offset_lo >> 3;
|
||||||
bit_offset_lo &= 0x07;
|
bit_offset_lo &= 0x07;
|
||||||
|
|
||||||
/* PNG pixels are packed into bytes to put the first pixel in the highest
|
/* PNG pixels are packed into bytes to put the first pixel in the highest
|
||||||
* bits of the byte and into two bytes for 16-bit values with the high 8 bits
|
* bits of the byte, and into two bytes for 16-bit values with the high
|
||||||
* first, so:
|
* 8 bits first, so:
|
||||||
*/
|
*/
|
||||||
switch (bit_depth)
|
switch (bit_depth)
|
||||||
{
|
{
|
||||||
case 1: return (row[0] >> (7-bit_offset_lo)) & 0x01;
|
case 1: return (row[0] >> (7 - bit_offset_lo)) & 0x01;
|
||||||
case 2: return (row[0] >> (6-bit_offset_lo)) & 0x03;
|
case 2: return (row[0] >> (6 - bit_offset_lo)) & 0x03;
|
||||||
case 4: return (row[0] >> (4-bit_offset_lo)) & 0x0f;
|
case 4: return (row[0] >> (4 - bit_offset_lo)) & 0x0f;
|
||||||
case 8: return row[0];
|
case 8: return row[0];
|
||||||
case 16: return (row[0] << 8) + row[1];
|
case 16: return (row[0] << 8) + row[1];
|
||||||
default:
|
default:
|
||||||
@ -71,9 +74,9 @@ component(png_const_bytep row, png_uint_32 x, unsigned int c,
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row,
|
print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row,
|
||||||
png_uint_32 x)
|
png_uint_32 x)
|
||||||
{
|
{
|
||||||
PNG_CONST unsigned int bit_depth = png_get_bit_depth(png_ptr, info_ptr);
|
unsigned int bit_depth = png_get_bit_depth(png_ptr, info_ptr);
|
||||||
|
|
||||||
switch (png_get_color_type(png_ptr, info_ptr))
|
switch (png_get_color_type(png_ptr, info_ptr))
|
||||||
{
|
{
|
||||||
@ -87,27 +90,29 @@ print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row,
|
|||||||
*/
|
*/
|
||||||
case PNG_COLOR_TYPE_PALETTE:
|
case PNG_COLOR_TYPE_PALETTE:
|
||||||
{
|
{
|
||||||
PNG_CONST int index = component(row, x, 0, bit_depth, 1);
|
int index = component(row, x, 0, bit_depth, 1);
|
||||||
png_colorp palette = NULL;
|
png_colorp palette = NULL;
|
||||||
int num_palette = 0;
|
int num_palette = 0;
|
||||||
|
|
||||||
if ((png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) &
|
if ((png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) &
|
||||||
PNG_INFO_PLTE) && num_palette > 0 && palette != NULL)
|
PNG_INFO_PLTE) &&
|
||||||
|
(num_palette > 0) &&
|
||||||
|
(palette != NULL))
|
||||||
{
|
{
|
||||||
png_bytep trans_alpha = NULL;
|
png_bytep trans_alpha = NULL;
|
||||||
int num_trans = 0;
|
int num_trans = 0;
|
||||||
if ((png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans,
|
if ((png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans,
|
||||||
NULL) & PNG_INFO_tRNS) && num_trans > 0 &&
|
NULL) & PNG_INFO_tRNS) &&
|
||||||
trans_alpha != NULL)
|
(num_trans > 0) &&
|
||||||
|
(trans_alpha != NULL))
|
||||||
printf("INDEXED %u = %d %d %d %d\n", index,
|
printf("INDEXED %u = %d %d %d %d\n", index,
|
||||||
palette[index].red, palette[index].green,
|
palette[index].red, palette[index].green,
|
||||||
palette[index].blue,
|
palette[index].blue,
|
||||||
index < num_trans ? trans_alpha[index] : 255);
|
index < num_trans ? trans_alpha[index] : 255);
|
||||||
|
|
||||||
else /* no transparency */
|
else /* no transparency */
|
||||||
printf("INDEXED %u = %d %d %d\n", index,
|
printf("INDEXED %u = %d %d %d\n", index, palette[index].red,
|
||||||
palette[index].red, palette[index].green,
|
palette[index].green, palette[index].blue);
|
||||||
palette[index].blue);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -117,20 +122,20 @@ print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row,
|
|||||||
|
|
||||||
case PNG_COLOR_TYPE_RGB:
|
case PNG_COLOR_TYPE_RGB:
|
||||||
printf("RGB %u %u %u\n", component(row, x, 0, bit_depth, 3),
|
printf("RGB %u %u %u\n", component(row, x, 0, bit_depth, 3),
|
||||||
component(row, x, 1, bit_depth, 3),
|
component(row, x, 1, bit_depth, 3),
|
||||||
component(row, x, 2, bit_depth, 3));
|
component(row, x, 2, bit_depth, 3));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case PNG_COLOR_TYPE_GRAY_ALPHA:
|
case PNG_COLOR_TYPE_GRAY_ALPHA:
|
||||||
printf("GRAY+ALPHA %u %u\n", component(row, x, 0, bit_depth, 2),
|
printf("GRAY+ALPHA %u %u\n", component(row, x, 0, bit_depth, 2),
|
||||||
component(row, x, 1, bit_depth, 2));
|
component(row, x, 1, bit_depth, 2));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case PNG_COLOR_TYPE_RGB_ALPHA:
|
case PNG_COLOR_TYPE_RGB_ALPHA:
|
||||||
printf("RGBA %u %u %u %u\n", component(row, x, 0, bit_depth, 4),
|
printf("RGBA %u %u %u %u\n", component(row, x, 0, bit_depth, 4),
|
||||||
component(row, x, 1, bit_depth, 4),
|
component(row, x, 1, bit_depth, 4),
|
||||||
component(row, x, 2, bit_depth, 4),
|
component(row, x, 2, bit_depth, 4),
|
||||||
component(row, x, 3, bit_depth, 4));
|
component(row, x, 3, bit_depth, 4));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -138,7 +143,8 @@ print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, const char **argv)
|
int
|
||||||
|
main(int argc, const char **argv)
|
||||||
{
|
{
|
||||||
/* This program uses the default, <setjmp.h> based, libpng error handling
|
/* This program uses the default, <setjmp.h> based, libpng error handling
|
||||||
* mechanism, therefore any local variable that exists before the call to
|
* mechanism, therefore any local variable that exists before the call to
|
||||||
@ -146,7 +152,7 @@ int main(int argc, const char **argv)
|
|||||||
* be declared with 'volatile' to ensure that their values don't get
|
* be declared with 'volatile' to ensure that their values don't get
|
||||||
* destroyed by longjmp:
|
* destroyed by longjmp:
|
||||||
*/
|
*/
|
||||||
volatile int result = 1/*fail*/;
|
volatile int result = 1 /*fail*/;
|
||||||
|
|
||||||
if (argc == 4)
|
if (argc == 4)
|
||||||
{
|
{
|
||||||
@ -163,8 +169,8 @@ int main(int argc, const char **argv)
|
|||||||
* writes error messages to stderr. Creating the png_struct is a
|
* writes error messages to stderr. Creating the png_struct is a
|
||||||
* little tricky; just copy the following code.
|
* little tricky; just copy the following code.
|
||||||
*/
|
*/
|
||||||
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
|
png_structp png_ptr =
|
||||||
NULL, NULL, NULL);
|
png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||||
|
|
||||||
if (png_ptr != NULL)
|
if (png_ptr != NULL)
|
||||||
{
|
{
|
||||||
@ -184,11 +190,11 @@ int main(int argc, const char **argv)
|
|||||||
compression_method, filter_method;
|
compression_method, filter_method;
|
||||||
png_bytep row_tmp;
|
png_bytep row_tmp;
|
||||||
|
|
||||||
/* Now associate the recently opened (FILE*) with the default
|
/* Now associate the recently opened FILE object with the
|
||||||
* libpng initialization functions. Sometimes libpng is
|
* default libpng initialization functions. Sometimes libpng
|
||||||
* compiled without stdio support (it can be difficult to do
|
* is compiled without stdio support (it can be difficult to
|
||||||
* in some environments); in that case you will have to write
|
* do in some environments); in that case you will have to
|
||||||
* your own read callback to read data from the (FILE*).
|
* write your own read callback to read data from the stream.
|
||||||
*/
|
*/
|
||||||
png_init_io(png_ptr, f);
|
png_init_io(png_ptr, f);
|
||||||
|
|
||||||
@ -202,21 +208,21 @@ int main(int argc, const char **argv)
|
|||||||
* space. In this case png_malloc is used - it will not
|
* space. In this case png_malloc is used - it will not
|
||||||
* return if memory isn't available.
|
* return if memory isn't available.
|
||||||
*/
|
*/
|
||||||
row = png_malloc(png_ptr, png_get_rowbytes(png_ptr,
|
row =
|
||||||
info_ptr));
|
png_malloc(png_ptr, png_get_rowbytes(png_ptr, info_ptr));
|
||||||
|
|
||||||
/* To avoid the overhead of using a volatile auto copy row_tmp
|
/* Avoid the overhead of using a volatile auto copy row_tmp
|
||||||
* to a local here - just use row for the png_free below.
|
* to a local here - just use row for the png_free below.
|
||||||
*/
|
*/
|
||||||
row_tmp = row;
|
row_tmp = row;
|
||||||
|
|
||||||
/* All the information we need is in the header is returned by
|
/* All the information we need is in the header returned by
|
||||||
* png_get_IHDR, if this fails we can now use 'png_error' to
|
* png_get_IHDR. If this fails, we can use 'png_error' to
|
||||||
* signal the error and return control to the setjmp above.
|
* signal the error and return control to the setjmp above.
|
||||||
*/
|
*/
|
||||||
if (png_get_IHDR(png_ptr, info_ptr, &width, &height,
|
if (png_get_IHDR(png_ptr, info_ptr, &width, &height,
|
||||||
&bit_depth, &color_type, &interlace_method,
|
&bit_depth, &color_type, &interlace_method,
|
||||||
&compression_method, &filter_method))
|
&compression_method, &filter_method))
|
||||||
{
|
{
|
||||||
int passes, pass;
|
int passes, pass;
|
||||||
|
|
||||||
@ -242,7 +248,7 @@ int main(int argc, const char **argv)
|
|||||||
/* Now read the pixels, pass-by-pass, row-by-row: */
|
/* Now read the pixels, pass-by-pass, row-by-row: */
|
||||||
png_start_read_image(png_ptr);
|
png_start_read_image(png_ptr);
|
||||||
|
|
||||||
for (pass=0; pass<passes; ++pass)
|
for (pass = 0; pass < passes; ++pass)
|
||||||
{
|
{
|
||||||
png_uint_32 ystart, xstart, ystep, xstep;
|
png_uint_32 ystart, xstart, ystep, xstep;
|
||||||
png_uint_32 py;
|
png_uint_32 py;
|
||||||
@ -299,19 +305,27 @@ int main(int argc, const char **argv)
|
|||||||
* are, of course, much better ways of doing this
|
* are, of course, much better ways of doing this
|
||||||
* than using a for loop:
|
* than using a for loop:
|
||||||
*/
|
*/
|
||||||
if (y == py) for (px = xstart, ppx = 0;
|
if (y == py)
|
||||||
px < width; px += xstep, ++ppx) if (x == px)
|
|
||||||
{
|
{
|
||||||
/* 'ppx' is the index of the pixel in the row
|
for (px = xstart, ppx = 0;
|
||||||
* buffer.
|
px < width;
|
||||||
*/
|
px += xstep, ++ppx)
|
||||||
print_pixel(png_ptr, info_ptr, row_tmp, ppx);
|
{
|
||||||
|
if (x == px)
|
||||||
|
{
|
||||||
|
/* 'ppx' is the index of the pixel in the
|
||||||
|
* row buffer.
|
||||||
|
*/
|
||||||
|
print_pixel(png_ptr, info_ptr, row_tmp,
|
||||||
|
ppx);
|
||||||
|
|
||||||
/* Now terminate the loops early - we have
|
/* Now terminate the loops early - we have
|
||||||
* found and handled the required data.
|
* found and handled the required data.
|
||||||
*/
|
*/
|
||||||
goto pass_loop_end;
|
goto pass_loop_end;
|
||||||
} /* x loop */
|
} /* x loop */
|
||||||
|
}
|
||||||
|
}
|
||||||
} /* y loop */
|
} /* y loop */
|
||||||
} /* pass loop */
|
} /* pass loop */
|
||||||
|
|
||||||
@ -323,7 +337,6 @@ int main(int argc, const char **argv)
|
|||||||
|
|
||||||
else
|
else
|
||||||
png_error(png_ptr, "pngpixel: png_get_IHDR failed");
|
png_error(png_ptr, "pngpixel: png_get_IHDR failed");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -349,7 +362,8 @@ int main(int argc, const char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
fprintf(stderr, "pngpixel: out of memory allocating png_info\n");
|
fprintf(stderr,
|
||||||
|
"pngpixel: out of memory allocating png_info\n");
|
||||||
|
|
||||||
png_destroy_read_struct(&png_ptr, NULL, NULL);
|
png_destroy_read_struct(&png_ptr, NULL, NULL);
|
||||||
}
|
}
|
||||||
@ -368,4 +382,3 @@ int main(int argc, const char **argv)
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif /* READ && SEQUENTIAL_READ */
|
|
||||||
|
@ -5,13 +5,11 @@
|
|||||||
* related or neighboring rights to this work. This work is published from:
|
* related or neighboring rights to this work. This work is published from:
|
||||||
* United States.
|
* United States.
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.29 [March 16, 2017]
|
|
||||||
*
|
|
||||||
* Read a PNG and write it out in a fixed format, using the 'simplified API'
|
* Read a PNG and write it out in a fixed format, using the 'simplified API'
|
||||||
* that was introduced in libpng-1.6.0.
|
* that was introduced in libpng-1.6.0.
|
||||||
*
|
*
|
||||||
* This sample code is just the code from the top of 'example.c' with some error
|
* This sample code is just the code from 'example.c' with some error handling
|
||||||
* handling added. See example.c for more comments.
|
* added. See example.c in the top-level libpng directory for more comments.
|
||||||
*/
|
*/
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -22,10 +20,15 @@
|
|||||||
* ensure the code picks up the local libpng implementation:
|
* ensure the code picks up the local libpng implementation:
|
||||||
*/
|
*/
|
||||||
#include "../../png.h"
|
#include "../../png.h"
|
||||||
#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) && \
|
|
||||||
defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
|
|
||||||
|
|
||||||
int main(int argc, const char **argv)
|
#if !defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \
|
||||||
|
!defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
|
||||||
|
#error This program requires libpng supporting the simplified read/write API
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, const char **argv)
|
||||||
{
|
{
|
||||||
int result = 1;
|
int result = 1;
|
||||||
|
|
||||||
@ -50,22 +53,22 @@ int main(int argc, const char **argv)
|
|||||||
|
|
||||||
if (buffer != NULL)
|
if (buffer != NULL)
|
||||||
{
|
{
|
||||||
if (png_image_finish_read(&image, NULL/*background*/, buffer,
|
if (png_image_finish_read(&image, NULL /*background*/, buffer,
|
||||||
0/*row_stride*/, NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP */))
|
0 /*row_stride*/, NULL /*colormap */))
|
||||||
{
|
{
|
||||||
if (png_image_write_to_file(&image, argv[2],
|
if (png_image_write_to_file(
|
||||||
0/*convert_to_8bit*/, buffer, 0/*row_stride*/,
|
&image, argv[2], 0 /*convert_to_8bit*/, buffer,
|
||||||
NULL/*colormap*/))
|
0 /*row_stride*/, NULL /*colormap*/))
|
||||||
result = 0;
|
result = 0;
|
||||||
|
|
||||||
else
|
else
|
||||||
fprintf(stderr, "pngtopng: write %s: %s\n", argv[2],
|
fprintf(stderr, "pngtopng: write %s: %s\n", argv[2],
|
||||||
image.message);
|
image.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
fprintf(stderr, "pngtopng: read %s: %s\n", argv[1],
|
fprintf(stderr, "pngtopng: read %s: %s\n", argv[1],
|
||||||
image.message);
|
image.message);
|
||||||
|
|
||||||
free(buffer);
|
free(buffer);
|
||||||
}
|
}
|
||||||
@ -73,7 +76,7 @@ int main(int argc, const char **argv)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "pngtopng: out of memory: %lu bytes\n",
|
fprintf(stderr, "pngtopng: out of memory: %lu bytes\n",
|
||||||
(unsigned long)PNG_IMAGE_SIZE(image));
|
(unsigned long)PNG_IMAGE_SIZE(image));
|
||||||
|
|
||||||
/* This is the only place where a 'free' is required; libpng does
|
/* This is the only place where a 'free' is required; libpng does
|
||||||
* the cleanup on error and success, but in this case we couldn't
|
* the cleanup on error and success, but in this case we couldn't
|
||||||
@ -95,4 +98,3 @@ int main(int argc, const char **argv)
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif /* READ && WRITE */
|
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
* United States.
|
* United States.
|
||||||
*
|
*
|
||||||
* Read several PNG files, which should have an alpha channel or transparency
|
* Read several PNG files, which should have an alpha channel or transparency
|
||||||
* information, and composite them together to produce one or more 16-bit linear
|
* information, and composite them together to produce one or more 16-bit
|
||||||
* RGBA intermediates. This involves doing the correct 'over' composition to
|
* linear RGBA intermediates. This involves doing the 'over' compositing
|
||||||
* combine the alpha channels and corresponding data.
|
* operation to combine the alpha channels and corresponding data.
|
||||||
*
|
*
|
||||||
* Finally read an output (background) PNG using the 24-bit RGB format (the
|
* Finally read an output (background) PNG using the 24-bit RGB format (the
|
||||||
* PNG will be composited on green (#00ff00) by default if it has an alpha
|
* PNG will be composited on green (#00ff00) by default if it has an alpha
|
||||||
@ -28,8 +28,8 @@
|
|||||||
* correctly. Apart from the libpng Simplified API the only work done in here
|
* correctly. Apart from the libpng Simplified API the only work done in here
|
||||||
* is to combine multiple input PNG images into a single sprite; this involves
|
* is to combine multiple input PNG images into a single sprite; this involves
|
||||||
* a Porter-Duff 'over' operation and the input PNG images may, as a result,
|
* a Porter-Duff 'over' operation and the input PNG images may, as a result,
|
||||||
* be regarded as being layered one on top of the other with the first (leftmost
|
* be regarded as being layered one on top of the other with the first
|
||||||
* on the command line) being at the bottom and the last on the top.
|
* (leftmost on the command line) being at the bottom and the last on the top.
|
||||||
*/
|
*/
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -44,54 +44,61 @@
|
|||||||
*/
|
*/
|
||||||
#include "../../png.h"
|
#include "../../png.h"
|
||||||
|
|
||||||
#ifdef PNG_SIMPLIFIED_READ_SUPPORTED
|
#if !defined(PNG_SIMPLIFIED_READ_SUPPORTED)
|
||||||
|
#error This program requires libpng supporting the simplified read API
|
||||||
|
#endif
|
||||||
|
|
||||||
#define sprite_name_chars 15
|
#define sprite_name_chars 15
|
||||||
struct sprite {
|
struct sprite
|
||||||
FILE *file;
|
{
|
||||||
png_uint_16p buffer;
|
FILE *file;
|
||||||
unsigned int width;
|
png_uint_16p buffer;
|
||||||
unsigned int height;
|
unsigned int width;
|
||||||
char name[sprite_name_chars+1];
|
unsigned int height;
|
||||||
|
char name[sprite_name_chars + 1];
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 0 /* div by 65535 test program */
|
#if 0 /* div by 65535 test program */
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int main(void) {
|
int
|
||||||
|
main(void)
|
||||||
|
{
|
||||||
double err = 0;
|
double err = 0;
|
||||||
unsigned int xerr = 0;
|
unsigned int xerr = 0;
|
||||||
unsigned int r = 32769;
|
unsigned int r = 32769;
|
||||||
|
unsigned int x = 0;
|
||||||
|
|
||||||
|
do
|
||||||
{
|
{
|
||||||
unsigned int x = 0;
|
unsigned int t = x + (x >> 16) /*+ (x >> 31)*/ + r;
|
||||||
|
double v = x, errtest;
|
||||||
|
|
||||||
do {
|
if (t < x)
|
||||||
unsigned int t = x + (x >> 16) /*+ (x >> 31)*/ + r;
|
{
|
||||||
double v = x, errtest;
|
fprintf(stderr, "overflow: %u+%u -> %u\n", x, r, t);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (t < x) {
|
v /= 65535;
|
||||||
fprintf(stderr, "overflow: %u+%u -> %u\n", x, r, t);
|
errtest = v;
|
||||||
return 1;
|
t >>= 16;
|
||||||
|
errtest -= t;
|
||||||
|
|
||||||
|
if (errtest > err)
|
||||||
|
{
|
||||||
|
err = errtest;
|
||||||
|
xerr = x;
|
||||||
|
|
||||||
|
if (errtest >= .5)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "error: %u/65535 = %f, not %u, error %f\n",
|
||||||
|
x, v, t, errtest);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
v /= 65535;
|
} while (++x <= 65535U * 65535U);
|
||||||
errtest = v;
|
|
||||||
t >>= 16;
|
|
||||||
errtest -= t;
|
|
||||||
|
|
||||||
if (errtest > err) {
|
|
||||||
err = errtest;
|
|
||||||
xerr = x;
|
|
||||||
|
|
||||||
if (errtest >= .5) {
|
|
||||||
fprintf(stderr, "error: %u/65535 = %f, not %u, error %f\n",
|
|
||||||
x, v, t, errtest);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} while (++x <= 65535U*65535U);
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("error %f @ %u\n", err, xerr);
|
printf("error %f @ %u\n", err, xerr);
|
||||||
|
|
||||||
@ -101,7 +108,7 @@ int main(void) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sprite_op(const struct sprite *sprite, int x_offset, int y_offset,
|
sprite_op(const struct sprite *sprite, int x_offset, int y_offset,
|
||||||
png_imagep image, const png_uint_16 *buffer)
|
png_imagep image, const png_uint_16 *buffer)
|
||||||
{
|
{
|
||||||
/* This is where the Porter-Duff 'Over' operator is evaluated; change this
|
/* This is where the Porter-Duff 'Over' operator is evaluated; change this
|
||||||
* code to change the operator (this could be parameterized). Any other
|
* code to change the operator (this could be parameterized). Any other
|
||||||
@ -112,8 +119,8 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset,
|
|||||||
/* Check for an x or y offset that pushes any part of the image beyond the
|
/* Check for an x or y offset that pushes any part of the image beyond the
|
||||||
* right or bottom of the sprite:
|
* right or bottom of the sprite:
|
||||||
*/
|
*/
|
||||||
if ((y_offset < 0 || (unsigned)/*SAFE*/y_offset < sprite->height) &&
|
if ((y_offset < 0 || /*SAFE*/ (unsigned)y_offset < sprite->height) &&
|
||||||
(x_offset < 0 || (unsigned)/*SAFE*/x_offset < sprite->width))
|
(x_offset < 0 || /*SAFE*/ (unsigned)x_offset < sprite->width))
|
||||||
{
|
{
|
||||||
unsigned int y = 0;
|
unsigned int y = 0;
|
||||||
|
|
||||||
@ -130,7 +137,7 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset,
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
/* In and out are RGBA values, so: */
|
/* In and out are RGBA values, so: */
|
||||||
const png_uint_16 *in_pixel = buffer + (y * image->width + x)*4;
|
const png_uint_16 *in_pixel = buffer + (y * image->width + x) * 4;
|
||||||
png_uint_32 in_alpha = in_pixel[3];
|
png_uint_32 in_alpha = in_pixel[3];
|
||||||
|
|
||||||
/* This is the optimized Porter-Duff 'Over' operation, when the
|
/* This is the optimized Porter-Duff 'Over' operation, when the
|
||||||
@ -139,10 +146,10 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset,
|
|||||||
if (in_alpha > 0)
|
if (in_alpha > 0)
|
||||||
{
|
{
|
||||||
png_uint_16 *out_pixel = sprite->buffer +
|
png_uint_16 *out_pixel = sprite->buffer +
|
||||||
((y+y_offset) * sprite->width + (x+x_offset))*4;
|
((y + y_offset) * sprite->width + (x + x_offset)) * 4;
|
||||||
|
|
||||||
/* This is the weight to apply to the output: */
|
/* This is the weight to apply to the output: */
|
||||||
in_alpha = 65535-in_alpha;
|
in_alpha = 65535 - in_alpha;
|
||||||
|
|
||||||
if (in_alpha > 0)
|
if (in_alpha > 0)
|
||||||
{
|
{
|
||||||
@ -159,9 +166,9 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset,
|
|||||||
*/
|
*/
|
||||||
png_uint_32 tmp;
|
png_uint_32 tmp;
|
||||||
|
|
||||||
# define compose(c)\
|
# define compose(c) \
|
||||||
tmp = out_pixel[c] * in_alpha;\
|
tmp = out_pixel[c] * in_alpha; \
|
||||||
tmp = (tmp + (tmp >> 16) + 32769) >> 16;\
|
tmp = (tmp + (tmp >> 16) + 32769) >> 16; \
|
||||||
out_pixel[c] = tmp + in_pixel[c]
|
out_pixel[c] = tmp + in_pixel[c]
|
||||||
|
|
||||||
/* The following is very vectorizable... */
|
/* The following is very vectorizable... */
|
||||||
@ -172,15 +179,15 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset,
|
|||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
out_pixel[0] = in_pixel[0],
|
{
|
||||||
out_pixel[1] = in_pixel[1],
|
out_pixel[0] = in_pixel[0];
|
||||||
out_pixel[2] = in_pixel[2],
|
out_pixel[1] = in_pixel[1];
|
||||||
|
out_pixel[2] = in_pixel[2];
|
||||||
out_pixel[3] = in_pixel[3];
|
out_pixel[3] = in_pixel[3];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
} while (++x < image->width);
|
||||||
while (++x < image->width);
|
} while (++y < image->height);
|
||||||
}
|
|
||||||
while (++y < image->height);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,9 +231,8 @@ create_sprite(struct sprite *sprite, int *argc, const char ***argv)
|
|||||||
|
|
||||||
if (buffer != NULL)
|
if (buffer != NULL)
|
||||||
{
|
{
|
||||||
if (png_image_finish_read(&image, NULL/*background*/, buffer,
|
if (png_image_finish_read(&image, NULL /*background*/, buffer,
|
||||||
0/*row_stride*/,
|
0 /*row_stride*/, NULL /*colormap*/))
|
||||||
NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP*/))
|
|
||||||
{
|
{
|
||||||
/* This is the place where the Porter-Duff 'Over' operator
|
/* This is the place where the Porter-Duff 'Over' operator
|
||||||
* needs to be done by this code. In fact, any image
|
* needs to be done by this code. In fact, any image
|
||||||
@ -245,14 +251,14 @@ create_sprite(struct sprite *sprite, int *argc, const char ***argv)
|
|||||||
{
|
{
|
||||||
free(buffer);
|
free(buffer);
|
||||||
fprintf(stderr, "simpleover: read %s: %s\n", (*argv)[0],
|
fprintf(stderr, "simpleover: read %s: %s\n", (*argv)[0],
|
||||||
image.message);
|
image.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "simpleover: out of memory: %lu bytes\n",
|
fprintf(stderr, "simpleover: out of memory: %lu bytes\n",
|
||||||
(unsigned long)PNG_IMAGE_SIZE(image));
|
(unsigned long)PNG_IMAGE_SIZE(image));
|
||||||
|
|
||||||
/* png_image_free must be called if we abort the Simplified API
|
/* png_image_free must be called if we abort the Simplified API
|
||||||
* read because of a problem detected in this code. If problems
|
* read because of a problem detected in this code. If problems
|
||||||
@ -290,8 +296,9 @@ create_sprite(struct sprite *sprite, int *argc, const char ***argv)
|
|||||||
save.flags = PNG_IMAGE_FLAG_FAST;
|
save.flags = PNG_IMAGE_FLAG_FAST;
|
||||||
save.colormap_entries = 0;
|
save.colormap_entries = 0;
|
||||||
|
|
||||||
if (png_image_write_to_stdio(&save, sprite->file, 1/*convert_to_8_bit*/,
|
if (png_image_write_to_stdio(&save, sprite->file, 1 /*convert_to_8_bit*/,
|
||||||
sprite->buffer, 0/*row_stride*/, NULL/*colormap*/))
|
sprite->buffer, 0 /*row_stride*/,
|
||||||
|
NULL /*colormap*/))
|
||||||
{
|
{
|
||||||
/* Success; the buffer is no longer needed: */
|
/* Success; the buffer is no longer needed: */
|
||||||
free(sprite->buffer);
|
free(sprite->buffer);
|
||||||
@ -301,19 +308,20 @@ create_sprite(struct sprite *sprite, int *argc, const char ***argv)
|
|||||||
|
|
||||||
else
|
else
|
||||||
fprintf(stderr, "simpleover: write sprite %s: %s\n", sprite->name,
|
fprintf(stderr, "simpleover: write sprite %s: %s\n", sprite->name,
|
||||||
save.message);
|
save.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
fprintf(stderr, "simpleover: sprite %s: could not allocate tmpfile: %s\n",
|
fprintf(stderr,
|
||||||
sprite->name, strerror(errno));
|
"simpleover: sprite %s: could not allocate tmpfile: %s\n",
|
||||||
|
sprite->name, strerror(errno));
|
||||||
|
|
||||||
return 0; /* fail */
|
return 0; /* fail */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite,
|
add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite,
|
||||||
int *argc, const char ***argv)
|
int *argc, const char ***argv)
|
||||||
{
|
{
|
||||||
/* Given a --add argument naming this sprite, perform the operations listed
|
/* Given a --add argument naming this sprite, perform the operations listed
|
||||||
* in the following arguments. The arguments are expected to have the form
|
* in the following arguments. The arguments are expected to have the form
|
||||||
@ -334,13 +342,13 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite,
|
|||||||
* will fit.
|
* will fit.
|
||||||
*/
|
*/
|
||||||
if (x < 0 || y < 0 ||
|
if (x < 0 || y < 0 ||
|
||||||
(unsigned)/*SAFE*/x >= output->width ||
|
/*SAFE*/ (unsigned)x >= output->width ||
|
||||||
(unsigned)/*SAFE*/y >= output->height ||
|
/*SAFE*/ (unsigned)y >= output->height ||
|
||||||
sprite->width > output->width-x ||
|
sprite->width > output->width - x ||
|
||||||
sprite->height > output->height-y)
|
sprite->height > output->height - y)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "simpleover: sprite %s @ (%d,%d) outside image\n",
|
fprintf(stderr, "simpleover: sprite %s @ (%d,%d) outside image\n",
|
||||||
sprite->name, x, y);
|
sprite->name, x, y);
|
||||||
/* Could just skip this, but for the moment it is an error */
|
/* Could just skip this, but for the moment it is an error */
|
||||||
return 0; /* error */
|
return 0; /* error */
|
||||||
}
|
}
|
||||||
@ -359,10 +367,10 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite,
|
|||||||
{
|
{
|
||||||
in.format = PNG_FORMAT_RGB; /* force compose */
|
in.format = PNG_FORMAT_RGB; /* force compose */
|
||||||
|
|
||||||
if (png_image_finish_read(&in, NULL/*background*/,
|
if (png_image_finish_read(
|
||||||
out_buf + (y*output->width + x)*3/*RGB*/,
|
&in, NULL /*background*/,
|
||||||
output->width*3/*row_stride*/,
|
out_buf + (y * output->width + x) * 3 /*RGB*/,
|
||||||
NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP*/))
|
output->width * 3 /*row_stride*/, NULL /*colormap*/))
|
||||||
{
|
{
|
||||||
++*argv, --*argc;
|
++*argv, --*argc;
|
||||||
continue;
|
continue;
|
||||||
@ -371,7 +379,7 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite,
|
|||||||
|
|
||||||
/* The read failed: */
|
/* The read failed: */
|
||||||
fprintf(stderr, "simpleover: add sprite %s: %s\n", sprite->name,
|
fprintf(stderr, "simpleover: add sprite %s: %s\n", sprite->name,
|
||||||
in.message);
|
in.message);
|
||||||
return 0; /* error */
|
return 0; /* error */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -379,7 +387,7 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "simpleover: --add='%s': invalid position %s\n",
|
fprintf(stderr, "simpleover: --add='%s': invalid position %s\n",
|
||||||
sprite->name, (*argv)[0]);
|
sprite->name, (*argv)[0]);
|
||||||
return 0; /* error */
|
return 0; /* error */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -389,10 +397,10 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
||||||
const char **argv)
|
const char **argv)
|
||||||
{
|
{
|
||||||
int result = 1; /* success */
|
int result = 1; /* success */
|
||||||
# define csprites 10/*limit*/
|
# define csprites 10 /*limit*/
|
||||||
# define str(a) #a
|
# define str(a) #a
|
||||||
int nsprites = 0;
|
int nsprites = 0;
|
||||||
struct sprite sprites[csprites];
|
struct sprite sprites[csprites];
|
||||||
@ -412,23 +420,25 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
|||||||
sprites[nsprites].width = sprites[nsprites].height = 0;
|
sprites[nsprites].width = sprites[nsprites].height = 0;
|
||||||
sprites[nsprites].name[0] = 0;
|
sprites[nsprites].name[0] = 0;
|
||||||
|
|
||||||
n = sscanf(argv[0], "--sprite=%u,%u,%" str(sprite_name_chars) "s%c",
|
n = sscanf(argv[0],
|
||||||
&sprites[nsprites].width, &sprites[nsprites].height,
|
"--sprite=%u,%u,%" str(sprite_name_chars) "s%c",
|
||||||
sprites[nsprites].name, &tombstone);
|
&sprites[nsprites].width, &sprites[nsprites].height,
|
||||||
|
sprites[nsprites].name, &tombstone);
|
||||||
|
|
||||||
if ((n == 2 || n == 3) &&
|
if ((n == 2 || n == 3) &&
|
||||||
sprites[nsprites].width > 0 && sprites[nsprites].height > 0)
|
(sprites[nsprites].width > 0) &&
|
||||||
|
(sprites[nsprites].height > 0))
|
||||||
{
|
{
|
||||||
size_t buf_size, tmp;
|
size_t buf_size, tmp;
|
||||||
|
|
||||||
/* Default a name if not given. */
|
/* Default a name if not given. */
|
||||||
if (sprites[nsprites].name[0] == 0)
|
if (sprites[nsprites].name[0] == 0)
|
||||||
sprintf(sprites[nsprites].name, "sprite-%d", nsprites+1);
|
sprintf(sprites[nsprites].name, "sprite-%d", nsprites + 1);
|
||||||
|
|
||||||
/* Allocate a buffer for the sprite and calculate the buffer
|
/* Allocate a buffer for the sprite and calculate the buffer
|
||||||
* size:
|
* size:
|
||||||
*/
|
*/
|
||||||
buf_size = sizeof (png_uint_16 [4]);
|
buf_size = sizeof(png_uint_16[4]);
|
||||||
buf_size *= sprites[nsprites].width;
|
buf_size *= sprites[nsprites].width;
|
||||||
buf_size *= sprites[nsprites].height;
|
buf_size *= sprites[nsprites].height;
|
||||||
|
|
||||||
@ -437,7 +447,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
|||||||
tmp /= sprites[nsprites].width;
|
tmp /= sprites[nsprites].width;
|
||||||
tmp /= sprites[nsprites].height;
|
tmp /= sprites[nsprites].height;
|
||||||
|
|
||||||
if (tmp == sizeof (png_uint_16 [4]))
|
if (tmp == sizeof(png_uint_16[4]))
|
||||||
{
|
{
|
||||||
sprites[nsprites].buffer = malloc(buf_size);
|
sprites[nsprites].buffer = malloc(buf_size);
|
||||||
/* This buffer must be initialized to transparent: */
|
/* This buffer must be initialized to transparent: */
|
||||||
@ -448,7 +458,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
|||||||
sprites[nsprites].file = NULL;
|
sprites[nsprites].file = NULL;
|
||||||
++argv, --argc;
|
++argv, --argc;
|
||||||
|
|
||||||
if (create_sprite(sprites+nsprites++, &argc, &argv))
|
if (create_sprite(sprites + nsprites++, &argc, &argv))
|
||||||
{
|
{
|
||||||
result = 1; /* still ok */
|
result = 1; /* still ok */
|
||||||
continue;
|
continue;
|
||||||
@ -466,7 +476,8 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "simpleover: %s: invalid sprite (%u,%u)\n",
|
fprintf(stderr, "simpleover: %s: invalid sprite (%u,%u)\n",
|
||||||
argv[0], sprites[nsprites].width, sprites[nsprites].height);
|
argv[0],
|
||||||
|
sprites[nsprites].width, sprites[nsprites].height);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -480,7 +491,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
|||||||
|
|
||||||
else if (strncmp(argv[0], "--add=", 6) == 0)
|
else if (strncmp(argv[0], "--add=", 6) == 0)
|
||||||
{
|
{
|
||||||
const char *name = argv[0]+6;
|
const char *name = argv[0] + 6;
|
||||||
int isprite = nsprites;
|
int isprite = nsprites;
|
||||||
|
|
||||||
++argv, --argc;
|
++argv, --argc;
|
||||||
@ -489,7 +500,8 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
|||||||
{
|
{
|
||||||
if (strcmp(sprites[isprite].name, name) == 0)
|
if (strcmp(sprites[isprite].name, name) == 0)
|
||||||
{
|
{
|
||||||
if (!add_sprite(output, out_buf, sprites+isprite, &argc, &argv))
|
if (!add_sprite(output, out_buf, sprites + isprite,
|
||||||
|
&argc, &argv))
|
||||||
goto out; /* error in add_sprite */
|
goto out; /* error in add_sprite */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -498,7 +510,8 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
|||||||
|
|
||||||
if (isprite < 0) /* sprite not found */
|
if (isprite < 0) /* sprite not found */
|
||||||
{
|
{
|
||||||
fprintf(stderr, "simpleover: --add='%s': sprite not found\n", name);
|
fprintf(stderr, "simpleover: --add='%s': sprite not found\n",
|
||||||
|
name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -526,7 +539,8 @@ out:
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, const char **argv)
|
int
|
||||||
|
main(int argc, const char **argv)
|
||||||
{
|
{
|
||||||
int result = 1; /* default to fail */
|
int result = 1; /* default to fail */
|
||||||
|
|
||||||
@ -536,7 +550,7 @@ int main(int argc, const char **argv)
|
|||||||
const char *output = NULL;
|
const char *output = NULL;
|
||||||
png_image image;
|
png_image image;
|
||||||
|
|
||||||
if (argc > 2 && argv[2][0] != '-'/*an operation*/)
|
if (argc > 2 && argv[2][0] != '-' /*an operation*/)
|
||||||
{
|
{
|
||||||
output = argv[2];
|
output = argv[2];
|
||||||
argi = 3;
|
argi = 3;
|
||||||
@ -558,7 +572,7 @@ int main(int argc, const char **argv)
|
|||||||
png_color background = {0, 0xff, 0}; /* fully saturated green */
|
png_color background = {0, 0xff, 0}; /* fully saturated green */
|
||||||
|
|
||||||
if (png_image_finish_read(&image, &background, buffer,
|
if (png_image_finish_read(&image, &background, buffer,
|
||||||
0/*row_stride*/, NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP */))
|
0 /*row_stride*/, NULL /*colormap*/))
|
||||||
{
|
{
|
||||||
/* At this point png_image_finish_read has cleaned up the
|
/* At this point png_image_finish_read has cleaned up the
|
||||||
* allocated data in png_image, and only the buffer needs to be
|
* allocated data in png_image, and only the buffer needs to be
|
||||||
@ -566,22 +580,24 @@ int main(int argc, const char **argv)
|
|||||||
*
|
*
|
||||||
* Perform the remaining operations:
|
* Perform the remaining operations:
|
||||||
*/
|
*/
|
||||||
if (simpleover_process(&image, buffer, argc-argi, argv+argi))
|
if (simpleover_process(&image, buffer,
|
||||||
|
argc - argi, argv + argi))
|
||||||
{
|
{
|
||||||
/* Write the output: */
|
/* Write the output: */
|
||||||
if ((output != NULL &&
|
if ((output != NULL &&
|
||||||
png_image_write_to_file(&image, output,
|
png_image_write_to_file(
|
||||||
0/*convert_to_8bit*/, buffer, 0/*row_stride*/,
|
&image, output, 0 /*convert_to_8bit*/, buffer,
|
||||||
NULL/*colormap*/)) ||
|
0 /*row_stride*/, NULL /*colormap*/)) ||
|
||||||
(output == NULL &&
|
(output == NULL &&
|
||||||
png_image_write_to_stdio(&image, stdout,
|
png_image_write_to_stdio(
|
||||||
0/*convert_to_8bit*/, buffer, 0/*row_stride*/,
|
&image, stdout, 0 /*convert_to_8bit*/, buffer,
|
||||||
NULL/*colormap*/)))
|
0 /*row_stride*/, NULL /*colormap*/)))
|
||||||
result = 0;
|
result = 0;
|
||||||
|
|
||||||
else
|
else
|
||||||
fprintf(stderr, "simpleover: write %s: %s\n",
|
fprintf(stderr, "simpleover: write %s: %s\n",
|
||||||
output == NULL ? "stdout" : output, image.message);
|
output == NULL ? "stdout" : output,
|
||||||
|
image.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* else simpleover_process writes an error message */
|
/* else simpleover_process writes an error message */
|
||||||
@ -589,7 +605,7 @@ int main(int argc, const char **argv)
|
|||||||
|
|
||||||
else
|
else
|
||||||
fprintf(stderr, "simpleover: read %s: %s\n", argv[1],
|
fprintf(stderr, "simpleover: read %s: %s\n", argv[1],
|
||||||
image.message);
|
image.message);
|
||||||
|
|
||||||
free(buffer);
|
free(buffer);
|
||||||
}
|
}
|
||||||
@ -597,7 +613,7 @@ int main(int argc, const char **argv)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "simpleover: out of memory: %lu bytes\n",
|
fprintf(stderr, "simpleover: out of memory: %lu bytes\n",
|
||||||
(unsigned long)PNG_IMAGE_SIZE(image));
|
(unsigned long)PNG_IMAGE_SIZE(image));
|
||||||
|
|
||||||
/* This is the only place where a 'free' is required; libpng does
|
/* This is the only place where a 'free' is required; libpng does
|
||||||
* the cleanup on error and success, but in this case we couldn't
|
* the cleanup on error and success, but in this case we couldn't
|
||||||
@ -617,7 +633,8 @@ int main(int argc, const char **argv)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Usage message */
|
/* Usage message */
|
||||||
fprintf(stderr,
|
fprintf(
|
||||||
|
stderr,
|
||||||
"simpleover: usage: simpleover background.png [output.png]\n"
|
"simpleover: usage: simpleover background.png [output.png]\n"
|
||||||
" Output 'background.png' as a 24-bit RGB PNG file in 'output.png'\n"
|
" Output 'background.png' as a 24-bit RGB PNG file in 'output.png'\n"
|
||||||
" or, if not given, stdout. 'background.png' will be composited\n"
|
" or, if not given, stdout. 'background.png' will be composited\n"
|
||||||
@ -628,13 +645,13 @@ int main(int argc, const char **argv)
|
|||||||
" --sprite=width,height,name {[--at=x,y] {sprite.png}}\n"
|
" --sprite=width,height,name {[--at=x,y] {sprite.png}}\n"
|
||||||
" Produce a transparent sprite of size (width,height) and with\n"
|
" Produce a transparent sprite of size (width,height) and with\n"
|
||||||
" name 'name'.\n"
|
" name 'name'.\n"
|
||||||
" For each sprite.png composite it using a Porter-Duff 'Over'\n"
|
" For each sprite.png composite it is using a Porter-Duff 'Over'\n"
|
||||||
" operation at offset (x,y) in the sprite (defaulting to (0,0)).\n"
|
" operation at offset (x,y) in the sprite, defaulting to (0,0).\n"
|
||||||
" Input PNGs will be truncated to the area of the sprite.\n"
|
" Input PNGs will be truncated to the area of the sprite.\n"
|
||||||
"\n"
|
"\n"
|
||||||
" --add='name' {x,y}\n"
|
" --add='name' {x,y}\n"
|
||||||
" Optionally, before output, composite a sprite, 'name', which\n"
|
" Optionally, before output, composite a sprite, 'name', which\n"
|
||||||
" must have been previously produced using --sprite, at each\n"
|
" must have been previously produced using --sprite at each\n"
|
||||||
" offset (x,y) in the output image. Each sprite must fit\n"
|
" offset (x,y) in the output image. Each sprite must fit\n"
|
||||||
" completely within the output image.\n"
|
" completely within the output image.\n"
|
||||||
"\n"
|
"\n"
|
||||||
@ -645,4 +662,3 @@ int main(int argc, const char **argv)
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif /* SIMPLIFIED_READ */
|
|
||||||
|
@ -146,7 +146,7 @@ int readpng2_init(mainprog_info *mainprog_ptr)
|
|||||||
/* These byte strings were copied from png.h. If a future version
|
/* These byte strings were copied from png.h. If a future version
|
||||||
* of readpng2.c recognizes more chunks, add them to this list.
|
* of readpng2.c recognizes more chunks, add them to this list.
|
||||||
*/
|
*/
|
||||||
static PNG_CONST png_byte chunks_to_process[] = {
|
static const png_byte chunks_to_process[] = {
|
||||||
98, 75, 71, 68, '\0', /* bKGD */
|
98, 75, 71, 68, '\0', /* bKGD */
|
||||||
103, 65, 77, 65, '\0', /* gAMA */
|
103, 65, 77, 65, '\0', /* gAMA */
|
||||||
115, 82, 71, 66, '\0', /* sRGB */
|
115, 82, 71, 66, '\0', /* sRGB */
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user