summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-05-28 00:21:25 +0000
committerMike Frysinger <vapier@gentoo.org>2013-05-28 00:21:25 +0000
commit446e13c1ae610c078d4dd221eac8e2ef34c158b7 (patch)
tree2d6f38a0156ca940ec78df197f8f5c28a613d34e /www-apache/mod_spdy
parentglance-2013.1 fix for bug 471290 (diff)
downloadgentoo-2-446e13c1ae610c078d4dd221eac8e2ef34c158b7.tar.gz
gentoo-2-446e13c1ae610c078d4dd221eac8e2ef34c158b7.tar.bz2
gentoo-2-446e13c1ae610c078d4dd221eac8e2ef34c158b7.zip
Initial ebuild #412451 by candrews.
(Portage version: 2.2.0_alpha170/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Diffstat (limited to 'www-apache/mod_spdy')
-rw-r--r--www-apache/mod_spdy/ChangeLog12
-rwxr-xr-xwww-apache/mod_spdy/files/make-snapshot.sh47
-rw-r--r--www-apache/mod_spdy/files/mod_spdy-0.9.3.3-execinfo.patch30
-rw-r--r--www-apache/mod_spdy/files/mod_spdy-0.9.3.3-system-zlib.patch39
-rw-r--r--www-apache/mod_spdy/metadata.xml7
-rw-r--r--www-apache/mod_spdy/mod_spdy-0.9.3.3.ebuild112
-rw-r--r--www-apache/mod_spdy/mod_spdy-9999.ebuild112
7 files changed, 359 insertions, 0 deletions
diff --git a/www-apache/mod_spdy/ChangeLog b/www-apache/mod_spdy/ChangeLog
new file mode 100644
index 000000000000..cdb5f911d4f6
--- /dev/null
+++ b/www-apache/mod_spdy/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for www-apache/mod_spdy
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_spdy/ChangeLog,v 1.1 2013/05/28 00:21:25 vapier Exp $
+
+*mod_spdy-0.9.3.3 (28 May 2013)
+*mod_spdy-9999 (28 May 2013)
+
+ 28 May 2013; Mike Frysinger <vapier@gentoo.org> +files/make-snapshot.sh,
+ +files/mod_spdy-0.9.3.3-execinfo.patch,
+ +files/mod_spdy-0.9.3.3-system-zlib.patch, +metadata.xml,
+ +mod_spdy-0.9.3.3.ebuild, +mod_spdy-9999.ebuild:
+ Initial ebuild #412451 by candrews.
diff --git a/www-apache/mod_spdy/files/make-snapshot.sh b/www-apache/mod_spdy/files/make-snapshot.sh
new file mode 100755
index 000000000000..0fd294a11d9c
--- /dev/null
+++ b/www-apache/mod_spdy/files/make-snapshot.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+if [[ $# -gt 1 || $1 == -* ]] ; then
+ echo "Usage: $0 [ver]"
+ exit 1
+fi
+
+set -ex
+
+SPDY_URL_BASE="http://mod-spdy.googlecode.com/svn/tags"
+
+if [[ $# -eq 1 ]] ; then
+ PV=$1
+else
+ svnout=$(svn ls ${SPDY_URL_BASE} | grep -v current | sort -V | tail -1)
+ PV=${svnout%/}
+fi
+
+PN="mod_spdy"
+P="${PN}-${PV}"
+
+: ${TMPDIR:=/tmp}
+
+tmp="${TMPDIR}/${PN}"
+rm -rf "${tmp}"
+mkdir "${tmp}"
+cd "${tmp}"
+
+DEPOT_TOOLS_URL="https://chromium.googlesource.com/chromium/tools/depot_tools.git"
+SPDY_URL="http://mod-spdy.googlecode.com/svn/tags/${PV}/src"
+
+git clone --single-branch --depth 1 ${DEPOT_TOOLS_URL}
+rm -rf depot_tools/.git
+PATH=${PWD}/depot_tools:${PATH}
+mkdir ${P}
+cd ${P}
+gclient config ${SPDY_URL}
+gclient sync --force --nohooks --delete_unversioned_trees
+cd ..
+
+tar cf - depot_tools ${P} | xz > ${P}.tar.xz
+
+mv ${P}.tar.xz "${TMPDIR}"/
+cd /
+rm -rf "${tmp}"
+
+du -hb "${TMPDIR}/${P}.tar.xz"
diff --git a/www-apache/mod_spdy/files/mod_spdy-0.9.3.3-execinfo.patch b/www-apache/mod_spdy/files/mod_spdy-0.9.3.3-execinfo.patch
new file mode 100644
index 000000000000..67b83adf3094
--- /dev/null
+++ b/www-apache/mod_spdy/files/mod_spdy-0.9.3.3-execinfo.patch
@@ -0,0 +1,30 @@
+not everyone has this header
+
+--- a/src/third_party/chromium/src/base/debug/debugger_posix.cc
++++ b/src/third_party/chromium/src/base/debug/debugger_posix.cc
+@@ -17,10 +17,6 @@
+ #include <string>
+ #include <vector>
+
+-#if !defined(OS_ANDROID) && !defined(OS_NACL)
+-#include <execinfo.h>
+-#endif
+-
+ #if defined(__GLIBCXX__)
+ #include <cxxabi.h>
+ #endif
+--- a/src/third_party/chromium/src/base/debug/stack_trace_posix.cc
++++ b/src/third_party/chromium/src/base/debug/stack_trace_posix.cc
+@@ -5,7 +5,12 @@
+ #include "base/debug/stack_trace.h"
+
+ #include <errno.h>
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ #include <execinfo.h>
++#else
++#define backtrace(array, size) 0
++#define backtrace_symbols(array, size) NULL
++#endif
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <stdlib.h>
diff --git a/www-apache/mod_spdy/files/mod_spdy-0.9.3.3-system-zlib.patch b/www-apache/mod_spdy/files/mod_spdy-0.9.3.3-system-zlib.patch
new file mode 100644
index 000000000000..797566896352
--- /dev/null
+++ b/www-apache/mod_spdy/files/mod_spdy-0.9.3.3-system-zlib.patch
@@ -0,0 +1,39 @@
+--- src/third_party/zlib/zlib.gyp
++++ src/third_party/zlib/zlib.gyp
+@@ -81,14 +81,6 @@
+ 'defines': [
+ 'USE_SYSTEM_ZLIB',
+ ],
+- 'sources': [
+- 'contrib/minizip/ioapi.c',
+- 'contrib/minizip/ioapi.h',
+- 'contrib/minizip/unzip.c',
+- 'contrib/minizip/unzip.h',
+- 'contrib/minizip/zip.c',
+- 'contrib/minizip/zip.h',
+- ],
+ 'conditions': [
+ ['OS=="android"', {
+ 'toolsets': ['target', 'host'],
+@@ -97,6 +89,7 @@
+ 'link_settings': {
+ 'libraries': [
+ '-lz',
++ '-lminizip',
+ ],
+ },
+ }],
+
+https://code.google.com/p/mod-spdy/issues/detail?id=71
+
+--- src/build/common.gypi
++++ src/build/common.gypi
+@@ -25,7 +25,7 @@
+ # (Chromium already has transitive dependencies on these libraries
+ # via gtk). We want to link these libraries into our binaries so
+ # we change the default behavior.
+- 'use_system_zlib': 0,
++ 'use_system_zlib%': 0,
+ 'use_system_apache_dev%': 0,
+
+ # Putting a variables dict inside another variables dict looks kind of
diff --git a/www-apache/mod_spdy/metadata.xml b/www-apache/mod_spdy/metadata.xml
new file mode 100644
index 000000000000..7123fa8f9ece
--- /dev/null
+++ b/www-apache/mod_spdy/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>vapier@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/www-apache/mod_spdy/mod_spdy-0.9.3.3.ebuild b/www-apache/mod_spdy/mod_spdy-0.9.3.3.ebuild
new file mode 100644
index 000000000000..663d160cfa35
--- /dev/null
+++ b/www-apache/mod_spdy/mod_spdy-0.9.3.3.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_spdy/mod_spdy-0.9.3.3.ebuild,v 1.1 2013/05/28 00:21:25 vapier Exp $
+
+EAPI="4"
+
+inherit apache-module eutils
+
+if [[ ${PV} == 9999 ]] ; then
+ ESVN_REPO_URI="http://mod-spdy.googlecode.com/svn/trunk/src"
+ ESVN_RESTRICT="export"
+ EGIT_REPO_URI="https://chromium.googlesource.com/chromium/tools/depot_tools.git"
+ EGIT_SOURCEDIR="${WORKDIR}/depot_tools"
+ inherit subversion git-2
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Apache module for rewriting web pages to reduce latency and bandwidth"
+HOMEPAGE="http://code.google.com/p/modpagespeed"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="debug test"
+
+RDEPEND="sys-libs/zlib[minizip]"
+DEPEND="${RDEPEND}"
+if [[ ${PV} == 9999 ]] ; then
+ DEPEND+=" net-misc/rsync"
+fi
+
+need_apache2_2
+
+e() { echo "$@"; "$@" || die; }
+
+EGCLIENT="${WORKDIR}/depot_tools/gclient"
+egclient() { set -- "${EGCLIENT}" "$@"; e "$@"; }
+
+src_unpack() {
+ if [[ ${PN} == "9999" ]] ; then
+ git-2_src_unpack
+
+ subversion_src_unpack
+ mkdir -p "${ESVN_STORE_DIR}/${PN}" || die
+ cd "${ESVN_STORE_DIR}/${PN}" || die
+
+ egclient config ${ESVN_REPO_URI}
+ egclient sync --force --nohooks --delete_unversioned_trees
+ e rsync -a --exclude=".svn/" ./ "${S}/"
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.3.3-execinfo.patch
+
+ # Make sure the system zlib is used.
+ epatch "${FILESDIR}"/${PN}-0.9.3.3-system-zlib.patch
+ find src/third_party/zlib/ -name '*.[ch]' -delete
+}
+
+src_configure() {
+ tc-export AR CC CXX RANLIB
+ tc-export_build_env BUILD_AR BUILD_CC BUILD_CXX
+
+ local myconf=(
+ -Duse_system_zlib=1
+ -Duse_system_ssl=1
+ -Dwerror=
+ )
+ #egclient runhooks "${myconf[@]}"
+ e python src/build/gyp_chromium "${myconf[@]}"
+}
+
+echo_tests() { echo base_unittests spdy_{apache,common}_test; }
+src_compile() {
+ emake -C src \
+ V=1 \
+ BUILDTYPE=$(usex debug Debug Release) \
+ mod_spdy \
+ $(use test && echo_tests)
+}
+
+src_test() {
+ cd src/out/Release
+ local t
+ for t in $(echo_tests) ; do
+ e ./${t}
+ done
+}
+
+src_install() {
+ ln -sf src/out/*/libmod_spdy.so ${PN}.so || die
+ APACHE2_MOD_FILE="${PWD}/${PN}.so"
+ APACHE2_MOD_DEFINE="SPDY"
+ apache-module_src_install
+
+ # Workaround #471442
+ cd "${S}/src"
+ local conf="${T}/80_${PN}.conf"
+ cat <<-EOF > "${conf}"
+ <IfDefine SPDY>
+ $(sed 's:@@APACHE_MODULEDIR@@:modules:' install/common/spdy.load.template)
+
+ $(<install/common/spdy.conf.template)
+ </IfDefine>
+ EOF
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${conf}"
+}
diff --git a/www-apache/mod_spdy/mod_spdy-9999.ebuild b/www-apache/mod_spdy/mod_spdy-9999.ebuild
new file mode 100644
index 000000000000..4b6819502a5b
--- /dev/null
+++ b/www-apache/mod_spdy/mod_spdy-9999.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_spdy/mod_spdy-9999.ebuild,v 1.1 2013/05/28 00:21:25 vapier Exp $
+
+EAPI="4"
+
+inherit apache-module eutils
+
+if [[ ${PV} == 9999 ]] ; then
+ ESVN_REPO_URI="http://mod-spdy.googlecode.com/svn/trunk/src"
+ ESVN_RESTRICT="export"
+ EGIT_REPO_URI="https://chromium.googlesource.com/chromium/tools/depot_tools.git"
+ EGIT_SOURCEDIR="${WORKDIR}/depot_tools"
+ inherit subversion git-2
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Apache module for rewriting web pages to reduce latency and bandwidth"
+HOMEPAGE="http://code.google.com/p/modpagespeed"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="debug test"
+
+RDEPEND="sys-libs/zlib[minizip]"
+DEPEND="${RDEPEND}"
+if [[ ${PV} == 9999 ]] ; then
+ DEPEND+=" net-misc/rsync"
+fi
+
+need_apache2_2
+
+e() { echo "$@"; "$@" || die; }
+
+EGCLIENT="${WORKDIR}/depot_tools/gclient"
+egclient() { set -- "${EGCLIENT}" "$@"; e "$@"; }
+
+src_unpack() {
+ if [[ ${PN} == "9999" ]] ; then
+ git-2_src_unpack
+
+ subversion_src_unpack
+ mkdir -p "${ESVN_STORE_DIR}/${PN}" || die
+ cd "${ESVN_STORE_DIR}/${PN}" || die
+
+ egclient config ${ESVN_REPO_URI}
+ egclient sync --force --nohooks --delete_unversioned_trees
+ e rsync -a --exclude=".svn/" ./ "${S}/"
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.3.3-execinfo.patch
+
+ # Make sure the system zlib is used.
+ epatch "${FILESDIR}"/${PN}-0.9.3.3-system-zlib.patch
+ find src/third_party/zlib/ -name '*.[ch]' -delete
+}
+
+src_configure() {
+ tc-export AR CC CXX RANLIB
+ tc-export_build_env BUILD_AR BUILD_CC BUILD_CXX
+
+ local myconf=(
+ -Duse_system_zlib=1
+ -Duse_system_ssl=1
+ -Dwerror=
+ )
+ #egclient runhooks "${myconf[@]}"
+ e python src/build/gyp_chromium "${myconf[@]}"
+}
+
+echo_tests() { echo base_unittests spdy_{apache,common}_test; }
+src_compile() {
+ emake -C src \
+ V=1 \
+ BUILDTYPE=$(usex debug Debug Release) \
+ mod_spdy \
+ $(use test && echo_tests)
+}
+
+src_test() {
+ cd src/out/Release
+ local t
+ for t in $(echo_tests) ; do
+ e ./${t}
+ done
+}
+
+src_install() {
+ ln -sf src/out/*/libmod_spdy.so ${PN}.so || die
+ APACHE2_MOD_FILE="${PWD}/${PN}.so"
+ APACHE2_MOD_DEFINE="SPDY"
+ apache-module_src_install
+
+ # Workaround #471442
+ cd "${S}/src"
+ local conf="${T}/80_${PN}.conf"
+ cat <<-EOF > "${conf}"
+ <IfDefine SPDY>
+ $(sed 's:@@APACHE_MODULEDIR@@:modules:' install/common/spdy.load.template)
+
+ $(<install/common/spdy.conf.template)
+ </IfDefine>
+ EOF
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${conf}"
+}