aboutsummaryrefslogtreecommitdiff
path: root/www/mod_spdy
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2012-05-17 23:43:37 +0000
committerSteve Wills <swills@FreeBSD.org>2012-05-17 23:43:37 +0000
commita411b2130c9e151ee97266c3184b2806d4df23a6 (patch)
tree911295bfabab6a5c61d8c3e75717a3312c8b8e7a /www/mod_spdy
parent05659b40509ead6a63db5d69d5b6c5268001d58a (diff)
Notes
Diffstat (limited to 'www/mod_spdy')
-rw-r--r--www/mod_spdy/Makefile73
-rw-r--r--www/mod_spdy/distinfo4
-rw-r--r--www/mod_spdy/files/mod_spdy.conf.in24
-rw-r--r--www/mod_spdy/files/patch-apr.gyp11
-rw-r--r--www/mod_spdy/files/patch-aprutil.gyp11
-rw-r--r--www/mod_spdy/files/patch-gyp_chromium8
-rw-r--r--www/mod_spdy/files/patch-mod_spdy.cc13
-rw-r--r--www/mod_spdy/files/patch-spdy_protocol_test.cc18
-rw-r--r--www/mod_spdy/files/patch-sys_byteorder.h40
-rw-r--r--www/mod_spdy/files/pkg-message.in16
-rw-r--r--www/mod_spdy/pkg-plist6
11 files changed, 168 insertions, 56 deletions
diff --git a/www/mod_spdy/Makefile b/www/mod_spdy/Makefile
index fa8912640e41..db5431580c31 100644
--- a/www/mod_spdy/Makefile
+++ b/www/mod_spdy/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= mod_spdy
-PORTVERSION= 0.9.1.5
+PORTVERSION= 0.9.2.1
CATEGORIES= www
MASTER_SITES= http://www.club.kyutech.ac.jp/~masaki/ports/:mod_spdy \
${MASTER_SITE_APACHE_HTTPD}:apache22 \
@@ -28,14 +28,11 @@ BUILD_DEPENDS= greadlink:${PORTSDIR}/sysutils/coreutils \
LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo
USE_XZ= yes
-USE_BINUTILS= yes
USE_APACHE= 22+
USE_PYTHON= 2.6+
USE_GMAKE= yes
-MAKE_JOBS_SAFE= yes
ONLY_FOR_ARCHS= amd64 i386
LDFLAGS+= -L${LOCALBASE}/lib
-MAKE_ENV+= BUILDTYPE=Release
WRKSRC= ${WRKDIR}/${PORTNAME}_source_${PORTVERSION}/mod_spdy/src
GYP_DEFINES+= \
use_system_apache_dev=1 \
@@ -45,9 +42,54 @@ GYP_DEFINES+= \
system_include_path_aprutil=${LOCALBASE}/include/apr-1 \
system_include_path_execinfo=${LOCALBASE}/include \
include_dirs=${LOCALBASE}/include
-SUB_FILES= pkg-message
-SUB_LIST= DATADIR=${DATADIR} \
- APACHEMODDIR=${PREFIX}/${APACHEMODDIR}
+
+OPTIONS= CLANG "Build with Clang" on \
+ GCC46 "Build with GCC 4.6+" off \
+ DEBUG "Compile with debug symbols and verbose output" off
+
+.include <bsd.port.options.mk>
+
+.if ${OSVERSION} < 900033 || defined(WITH_GCC46)
+BUILD_DEPENDS+= ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils
+CONFIGURE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
+MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
+.endif
+
+.if !defined(WITH_GCC46) && !defined(WITH_CLANG)
+IGNORE= does not compile with base gcc
+.endif
+
+.if defined(WITH_GCC46) && defined(WITH_CLANG)
+IGNORE= conflicting options (CLANG and GCC46)
+.endif
+
+.if defined(WITH_GCC46)
+USE_GCC?= 4.6+
+.endif
+
+.if defined(WITH_CLANG)
+.if ${OSVERSION} < 900033
+BUILD_DEPENDS+= clang:${PORTSDIR}/lang/clang
+.endif
+CC= clang
+CXX= clang++
+CPP= clang-cpp
+GYP_DEFINES+= clang=1
+.endif
+
+.if !defined(WITH_DEBUG)
+BUILDTYPE= Release
+.else
+MAKE_ENV+= V=1
+BUILDTYPE= Debug
+.endif
+
+MAKE_ENV+= BUILDTYPE=${BUILDTYPE}
+MAKE_JOBS_SAFE= yes
+CFLAGS+= -Wno-error
+
+SUB_FILES+= mod_spdy.conf
+SUB_LIST+= APACHEMODDIR=${APACHEMODDIR}
.include <bsd.port.pre.mk>
@@ -64,22 +106,21 @@ post-patch:
@${REINPLACE_CMD} -e 's|#!/bin/bash|#!${LOCALBASE}/bin/bash|' \
${WRKSRC}/build_modssl_with_npn.sh
-pre-build:
- @cd ${WRKSRC} && \
- BUILDROOT=${WRKSRC}/temp ${WRKSRC}/build_modssl_with_npn.sh
-
do-configure:
@cd ${WRKSRC} && \
GYP_DEFINES="${GYP_DEFINES}" ${PYTHON_CMD} \
../../depot_tools/gclient.py runhooks
-do-install:
+pre-build:
@cd ${WRKSRC} && \
- ${INSTALL} out/Release/libmod_spdy.so ${PREFIX}/${APACHEMODDIR}/mod_spdy.so
- @${MKDIR} ${DATADIR}
- @${INSTALL} ${WRKSRC}/mod_ssl.so ${DATADIR}/mod_ssl.so
+ BUILDROOT=${WRKSRC}/temp ${WRKSRC}/build_modssl_with_npn.sh
+
+do-install:
+ @${INSTALL} ${WRKSRC}/out/${BUILDTYPE}/libmod_spdy.so ${PREFIX}/${APACHEMODDIR}/mod_spdy.so
+ @${INSTALL} ${WRKSRC}/mod_ssl.so ${PREFIX}/${APACHEMODDIR}/mod_ssl_with_npn.so
+ @${INSTALL_DATA} ${WRKDIR}/mod_spdy.conf ${PREFIX}/${APACHEETCDIR}/Includes
post-install:
- @${CAT} ${PKGMESSAGE}
+ @${REINPLACE_CMD} -e 's/mod_ssl.so/mod_ssl_with_npn.so/g' ${PREFIX}/${APACHEETCDIR}/httpd.conf
.include <bsd.port.post.mk>
diff --git a/www/mod_spdy/distinfo b/www/mod_spdy/distinfo
index 5087bb28794f..8212d13c4d4b 100644
--- a/www/mod_spdy/distinfo
+++ b/www/mod_spdy/distinfo
@@ -1,5 +1,5 @@
-SHA256 (mod_spdy/mod_spdy_source_0.9.1.5.tar.xz) = c57d04849519f996b9466290e8f52675510b03abe1a00cf298af14cc8a6f8d0a
-SIZE (mod_spdy/mod_spdy_source_0.9.1.5.tar.xz) = 4382188
+SHA256 (mod_spdy/mod_spdy_source_0.9.2.1.tar.xz) = 841725c549bf41caa99232231bb01947a319c7b5ab7c046c919c4a78e24d930f
+SIZE (mod_spdy/mod_spdy_source_0.9.2.1.tar.xz) = 4792132
SHA256 (mod_spdy/httpd-2.2.22.tar.gz) = 74c1ffffefe1a502339b004ad6488fbd858eb425a05968cd67c05695dbc0fe7c
SIZE (mod_spdy/httpd-2.2.22.tar.gz) = 7200529
SHA256 (mod_spdy/openssl-1.0.1.tar.gz) = 4d9f0a594a9a89b28e1a04a9504c04104f6508ee27ad1e0efdd17a7a6dbbeeee
diff --git a/www/mod_spdy/files/mod_spdy.conf.in b/www/mod_spdy/files/mod_spdy.conf.in
new file mode 100644
index 000000000000..a3188b8c2950
--- /dev/null
+++ b/www/mod_spdy/files/mod_spdy.conf.in
@@ -0,0 +1,24 @@
+LoadModule spdy_module %%APACHEMODDIR%%/mod_spdy.so
+
+<IfModule spdy_module>
+ # Turn on mod_spdy. To completely disable mod_spdy, you can set
+ # this to "off".
+ SpdyEnabled on
+
+ # In order to support concurrent multiplexing of requests over a
+ # single connection, mod_spdy maintains its own thread pool in
+ # each Apache child process for processing requests. The default
+ # size of this thread pool is very conservative; you can override
+ # it with a larger value (as below) to increase concurrency, at
+ # the possible cost of increased memory usage.
+ #
+ #SpdyMaxThreadsPerProcess 30
+
+ # Memory usage can also be affected by the maximum number of
+ # simultaneously open SPDY streams permitted for each client
+ # connection. Ideally, this limit should be set as high as
+ # possible, but you can tweak it as necessary to limit memory
+ # consumption.
+ #
+ #SpdyMaxStreamsPerConnection 100
+</IfModule>
diff --git a/www/mod_spdy/files/patch-apr.gyp b/www/mod_spdy/files/patch-apr.gyp
new file mode 100644
index 000000000000..99fc403cf297
--- /dev/null
+++ b/www/mod_spdy/files/patch-apr.gyp
@@ -0,0 +1,11 @@
+--- third_party/apache/apr/apr.gyp.old 2012-05-14 20:42:31.000000000 +0900
++++ third_party/apache/apr/apr.gyp 2012-05-14 21:46:57.000000000 +0900
+@@ -201,7 +201,7 @@
+ },
+ {
+ 'target_name': 'apr',
+- 'type': 'settings',
++ 'type': '<(library)',
+ 'dependencies': [
+ 'include',
+ ],
diff --git a/www/mod_spdy/files/patch-aprutil.gyp b/www/mod_spdy/files/patch-aprutil.gyp
new file mode 100644
index 000000000000..d303ce8e0d49
--- /dev/null
+++ b/www/mod_spdy/files/patch-aprutil.gyp
@@ -0,0 +1,11 @@
+--- third_party/apache/aprutil/aprutil.gyp.old 2012-05-14 20:42:31.000000000 +0900
++++ third_party/apache/aprutil/aprutil.gyp 2012-05-14 21:47:36.000000000 +0900
+@@ -142,7 +142,7 @@
+ },
+ {
+ 'target_name': 'aprutil',
+- 'type': 'settings',
++ 'type': '<(library)',
+ 'dependencies': [
+ 'include',
+ ],
diff --git a/www/mod_spdy/files/patch-gyp_chromium b/www/mod_spdy/files/patch-gyp_chromium
new file mode 100644
index 000000000000..dde68340971d
--- /dev/null
+++ b/www/mod_spdy/files/patch-gyp_chromium
@@ -0,0 +1,8 @@
+--- build/gyp_chromium.old 2012-05-14 20:42:30.000000000 +0900
++++ build/gyp_chromium 2012-05-14 22:00:42.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python
+
+ # Copyright 2010 Google Inc.
+ #
diff --git a/www/mod_spdy/files/patch-mod_spdy.cc b/www/mod_spdy/files/patch-mod_spdy.cc
index 733dbaaa9510..8bfe9ece6689 100644
--- a/www/mod_spdy/files/patch-mod_spdy.cc
+++ b/www/mod_spdy/files/patch-mod_spdy.cc
@@ -1,5 +1,5 @@
---- mod_spdy/mod_spdy.cc.org 2012-03-31 16:28:56.745777000 +0900
-+++ mod_spdy/mod_spdy.cc 2012-03-31 20:48:01.337782696 +0900
+--- mod_spdy/mod_spdy.cc.orig 2012-05-14 20:42:33.000000000 +0900
++++ mod_spdy/mod_spdy.cc 2012-05-17 23:33:20.000000000 +0900
@@ -22,6 +22,9 @@
#include "httpd.h"
#include "http_connection.h"
@@ -10,3 +10,12 @@
#include "http_log.h"
#include "http_protocol.h"
#include "http_request.h"
+@@ -790,7 +793,7 @@
+
+ // Declare our module object (note that "module" is a typedef for "struct
+ // module_struct"; see http_config.h for the definition of module_struct).
+- module AP_MODULE_DECLARE_DATA spdy_module = {
++ struct module_struct __attribute__((visibility("default"))) spdy_module = {
+ // This next macro indicates that this is a (non-MPM) Apache 2.0 module
+ // (the macro actually expands to multiple comma-separated arguments; see
+ // http_config.h for the definition):
diff --git a/www/mod_spdy/files/patch-spdy_protocol_test.cc b/www/mod_spdy/files/patch-spdy_protocol_test.cc
deleted file mode 100644
index 8b331af16336..000000000000
--- a/www/mod_spdy/files/patch-spdy_protocol_test.cc
+++ /dev/null
@@ -1,18 +0,0 @@
---- net/spdy/spdy_protocol_test.cc.org 2012-03-31 16:28:55.670784000 +0900
-+++ net/spdy/spdy_protocol_test.cc 2012-03-31 20:49:17.303795861 +0900
-@@ -239,13 +239,13 @@
- frame.set_stream_id(0);
- // TODO(mbelshe): implement EXPECT_DEBUG_DEATH on windows.
- #ifndef WIN32
-- EXPECT_DEBUG_DEATH(frame.set_stream_id(~0), "");
-+ EXPECT_DEATH_IF_SUPPORTED(frame.set_stream_id(~0), "");
- #endif
- EXPECT_FALSE(frame.is_control_frame());
-
- frame.set_flags(0);
- #ifndef WIN32
-- EXPECT_DEBUG_DEATH(frame.set_length(~0), "");
-+ EXPECT_DEATH_IF_SUPPORTED(frame.set_length(~0), "");
- #endif
- EXPECT_EQ(0, frame.flags());
- }
diff --git a/www/mod_spdy/files/patch-sys_byteorder.h b/www/mod_spdy/files/patch-sys_byteorder.h
new file mode 100644
index 000000000000..ec3a5237b858
--- /dev/null
+++ b/www/mod_spdy/files/patch-sys_byteorder.h
@@ -0,0 +1,40 @@
+--- third_party/chromium/src/base/sys_byteorder.h.org 2012-05-15 13:15:00.000000000 +0900
++++ third_party/chromium/src/base/sys_byteorder.h 2012-05-15 13:32:03.000000000 +0900
+@@ -25,7 +25,7 @@
+ #include <stdlib.h>
+ #elif defined(OS_MACOSX)
+ #include <libkern/OSByteOrder.h>
+-#elif defined(OS_OPENBSD)
++#elif defined(OS_OPENBSD) || defined(OS_FREEBSD)
+ #include <sys/endian.h>
+ #else
+ #include <byteswap.h>
+@@ -42,6 +42,8 @@
+ return OSSwapInt16(x);
+ #elif defined(OS_OPENBSD)
+ return swap16(x);
++#elif defined(OS_FREEBSD)
++ return bswap16(x);
+ #else
+ return bswap_16(x);
+ #endif
+@@ -53,6 +55,8 @@
+ return OSSwapInt32(x);
+ #elif defined(OS_OPENBSD)
+ return swap32(x);
++#elif defined(OS_FREEBSD)
++ return bswap32(x);
+ #else
+ return bswap_32(x);
+ #endif
+@@ -63,7 +67,9 @@
+ #elif defined(OS_MACOSX)
+ return OSSwapInt64(x);
+ #elif defined(OS_OPENBSD)
+- return swap64(x);
++ return swap64(x);
++#elif defined(OS_FREEBSD)
++ return bswap64(x);
+ #else
+ return bswap_64(x);
+ #endif
diff --git a/www/mod_spdy/files/pkg-message.in b/www/mod_spdy/files/pkg-message.in
deleted file mode 100644
index db33f9db18f1..000000000000
--- a/www/mod_spdy/files/pkg-message.in
+++ /dev/null
@@ -1,16 +0,0 @@
-==============================================================================
-To enable mod_spdy, add these lines:
-
-LoadModule spdy_module libexec/apache22/mod_spdy.so
-<IfModule spdy_module>
-SpdyEnabled on
-</IfModule>
-
-to etc/apache22/httpd.conf
-------------------------------------------------------------------------------
-In order for mod_spdy to function properly, please backup your mod_ssl.so and
-and install the one compiled by this port using these commands:
-
-cp %%APACHEMODDIR%%/mod_ssl.so %%DATADIR%%/mod_ssl.so.old
-cp %%DATADIR%%/mod_ssl.so %%APACHEMODDIR%%/
-==============================================================================
diff --git a/www/mod_spdy/pkg-plist b/www/mod_spdy/pkg-plist
index 1c3ca3cdd155..2cc0546680ab 100644
--- a/www/mod_spdy/pkg-plist
+++ b/www/mod_spdy/pkg-plist
@@ -1,3 +1,5 @@
+@unexec /usr/bin/sed -i '' 's/mod_ssl_with_npn.so/mod_ssl.so/g' %D/%%APACHEETCDIR%%/httpd.conf
%%APACHEMODDIR%%/mod_spdy.so
-%%DATADIR%%/mod_ssl.so
-@dirrmtry %%DATADIR%%
+%%APACHEMODDIR%%/mod_ssl_with_npn.so
+%%APACHEETCDIR%%/Includes/mod_spdy.conf
+@exec /usr/bin/sed -i '' -e 's/mod_ssl.so/mod_ssl_with_npn.so/g' %D/%%APACHEETCDIR%%/httpd.conf