diff --git a/www/h2o/Makefile b/www/h2o/Makefile index 80e0fa4ae240..9c8001bcca77 100644 --- a/www/h2o/Makefile +++ b/www/h2o/Makefile @@ -1,74 +1,77 @@ PORTNAME= h2o DISTVERSIONPREFIX= v -DISTVERSION= 2.3.0-dev.20240314 +DISTVERSION= 2.3.0-dev.20240411 CATEGORIES= www MAINTAINER= dch@FreeBSD.org COMMENT= Optimized HTTP/2 server including support for TLS 1.3 and HTTP/1.x WWW= https://github.com/h2o/h2o LICENSE= BSD2CLAUSE MIT LICENSE_COMB= multi BROKEN_armv6= fails to compile: asm_arm.inc:139:36: '.syntax divided' arm assembly not supported BROKEN_armv7= fails to compile: asm_arm.inc:139:36: '.syntax divided' arm assembly not supported -BUILD_DEPENDS= rubygem-rake>=0:devel/rubygem-rake -LIB_DEPENDS= libuv.so:devel/libuv +LIB_DEPENDS= libhiredis.so:databases/hiredis \ + libyaml.so:textproc/libyaml -USES= cmake:noninja compiler:c11 cpe perl5 pkgconfig shebangfix ssl +USES= cmake compiler:c11 cpe pathfix perl5 pkgconfig shebangfix ssl CPE_VENDOR= dena USE_GITHUB= yes -GH_TAGNAME= 7545f5f - -USE_LDCONFIG= yes +GH_TAGNAME= 222b36d +USE_LDCONFIG= YES USE_RC_SUBR= ${PORTNAME} SHEBANG_FILES= share/h2o/start_server -CMAKE_ARGS+= -DBUILD_SHARED_LIBS=OFF +CMAKE_ON= BUILD_SHARED_LIBS + +EXTRACT_AFTER_ARGS= --exclude deps/hiredis --exclude deps/yaml/include SUB_FILES= ${PORTNAME} ${PORTNAME}.conf.sample -SUB_LIST+= H2O_GROUP=${H2O_GROUP} \ +SUB_LIST= H2O_GROUP=${H2O_GROUP} \ H2O_LOGDIR=${H2O_LOGDIR} \ H2O_USER=${H2O_USER} PLIST_SUB= H2O_GROUP=${H2O_GROUP} \ H2O_LOGDIR=${H2O_LOGDIR} \ H2O_USER=${H2O_USER} PORTDOCS= README.md .ifnmake portclippy H2O_USER?= www H2O_GROUP?= www H2O_LOGDIR= /var/log/${PORTNAME}/ .endif OPTIONS_DEFINE= DOCS MRUBY OPTIONS_DEFAULT= MRUBY OPTIONS_SUB= yes MRUBY_DESC= Build with embedded mruby handler support -MRUBY_USES= bison ruby:build +MRUBY_BUILD_DEPENDS+= rubygem-rake>=0:devel/rubygem-rake +MRUBY_USES= bison libtool ruby:build MRUBY_CMAKE_BOOL= WITH_MRUBY -.include +.include -.if ${ARCH} == i386 -CMAKE_ARGS+= -DWITH_FUSION=OFF +.if ${ARCH} == amd64 && defined(CPUTYPE) && ${MACHINE_CPU:Mavx2} +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-cputype-defined +CMAKE_ON+= WITH_FUSION +.else +CMAKE_OFF+= WITH_FUSION .endif -.include - post-install: ${MKDIR} ${STAGEDIR}${ETCDIR} \ ${STAGEDIR}${H2O_LOGDIR} - ${INSTALL_DATA} \ - ${WRKDIR}/${PORTNAME}.conf.sample \ + ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.conf.sample \ ${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.md \ + ${STAGEDIR}${DOCSDIR} -.include +.include diff --git a/www/h2o/distinfo b/www/h2o/distinfo index 5aa371be9f97..2d4da3317841 100644 --- a/www/h2o/distinfo +++ b/www/h2o/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1711233165 -SHA256 (h2o-h2o-v2.3.0-dev.20240314-7545f5f_GH0.tar.gz) = e7fd874375b735e30eeea96539f37db5f10de64d797ea8b5269d9f1969784f68 -SIZE (h2o-h2o-v2.3.0-dev.20240314-7545f5f_GH0.tar.gz) = 30755375 +TIMESTAMP = 1714564834 +SHA256 (h2o-h2o-v2.3.0-dev.20240411-222b36d_GH0.tar.gz) = dc8db25dab7d009718c2309f5bfaa1c666900a6d574324170d68f39a26b2977b +SIZE (h2o-h2o-v2.3.0-dev.20240411-222b36d_GH0.tar.gz) = 30763238 diff --git a/www/h2o/files/extra-patch-cputype-defined b/www/h2o/files/extra-patch-cputype-defined new file mode 100644 index 000000000000..519c98f2a50a --- /dev/null +++ b/www/h2o/files/extra-patch-cputype-defined @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2024-03-27 17:04:02 UTC ++++ CMakeLists.txt +@@ -776,7 +776,7 @@ IF (WITH_FUSION) + IF (WITH_FUSION) + SET(STANDALONE_COMPILE_FLAGS "${STANDALONE_COMPILE_FLAGS} -DH2O_USE_FUSION=1") + LIST(APPEND STANDALONE_SOURCE_FILES deps/picotls/lib/fusion.c) +- SET_SOURCE_FILES_PROPERTIES(deps/picotls/lib/fusion.c PROPERTIES COMPILE_FLAGS "-mavx2 -maes -mpclmul -mvaes -mvpclmulqdq") ++ SET_SOURCE_FILES_PROPERTIES(deps/picotls/lib/fusion.c PROPERTIES COMPILE_FLAGS "") + ENDIF () + IF (WITH_KTLS) + SET(STANDALONE_COMPILE_FLAGS "${STANDALONE_COMPILE_FLAGS} -DH2O_USE_KTLS=1") diff --git a/www/h2o/files/patch-CMakeLists.txt b/www/h2o/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..42fe23553092 --- /dev/null +++ b/www/h2o/files/patch-CMakeLists.txt @@ -0,0 +1,98 @@ +--- CMakeLists.txt.orig 2024-03-14 06:01:10 UTC ++++ CMakeLists.txt +@@ -174,7 +174,6 @@ INCLUDE_DIRECTORIES( + deps/cloexec + deps/brotli/c/include + deps/golombset +- deps/hiredis + deps/libgkc + deps/libyrmcds + deps/klib +@@ -186,7 +185,6 @@ INCLUDE_DIRECTORIES( + deps/picotls/deps/micro-ecc + deps/picotls/include + deps/quicly/include +- deps/yaml/include + deps/yoml + ${CMAKE_CURRENT_BINARY_DIR}) + +@@ -257,6 +255,23 @@ ENDIF (PKG_CONFIG_FOUND) + ENDIF (LIBCAP_FOUND) + ENDIF (PKG_CONFIG_FOUND) + ++IF (PKG_CONFIG_FOUND) ++ PKG_CHECK_MODULES(HIREDIS hiredis) ++ IF (HIREDIS_FOUND) ++ INCLUDE_DIRECTORIES(${HIREDIS_INCLUDE_DIRS}) ++ LINK_DIRECTORIES(${HIREDIS_LIBRARY_DIRS}) ++ ENDIF (HIREDIS_FOUND) ++ENDIF (PKG_CONFIG_FOUND) ++ ++IF (PKG_CONFIG_FOUND) ++ PKG_CHECK_MODULES(LIBYAML yaml-0.1) ++ IF (LIBYAML_FOUND) ++ INCLUDE_DIRECTORIES(${LIBYAML_INCLUDE_DIRS}) ++ LINK_DIRECTORIES(${LIBYAML_LIBRARY_DIRS}) ++ ENDIF (LIBYAML_FOUND) ++ENDIF (PKG_CONFIG_FOUND) ++ ++ + SET(CC_WARNING_FLAGS "-Wall -Wno-unused-value -Wno-unused-function -Wno-nullability-completeness -Wno-expansion-to-defined -Werror=implicit-function-declaration -Werror=incompatible-pointer-types") + + IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") +@@ -269,7 +284,7 @@ ENDIF () + ENDIF () + + # setup compile flags +-SET(CMAKE_C_FLAGS "-g3 ${CC_WARNING_FLAGS} ${CMAKE_C_FLAGS} -DH2O_ROOT=\"${CMAKE_INSTALL_PREFIX}\" -DH2O_CONFIG_PATH=\"${CMAKE_INSTALL_FULL_SYSCONFDIR}/h2o.conf\"") ++SET(CMAKE_C_FLAGS "${CC_WARNING_FLAGS} ${CMAKE_C_FLAGS} -DH2O_ROOT=\"${CMAKE_INSTALL_PREFIX}\" -DH2O_CONFIG_PATH=\"${CMAKE_INSTALL_FULL_SYSCONFDIR}/h2o.conf\"") + IF (WITH_DTRACE) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPICOTLS_USE_DTRACE=1 -DQUICLY_USE_DTRACE=1 -DH2O_USE_DTRACE=1") + ENDIF () +@@ -339,11 +354,6 @@ SET(LIB_SOURCE_FILES + + SET(LIB_SOURCE_FILES + deps/cloexec/cloexec.c +- deps/hiredis/async.c +- deps/hiredis/hiredis.c +- deps/hiredis/net.c +- deps/hiredis/read.c +- deps/hiredis/sds.c + deps/libgkc/gkc.c + deps/libyrmcds/close.c + deps/libyrmcds/connect.c +@@ -497,7 +507,6 @@ SET(UNIT_TEST_SOURCE_FILES + + SET(UNIT_TEST_SOURCE_FILES + ${LIB_SOURCE_FILES} +- ${LIBYAML_SOURCE_FILES} + ${BROTLI_SOURCE_FILES} + deps/picotest/picotest.c + t/00unit/test.c +@@ -710,6 +719,10 @@ TARGET_LINK_LIBRARIES(h2o-httpclient libh2o-evloop ${E + COMPILE_FLAGS "-DH2O_USE_LIBUV=0") + TARGET_LINK_LIBRARIES(h2o-httpclient libh2o-evloop ${EXTRA_LIBS}) + ++IF (HIREDIS_FOUND) ++ TARGET_LINK_LIBRARIES(h2o-httpclient ${HIREDIS_LIBRARIES}) ++ENDIF (HIREDIS_FOUND) ++ + SET_TARGET_PROPERTIES(examples-socket-client-evloop PROPERTIES + COMPILE_FLAGS "-DH2O_USE_LIBUV=0" + EXCLUDE_FROM_ALL 1) +@@ -788,6 +801,15 @@ TARGET_LINK_LIBRARIES(h2o ${OPENSSL_LIBRARIES} ${CMAKE + SET_TARGET_PROPERTIES(h2o PROPERTIES COMPILE_FLAGS "${STANDALONE_COMPILE_FLAGS}") + TARGET_INCLUDE_DIRECTORIES(h2o PUBLIC ${OPENSSL_INCLUDE_DIR}) + TARGET_LINK_LIBRARIES(h2o ${OPENSSL_LIBRARIES} ${CMAKE_DL_LIBS}) ++IF (HIREDIS_FOUND) ++ TARGET_INCLUDE_DIRECTORIES(h2o PUBLIC ${HIREDIS_INCLUDE_DIRS}) ++ TARGET_LINK_LIBRARIES(h2o ${HIREDIS_LIBRARIES}) ++ENDIF (HIREDIS_FOUND) ++ ++IF (LIBYAML_FOUND) ++ TARGET_INCLUDE_DIRECTORIES(h2o PUBLIC ${LIBYXML_INCLUDE_DIRS}) ++ TARGET_LINK_LIBRARIES(h2o ${LIBYAML_LIBRARIES}) ++ENDIF (LIBYAML_FOUND) + IF (WITH_MRUBY) + TARGET_INCLUDE_DIRECTORIES(h2o BEFORE PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/deps/mruby/include ${CMAKE_CURRENT_SOURCE_DIR}/deps/mruby-input-stream/src) + # note: the paths need to be determined before libmruby.flags.mak is generated diff --git a/www/h2o/files/patch-src_ssl.c b/www/h2o/files/patch-src_ssl.c index 938c96e1e7ee..23ef45f0b28c 100644 --- a/www/h2o/files/patch-src_ssl.c +++ b/www/h2o/files/patch-src_ssl.c @@ -1,12 +1,12 @@ ---- src/ssl.c.orig 2023-08-08 09:33:37 UTC +--- src/ssl.c.orig 2024-03-14 06:01:10 UTC +++ src/ssl.c -@@ -1182,7 +1182,9 @@ void init_openssl(void) +@@ -1185,7 +1185,9 @@ void init_openssl(void) SSL_library_init(); OpenSSL_add_all_algorithms(); #if H2O_CAN_OSSL_ASYNC +#if OPENSSL_VERSION_NUMBER < 0x30000000L ERR_load_ASYNC_strings(); +#endif #endif /* When using OpenSSL >= 3.0, load legacy provider so that blowfish can be used for 64-bit QUIC CIDs. */ diff --git a/www/h2o/pkg-plist b/www/h2o/pkg-plist index d67651f52feb..b46446ec6e86 100644 --- a/www/h2o/pkg-plist +++ b/www/h2o/pkg-plist @@ -1,132 +1,160 @@ -@comment bin/h2o-httpclient @dir(%%H2O_USER%%,%%H2O_GROUP%%,0750) %%H2O_LOGDIR%% @sample %%ETCDIR%%/h2o.conf.sample %%DATADIR%%/annotate-backtrace-symbols %%DATADIR%%/ca-bundle.crt %%DATADIR%%/fastcgi-cgi %%DATADIR%%/fetch-ocsp-response %%DATADIR%%/kill-on-close %%DATADIR%%/setuidgid %%DATADIR%%/start_server %%DATADIR%%/status/index.html %%MRUBY%%%%DATADIR%%/mruby/acl.rb %%MRUBY%%%%DATADIR%%/mruby/bootstrap.rb %%MRUBY%%%%DATADIR%%/mruby/dos_detector.rb %%MRUBY%%%%DATADIR%%/mruby/htpasswd.rb %%MRUBY%%%%DATADIR%%/mruby/lru_cache.rb %%MRUBY%%%%DATADIR%%/mruby/preloads.rb %%MRUBY%%%%DATADIR%%/mruby/prometheus.rb %%MRUBY%%%%DATADIR%%/mruby/trie_addr.rb %%PORTDOCS%%%%DOCSDIR%%/assets/8mbps100msec-nginx195-h2o150.png %%PORTDOCS%%%%DOCSDIR%%/assets/firstpaintbench.png %%PORTDOCS%%%%DOCSDIR%%/assets/remotebench.png %%PORTDOCS%%%%DOCSDIR%%/assets/searchstyle.css %%PORTDOCS%%%%DOCSDIR%%/assets/staticfile612-nginx1910-h2o170.png %%PORTDOCS%%%%DOCSDIR%%/assets/style.css %%PORTDOCS%%%%DOCSDIR%%/benchmarks.html %%PORTDOCS%%%%DOCSDIR%%/configure.html %%PORTDOCS%%%%DOCSDIR%%/configure/access_control.html %%PORTDOCS%%%%DOCSDIR%%/configure/access_log_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/base_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/basic_auth.html %%PORTDOCS%%%%DOCSDIR%%/configure/cgi.html %%PORTDOCS%%%%DOCSDIR%%/configure/command_options.html %%PORTDOCS%%%%DOCSDIR%%/configure/compress_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/dos_detection.html %%PORTDOCS%%%%DOCSDIR%%/configure/errordoc_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/expires_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/fastcgi_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/file_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/h2olog.html %%PORTDOCS%%%%DOCSDIR%%/configure/headers_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/http1_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/http2_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/http3_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/mruby_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/mruby.html %%PORTDOCS%%%%DOCSDIR%%/configure/proxy_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/quick_start.html %%PORTDOCS%%%%DOCSDIR%%/configure/redirect_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/reproxy_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/server_timing_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/status_directives.html %%PORTDOCS%%%%DOCSDIR%%/configure/syntax_and_structure.html %%PORTDOCS%%%%DOCSDIR%%/configure/throttle_response_directives.html %%PORTDOCS%%%%DOCSDIR%%/examples/doc_root.alternate/index.txt %%PORTDOCS%%%%DOCSDIR%%/examples/doc_root.third/index.txt %%PORTDOCS%%%%DOCSDIR%%/examples/doc_root/index.html %%PORTDOCS%%%%DOCSDIR%%/examples/h2o_mruby/h2o.conf %%PORTDOCS%%%%DOCSDIR%%/examples/h2o_mruby/hello.rb %%PORTDOCS%%%%DOCSDIR%%/examples/h2o/alternate.crt %%PORTDOCS%%%%DOCSDIR%%/examples/h2o/alternate.key %%PORTDOCS%%%%DOCSDIR%%/examples/h2o/ech.key %%PORTDOCS%%%%DOCSDIR%%/examples/h2o/h2o.conf %%PORTDOCS%%%%DOCSDIR%%/examples/h2o/server.crt %%PORTDOCS%%%%DOCSDIR%%/examples/h2o/server.key %%PORTDOCS%%%%DOCSDIR%%/examples/h2o/server.pub %%PORTDOCS%%%%DOCSDIR%%/examples/h2o/wildcard.crt %%PORTDOCS%%%%DOCSDIR%%/examples/h2o/wildcard.key %%PORTDOCS%%%%DOCSDIR%%/examples/libh2o/latency-optimization.c %%PORTDOCS%%%%DOCSDIR%%/examples/libh2o/redis-client.c %%PORTDOCS%%%%DOCSDIR%%/examples/libh2o/simple.c %%PORTDOCS%%%%DOCSDIR%%/examples/libh2o/socket-client.c %%PORTDOCS%%%%DOCSDIR%%/examples/libh2o/websocket.c %%PORTDOCS%%%%DOCSDIR%%/faq.html %%PORTDOCS%%%%DOCSDIR%%/h2o.conf.5 %%PORTDOCS%%%%DOCSDIR%%/index.html %%PORTDOCS%%%%DOCSDIR%%/install.html %%PORTDOCS%%%%DOCSDIR%%/search/jquery-1.9.1.min.js %%PORTDOCS%%%%DOCSDIR%%/search/oktavia-english-search.js %%PORTDOCS%%%%DOCSDIR%%/search/oktavia-jquery-ui.js %%PORTDOCS%%%%DOCSDIR%%/search/searchindex.js bin/h2o include/h2o.h include/h2o/absprio.h include/h2o/balancer.h include/h2o/cache_digests.h include/h2o/cache.h include/h2o/configurator.h include/h2o/ebpf.h include/h2o/file.h include/h2o/filecache.h include/h2o/header.h include/h2o/hiredis_.h include/h2o/hostinfo.h include/h2o/hpack.h include/h2o/http1.h include/h2o/http2_casper.h include/h2o/http2_common.h include/h2o/http2_internal.h include/h2o/http2_scheduler.h include/h2o/http2.h include/h2o/http3_common.h include/h2o/http3_internal.h include/h2o/http3_server.h include/h2o/httpclient.h include/h2o/linklist.h include/h2o/memcached.h include/h2o/memory.h include/h2o/mruby_.h include/h2o/multithread.h include/h2o/openssl_backport.h include/h2o/qpack.h include/h2o/rand.h include/h2o/redis.h include/h2o/send_state.h include/h2o/serverutil.h include/h2o/socket.h include/h2o/socket/evloop.h include/h2o/socket/uv-binding.h include/h2o/socketpool.h include/h2o/string_.h include/h2o/time_.h include/h2o/timerwheel.h include/h2o/token_table.h include/h2o/token.h include/h2o/url.h include/h2o/version.h include/h2o/websocket.h +include/picotls.h +include/picotls/asn1.h +include/picotls/certificate_compression.h +include/picotls/ffx.h +include/picotls/fusion.h +include/picotls/mbedtls.h +include/picotls/minicrypto.h +include/picotls/openssl.h +include/picotls/pembase64.h +include/picotls/ptlsbcrypt.h +include/quicly.h +include/quicly/cc.h +include/quicly/cid.h +include/quicly/constants.h +include/quicly/defaults.h +include/quicly/frame.h +include/quicly/linklist.h +include/quicly/local_cid.h +include/quicly/loss.h +include/quicly/maxsender.h +include/quicly/pacer.h +include/quicly/ranges.h +include/quicly/rate.h +include/quicly/recvstate.h +include/quicly/remote_cid.h +include/quicly/retire_cid.h +include/quicly/sendstate.h +include/quicly/sentmap.h +include/quicly/streambuf.h libdata/pkgconfig/libh2o-evloop.pc libdata/pkgconfig/libh2o.pc share/man/man5/h2o.conf.5.gz share/man/man8/h2o.8.gz