OK let's forget the random stuff for now, and use a simpler diff for ALPN,
I think the way that nginx is checking for this is pretty reasonable actually,
they are trying to keep their autoconf checks clean and avoid nasty ifdefs as
much as possible, and doing it this way it's simple to remove when we do
add support.

Since the port has been broken for about a week I plan to commit this in
a couple of hours unless there are objections.

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/nginx/Makefile,v
retrieving revision 1.66
diff -u -p -r1.66 Makefile
--- Makefile    31 Oct 2014 14:40:59 -0000      1.66
+++ Makefile    7 Nov 2014 16:53:40 -0000
@@ -25,6 +25,7 @@ LIB_DEPENDS+= devel/pcre
 
 NGINX_DIR=     /var/www
 SUBST_VARS=    NGINX_DIR
+CFLAGS+=       -Wall -Wpointer-arith -Werror
 
 FLAVORS=       lua naxsi passenger
 FLAVOR?=
Index: patches/patch-src_event_ngx_event_openssl_h
===================================================================
RCS file: patches/patch-src_event_ngx_event_openssl_h
diff -N patches/patch-src_event_ngx_event_openssl_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_event_ngx_event_openssl_h 7 Nov 2014 16:53:40 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+--- src/event/ngx_event_openssl.h.orig Fri Nov  7 16:50:18 2014
++++ src/event/ngx_event_openssl.h      Fri Nov  7 16:51:52 2014
+@@ -30,6 +30,12 @@
+ #include <openssl/x509.h>
+ #include <openssl/x509v3.h>
+ 
++/*
++ * XXX nginx checks this define to detect ALPN support;
++ *     libressl has added, the macro but doesn't have support yet
++ */
++#undef TLSEXT_TYPE_application_layer_protocol_negotiation
++
+ #define NGX_SSL_NAME     "OpenSSL"
+ 
+ 

Reply via email to