Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 May 2024 15:22:08 GMT
From:      Dave Cottlehuber <dch@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: b69b773660b7 - main - www/h2o: update to latest git snapshot 20240411
Message-ID:  <202405041522.444FM8L2062806@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dch:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b69b773660b7dc164e29b56c3e89654c36b99dbc

commit b69b773660b7dc164e29b56c3e89654c36b99dbc
Author:     Dave Cottlehuber <dch@FreeBSD.org>
AuthorDate: 2024-05-04 15:22:05 +0000
Commit:     Dave Cottlehuber <dch@FreeBSD.org>
CommitDate: 2024-05-04 15:22:05 +0000

    www/h2o: update to latest git snapshot 20240411
    
    pet port
    - fix build without ruby
    - add new quicly includes
    - let ports handle fusion CPU options
    
    Differential Revision:  https://reviews.freebsd.org/D44942
    PR:             278101
    Obtained from:  diizzy
---
 www/h2o/Makefile                          | 41 +++++++------
 www/h2o/distinfo                          |  6 +-
 www/h2o/files/extra-patch-cputype-defined | 11 ++++
 www/h2o/files/patch-CMakeLists.txt        | 98 +++++++++++++++++++++++++++++++
 www/h2o/files/patch-src_ssl.c             |  4 +-
 www/h2o/pkg-plist                         | 30 +++++++++-
 6 files changed, 165 insertions(+), 25 deletions(-)

diff --git a/www/h2o/Makefile b/www/h2o/Makefile
index 80e0fa4ae240..9c8001bcca77 100644
--- a/www/h2o/Makefile
+++ b/www/h2o/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	h2o
 DISTVERSIONPREFIX=	v
-DISTVERSION=	2.3.0-dev.20240314
+DISTVERSION=	2.3.0-dev.20240411
 CATEGORIES=	www
 
 MAINTAINER=	dch@FreeBSD.org
@@ -13,23 +13,24 @@ 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}
 
@@ -49,26 +50,28 @@ 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 <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
-.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 <bsd.port.options.mk>
-
 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 <bsd.port.post.mk>
+.include <bsd.port.mk>
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,6 +1,6 @@
---- 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
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,4 +1,3 @@
-@comment bin/h2o-httpclient
 @dir(%%H2O_USER%%,%%H2O_GROUP%%,0750) %%H2O_LOGDIR%%
 @sample %%ETCDIR%%/h2o.conf.sample
 %%DATADIR%%/annotate-backtrace-symbols
@@ -126,6 +125,35 @@ 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202405041522.444FM8L2062806>