Skip to content

Commit

Permalink
www/h2o: fix for building with LibreSSL 3.5.3
Browse files Browse the repository at this point in the history
PR:		266659
Sponsored by:	SkunkWerks, GmbH
  • Loading branch information
dch committed Nov 13, 2022
1 parent 8bb719f commit c145b65
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
26 changes: 14 additions & 12 deletions www/h2o/Makefile
@@ -1,22 +1,23 @@
PORTNAME= h2o
DISTVERSIONPREFIX= v
DISTVERSION= 2.2.6
PORTREVISION= 1
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= MIT BSD2CLAUSE
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
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
BROKEN_FreeBSD_12_powerpc64= fails to link: unrecognized option '-Wl,-rpath=/usr/local/lib/gcc6'

LIB_DEPENDS= libuv.so:devel/libuv

USES= cmake:noninja compiler:c11 cpe perl5 shebangfix ssl pkgconfig
USES= cmake:noninja compiler:c11 cpe perl5 pkgconfig shebangfix ssl
USE_GITHUB= yes
USE_PERL5= run
USE_LDCONFIG= yes
Expand All @@ -30,13 +31,13 @@ SHEBANG_FILES= share/h2o/start_server
PORTDOCS= README.md

SUB_FILES= ${PORTNAME} ${PORTNAME}.conf.sample
SUB_LIST+= H2O_USER=${H2O_USER} \
H2O_GROUP=${H2O_GROUP} \
H2O_LOGDIR=${H2O_LOGDIR}
SUB_LIST+= H2O_GROUP=${H2O_GROUP} \
H2O_LOGDIR=${H2O_LOGDIR} \
H2O_USER=${H2O_USER}

PLIST_SUB= H2O_USER=${H2O_USER} \
H2O_GROUP=${H2O_GROUP} \
H2O_LOGDIR=${H2O_LOGDIR}
PLIST_SUB= H2O_GROUP=${H2O_GROUP} \
H2O_LOGDIR=${H2O_LOGDIR} \
H2O_USER=${H2O_USER}

H2O_USER?= www
H2O_GROUP?= www
Expand All @@ -45,12 +46,13 @@ H2O_LOGDIR= /var/log/${PORTNAME}/

USE_RC_SUBR= ${PORTNAME}

OPTIONS_DEFINE= MRUBY DOCS
OPTIONS_DEFINE= DOCS MRUBY
OPTIONS_DEFAULT= MRUBY
OPTIONS_SUB= yes
MRUBY_DESC= Build with embedded mruby handler support

CMAKE_ARGS+= -DBUILD_SHARED_LIBS=ON -DWITH_BUNDLED_SSL=OFF
CMAKE_ARGS+= -DBUILD_SHARED_LIBS=ON \
-DWITH_BUNDLED_SSL=OFF

MRUBY_CMAKE_BOOL= WITH_MRUBY
MRUBY_USES= bison
Expand Down
13 changes: 12 additions & 1 deletion www/h2o/files/patch-deps_neverbleed_neverbleed.c
@@ -1,6 +1,17 @@
--- deps/neverbleed/neverbleed.c.orig 2019-08-12 14:09:44 UTC
+++ deps/neverbleed/neverbleed.c
@@ -630,7 +630,7 @@ static int sign_stub(struct expbuf_t *buf)
@@ -45,7 +45,9 @@
#endif
#include "neverbleed.h"

-#if (!defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x1010000fL)
+#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL \
+ || (defined(LIBRESSL_VERSION_NUMBER) \
+ && LIBRESSL_VERSION_NUMBER >= 0x3050300fL))
#define OPENSSL_1_1_API 1
#else
#define OPENSSL_1_1_API 0
@@ -630,7 +632,7 @@ static int sign_stub(struct expbuf_t *buf)
return 0;
}

Expand Down

0 comments on commit c145b65

Please sign in to comment.