aboutsummaryrefslogtreecommitdiff
path: root/www/varnish
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2012-10-23 15:34:47 +0000
committerMikhail Teterin <mi@FreeBSD.org>2012-10-23 15:34:47 +0000
commit2beb272c21c59e190ab211cffdff99d0fc68f0a6 (patch)
treefeea6bec5fded5816a4fe52b26658c2e6c5e635d /www/varnish
parent38fb69522250aaddc3c6dd73ed50a6d1a927d45d (diff)
downloadports-2beb272c21c59e190ab211cffdff99d0fc68f0a6.tar.gz
ports-2beb272c21c59e190ab211cffdff99d0fc68f0a6.zip
Notes
Diffstat (limited to 'www/varnish')
-rw-r--r--www/varnish/Makefile34
-rw-r--r--www/varnish/files/bug-1201.patch15
-rw-r--r--www/varnish/files/no-inet6.patch8
-rw-r--r--www/varnish/files/patch-bug-120212
-rw-r--r--www/varnish/files/patch-digest72
-rw-r--r--www/varnish/pkg-plist13
6 files changed, 138 insertions, 16 deletions
diff --git a/www/varnish/Makefile b/www/varnish/Makefile
index 8c26e7638dfc..6d9fa0ac6965 100644
--- a/www/varnish/Makefile
+++ b/www/varnish/Makefile
@@ -2,6 +2,7 @@
PORTNAME= varnish
PORTVERSION= 3.0.3
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://repo.varnish-cache.org/source/
@@ -10,20 +11,20 @@ COMMENT= The Varnish high-performance HTTP accelerator
LICENSE= BSD
-LIB_DEPENDS= pcre.1:${PORTSDIR}/devel/pcre
+LIB_DEPENDS= pcre:${PORTSDIR}/devel/pcre
CONFLICTS= varnish-2.*
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_PYTHON_BUILD= yes
-CONFIGURE_ARGS= --localstatedir=${PREFIX}
+CONFIGURE_ARGS= --localstatedir=${PREFIX} --enable-tests
CONFIGURE_ENV= RST2MAN=true
USE_LDCONFIG= yes
USE_GNOME= pkgconfig
USE_AUTOTOOLS= aclocal libtool libtoolize automake autoconf
ACLOCAL_ARGS= -I m4
-LIBTOOLFLAGS= --copy --force
+LIBTOOLFLAGS= --copy --force --disable-static
AUTOMAKE_ARGS= --add-missing --copy --foreign
MAN1= varnishadm.1 varnishd.1 varnishhist.1 varnishlog.1 \
@@ -33,10 +34,31 @@ MAN3= vmod_std.3
MAN7= vcl.7 varnish-cli.7 varnish-counters.7
USE_RC_SUBR= varnishd varnishlog varnishncsa
SUB_FILES= pkg-message
+.if defined(NO_INET6) || defined(WITHOUT_INET6)
+BAD_TESTS+= r00832
+EXTRA_PATCHES+= ${FILESDIR}/no-inet6.patch
+.endif
+MAKE_JOBS_SAFE= yes
post-patch:
@${REINPLACE_CMD} -e 's|\$$(libdir)/pkgconfig|\$$(prefix)/libdata/pkgconfig|' \
${WRKSRC}/Makefile.am
+.if defined(BAD_TESTS)
+ ${RM} -f ${BAD_TESTS:C|.+|${WRKSRC}/bin/varnishtest/tests/\0.vtc|}
+.endif
+
+regression-test check test: build
+ ${GMAKE} TESTS_PARALLELISM=1 -C ${WRKSRC} check
+
+post-build:
+ #
+ # It is highly recommended, that you verify the build's
+ # correctness by performing:
+ #
+ # make check
+ #
+ # now...
+ #
post-install:
@${MKDIR} ${PREFIX}/share/varnish
@@ -44,13 +66,17 @@ post-install:
.for f in cache.h heritage.h steps.h common.h acct_fields.h locks.h body_status.h
@${INSTALL_DATA} ${WRKSRC}/bin/varnishd/${f} ${PREFIX}/include/varnish
.endfor
-.for f in vct.h vmod_abi.h vrt.h vqueue.h vsb.h libvarnish.h miniobj.h vas.h vav.h http_headers.h vcl_returns.h
+.for f in vct.h vmod_abi.h vre.h vrt.h vqueue.h vsb.h libvarnish.h miniobj.h vas.h vav.h http_headers.h vcl_returns.h
@${INSTALL_DATA} ${WRKSRC}/include/${f} ${PREFIX}/include/varnish
.endfor
@${CAT} ${PKGMESSAGE}
+ @${RM} -f ${PREFIX}/lib/libvarnishapi.*a ${PREFIX}/lib/varnish/lib*a ${PREFIX}/lib/varnish/vmods/lib*a
.include <bsd.port.pre.mk>
+.if ${ARCH} == "i386"
+EXTRA_PATCHES+= ${FILESDIR}/bug-1201.patch
+.endif
.if ${ARCH} == "arm"
BROKEN= Does not configure on arm
.endif
diff --git a/www/varnish/files/bug-1201.patch b/www/varnish/files/bug-1201.patch
new file mode 100644
index 000000000000..e0872f346bc9
--- /dev/null
+++ b/www/varnish/files/bug-1201.patch
@@ -0,0 +1,15 @@
+Use larger stack-size for the r01109 test. See:
+
+ https://www.varnish-cache.org/trac/ticket/1201
+
+for details.
+
+--- bin/varnishtest/tests/r01109.vtc 2012-08-20 05:20:39.000000000 -0400
++++ bin/varnishtest/tests/r01109.vtc 2012-10-10 09:06:29.000000000 -0400
+@@ -22,5 +22,5 @@
+ } -start
+
+-varnish v1 -arg "-pfetch_chunksize=4k" -arg "-pgzip_level=0" -vcl+backend {
++varnish v1 -arg "-pfetch_chunksize=4k" -arg "-pgzip_level=0" -arg "-pthread_pool_stack=131072" -vcl+backend {
+ sub vcl_fetch {
+ if (req.url ~ "/test") {
diff --git a/www/varnish/files/no-inet6.patch b/www/varnish/files/no-inet6.patch
new file mode 100644
index 000000000000..56d16e63b100
--- /dev/null
+++ b/www/varnish/files/no-inet6.patch
@@ -0,0 +1,8 @@
+--- bin/varnishtest/tests/c00005.vtc 2012-08-20 05:20:39.000000000 -0400
++++ bin/varnishtest/tests/c00005.vtc 2012-09-26 12:09:59.000000000 -0400
+@@ -32,5 +32,4 @@
+ ! "localhost";
+ "0.0.0.0" / 0;
+- "::" / 0;
+ }
+
diff --git a/www/varnish/files/patch-bug-1202 b/www/varnish/files/patch-bug-1202
new file mode 100644
index 000000000000..aa7e78af40ed
--- /dev/null
+++ b/www/varnish/files/patch-bug-1202
@@ -0,0 +1,12 @@
+See:
+ https://www.varnish-cache.org/trac/ticket/1202
+
+--- bin/varnishtest/vtc_log.c 2012-08-20 05:20:40.000000000 -0400
++++ bin/varnishtest/vtc_log.c 2012-10-01 12:35:45.000000000 -0400
+@@ -138,5 +138,5 @@
+ AZ(pthread_mutex_lock(&vl->mtx));
+ vl->act = 1;
+- assert(lvl < NLEAD);
++ assert(lvl < (int)NLEAD);
+ VSB_clear(vl->vsb);
+ VSB_printf(vl->vsb, "%s %-4s %4.1f ",
diff --git a/www/varnish/files/patch-digest b/www/varnish/files/patch-digest
new file mode 100644
index 000000000000..22ff2463481a
--- /dev/null
+++ b/www/varnish/files/patch-digest
@@ -0,0 +1,72 @@
+This arranges for using SHA256 found in -lmd, instead of
+the copy bundled with Varnish sources.
+
+ -mi
+
+P.S. OpenSSL has the same SHA256 API and could also be used
+for the same purpose.
+--- include/vsha256.h 2012-08-20 05:20:40.000000000 -0400
++++ include/vsha256.h 2012-09-26 14:28:29.000000000 -0400
+@@ -28,20 +28,8 @@
+
+ #ifndef _SHA256_H_
+-#define _SHA256_H_
+
+-#include <stdint.h>
++#include <sha256.h>
+
+ #define SHA256_LEN 32
+
+-typedef struct SHA256Context {
+- uint32_t state[8];
+- uint64_t count;
+- unsigned char buf[64];
+-} SHA256_CTX;
+-
+-void SHA256_Init(SHA256_CTX *);
+-void SHA256_Update(SHA256_CTX *, const void *, size_t);
+-void SHA256_Final(unsigned char [SHA256_LEN], SHA256_CTX *);
+-void SHA256_Test(void);
+-
+ #endif /* !_SHA256_H_ */
+--- lib/libvarnish/Makefile.am 2012-08-20 05:20:40.000000000 -0400
++++ lib/libvarnish/Makefile.am 2012-09-26 14:28:35.000000000 -0400
+@@ -26,10 +26,10 @@
+ vre.c \
+ vsb.c \
+- vsha256.c \
+ vss.c \
+ vtmpfile.c
+
+ libvarnish_la_CFLAGS = -DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"'
+ libvarnish_la_LIBADD = ${RT_LIBS} ${NET_LIBS} ${LIBM} @PCRE_LIBS@
++libvarnish_la_LIBADD+= -lmd
+
+ if ENABLE_TESTS
+--- lib/libvarnishapi/Makefile.am 2012-08-20 05:20:40.000000000 -0400
++++ lib/libvarnishapi/Makefile.am 2012-09-26 14:36:57.000000000 -0400
+@@ -21,5 +21,4 @@
+ ../libvarnish/vre.c \
+ ../libvarnish/vsb.c \
+- ../libvarnish/vsha256.c \
+ vsm.c \
+ vsl_arg.c \
+@@ -31,5 +30,5 @@
+ -DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"'
+
+-libvarnishapi_la_LIBADD = @PCRE_LIBS@
++libvarnishapi_la_LIBADD = @PCRE_LIBS@ -lmd
+
+ if HAVE_LD_VERSION_SCRIPT
+--- bin/varnishd/varnishd.c 2012-08-20 05:20:40.000000000 -0400
++++ bin/varnishd/varnishd.c 2012-09-26 14:50:04.000000000 -0400
+@@ -391,9 +391,4 @@
+ assert(TIM_parse("Sun Nov 6 08:49:37 1994") == 784111777);
+
+- /*
+- * Check that our SHA256 works
+- */
+- SHA256_Test();
+-
+ memset(cli, 0, sizeof cli);
+ cli[0].sb = VSB_new_auto();
diff --git a/www/varnish/pkg-plist b/www/varnish/pkg-plist
index d40b307d8ec5..b3ecfa560292 100644
--- a/www/varnish/pkg-plist
+++ b/www/varnish/pkg-plist
@@ -26,6 +26,7 @@ include/varnish/vcli.h
include/varnish/vct.h
include/varnish/vmod_abi.h
include/varnish/vqueue.h
+include/varnish/vre.h
include/varnish/vrt.h
include/varnish/vsb.h
include/varnish/vsc.h
@@ -35,24 +36,12 @@ include/varnish/vsl.h
include/varnish/vsl_tags.h
include/varnish/vsm.h
lib/varnish/libvarnish.so
-lib/varnish/libvarnish.la
-lib/varnish/libvarnish.a
lib/varnish/libvarnishcompat.so
-lib/varnish/libvarnishcompat.la
-lib/varnish/libvarnishcompat.a
lib/varnish/libvcl.so
-lib/varnish/libvcl.la
-lib/varnish/libvcl.a
lib/varnish/libvgz.so
-lib/varnish/libvgz.la
-lib/varnish/libvgz.a
lib/varnish/vmods/libvmod_std.so
-lib/varnish/vmods/libvmod_std.la
-lib/varnish/vmods/libvmod_std.a
lib/libvarnishapi.so.1
lib/libvarnishapi.so
-lib/libvarnishapi.la
-lib/libvarnishapi.a
libdata/pkgconfig/varnishapi.pc
sbin/varnishd
share/varnish/vmod.py