Revised to include the rc script which I forget to cvs add before sending the previous diff. Thanks to gonzalo for catching that error. I also included updates from gonzalo's previous 3.0.3 patch. Again, many thanks to gonzalo!
OK? jim@
? patches/patch-bin_varnishtest_Makefile_am ? patches/patch-bin_varnishtest_Makefile_in Index: Makefile =================================================================== RCS file: /cvs/ports/www/varnish/Makefile,v retrieving revision 1.14 diff -u -p -r1.14 Makefile --- Makefile 21 Mar 2013 08:48:55 -0000 1.14 +++ Makefile 13 Jul 2013 21:36:06 -0000 @@ -4,7 +4,7 @@ SHARED_ONLY = Yes COMMENT = high-performance HTTP accelerator -DISTNAME = varnish-3.0.2 +DISTNAME = varnish-3.0.4 CATEGORIES = www SHARED_LIBS = varnishapi 1.0 @@ -16,16 +16,14 @@ HOMEPAGE = http://www.varnish-cache.org # BSD PERMIT_PACKAGE_CDROM = Yes -WANTLIB = c curses edit m pcre pthread +WANTLIB = c curses m pcre pthread readline termcap BUILD_DEPENDS = textproc/py-docutils LIB_DEPENDS = devel/pcre MASTER_SITES = http://repo.varnish-cache.org/source/ -USE_GROFF = Yes -CONFIGURE_STYLE = autoconf -AUTOCONF_VERSION = 2.68 +CONFIGURE_STYLE = gnu TEST_TARGET = check @@ -34,7 +32,5 @@ post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/varnish mv ${WRKINST}${SYSCONFDIR}/varnish/default.vcl \ ${PREFIX}/share/examples/varnish - @find ${PREFIX}/lib/varnish -name '*.a' -print | xargs rm - @find ${PREFIX}/lib/varnish -name '*.la' -print | xargs rm .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/www/varnish/distinfo,v retrieving revision 1.4 diff -u -p -r1.4 distinfo --- distinfo 23 Dec 2011 13:06:30 -0000 1.4 +++ distinfo 13 Jul 2013 21:36:06 -0000 @@ -1,5 +1,2 @@ -MD5 (varnish-3.0.2.tar.gz) = yOrgqrvma22qvfOh9YzUeg== -RMD160 (varnish-3.0.2.tar.gz) = YJODmBW6chB/orUvChmBZ6Omt5s= -SHA1 (varnish-3.0.2.tar.gz) = kG8VNst+co0Y2UJWd5B65yOUPfc= -SHA256 (varnish-3.0.2.tar.gz) = lz9gYl6WkOCYnhu8c8N+pT/GKRuPewPWF7dvgISkokM= -SIZE (varnish-3.0.2.tar.gz) = 1977852 +SHA256 (varnish-3.0.4.tar.gz) = TgRMy1x2Iivd+JyAjxPqj2aXeXJnWuy0ipIPaACtD3k= +SIZE (varnish-3.0.4.tar.gz) = 2081361 Index: patches/patch-bin_varnishadm_varnishadm_c =================================================================== RCS file: patches/patch-bin_varnishadm_varnishadm_c diff -N patches/patch-bin_varnishadm_varnishadm_c --- patches/patch-bin_varnishadm_varnishadm_c 23 Dec 2011 13:06:30 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,15 +0,0 @@ -$OpenBSD: patch-bin_varnishadm_varnishadm_c,v 1.1 2011/12/23 13:06:30 jasper Exp $ ---- bin/varnishadm/varnishadm.c.orig Mon Oct 24 03:25:09 2011 -+++ bin/varnishadm/varnishadm.c Tue Nov 29 21:32:59 2011 -@@ -38,7 +38,11 @@ - #include <sys/socket.h> - - #ifdef HAVE_LIBEDIT -+#ifdef HAVE_READLINE_READLINE_H -+#include <readline/readline.h> -+#else - #include <editline/readline.h> -+#endif - #endif - - #include "vcli.h" Index: patches/patch-bin_varnishd_mgt_pool_c =================================================================== RCS file: patches/patch-bin_varnishd_mgt_pool_c diff -N patches/patch-bin_varnishd_mgt_pool_c --- patches/patch-bin_varnishd_mgt_pool_c 23 Dec 2011 13:06:30 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,15 +0,0 @@ -$OpenBSD: patch-bin_varnishd_mgt_pool_c,v 1.3 2011/12/23 13:06:30 jasper Exp $ ---- bin/varnishd/mgt_pool.c.orig Mon Oct 24 03:25:13 2011 -+++ bin/varnishd/mgt_pool.c Tue Nov 29 20:39:42 2011 -@@ -78,7 +78,11 @@ tweak_stack_size(struct cli *cli, const struct parspec - unsigned low, u; - char buf[12]; - -+#if defined (__OpenBSD__) -+ low = PTHREAD_STACK_MIN; -+#else - low = sysconf(_SC_THREAD_STACK_MIN); -+#endif - - if (arg != NULL && !strcmp(arg, "32bit")) { - u = 65536; Index: patches/patch-configure_ac =================================================================== RCS file: patches/patch-configure_ac diff -N patches/patch-configure_ac --- patches/patch-configure_ac 23 Dec 2011 13:06:30 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,39 +0,0 @@ -$OpenBSD: patch-configure_ac,v 1.1 2011/12/23 13:06:30 jasper Exp $ ---- configure.ac.orig Mon Oct 24 03:25:13 2011 -+++ configure.ac Tue Nov 29 21:30:07 2011 -@@ -147,9 +147,23 @@ fi - AC_SUBST(PCRE_CFLAGS) - AC_SUBST(PCRE_LIBS) - --PKG_CHECK_MODULES([LIBEDIT], [libedit], -- [AC_DEFINE([HAVE_LIBEDIT], [1], [Define we have libedit])], -- [AC_MSG_WARN([libedit not found, disabling libedit support])]) -+case $target in -+*-*-*bsd*) -+ AC_CHECK_HEADERS([readline/readline.h]) -+ AC_CHECK_LIB(edit, el_init, -+ [ AC_DEFINE([HAVE_LIBEDIT], [1], [Define we have libedit]) -+ LIBEDIT_CFLAGS="" -+ LIBEDIT_LIBS="-ledit ${CURSES_LIBS}" -+ ], -+ [AC_MSG_WARN([libedit not found, disabling libedit support])], -+ [${CURSES_LIBS}]) -+ ;; -+*) -+ PKG_CHECK_MODULES([LIBEDIT], [libedit], -+ [AC_DEFINE([HAVE_LIBEDIT], [1], [Define we have libedit])], -+ [AC_MSG_WARN([libedit not found, disabling libedit support])]) -+ ;; -+esac - - # Checks for header files. - AC_HEADER_STDC -@@ -341,7 +355,7 @@ AC_ARG_ENABLE(kqueue, - - if test "$enable_kqueue" = yes; then - case $target in -- *-*-freebsd* | *-*-darwin9* | *-*-netbsd* ) -+ *-*-freebsd* | *-*-darwin9* | *-*-netbsd* | *-*-openbsd*) - AC_CHECK_FUNCS([kqueue]) - ;; - *-*-bsd*) Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/www/varnish/pkg/PLIST,v retrieving revision 1.4 diff -u -p -r1.4 PLIST --- pkg/PLIST 23 Dec 2011 13:06:30 -0000 1.4 +++ pkg/PLIST 13 Jul 2013 21:36:06 -0000 @@ -24,11 +24,21 @@ lib/libvarnishapi.la @lib lib/libvarnishapi.so.${LIBvarnishapi_VERSION} lib/pkgconfig/varnishapi.pc lib/varnish/ +lib/varnish/libvarnish.a +lib/varnish/libvarnish.la lib/varnish/libvarnish.so +lib/varnish/libvarnishcompat.a +lib/varnish/libvarnishcompat.la lib/varnish/libvarnishcompat.so +lib/varnish/libvcl.a +lib/varnish/libvcl.la lib/varnish/libvcl.so +lib/varnish/libvgz.a +lib/varnish/libvgz.la lib/varnish/libvgz.so lib/varnish/vmods/ +lib/varnish/vmods/libvmod_std.a +lib/varnish/vmods/libvmod_std.la lib/varnish/vmods/libvmod_std.so @man man/man1/varnishadm.1 @man man/man1/varnishd.1 Index: pkg/varnishd.rc =================================================================== RCS file: pkg/varnishd.rc diff -N pkg/varnishd.rc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/varnishd.rc 13 Jul 2013 21:36:06 -0000 @@ -0,0 +1,14 @@ +#!/bin/sh +# +# $OpenBSD$ + +daemon="${TRUEPREFIX}/sbin/varnishd" +daemon_flags="-f ${SYSCONFDIR}/varnish/default.vcl" + +. /etc/rc.d/rc.subr + +pexp="varnishd: Varnish-Mgr" + +rc_reload=NO + +rc_cmd $1