-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathlinux_thirdparty.bash
More file actions
2468 lines (2093 loc) · 73 KB
/
linux_thirdparty.bash
File metadata and controls
2468 lines (2093 loc) · 73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
set -eu
set -o pipefail
if [ "$CC" = /work/slimcc/slimcc ]; then
is_CI=
SRC_DIR=`dirname $CC`
MUON=muon
fi
test_ag() {
git_fetch https://github.com/aswild/the_silver_searcher 7b571a8a94d0e22a06e3313cb0d9672b416fb2c1 ag
sh autogen.sh
./configure && make test
}
test_apk() {
github_tar alpinelinux apk-tools v3.0.5
rm test/user/mkpkg.sh # permission
muon_init -Dpython=disabled -Dhelp=enabled -Dlua_bin=luajit
muon_build
muon_test
}
test_argtable3() {
github_tar argtable argtable3 v3.3.1
cmake_init
make && ctest
}
test_bash() {
url_tar https://ftpmirror.gnu.org/gnu/bash/bash-5.3.tar.gz bash
fix_and_configure
make test
}
test_bearssl() {
url_tar https://bearssl.org/bearssl-0.6.tar.gz bearssl
make CC=$CC LDDLL=$CC LD=$CC
build/testcrypto all
build/testx509
}
test_binn() {
git_fetch https://github.com/liteserver/binn 6867557c9cb322ba173bacb142246c76ce8d0bac binn
make test
}
test_bfs() {
github_tar tavianator bfs 4.1
./configure
make check
}
test_binutils() {
shared_binutils
(cd ld/testsuite && find . -name '*.c' -exec sed -i 's|^#pragma weak.*|__attribute__((weak))|g' {} +)
sed -i 's|\[at_least_gcc_version 5 1\]|1|g' ld/testsuite/ld-elf/linux-x86.exp
sed -i 's|__builtin_abort ();|{void abort();abort();}|g' ld/testsuite/ld-x86-64/plt-main3.c
sed -i 's|__builtin_abort ();|{void abort();abort();}|g' ld/testsuite/ld-x86-64/plt-main4.c
# tests depend on printf() being converted to puts
sed -i 's|printf (\"PASS\\n\")|puts(\"PASS\")|g' ld/testsuite/ld-elf/pr25617-1a.c
# tests depend on asm name NOT being double quoted (which we always do)
sed -i 's|(long) &size_of_bar|({long v;__asm(\"lea bar@SIZE(%%rip),%0\":\"=r\"(v)); v;})|g' ld/testsuite/ld-size/size-7a.c
sed -i 's|(long) &size_of_bar|({long v;__asm(\"lea bar@SIZE(%%rip),%0\":\"=r\"(v)); v;})|g' ld/testsuite/ld-size/size-8a.c
# tests depend on -fasynchronous-unwind-tables
sed -i 's|3f|..|g' ld/testsuite/ld-x86-64/plt-main-ibt.dd
# tests depend on GCC's instruction selection behavior
sed -i 's|{error_output \"pr22001-1b.err\"}||g' ld/testsuite/ld-x86-64/x86-64.exp
# tests depend on debug info
rm ld/testsuite/ld-elf/compress.exp
rm binutils/testsuite/binutils-all/addr2line.exp
replace_line "test_objdump_S" "" binutils/testsuite/binutils-all/objdump.exp
replace_line "readelf_wi_test" "" binutils/testsuite/binutils-all/readelf.exp
sed -i 's|beginwarn.c:7:|beginwarn.o:|g' ld/testsuite/ld-elf/shared.exp
# this one passes '-Bsymbolic' to cc, not sure if intended
sed -i 's|symbolic \"-Bsymbolic\"|symbolic \"-Wl,-Bsymbolic\"|g' ld/testsuite/ld-shared/shared.exp
fix_and_configure --disable-gprofng
make && make check
}
test_binutils_gccverify() {
shared_binutils
echo "$CC \"\$@\"" > $PWD/cc
chmod +x $PWD/cc
CC=$PWD/cc fix_and_configure --disable-gprofng
make
echo "gcc \"\$@\"" > $PWD/cc
make check
}
test_bison() {
url_lz https://ftpmirror.gnu.org/gnu/bison/bison-3.8.2.tar.lz bison
./configure
make check
}
test_blake2() {
git_fetch https://github.com/BLAKE2/BLAKE2 ed1974ea83433eba7b2d95c5dcd9ac33cb847913 blake2
cd ref
make CC=$CC check
}
test_blake3() {
github_tar BLAKE3-team BLAKE3 1.8.4
sed -i 's|C CXX ASM|C ASM|g' c/CMakeLists.txt
sed -i 's|#undef IS_X86||g' c/blake3_dispatch.c
sed -i 's|-fstack-protector-strong||g' c/cmake/BLAKE3/ContinuousIntegration.cmake
sed -i 's|-fsanitize=address,undefined||g' c/cmake/BLAKE3/ContinuousIntegration.cmake
sed -i 's|--fresh||g' c/cmake/BLAKE3/ContinuousIntegration.cmake
cd c/
cmake_init -DCMAKE_C_COMPILE_FEATURES=c_std_99 -DBLAKE3_SIMD_TYPE=none -DBLAKE3_TESTING=ON -DBLAKE3_TESTING_CI=ON
ctest
}
test_blosc2() {
github_tar Blosc c-blosc2 v2.23.1
replace_line " #elif (defined(__GNUC__) && __GNUC__ >= 4) || defined(__clang__)" "#elif 1" include/blosc2/blosc2-export.h
sed -i 's|uint8_t \*dest = (uint8_t \*)&idest;|&const uint8_t*pa_=pa;|g' blosc/blosc-private.h
replace_line "#ifdef __GNUC__" "#if 1" tests/b2nd/test_b2nd_persistency.c
replace_line "#ifdef __GNUC__" "#if 1" tests/b2nd/test_b2nd_save.c
replace_line "#ifdef __GNUC__" "#if 1" tests/b2nd/test_b2nd_save_append.c
cmake_init -DPREFER_EXTERNAL_LZ4=ON -DPREFER_EXTERNAL_ZLIB=ON -DPREFER_EXTERNAL_ZSTD=ON
make && ctest
}
test_box2d() {
github_tar erincatto box2d v3.1.1
use_stdatomic '#include <stdint.h>' src/atomic.h
use_stdbit '#include <stdint.h>' src/ctz.h
replace_line "#elif defined( __GNUC__ ) || defined( __clang__ )" "#elif 1" src/atomic.h
sed -i 's|__atomic_compare_exchange_n( &a->value, &expected, desired, false,|atomic_compare_exchange_strong_explicit(\&a->value,\&expected,desired,|g' src/atomic.h
cmake_init -DBOX2D_DISABLE_SIMD=ON
make
./bin/test
}
test_brieflz() {
github_tar jibsen brieflz v1.3.0
# they have functional fallback, this is just to speed up test
use_stdbit '#include <stdint.h>' src/brieflz.c
replace_line "#elif defined(BLZ_BUILTIN_GCC)" "#elif 1" src/brieflz.c
cmake_init
make && ctest
}
test_brotli() {
github_tar google brotli v1.2.0
cmake_init
make && ctest
}
test_bubblewrap() {
github_tar containers bubblewrap v0.11.1
muon_init -Dbash_completion=disabled
muon_build
muon_test
}
test_busybox() {
git_fetch https://github.com/sailfishos-mirror/busybox a98b95b715359a8b002d1cb8e1f998a4afa2c73e busybox
sed -i 's|LDLIBS += rt|LDLIBS += rt resolv|g' Makefile.flags
sed -i 's|&& defined(__GNUC__)||g' libbb/hash_sha1_hwaccel_x86-64.S
sed -i 's|&& defined(__GNUC__)||g' libbb/hash_sha256_hwaccel_x86-64.S
sed -i 's|\tgcc |$CC |g' testsuite/testing.sh
replace_line "# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))" "#if 1" libbb/hash_md5_sha.c
make CC=$CC HOSTCC=$CC defconfig
make CC=$CC HOSTCC=$CC
make CC=$CC HOSTCC=$CC SKIP_KNOWN_BUGS=1 test
}
test_byacc() {
github_tar ThomasDickey byacc-snapshots t20260126
./configure
make check
}
test_bzip2() {
url_tar https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz bzip2
make CC=$CC test
}
test_bzip3() {
git_fetch https://github.com/iczelia/bzip3 940d466535858c925d1de04d3d175d6d8801eb03 bzip3
libtoolize
sh ./bootstrap.sh
fix_and_configure --disable-arch-native
sed -i 's|#include <intrin.h>||g' include/common.h
sed -i 's|_mm_prefetch((const void \*)(address), _MM_HINT_NTA)||g' include/common.h
sed -i 's|_m_prefetchw((const void \*)(address))||g' include/common.h
make roundtrip test
}
test_c2() {
git_fetch https://github.com/c2lang/c2compiler 1c1a38a018f4bcbc51ef20082da5fd985f6df13c c2compiler
sed -i 's|-pipe ||g' bootstrap/Makefile
sed -i 's|-pipe ||g' bootstrap/bootstrap.c
sed -i 's|-pipe ||g' generator/c/c_generator_special.c2
export C2_LIBDIR=$PWD/libs
export C2_PLUGINDIR=$PWD/output/plugins
make CC=$CC test
}
test_c23doku() {
git_fetch https://github.com/fuhsnn/c23doku 9c84d5229e16af9e58deca7322dc79751d7474b0 c23doku
sh test.sh
sh test_c2y.sh
}
test_c3() {
github_tar c3lang c3c v0.7.11
cmake_init
make
cd ../test
../cmakebuild/c3c compile-test unit
../cmakebuild/c3c compile-run -O1 src/test_suite_runner.c3 -- ../cmakebuild/c3c test_suite/
}
test_c4() {
git_fetch https://github.com/rswier/c4 2feb8c0a142b2e513be69442c24af82dbaf41a25 c4
$CC c4.c && ./a.out c4.c hello.c | grep '^hello, world$'
}
test_calc() {
github_tar lcn2 calc v3.0.0.3
make CC=$CC LCC=$CC MAN=true check
}
test_camgunz_cmp() {
git_fetch https://github.com/camgunz/cmp e564b7a06bd39e7ab2f19f9a616a3d268638a88d camgunz_cmp
sed -i 's|-fprofile-arcs -ftest-coverage||g' Makefile
make unittest
}
test_cc65() {
git_fetch https://github.com/cc65/cc65 a545b4fc3e7b512fb8de16fa1bb5891166b1bb02 cc65
make QUIET=1 CC=$CC
make QUIET=1 CC=gcc test
}
test_cello() {
git_fetch https://github.com/orangeduck/Cello 61ee5c3d9bca98fd68af575e9704f5f02533ae26 cello
make check
}
test_cfitsio() {
github_tar HEASARC cfitsio cfitsio-4.6.3
fix_and_configure
# from their .github/workflows/ci.yml
make testprog
./testprog > testprog.lis
diff testprog.lis testprog.out
cmp testprog.fit testprog.std
}
test_cgit() {
github_tar zx2c4 cgit v1.3
make get-git
make CC=$CC test
}
test_chibischeme() {
github_tar ashinn chibi-scheme 0.12
sed -i 's| test-division$||g' Makefile
sed -i "s|\"cc\"|\"`realpath $CC`\"|g" tools/chibi-ffi
make && make test-ffi
}
test_cjson() {
github_tar DaveGamble cJSON v1.7.19
replace_line "#if (defined(__GNUC__) || defined(__SUNPRO_CC) || defined (__SUNPRO_C)) && defined(CJSON_API_VISIBILITY)" "#if 1" cJSON.h
sed -i 's/if defined(__GNUC__) || defined(__ghs__)/if 1/g' tests/unity/src/unity_internals.h
cmake_init
make check
}
test_cmark() {
github_tar commonmark cmark 0.31.2
cmake_init
make
}
test_cmocka() {
gitlab_tar gitlab.com/cmocka cmocka cmocka-2.0.2
cmake_init
make && ctest
}
test_coremark() {
git_fetch https://github.com/eembc/coremark 1f483d5b8316753a742cbf5590caf5bd0a4e4777 coremark
make
cat run1.log run2.log | grep '^Correct operation validated' | wc -l | grep ^2$
cat run1.log run2.log | grep crc | grep -v crcfinal | md5sum | grep cb180b3a8bf8cd7cff3bf3ee9c0654c3
}
test_coremarkpro() {
git_fetch https://github.com/eembc/coremark-pro 4832cc67b0926c7a80a4b7ce0ce00f4640ea6bec coremarkpro
make CC=$CC LD=$CC TARGET=linux64 XCMD='-c2' certify-all | (! grep ERROR)
}
test_coreutils() {
url_xz https://ftpmirror.gnu.org/gnu/coreutils/coreutils-9.10.tar.xz coreutils
${is_CI+ replace_line "skip_if_root_" "skip_" tests/rm/deep-2.sh }
./configure
make check
}
test_cpio() {
url_bz https://ftpmirror.gnu.org/gnu/cpio/cpio-2.15.tar.bz2 cpio
./configure
make check
}
test_cproc() {
local CCTESTSCRIPT=$(dirname $(realpath $0))/cctest_cproc.bash
git_fetch https://github.com/michaelforney/cproc 64e7bc48ea7a6a15c646b64c0e4fe58f64bcace3 cproc
./configure --host=x86_64-linux-gnu
make CFLAGS=-std=c99 check
bash $CCTESTSCRIPT
}
test_curl() {
github_tar curl curl curl-8_19_0
libtoolize
autoreconf -fi
fix_and_configure --with-openssl
make && make test-nonflaky
}
test_cwalk() {
github_tar likle cwalk v1.2.9
cmake_init -DENABLE_TESTS=ON
make && ctest
}
test_cwpack() {
github_tar clwi CWPack 1.4
cd test
sed -i 's|clang|$CC|g' runModuleTest.sh
bash runModuleTest.sh
}
test_darkhttpd() {
github_tar emikulic darkhttpd v1.17
sed -i 's|-fsanitize=address | |g' devel/run-tests
sed -i 's|-fsanitize=undefined | |g' devel/run-tests
sed -i 's|-fprofile-arcs -ftest-coverage | |g' devel/run-tests
make CC=$CC test
}
test_diffutils() {
url_xz https://ftpmirror.gnu.org/gnu/diffutils/diffutils-3.12.tar.xz diffutils
./configure
make && make check SUBDIRS=./tests
}
test_discount() {
github_tar Orc discount v3.0.1.2
sh configure.sh
make test
}
test_doom() {
git_fetch https://github.com/Daivuk/PureDOOM aa9510a97767a1383bfd7711106c4aeee48605fb puredoom
mkdir -p examples/Tests/build && cd "$_"
replace_line "project(pd_tests)" "project(pd_tests C)" ../CMakeLists.txt
cmake ../ && make
cd ../../../ && examples/Tests/build/pd_tests
}
test_elk() {
git_fetch https://github.com/cesanta/elk 71a86fa2fef146696be9ae66715bf3f91d0a5f2c elk
CFLAGS='-O -ffunction-sections -fdata-sections' make -C test test elk
}
test_emacs() {
url_xz https://ftpmirror.gnu.org/gnu/emacs/emacs-30.2.tar.xz emacs
./configure
make check -j2
}
test_espruino() {
# build process needs .git/
github_clone espruino Espruino RELEASE_2V29
rm -r tests/manual/ tests/*_FAIL.js tests/test_tensorflow.js tests/test_packet_*.js
sed -i 's|-lstdc++|-lc|g' make/family/LINUX.make
BOARD=LINUX PYTHON=python3 USE_TENSORFLOW=0 make CC=$CC LD=$CC V=1 -j1
./bin/espruino --test-all
}
test_femtolisp() {
git_fetch https://github.com/JeffBezanson/femtolisp ec7601076a976f845bc05ad6bd3ed5b8cde58a97 femtolisp
make CC=$CC CFLAGS=-D_GNU_SOURCE
}
test_ffc() {
github_tar kolemannix ffc.h v26.03.2
use_stdbit ' #include <stdbool.h>' test_src/sonicsv.h
cmake_init
make && ctest
}
test_fftw() {
url_tar https://fftw.org/fftw-3.3.10.tar.gz fftw
fix_and_configure
make check
}
test_file() {
github_tar file file FILE5_47
libtoolize
autoreconf -fi
fix_and_configure
make check
}
test_findutils() {
url_xz https://ftpmirror.gnu.org/gnu/findutils/findutils-4.10.0.tar.xz findutils
./configure
make && make check-TESTS
}
test_flatcc() {
git_fetch https://github.com/dvidelabs/flatcc e3e44836c5f625b5532586ddce895f8b5e36a212 flatcc
cmake_init -DCMAKE_C_FLAGS=-DPORTABLE_USE_ISINF
make && ctest
}
test_flex() {
url_tar https://github.com/westes/flex/files/981163/flex-2.6.4.tar.gz flex
fix_configure
CC_FOR_BUILD=$CC ./configure
make check
}
test_fribidi() {
github_tar fribidi fribidi v1.0.16
export CC_FOR_BUILD=$CC
libtoolize
sh autogen.sh
fix_and_configure
make check
}
test_gawk() {
url_lz https://ftpmirror.gnu.org/gnu/gawk/gawk-5.4.0.tar.lz gawk
fix_and_configure ${is_CI+ --disable-pma } # pma segfault in docker
make check
}
test_genann() {
git_fetch https://github.com/codeplea/genann 4f72209510c9792131bd8c4b0347272b088cfa80 genann
make check
}
test_ggrep() {
url_xz https://ftpmirror.gnu.org/gnu/grep/grep-3.12.tar.xz ggrep
./configure
make && make check SUBDIRS=./tests
}
test_giflib() {
url_tar https://sourceforge.net/projects/giflib/files/giflib-6.x/giflib-6.1.2.tar.gz/download giflib
make check
}
test_git() {
github_tar git git v2.53.0
make CC="$CC" test -j2
}
test_glib() {
github_branch fuhsnn glib main
libtoolize
sh autogen.sh
fix_and_configure
replace_line "#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)" "#if 1" glib/gconstructor.h
replace_line "#ifdef __GNUC__" "#if 1" glib/gmacros.h
replace_line "#elif defined(__GNUC__) && (__GNUC__ >= 4)" "#elif 1" gio/tests/modules/symbol-visibility.h
make check
}
test_gmake() {
url_lz https://ftpmirror.gnu.org/gnu/make/make-4.4.1.tar.lz gmake
fix_and_configure
make check
}
test_gnutls() {
url_xz https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/gnutls-3.8.12.tar.xz gnutls
fix_configure
CFLAGS=-DCRAU_MAYBE_UNUSED= ./configure --disable-hardware-acceleration
make -j2
make -C tests check -j2
make -C fuzz check -j2
}
test_go() {
git_fetch https://github.com/golang/go ceb95ea6aef52c1fb472d3539c6ef68670778b5b go
sed -i 's|\"-ggdb\",||g' src/cmd/dist/build.c
sed -i 's|\"-pipe\",||g' src/cmd/dist/build.c
sed -i 's|vadd(&gccargs, \"-fmessage-length=0\");||g' src/cmd/dist/build.c
${is_CI+ rm src/runtime/pprof/pprof_test.go } # flaky (cpu load sensitive)
cd src/
GO14TESTS=1 ./all.bash
}
test_got() {
github_tar gameoftrees got-portable 0.123
sh autogen.sh
local GOT=$PWD/got_install
./configure --prefix=$GOT
make PREFIX=$GOT install
export PATH="$GOT/bin:$PATH"
# decomposed from `make tests`
subtests=(
compat regress-delta regress-deltify regress-fetch regress-idset
regress-path regress-tog
# regress-cmdline # permission/ssh issues
)
make "${subtests[@]}"
}
test_gpatch() {
url_xz https://ftpmirror.gnu.org/gnu/patch/patch-2.8.tar.xz gpatch
./configure
make check
}
test_groff() {
url_tar https://ftpmirror.gnu.org/gnu/groff/groff-1.24.1.tar.gz groff
./configure
make
sed -i 's|exec eqn|exec ./eqn|g' neqn
make check
}
test_gsed() {
url_xz https://ftpmirror.gnu.org/gnu/sed/sed-4.9.tar.xz gsed
./configure
make && make check-TESTS
}
test_gtar() {
url_xz https://ftpmirror.gnu.org/gnu/tar/tar-1.35.tar.xz gtar
./configure
make check
}
test_gumbo() {
codeberg_tar gumbo-parser gumbo-parser 0.13.2
muon_init
muon_build
muon_test
}
test_gzip() {
url_xz https://ftpmirror.gnu.org/gnu/gzip/gzip-1.14.tar.xz gzip
fix_and_configure
make check
}
test_handmademath() {
git_fetch https://github.com/HandmadeMath/HandmadeMath 661fef0893bccfe30342049e848b8d54e7430234 HandmadeMath
make -C test CC=$CC c99 c11
}
test_hare() {
url_tar https://git.sr.ht/~sircmpwn/harec/archive/0.26.0.tar.gz harec
mv configs/linux.mk config.mk
make CC="$CC" check
}
test_heatshrink() {
git_fetch https://github.com/atomicobject/heatshrink 7d419e1fa4830d0b919b9b6a91fe2fb786cf3280 heatshrink
sed -i 's|HEATSHRINK_MIN_WINDOW_BITS, 4);|HEATSHRINK_MIN_WINDOW_BITS, HEATSHRINK_MIN_WINDOW_BITS - 1);|g' test_heatshrink_dynamic.c
make test
}
test_hoedown() {
git_fetch https://github.com/hoedown/hoedown 980b9c549b4348d50b683ecee6abee470b98acda hoedown
make
python3 test/runner.py
}
test_httpparser() {
git_fetch https://github.com/nodejs/http-parser ec8b5ee63f0e51191ea43bb0c6eac7bfbff3141d httpparser
make test
}
test_imagemagick() {
github_tar ImageMagick ImageMagick 7.1.2-18
fix_and_configure
make check V=1
}
test_inih() {
github_tar benhoyt inih r62
muon_init
muon_build
muon_test
}
test_janet() {
github_tar janet-lang janet v1.41.2
# Use C11 concurrency features
sed -i "s|/\* #define JANET_THREAD_LOCAL _Thread_local \*/|#define JANET_THREAD_LOCAL _Thread_local|g" src/conf/janetconf.h
sed -i "s|/\* #define JANET_USE_STDATOMIC \*/|#define JANET_USE_STDATOMIC|g" src/conf/janetconf.h
# Enable computed goto
replace_line "#if defined(__GNUC__) && !defined(__EMSCRIPTEN__)" "#if 1" src/core/vm.c
make test
}
test_jemalloc() {
git_fetch https://github.com/jemalloc/jemalloc 6515df8cec7fe50f6b45069f82bdf685171f9ee7 jemalloc
autoconf
./configure --disable-cxx
make check
}
test_jerryscript() {
github_tar jerryscript-project jerryscript v3.0.0
sed -i 's|if(NOT (${CMAKE_C_COMPILER_ID} STREQUAL MSVC))|if(FALSE)|g' tests/unit-doc/CMakeLists.txt
replace_line "#ifdef __GNUC__" "#if 1" jerry-ext/include/jerryscript-ext/autorelease.impl.h
replace_line "#elif defined(__GNUC__)" "#elif 1" jerry-ext/include/jerryscript-ext/module.h
python3 tools/run-tests.py --unittest
python3 tools/run-tests.py --jerry-tests
python3 tools/run-tests.py --test262
python3 tools/build.py
}
test_jq() {
github_tar jqlang jq jq-1.8.1
libtoolize
autoreconf -fi
fix_and_configure
make check
}
test_jsmn() {
git_fetch https://github.com/zserge/jsmn 25647e692c7906b96ffd2b05ca54c097948e879c jsmn
make CC=$CC test
}
test_kefir() {
codeberg_tar jprotopopov kefir v0.5.0
mkdir bin && CC=gcc scripts/detect-host-env.sh --header > bin/config.h
make CC="$CC"
LC_ALL=C.UTF-8 make CC=gcc test
}
test_ksh93() {
git_fetch https://github.com/ksh93/ksh ffd52e5a091cf3eae02846ea1de20d8b473862cc ksh93
replace_line 'occ=cc' 'occ=$CC' src/cmd/INIT/iffe.sh
# probe depends on -Wincompatible-pointer-types
sed -i 's|$i (\*Sig_handler_t)($j)|void (*Sig_handler_t)(int)|g' src/lib/libast/features/sig.sh
${is_CI+ rm src/cmd/ksh93/tests/basic.sh src/cmd/ksh93/tests/io.sh src/cmd/ksh93/tests/sigchld.sh src/cmd/ksh93/tests/variables.sh }
bin/package make
bin/package test
}
test_lame() {
url_tar https://sourceforge.net/projects/lame/files/lame/3.100/lame-3.100.tar.gz/download lame
fix_and_configure
make test
}
test_lexbor() {
github_tar lexbor lexbor v3.0.0
sed -i 's| -pipe | |g' source/lexbor/ports/posix/config.cmake
cmake_init -DLEXBOR_BUILD_TESTS=ON
make && ctest
}
test_liballegro5() {
github_tar liballeg allegro5 5.2.11.3
cmake_init
make
make run_standalone_tests
. ../tests/grab_bitmap_suites.sh
find ../tests -name '*.ini' | grep -v 'compressed' | xargs xvfb-run tests/test_driver --save_on_failure --xvfb | tee /tmp/test_out || true
grep -q 'failed tests: 0' /tmp/test_out
}
test_libarchive() {
github_tar libarchive libarchive v3.8.6
replace_line "#elif defined(__GNUC__)" "#elif 1" libarchive/archive_blake2.h
replace_line "#if defined(__GNUC__)" "#if 1" libarchive/archive_write_set_format_cpio_binary.c
libtoolize
autoreconf -fi
fix_and_configure
make check
}
test_libevent() {
git_fetch https://github.com/libevent/libevent 48296514d8fd9c0b3812b11d45ad80b0c002c14e libevent
libtoolize
sh autogen.sh
fix_and_configure
make check -j2
}
test_libexpat() {
github_tar libexpat libexpat R_2_7_5
cd expat
cmake_init
make && ctest
}
test_libgc() {
git_fetch https://github.com/bdwgc/bdwgc b819d9fe314f95a2ac466987d5e6ff0ddb80587b libgc
sed -i 's|__atomic_compare_exchange_n(p, &ov, nv, 0,|atomic_compare_exchange_strong_explicit(p, \&ov, nv,|g' include/private/gc_atomic_ops.h
use_stdatomic 'typedef size_t AO_t' include/private/gc_atomic_ops.h
sed -i 's/(defined(__GNUC__)/1 || (defined(__GNUC__)/g' cord/cordxtra.c
use_stdatomic '#include <stdarg.h>' cord/cordxtra.c
sed -i 's|defined(__GNUC__)|1|g' cord/cordprnt.c
libtoolize
sh autogen.sh
fix_and_configure --disable-dynamic-loading --enable-threads=posix --with-libatomic-ops=none
make check
}
test_libgit2(){
github_tar libgit2 libgit2 v1.9.2
use_stdatomic '#ifdef GIT_THREADS' src/util/thread.h
sed -i 's|defined(GIT_BUILTIN_ATOMIC)|1|g' src/util/thread.h
sed -i 's|__atomic_exchange(ptr, &newval, &foundval,|return atomic_exchange_explicit(ptr, newval,|g' src/util/thread.h
sed -i 's|__atomic_compare_exchange(ptr, &foundval, &newval, false,|atomic_compare_exchange_strong_explicit(ptr, \&foundval, newval,|g' src/util/thread.h
replace_line "#elif defined(__clang__) || defined(__GNUC__)" "#elif 1" deps/ntlmclient/utf8.h
sed -i 's|__has_builtin(__builtin_add_overflow)|0|g' src/util/integer.h
${is_CI+ sed -i '/\-sonline/d' tests/libgit2/CMakeLists.txt } # flaky
cmake_init
make && ctest --verbose
}
test_libgmp() {
url_xz https://ftpmirror.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz gmp
fix_and_configure
make && make check
}
test_libjansson() {
github_tar akheron jansson v2.15.0
replace_line "#if defined(__GNUC__) || defined(__clang__)" "#if 1" src/jansson.h
convert_atomic_x_fetch src/jansson.h
use_stdatomic "#include <stdio.h>" src/hashtable_seed.c
cmake_init -DJANSSON_BUILD_DOCS=OFF -DHAVE_ATOMIC_BUILTINS=1
make && make test
}
test_libjpeg() {
url_tar https://www.ijg.org/files/jpegsrc.v9f.tar.gz libjpeg
fix_and_configure
make check
}
test_libjsonc() {
git_fetch https://github.com/json-c/json-c 52ddfb35f1cc7e337edb6b1939a043140b42cf5a json-c
cmake_init
make && make test
}
test_liblz4() {
git_fetch https://github.com/lz4/lz4 9da37b2eebf082bfab6e57c49be71cc41119a40d lz4
make test
}
test_libmicrohttpd() {
url_tar https://ftpmirror.gnu.org/gnu/libmicrohttpd/libmicrohttpd-1.0.3.tar.gz libmicrohttpd
sed -i 's|defined(__GNUC__)|1|g' src/include/autoinit_funcs.h
fix_and_configure
make check
}
test_libmpc() {
url_xz https://ftpmirror.gnu.org/gnu/mpc/mpc-1.4.0.tar.xz mpc
fix_and_configure
make check
}
test_libmpfr() {
url_xz https://ftpmirror.gnu.org/gnu/mpfr/mpfr-4.2.2.tar.xz mpfr
fix_and_configure
make check
}
test_libopus() {
url_tar https://downloads.xiph.org/releases/opus/opus-1.6.tar.gz opus
fix_configure
CFLAGS=-fdisable-visibility ./configure
make check
}
test_libpcre2() {
github_tar PCRE2Project pcre2 pcre2-10.47
fix_and_configure
make check
}
test_libpng() {
github_tar pnggroup libpng v1.6.57
fix_and_configure
make test
}
test_libpsl() {
url_lz https://github.com/rockdaboot/libpsl/releases/download/0.21.5/libpsl-0.21.5.tar.lz libpsl
fix_and_configure
make check
}
test_libressl() {
url_tar https://github.com/libressl/portable/releases/download/v4.2.1/libressl-4.2.1.tar.gz libressl
fix_and_configure
replace_line "#if defined(__GNUC__)" "#if 1" crypto/bn/arch/amd64/bn_arch.h
make check
}
test_libsamplerate() {
git_fetch https://github.com/libsndfile/libsamplerate 2ccde9568cca73c7b32c97fefca2e418c16ae5e3 libsamplerate
replace_line "# define HAVE_SSE2_INTRINSICS" "" src/common.h
libtoolize
sh autogen.sh
fix_and_configure
make test
}
test_libsodium() {
url_tar https://github.com/jedisct1/libsodium/releases/download/1.0.21-RELEASE/libsodium-1.0.21.tar.gz libsodium
fix_and_configure
replace_line "#if !defined(__clang__) && !defined(__GNUC__)" "#if 0" src/libsodium/include/sodium/private/common.h
replace_line "#if !defined(__clang__) && !defined(__GNUC__)" "#if 0" src/libsodium/include/sodium/export.h
replace_line "#elif defined(HAVE_C11_MEMORY_FENCES)" "#elif defined(HAVE_C11_MEMORY_FENCES)\n#include <stdatomic.h>" src/libsodium/include/sodium/private/common.h
make check
}
test_libtommath() {
git_fetch https://github.com/libtom/libtommath 652d70a31fcecc7beb7a01b3edef645039f54778 libtommath
sed -i 's|defined(__GNUC__) && __GNUC__ >= 4|1|g' tommath_private.h
cmake_init -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=MinSizeRel
make && ctest
}
test_libucl() {
github_tar vstakhov libucl 0.9.4
cmake_init
make && ctest
}
test_libuev() {
github_tar troglobit libuev v2.4.1
libtoolize
autoreconf -fi
fix_and_configure
make check
}
test_libuv() {
github_tar libuv libuv v1.52.1
replace_line "#elif defined(__GNUC__)" "#elif 1" include/uv.h
# https://github.com/libuv/libuv/issues/2635#issuecomment-575109464
sed -i 's|TEST_DECLARE (udp_multicast_join)||g' test/test-list.h
sed -i 's|TEST_DECLARE (udp_multicast_join6)||g' test/test-list.h
sed -i 's|TEST_ENTRY (udp_multicast_join)||g' test/test-list.h
sed -i 's|TEST_ENTRY (udp_multicast_join6)||g' test/test-list.h
libtoolize
sh autogen.sh
fix_and_configure
make check
}
test_libwebp() {
github_tar webmproject libwebp v1.6.0
cmake_init
make
./dwebp ../examples/test.webp -ppm -o test.ppm
md5sum test.ppm | grep ebdd46e0760b2a4891e6550b37c00660
}
test_libxml() {
github_tar GNOME libxml2 v2.15.2
libtoolize
sh autogen.sh
fix_configure
CFLAGS=-D_FILE_OFFSET_BITS=64 ./configure
make check
}
test_libxo_chimerautils() {
local LIBXO=$PWD/libxo_install
github_tar chimera-linux chimerautils v15.0.3
github_tar Juniper libxo 1.7.5
sed -i 's|__int128_t|_BitInt(128)|g' libxo/xo_humanize.h
libtoolize
autoreconf -fi
fix_and_configure --prefix=$LIBXO
make && make test && make install
cd ../
export PKG_CONFIG_PATH="$LIBXO/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
sed -i "s|type: 'boolean', value: 'true'|type: 'boolean', value: true|g" meson_options.txt
muon_init
muon_build
./muonbuild/src.freebsd/coreutils/echo/echo 'echo hello_world' > hello.sh
./muonbuild/src.freebsd/sh/sh hello.sh | ./muonbuild/src.freebsd/grep/grep ^hello_world$
}
test_libyaml() {
git_fetch https://github.com/yaml/libyaml 840b65c40675e2d06bf40405ad3f12dec7f35923 libyaml
cmake_init
make && make test
}
test_lighthttpd() {
url_xz https://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.82.tar.xz lighthttpd
libtoolize
sh autogen.sh
fix_configure
CC_FOR_BUILD=$CC ./configure
make check
}
test_linenoise() {
github_tar antirez linenoise 2.0
make test
}
test_lmdb() {
github_tar LMDB lmdb LMDB_0.9.35
make -C libraries/liblmdb CC=$CC test
}
test_lua() {
url_tar https://lua.org/ftp/lua-5.5.0.tar.gz lua
cd src && make CC="$CC"
url_tar https://lua.org/tests/lua-5.5.0-tests.tar.gz luatests
cd libs && make CC="$CC" && cd ../
../lua ${is_CI+ -e"_port=true" } all.lua # assertion at files.lua:84 in CI
}
test_lwan(){
git_fetch https://github.com/lpereira/lwan 7508daa6037dd4c94a98d32c8e286c9e8212af87 lwan
use_stdbit '#include <assert.h>' src/bin/tools/mimegen.c
use_stdbit '#include <assert.h>' src/lib/timeout.c
use_stdbit '#include <assert.h>' src/samples/techempower/json.c
use_stdbit '#include <stdlib.h>' src/lib/lwan-private.h
sed -i 's|__sync_##O##_and_fetch|__builtin_atomic_arith_##O|g' src/lib/lwan.h
sed -i 's|__uint128_t|unsigned _BitInt(128)|g' src/lib/lwan-thread.c
sed -i 's|__builtin_inf()|HUGE_VAL|g' src/samples/forthsalon/forth.c
replace_line "#if defined(__x86_64__)" "#if 0" src/lib/lwan-websocket.c
replace_line "#if __x86_64__" "#if 0" src/lib/lwan-template.c
cmake_init
make testsuite
}
test_mawk() {
github_tar ThomasDickey mawk-snapshots t20260302
./configure
make check
}
test_mbedtls() {
url_bz https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-4.0.0/mbedtls-4.0.0.tar.bz2 mbedtls
replace_line " (defined(__GNUC__) || defined(__clang__)) && defined(MBEDTLS_ARCH_IS_X64)" "1" tf-psa-crypto/drivers/builtin/src/aesni.h
cmake_init
make && ctest -j2
}
test_md4c() {
github_tar mity md4c release-0.5.2
cmake_init
make
SELF_DIR=$PWD bash ../scripts/run-tests.sh
}
test_memcached() {
github_tar memcached memcached 1.6.41
sed -i "s/defined(__has_builtin)/0/g" crc32c.c
${is_CI+ rm t/slabs-mover.t } # flaky
sh autogen.sh
CFLAGS=-D_GNU_SOURCE ./configure
make && make test
}
test_metalang99() {
github_tar hirrolot datatype99 v1.6.5