Skip to content

Commit 64b6b22

Browse files
committed
picotls: update to 2025.09.12
See: macports/macports-ports#29397
1 parent 4e98c13 commit 64b6b22

File tree

2 files changed

+47
-22
lines changed

2 files changed

+47
-22
lines changed

net/picotls/Portfile

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
PortSystem 1.0
44
PortGroup cmake 1.1
5-
PortGroup compiler_blacklist_versions 1.0
65
PortGroup github 1.0
76
PortGroup legacysupport 1.1
87
PortGroup openssl 1.0
8+
PortGroup perl5 1.0
99

1010
# Need O_CLOEXEC
1111
legacysupport.newest_darwin_requires_legacy 10
1212

13-
github.setup h2o picotls 703553c94048ba22987e8529590f4c060c0407f8
14-
version 2024.03.05
13+
github.setup h2o picotls 4e443c11eb48949e597911b1b772a9d2588b4769
14+
version 2025.09.12
1515
revision 0
1616
categories net security
1717
license MIT
@@ -21,21 +21,26 @@ long_description {*}${description}. &{name} is designed to be fast, tiny and
2121
with the primary user being the H2O HTTP/2 server for serving \
2222
HTTP/1, HTTP/2 and HTTP/3 over QUIC.
2323

24+
set with_fusion OFF
25+
if {${configure.build_arch} in [list i386 x86_64]} {
26+
set with_fusion ON
27+
}
28+
2429
github.tarball_from archive
2530

26-
set picotest_hash 6906d90b39684b8b2c18db5b0c7412128140655d
31+
set picotest_hash a99858e0c33b97b24cd09ceae729f2be33ec01e1
2732

2833
master_sites-append https://github.com/h2o/picotest/archive/${picotest_hash}/:picotest
2934
distfiles-append picotest-${picotest_hash}.tar.gz:picotest
3035

3136
checksums ${distname}${extract.suffix} \
32-
rmd160 a0461de42f2e24063ce2ab3719782860ad0ec2eb \
33-
sha256 01debc1ebd6dabe301cdf82d7f0d8bf7107f915d3ab48ee26d82f288c66d9d8b \
34-
size 641429 \
37+
rmd160 b9c4f9603c5fceb839b841fa5c6e2f81f9739ac9 \
38+
sha256 b9e0c88d03ec93de9b7395f7796e5294e45b92bcc516db441d574bf1abaa839c \
39+
size 655335 \
3540
picotest-${picotest_hash}.tar.gz \
36-
rmd160 934cb89c1683095b5950ece003c5a307c773b058 \
37-
sha256 a297cfd0db85186813622ebffcd8d86d73cd0e590f5fb7fe82ec7d40c88d3677 \
38-
size 1748
41+
rmd160 d0305fe488de16cd68e2919643f4fc9cf60c9025 \
42+
sha256 f3c42d988c8cd1af24dee2e66ce832f3e257bb7766e34167499954c1604c82c0 \
43+
size 1828
3944

4045
extract.only ${distname}${extract.suffix}
4146

@@ -46,29 +51,39 @@ post-extract {
4651
move ${workpath}/picotest-${picotest_hash} ${worksrcpath}/deps/picotest
4752
}
4853

49-
depends_lib-append port:brotli \
50-
port:mbedtls3
54+
perl5.branches 5.34
55+
56+
depends_lib-append port:brotli
5157

58+
depends_test-append port:p${perl5.major}-test-tcp \
59+
port:p${perl5.major}-scope-guard
60+
61+
patchfiles-append patch-aligned_alloc.diff
62+
63+
# MbedTLS is still WIP as previous PRs have been abandoned
5264
configure.args-append \
5365
-DWITH_AEGIS=OFF \
5466
-DWITH_DTRACE=OFF \
55-
-DWITH_MBEDTLS=ON
67+
-DWITH_FUSION=${with_fusion} \
68+
-DWITH_MBEDTLS=OFF
5669

57-
# https://github.com/h2o/picotls/issues/505
70+
# See net/nss/Portfile for architecture-specific compiler problems
5871
compiler.blacklist-append \
59-
*gcc-4.* {clang < 500}
60-
61-
# FIXME: fails to build with clang on 10.6–10.7:
62-
# error: call to undeclared library function 'aligned_alloc'
63-
# https://github.com/h2o/picotls/issues/514
72+
*gcc-4.* {clang < 800}
6473

6574
destroot {
6675
move ${cmake.build_dir}/cli ${destroot}${prefix}/bin/picotls_cli
67-
copy ${worksrcpath}/include/picotls ${destroot}${prefix}/include
68-
copy ${worksrcpath}/include/picotls.h ${destroot}${prefix}/include
69-
foreach lib {libpicotls-core.a libpicotls-mbedtls.a libpicotls-minicrypto.a libpicotls-openssl.a} {
76+
foreach lib {libpicotls-core.a libpicotls-minicrypto.a libpicotls-openssl.a} {
7077
copy ${cmake.build_dir}/${lib} ${destroot}${prefix}/lib
7178
}
79+
if {${with_fusion} eq "ON"} {
80+
copy ${cmake.build_dir}/libpicotls-fusion.a ${destroot}${prefix}/lib
81+
} else {
82+
delete ${worksrcpath}/include/picotls/fusion.h
83+
}
84+
delete ${worksrcpath}/include/picotls/mbedtls.h
85+
copy ${worksrcpath}/include/picotls ${destroot}${prefix}/include
86+
copy ${worksrcpath}/include/picotls.h ${destroot}${prefix}/include
7287
}
7388

7489
test.run yes
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- lib/fusion.c.orig 2025-09-18 12:51:36.000000000 +0200
2+
+++ lib/fusion.c 2025-09-18 12:51:10.000000000 +0200
3+
@@ -64,6 +64,7 @@
4+
#define aligned_alloc(a, s) _aligned_malloc((s), (a))
5+
#define aligned_free(p) _aligned_free(p)
6+
#else
7+
+#define aligned_alloc(a, s) ({void *res; posix_memalign(&res, a, s) == 0 ? res : NULL;})
8+
#define aligned_free(p) free(p)
9+
#endif
10+

0 commit comments

Comments
 (0)