aboutsummaryrefslogtreecommitdiff
path: root/www/mod_pagespeed
diff options
context:
space:
mode:
Diffstat (limited to 'www/mod_pagespeed')
-rw-r--r--www/mod_pagespeed/Makefile130
-rw-r--r--www/mod_pagespeed/distinfo2
-rw-r--r--www/mod_pagespeed/files/extra-gperf.gypi17
-rw-r--r--www/mod_pagespeed/files/patch-base.gypi18
-rw-r--r--www/mod_pagespeed/files/patch-build-common.gypi37
-rw-r--r--www/mod_pagespeed/files/patch-common.h13
-rw-r--r--www/mod_pagespeed/files/patch-common.py11
-rw-r--r--www/mod_pagespeed/files/patch-file_path.cc50
-rw-r--r--www/mod_pagespeed/files/patch-gyptest.py11
-rw-r--r--www/mod_pagespeed/files/patch-hostname_util.cc12
-rw-r--r--www/mod_pagespeed/files/patch-instaweb_core.gyp57
-rw-r--r--www/mod_pagespeed/files/patch-libjpeg_jpeglib.h11
-rw-r--r--www/mod_pagespeed/files/patch-make.py19
-rw-r--r--www/mod_pagespeed/files/patch-parser.cc43
-rw-r--r--www/mod_pagespeed/files/patch-pthread_shared_mem.cc146
-rw-r--r--www/mod_pagespeed/files/patch-python_arch.sh21
-rw-r--r--www/mod_pagespeed/files/patch-python_arch2.sh21
-rw-r--r--www/mod_pagespeed/files/patch-stack_trace_posix.cc26
-rw-r--r--www/mod_pagespeed/pkg-descr8
-rw-r--r--www/mod_pagespeed/pkg-message8
-rw-r--r--www/mod_pagespeed/pkg-plist12
21 files changed, 0 insertions, 673 deletions
diff --git a/www/mod_pagespeed/Makefile b/www/mod_pagespeed/Makefile
deleted file mode 100644
index db0647229f3c..000000000000
--- a/www/mod_pagespeed/Makefile
+++ /dev/null
@@ -1,130 +0,0 @@
-# Created by: Steve Wills <swills@FreeBSD.org>
-# $FreeBSD$
-
-PORTNAME= mod_pagespeed
-PORTVERSION= 1.2.24.2
-PORTREVISION= 2
-PORTEPOCH= 1
-CATEGORIES= www
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= swills
-DISTNAME= mod_pagespeed_source_${PORTVERSION}
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Apache module that automatically optimizes web pages
-
-BROKEN= Does not link
-
-BUILD_DEPENDS= python:${PORTSDIR}/lang/python \
- bash:${PORTSDIR}/shells/bash \
- greadlink:${PORTSDIR}/sysutils/coreutils \
- gsed:${PORTSDIR}/textproc/gsed \
- svn:${PORTSDIR}/devel/subversion \
- flock:${PORTSDIR}/sysutils/flock
-LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png \
- libjpeg.so:${PORTSDIR}/graphics/jpeg \
- libicutu.so:${PORTSDIR}/devel/icu \
- libopencv_legacy.so:${PORTSDIR}/graphics/opencv \
- libexecinfo.so:${PORTSDIR}/devel/libexecinfo
-
-USES= gmake pkgconfig tar:xz
-USE_BINUTILS= yes
-USE_APACHE= 22
-USE_PYTHON= yes
-
-# debugging
-#MAKE_ENV+= V=1
-
-# seems new version isn't JOBS safe
-MAKE_JOBS_UNSAFE= yes
-
-ONLY_FOR_ARCHS= amd64 i386
-LDFLAGS+= -L${LOCALBASE}/lib
-PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
-MAKE_ENV+= BUILDTYPE=Release
-ALL_TARGET= mod_pagespeed_test pagespeed_automatic_test all html_minifier_main css_minify_main
-WRKSRC= ${WRKDIR}/${PORTNAME}_source_${PORTVERSION}/mod_pagespeed/src
-GYP_DEFINES+= \
- use_system_apache_dev=1 \
- use_system_libjpeg=1 \
- use_system_libpng=1 \
- use_system_zlib=1 \
- use_system_icu=1 \
- use_system_opencv=1 \
- target_arch=${ARCH} \
- system_include_path_apr=${LOCALBASE}/include/apr-1 \
- system_include_path_aprutil=${LOCALBASE}/include/apr-1 \
- system_include_path_httpd=${LOCALBASE}/include/apache22 \
- system_include_path_execinfo=${LOCALBASE}/include \
- system_include_path_icu=${LOCALBASE}/include \
- include_dirs=${LOCALBASE}/include
-
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
-
-# testing
-#USE_GCC= yes
-#.if ${OSVERSION} > 1000000
-#CC= clang
-#CXX= clang++
-#GYP_DEFINES+= clang=1
-#.endif
-
-.if ${OSVERSION} < 802517 || (${OSVERSION} >= 900000 && ${OSVERSION} < 900502)
-EXTRA_PATCHES= ${FILESDIR}/extra-gperf.gypi
-BUILD_DEPENDS+= ${LOCALBASE}/bin/gperf:${PORTSDIR}/devel/gperf
-.endif
-
-post-patch:
- ( cd ${BUILD_WRKSRC}/third_party/gflags/gen/arch && ${CP} -R linux freebsd && \
- cd ${BUILD_WRKSRC}/third_party/gflags/gen/arch/freebsd && ${MV} ia32 i386 && ${MV} x64 amd64 )
- ( cd ${BUILD_WRKSRC}/third_party/google-sparsehash/gen/arch && ${CP} -R linux freebsd && \
- cd ${BUILD_WRKSRC}/third_party/google-sparsehash/gen/arch/freebsd && ${MV} ia32 i386 && ${MV} x64 amd64 )
- ( cd ${BUILD_WRKSRC}/third_party/opencv/gen/arch && ${CP} -R linux freebsd && \
- cd ${BUILD_WRKSRC}/third_party/opencv/gen/arch/freebsd && ${MV} ia32 i386 && ${MV} x64 amd64 )
- ${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE},g" \
- ${WRKSRC}/base/base.gypi
- ${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE},g" \
- -e "s,%%CC%%,${CC},g" \
- -e "s,%%CXX%%,${CXX},g" \
- ${WRKSRC}/tools/gyp/pylib/gyp/generator/make.py
-.if ${OSVERSION} < 802517 || ${OSVERSION} < 900502
- ${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE},g" \
- ${WRKSRC}/net/instaweb/gperf.gypi
-.endif
-
-do-configure:
- cd ${WRKSRC} && \
- GYP_DEFINES="${GYP_DEFINES}" ${PYTHON_CMD} \
- ../../depot_tools/gclient.py runhooks
-
-do-install:
- cd ${WRKSRC} && \
- ${INSTALL_PROGRAM} out/Release/css_minify_main ${PREFIX}/bin ; \
- ${INSTALL_PROGRAM} out/Release/html_minifier_main ${PREFIX}/bin ; \
- ${INSTALL_PROGRAM} out/Release/js_minify ${PREFIX}/bin ; \
- ${INSTALL} out/Release/libmod_pagespeed.so ${PREFIX}/${APACHEMODDIR}/mod_pagespeed.so
- if [ ! -f ${PREFIX}/${APACHEETCDIR}/pagespeed.conf-dist ] ; then \
- cd ${WRKSRC}/install && \
- ${CAT} common/pagespeed.load.template common/pagespeed.conf.template | \
- ${SED} -e "s,@@COMMENT_OUT_DEFLATE@@,," \
- -e "s,@@APACHE_MODULEDIR@@,${APACHEMODDIR}," \
- -e "s,@@MOD_PAGESPEED_STATS_LOG@@,/var/log/mod_pagespeed_stats.log," \
- -e "s,@@MOD_PAGESPEED_CACHE@@,/var/mod_pagespeed/,g" \
- > ${PREFIX}/${APACHEETCDIR}/pagespeed.conf-dist ; \
- fi
- if [ ! -f ${PREFIX}/${APACHEETCDIR}/pagespeed_libraries.conf-dist ] ; then \
- ${INSTALL_DATA} ${WRKSRC}/net/instaweb/genfiles/conf/pagespeed_libraries.conf ${PREFIX}/${APACHEETCDIR}/pagespeed_libraries.conf-dist ; \
- fi
-
-post-install:
- ${INSTALL} -d -o ${WWWOWN} -g ${WWWGRP} -m 755 /var/mod_pagespeed
- @if [ ! -f ${PREFIX}/etc/pagespeed.conf ]; then \
- ${CP} -p ${PREFIX}/${APACHEETCDIR}/pagespeed.conf-dist ${PREFIX}/${APACHEETCDIR}/pagespeed.conf ; \
- fi
- @if [ ! -f ${PREFIX}/etc/pagespeed_libraries.conf ]; then \
- ${CP} -p ${PREFIX}/${APACHEETCDIR}/pagespeed_libraries.conf-dist ${PREFIX}/${APACHEETCDIR}/pagespeed_libraries.conf ; \
- fi
- @${CAT} ${PKGMESSAGE}
-
-.include <bsd.port.post.mk>
diff --git a/www/mod_pagespeed/distinfo b/www/mod_pagespeed/distinfo
deleted file mode 100644
index d4977938a0eb..000000000000
--- a/www/mod_pagespeed/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (mod_pagespeed_source_1.2.24.2.tar.xz) = 17769ce144a6ea8234d36f1b6184b181c244a6a904a328ee178f895391f603f1
-SIZE (mod_pagespeed_source_1.2.24.2.tar.xz) = 12441180
diff --git a/www/mod_pagespeed/files/extra-gperf.gypi b/www/mod_pagespeed/files/extra-gperf.gypi
deleted file mode 100644
index 944b0004ac16..000000000000
--- a/www/mod_pagespeed/files/extra-gperf.gypi
+++ /dev/null
@@ -1,17 +0,0 @@
---- net/instaweb/gperf.gypi.orig 2012-02-06 20:45:36.000000000 -0500
-+++ net/instaweb/gperf.gypi 2012-02-06 20:45:58.000000000 -0500
-@@ -23,12 +23,13 @@
- 'message': 'Generating C++ code from <(RULE_INPUT_PATH)',
- 'variables': {
- 'gperf_out_dir': '<(SHARED_INTERMEDIATE_DIR)/gperf_out/instaweb',
-+ 'gperf_bin_dir': '%%LOCALBASE%%/bin',
- },
- 'outputs': [
- '<(gperf_out_dir)/<(instaweb_gperf_subdir)/<(RULE_INPUT_ROOT).gp.cc',
- ],
- 'action': [
-- 'gperf',
-+ '<(gperf_bin_dir)/gperf',
- '-m 10',
- '<(instaweb_root)/<(instaweb_gperf_subdir)/<(RULE_INPUT_NAME)',
- '--output-file=<(gperf_out_dir)/<(instaweb_gperf_subdir)/<(RULE_INPUT_ROOT).gp.cc',
diff --git a/www/mod_pagespeed/files/patch-base.gypi b/www/mod_pagespeed/files/patch-base.gypi
deleted file mode 100644
index 43d0f36ac2d6..000000000000
--- a/www/mod_pagespeed/files/patch-base.gypi
+++ /dev/null
@@ -1,18 +0,0 @@
---- base/base.gypi.orig 2012-07-11 20:16:43.000000000 -0400
-+++ base/base.gypi 2012-07-11 21:12:00.214510822 -0400
-@@ -7,6 +7,7 @@
- 'variables': {
- 'base_target': 0,
- 'chromium_root': '<(DEPTH)/third_party/chromium/src',
-+ 'system_include_path_execinfo%': '%%LOCALBASE%%/include',
- 'conditions': [
- # The default stack_trace_posix.cc is not compatible with NaCL newlib
- # toolchain, so we provide a stubbed version when building for NaCL.
-@@ -117,6 +118,7 @@
- 'include_dirs': [
- '<(chromium_root)',
- '<(DEPTH)',
-+ '<(system_include_path_execinfo)',
- ],
- # These warnings are needed for the files in third_party\dmg_fp.
- 'msvs_disabled_warnings': [
diff --git a/www/mod_pagespeed/files/patch-build-common.gypi b/www/mod_pagespeed/files/patch-build-common.gypi
deleted file mode 100644
index 15b6219c7e41..000000000000
--- a/www/mod_pagespeed/files/patch-build-common.gypi
+++ /dev/null
@@ -1,37 +0,0 @@
---- build/common.gypi.orig 2012-07-12 19:09:26.000000000 +0000
-+++ build/common.gypi 2012-07-12 19:09:38.000000000 +0000
-@@ -91,6 +91,34 @@
- '-Wl,-z,defs',
- ],
- }],
-+ ['OS == "freebsd"', {
-+ # Disable -Werror when not using the version of gcc that development
-+ # is generally done with, to avoid breaking things for users with
-+ # something older or newer (which produces different warnings).
-+ 'conditions': [
-+ ['<(gcc_version) != <(gcc_devel_version)', {
-+ 'cflags!': ['-Werror']
-+ }],
-+ ],
-+ 'cflags': [
-+ # Our dependency on OpenCV need us to turn on exceptions.
-+ '-fexceptions',
-+ # Now we are using exceptions. -fno-asynchronous-unwind-tables is
-+ # set in libpagespeed's common.gypi. Now enable it.
-+ '-fasynchronous-unwind-tables',
-+ # We'd like to add '-Wtype-limits', but this does not work on
-+ # earlier versions of g++ on supported operating systems.
-+ ],
-+ 'cflags_cc': [
-+ '-frtti', # g++ 4.2 <trl/function> uses typeid
-+ ],
-+ # Disable -z,defs in linker.
-+ # This causes mod_pagespeed.so to fail because it doesn't link apache
-+ # libraries.
-+ 'ldflags!': [
-+ '-Wl,-z,defs',
-+ ],
-+ }],
- ['OS == "mac"', {
- 'xcode_settings':{
- 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', # -fexceptions
diff --git a/www/mod_pagespeed/files/patch-common.h b/www/mod_pagespeed/files/patch-common.h
deleted file mode 100644
index cbdbc417baf0..000000000000
--- a/www/mod_pagespeed/files/patch-common.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- third_party/protobuf/src/google/protobuf/stubs/common.h.orig 2011-10-31 14:25:22.000000000 +0000
-+++ third_party/protobuf/src/google/protobuf/stubs/common.h 2011-10-31 17:54:21.000000000 +0000
-@@ -47,6 +47,10 @@
- #elif !defined(_MSC_VER)
- #include <stdint.h>
- #endif
-+#if defined(__FreeBSD__)
-+#undef major
-+#undef minor
-+#endif
-
- #if defined(_MSC_VER) && defined(_CPPUNWIND)
- #define PROTOBUF_USE_EXCEPTIONS
diff --git a/www/mod_pagespeed/files/patch-common.py b/www/mod_pagespeed/files/patch-common.py
deleted file mode 100644
index 532103fb0f43..000000000000
--- a/www/mod_pagespeed/files/patch-common.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- tools/gyp/pylib/gyp/common.py.orig 2012-07-11 21:33:14.908184100 -0400
-+++ tools/gyp/pylib/gyp/common.py 2012-07-11 21:33:28.963202252 -0400
-@@ -353,6 +353,8 @@
- 'sunos5': 'solaris',
- 'freebsd7': 'freebsd',
- 'freebsd8': 'freebsd',
-+ 'freebsd9': 'freebsd',
-+ 'freebsd10': 'freebsd',
- }
- flavor = flavors.get(sys.platform, 'linux')
- return params.get('flavor', flavor)
diff --git a/www/mod_pagespeed/files/patch-file_path.cc b/www/mod_pagespeed/files/patch-file_path.cc
deleted file mode 100644
index 786d64de364e..000000000000
--- a/www/mod_pagespeed/files/patch-file_path.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-Index: third_party/chromium/src/base/sys_string_conversions_linux.cc
-===================================================================
---- third_party/chromium/src/base/sys_string_conversions_linux.cc (revision 90205)
-+++ third_party/chromium/src/base/sys_string_conversions_linux.cc (working copy)
-@@ -97,6 +97,7 @@
- return out;
- }
-
-+#if 0
- std::wstring SysNativeMBToWide(const StringPiece& native_mb) {
- mbstate_t ps;
-
-@@ -153,6 +154,7 @@
-
- return out;
- }
-+#endif
-
- #endif // OS_CHROMEOS
-
-Index: third_party/chromium/src/base/file_path.cc
-===================================================================
---- third_party/chromium/src/base/file_path.cc (revision 90205)
-+++ third_party/chromium/src/base/file_path.cc (working copy)
-@@ -517,9 +517,11 @@
- // See file_path.h for a discussion of the encoding of paths on POSIX
- // platforms. These encoding conversion functions are not quite correct.
-
-+#if 0
- string16 FilePath::LossyDisplayName() const {
- return WideToUTF16(base::SysNativeMBToWide(path_));
- }
-+#endif
-
- std::string FilePath::MaybeAsASCII() const {
- if (IsStringASCII(path_))
-@@ -530,10 +532,13 @@
- // The *Hack functions are temporary while we fix the remainder of the code.
- // Remember to remove the #includes at the top when you remove these.
-
-+#if 0
- // static
- FilePath FilePath::FromWStringHack(const std::wstring& wstring) {
- return FilePath(base::SysWideToNativeMB(wstring));
- }
-+#endif
-+
- #elif defined(OS_WIN)
- string16 FilePath::LossyDisplayName() const {
- return path_;
diff --git a/www/mod_pagespeed/files/patch-gyptest.py b/www/mod_pagespeed/files/patch-gyptest.py
deleted file mode 100644
index cf97bf98345e..000000000000
--- a/www/mod_pagespeed/files/patch-gyptest.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- tools/gyp/gyptest.py.orig 2012-07-11 21:42:55.394188934 -0400
-+++ tools/gyp/gyptest.py 2012-07-11 21:43:15.729199931 -0400
-@@ -208,6 +208,8 @@
- format_list = {
- 'freebsd7': ['make'],
- 'freebsd8': ['make'],
-+ 'freebsd9': ['make'],
-+ 'freebsd10': ['make'],
- 'cygwin': ['msvs'],
- 'win32': ['msvs'],
- 'linux2': ['make', 'ninja'],
diff --git a/www/mod_pagespeed/files/patch-hostname_util.cc b/www/mod_pagespeed/files/patch-hostname_util.cc
deleted file mode 100644
index 54c5292a6440..000000000000
--- a/www/mod_pagespeed/files/patch-hostname_util.cc
+++ /dev/null
@@ -1,12 +0,0 @@
---- net/instaweb/util/hostname_util.cc.orig 2012-12-02 20:27:11.000000000 +0000
-+++ net/instaweb/util/hostname_util.cc 2012-12-02 20:43:33.000000000 +0000
-@@ -29,7 +29,8 @@
- namespace net_instaweb {
-
- GoogleString GetHostname() {
-- char hostname[HOST_NAME_MAX + 1];
-+ int hnm = sysconf(_SC_HOST_NAME_MAX);
-+ char hostname[hnm + 1];
- hostname[sizeof(hostname) - 1] = '\0';
-
- // This call really shouldn't fail, so crash if it does under Debug,
diff --git a/www/mod_pagespeed/files/patch-instaweb_core.gyp b/www/mod_pagespeed/files/patch-instaweb_core.gyp
deleted file mode 100644
index b2449093e9e1..000000000000
--- a/www/mod_pagespeed/files/patch-instaweb_core.gyp
+++ /dev/null
@@ -1,57 +0,0 @@
---- net/instaweb/instaweb_core.gyp.orig 2012-07-11 21:12:43.400191212 -0400
-+++ net/instaweb/instaweb_core.gyp 2012-07-11 21:13:29.815181464 -0400
-@@ -175,54 +175,4 @@
- ],
- },
- ],
-- 'conditions': [
-- ['OS=="linux" and use_system_icu==0', {
-- 'targets': [
-- # We build this target to make sure that we don't accidentially
-- # introduce dependencies from the core libraries to non-core
-- # libraries.
-- {
-- 'target_name': 'html_minifier_main_dependency_check',
-- 'type': 'none',
-- 'dependencies': [
-- 'html_minifier_main',
-- ],
-- 'actions': [
-- {
-- 'action_name': 'html_minifier_main_dependency_check',
-- 'inputs': [
-- '<(PRODUCT_DIR)/html_minifier_main',
-- ],
-- 'outputs': [
-- '<(PRODUCT_DIR)/html_minifier_main_dependency_check',
-- ],
-- 'action': [
-- 'g++',
-- '-pthread',
-- '-o', '<@(_outputs)',
-- '<(LIB_DIR)/html_minifier_main/net/instaweb/rewriter/html_minifier_main.o',
--
-- # Only the following dependencies are allowed. If you
-- # find yourself needing to add additional dependencies,
-- # please check with bmcquade first.
-- '<(LIB_DIR)/net/instaweb/libinstaweb_rewriter_html.a',
-- '<(LIB_DIR)/net/instaweb/libinstaweb_htmlparse_core.a',
-- '<(LIB_DIR)/net/instaweb/libhttp_core.a',
-- '<(LIB_DIR)/net/instaweb/libinstaweb_util_core.a',
-- '<(LIB_DIR)/net/instaweb/libinstaweb_htmlparse_core_gperf.a',
-- '<(LIB_DIR)/build/temp_gyp/libgoogleurl.a',
-- '<(LIB_DIR)/base/libbase.a',
-- '<(LIB_DIR)/base/libbase_static.a',
-- '<(LIB_DIR)/third_party/chromium/src/base/third_party/dynamic_annotations/libdynamic_annotations.a',
-- '<(LIB_DIR)/third_party/modp_b64/libmodp_b64.a',
-- '<(LIB_DIR)/third_party/icu/libicuuc.a',
-- '<(LIB_DIR)/third_party/icu/libicudata.a',
-- '-lrt',
-- ],
-- },
-- ],
-- },
-- ],
-- }],
-- ],
- }
diff --git a/www/mod_pagespeed/files/patch-libjpeg_jpeglib.h b/www/mod_pagespeed/files/patch-libjpeg_jpeglib.h
deleted file mode 100644
index eb126eb316fd..000000000000
--- a/www/mod_pagespeed/files/patch-libjpeg_jpeglib.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./third_party/libjpeg/jpeglib.h.orig 2012-07-12 20:18:05.000000000 +0000
-+++ ./third_party/libjpeg/jpeglib.h 2012-07-12 20:19:07.000000000 +0000
-@@ -14,6 +14,8 @@
- #ifndef JPEGLIB_H
- #define JPEGLIB_H
-
-+#include <stdio.h>
-+
- /*
- * First we include the configuration files that record how this
- * installation of the JPEG library is set up. jconfig.h can be
diff --git a/www/mod_pagespeed/files/patch-make.py b/www/mod_pagespeed/files/patch-make.py
deleted file mode 100644
index 02697b68a9e3..000000000000
--- a/www/mod_pagespeed/files/patch-make.py
+++ /dev/null
@@ -1,19 +0,0 @@
---- tools/gyp/pylib/gyp/generator/make.py.orig 2012-07-12 00:18:25.000000000 +0000
-+++ tools/gyp/pylib/gyp/generator/make.py 2012-07-15 14:59:48.000000000 +0000
-@@ -269,12 +269,12 @@
- # in gyp's make.py where ARFLAGS.host etc. is computed.
- # TODO(evan): move all cross-compilation logic to gyp-time so we don't need
- # to replicate this environment fallback in make as well.
--CC.host ?= gcc
-+CC.host ?= %%CC%%
- CFLAGS.host ?=
--CXX.host ?= g++
-+CXX.host ?= %%CXX%%
- CXXFLAGS.host ?=
--LINK.host ?= g++
--LDFLAGS.host ?=
-+LINK.host ?= %%CXX%%
-+LDFLAGS.host ?= -Wl,-rpath,%%LOCALBASE%%/lib/%%CC%%
- AR.host ?= ar
- ARFLAGS.host := %(ARFLAGS.host)s
-
diff --git a/www/mod_pagespeed/files/patch-parser.cc b/www/mod_pagespeed/files/patch-parser.cc
deleted file mode 100644
index 7895e0c059af..000000000000
--- a/www/mod_pagespeed/files/patch-parser.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-Index: third_party/protobuf/src/google/protobuf/compiler/parser.cc
-===================================================================
---- third_party/protobuf/src/google/protobuf/compiler/parser.cc (revision 90205)
-+++ third_party/protobuf/src/google/protobuf/compiler/parser.cc (working copy)
-@@ -82,8 +82,15 @@
- return result;
- }
-
--const TypeNameMap kTypeNames = MakeTypeNameTable();
-+TypeNameMap type_names;
-
-+const TypeNameMap& kTypeNames() {
-+ if (type_names.empty()) {
-+ type_names = MakeTypeNameTable();
-+ }
-+ return type_names;
-+}
-+
- } // anonymous namespace
-
- // Makes code slightly more readable. The meaning of "DO(foo)" is
-@@ -1336,8 +1343,8 @@
-
- bool Parser::ParseType(FieldDescriptorProto::Type* type,
- string* type_name) {
-- TypeNameMap::const_iterator iter = kTypeNames.find(input_->current().text);
-- if (iter != kTypeNames.end()) {
-+ TypeNameMap::const_iterator iter = kTypeNames().find(input_->current().text);
-+ if (iter != kTypeNames().end()) {
- *type = iter->second;
- input_->Next();
- } else {
-@@ -1349,8 +1356,8 @@
- bool Parser::ParseUserDefinedType(string* type_name) {
- type_name->clear();
-
-- TypeNameMap::const_iterator iter = kTypeNames.find(input_->current().text);
-- if (iter != kTypeNames.end()) {
-+ TypeNameMap::const_iterator iter = kTypeNames().find(input_->current().text);
-+ if (iter != kTypeNames().end()) {
- // Note: The only place enum types are allowed is for field types, but
- // if we are parsing a field type then we would not get here because
- // primitives are allowed there as well. So this error message doesn't
diff --git a/www/mod_pagespeed/files/patch-pthread_shared_mem.cc b/www/mod_pagespeed/files/patch-pthread_shared_mem.cc
deleted file mode 100644
index ba24875fb652..000000000000
--- a/www/mod_pagespeed/files/patch-pthread_shared_mem.cc
+++ /dev/null
@@ -1,146 +0,0 @@
---- net/instaweb/util/pthread_shared_mem.cc.orig 2011-10-31 14:25:06.000000000 +0000
-+++ net/instaweb/util/pthread_shared_mem.cc 2011-10-31 22:04:15.000000000 +0000
-@@ -24,6 +24,9 @@
- #include <cstddef>
- #include <map>
- #include <utility>
-+#if defined(__FreeBSD__)
-+#include <semaphore.h>
-+#endif
- #include "net/instaweb/util/public/abstract_shared_mem.h"
- #include "net/instaweb/util/public/abstract_mutex.h"
- #include "net/instaweb/util/public/basictypes.h"
-@@ -70,13 +73,45 @@
- DISALLOW_COPY_AND_ASSIGN(PthreadSharedMemMutex);
- };
-
-+#if defined(__FreeBSD__)
-+// Some OSs does not support PTHREAD_PROCESS_SHARED attribute. (ex. FreeBSD < 9R, MacOS)
-+// FreeBSD lacks PTHREAD_PROCESS_SHARED support before 9.0R, so we use a semaphore
-+// instead. But nested locking is not supported.
-+class SemSharedMemMutex : public AbstractMutex {
-+ public:
-+ explicit SemSharedMemMutex(sem_t* sem)
-+ : sem_(sem) {}
-+
-+ virtual void Lock() {
-+ sem_wait(sem_);
-+ }
-+
-+ virtual void Unlock() {
-+ sem_post(sem_);
-+ }
-+
-+private:
-+ sem_t* sem_;
-+ DISALLOW_COPY_AND_ASSIGN(SemSharedMemMutex);
-+};
-+#endif
-+
- class PthreadSharedMemSegment : public AbstractSharedMemSegment {
- public:
- // We will be representing memory mapped in the [base, base + size) range.
-+#if defined(__FreeBSD__)
-+ PthreadSharedMemSegment(char* base, size_t size, MessageHandler* handler, const char* name)
-+ : base_(base),
-+ size_(size),
-+ sem_(NULL) {
-+ std::sprintf(name_, "/%s_sem", name);
-+ }
-+#else
- PthreadSharedMemSegment(char* base, size_t size, MessageHandler* handler)
- : base_(base),
- size_(size) {
- }
-+#endif
-
- virtual ~PthreadSharedMemSegment() {
- }
-@@ -86,10 +121,18 @@
- }
-
- virtual size_t SharedMutexSize() const {
-+#if defined(__FreeBSD__)
-+ return 0;
-+#else
- return sizeof(pthread_mutex_t);
-+#endif
- }
-
- virtual bool InitializeSharedMutex(size_t offset, MessageHandler* handler) {
-+#if defined(__FreeBSD__)
-+ sem_ = sem_open(name_, O_CREAT, 0755, 1);
-+ return sem_ ? true : false;
-+#else
- pthread_mutexattr_t attr;
- if (pthread_mutexattr_init(&attr) != 0) {
- handler->Message(kError, "pthread_mutexattr_init failed with errno:%d",
-@@ -113,19 +156,32 @@
-
- pthread_mutexattr_destroy(&attr);
- return true;
-+#endif
- }
-
- virtual AbstractMutex* AttachToSharedMutex(size_t offset) {
-+#if defined(__FreeBSD__)
-+ sem_ = sem_open(name_, O_EXCL);
-+ return new SemSharedMemMutex(sem_);
-+#else
- return new PthreadSharedMemMutex(MutexPtr(offset));
-+#endif
- }
-
- private:
-+#if defined(__FreeBSD__)
-+#else
- pthread_mutex_t* MutexPtr(size_t offset) {
- return reinterpret_cast<pthread_mutex_t*>(base_ + offset);
- }
-+#endif
-
- char* const base_;
- const size_t size_;
-+#if defined(__FreeBSD__)
-+ char name_[256];
-+ sem_t* sem_;
-+#endif
-
- DISALLOW_COPY_AND_ASSIGN(PthreadSharedMemSegment);
- };
-@@ -143,7 +199,11 @@
- }
-
- size_t PthreadSharedMem::SharedMutexSize() const {
-+#if defined(__FreeBSD__)
-+ return 0;
-+#else
- return sizeof(pthread_mutex_t);
-+#endif
- }
-
- AbstractSharedMemSegment* PthreadSharedMem::CreateSegment(
-@@ -167,7 +227,11 @@
- SegmentBaseMap* bases = AcquireSegmentBases();
- (*bases)[name] = base;
- UnlockSegmentBases();
-+#if defined(__FreeBSD__)
-+ return new PthreadSharedMemSegment(base, size, handler, name.c_str());
-+#else
- return new PthreadSharedMemSegment(base, size, handler);
-+#endif
- }
-
- AbstractSharedMemSegment* PthreadSharedMem::AttachToSegment(
-@@ -182,7 +246,11 @@
- }
- char* base = i->second;
- UnlockSegmentBases();
-+#if defined(__FreeBSD__)
-+ return new PthreadSharedMemSegment(base, size, handler, name.c_str());
-+#else
- return new PthreadSharedMemSegment(base, size, handler);
-+#endif
- }
-
- void PthreadSharedMem::DestroySegment(const GoogleString& name,
diff --git a/www/mod_pagespeed/files/patch-python_arch.sh b/www/mod_pagespeed/files/patch-python_arch.sh
deleted file mode 100644
index ee59a745ff01..000000000000
--- a/www/mod_pagespeed/files/patch-python_arch.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-Index: build/linux/python_arch.sh
-===================================================================
---- build/linux/python_arch.sh (revision 90205)
-+++ build/linux/python_arch.sh (working copy)
-@@ -10,7 +10,15 @@
- # python_arch.sh /path/to/sysroot/usr/lib/libpython2.4.so.1.0
- #
-
--python=$(readlink -f "$1")
-+UNAME=`uname`
-+
-+# FreeBSD readlink lacks -f support before 9.0
-+if [ ${UNAME} = "FreeBSD" ]; then
-+ python=$(greadlink -f "$1")
-+else
-+ python=$(readlink -f "$1")
-+fi
-+
- if [ ! -r "$python" ]; then
- echo unknown
- exit 0
diff --git a/www/mod_pagespeed/files/patch-python_arch2.sh b/www/mod_pagespeed/files/patch-python_arch2.sh
deleted file mode 100644
index 9cf967b9efdc..000000000000
--- a/www/mod_pagespeed/files/patch-python_arch2.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-Index: third_party/chromium/src/build/linux/python_arch.sh
-===================================================================
---- third_party/chromium/src/build/linux/python_arch.sh (revision 90205)
-+++ third_party/chromium/src/build/linux/python_arch.sh (working copy)
-@@ -10,7 +10,15 @@
- # python_arch.sh /path/to/sysroot/usr/lib/libpython2.4.so.1.0
- #
-
--python=$(readlink -f "$1")
-+UNAME=`uname`
-+
-+# FreeBSD readlink lacks -f support before 9.0
-+if [ "${UNAME}" = "FreeBSD" ]; then
-+ python=$(greadlink -f "$1")
-+else
-+ python=$(readlink -f "$1")
-+fi
-+
- if [ ! -r "$python" ]; then
- echo unknown
- exit 0
diff --git a/www/mod_pagespeed/files/patch-stack_trace_posix.cc b/www/mod_pagespeed/files/patch-stack_trace_posix.cc
deleted file mode 100644
index 65f9ca7fd494..000000000000
--- a/www/mod_pagespeed/files/patch-stack_trace_posix.cc
+++ /dev/null
@@ -1,26 +0,0 @@
---- third_party/chromium/src/base/debug/stack_trace_posix.cc.orig
-+++ third_party/chromium/src/base/debug/stack_trace_posix.cc
-@@ -126,7 +126,7 @@
- trace_strings->push_back(base::StringPrintf("%p", trace[i]));
- }
- }
--#else
-+#elif defined(OS_LINUX)
- scoped_ptr_malloc<char*> trace_symbols(backtrace_symbols(trace, size));
- if (trace_symbols.get()) {
- for (int i = 0; i < size; ++i) {
-@@ -155,10 +155,13 @@
- count_ = 0;
- return;
- }
--#endif
-+#elif defined(OS_LINUX)
- // Though the backtrace API man page does not list any possible negative
- // return values, we take no chance.
- count_ = std::max(backtrace(trace_, arraysize(trace_)), 0);
-+#else
-+ count_ = 0;
-+#endif
- }
-
- void StackTrace::PrintBacktrace() {
diff --git a/www/mod_pagespeed/pkg-descr b/www/mod_pagespeed/pkg-descr
deleted file mode 100644
index 9ce8e48e2811..000000000000
--- a/www/mod_pagespeed/pkg-descr
+++ /dev/null
@@ -1,8 +0,0 @@
-mod_pagespeed is an open-source Apache module that automatically optimizes web
-pages and resources on them. It does this by rewriting the resources using
-filters that implement web performance best practices. Webmasters and web
-developers can use mod_pagespeed to improve the performance of their web pages
-when serving content with the Apache HTTP Server.
-
-
-WWW: http://code.google.com/speed/page-speed/docs/module.html
diff --git a/www/mod_pagespeed/pkg-message b/www/mod_pagespeed/pkg-message
deleted file mode 100644
index 346577d2fb39..000000000000
--- a/www/mod_pagespeed/pkg-message
+++ /dev/null
@@ -1,8 +0,0 @@
-----------------------------------------------------------------------
-To enable mod_pagespeed add these lines:
-
-Include etc/apache22/pagespeed.conf
-Include etc/apache22/pagespeed_libraries.conf
-
-to etc/apache22/httpd.conf
-----------------------------------------------------------------------
diff --git a/www/mod_pagespeed/pkg-plist b/www/mod_pagespeed/pkg-plist
deleted file mode 100644
index 5699780b47c5..000000000000
--- a/www/mod_pagespeed/pkg-plist
+++ /dev/null
@@ -1,12 +0,0 @@
-bin/css_minify_main
-bin/html_minifier_main
-bin/js_minify
-%%APACHEMODDIR%%/mod_pagespeed.so
-@unexec if cmp -s %D/%%APACHEETCDIR%%/pagespeed.conf %D/%%APACHEETCDIR%%/pagespeed.conf-dist; then rm -f %D/%%APACHEETCDIR%%/pagespeed.conf; fi
-@unexec if cmp -s %D/%%APACHEETCDIR%%/pagespeed_libraries.conf %D/%%APACHEETCDIR%%/pagespeed_libraries.conf-dist; then rm -f %D/%%APACHEETCDIR%%/pagespeed_libraries.conf; fi
-%%APACHEETCDIR%%/pagespeed.conf-dist
-%%APACHEETCDIR%%/pagespeed_libraries.conf-dist
-@exec [ ! -f %B/pagespeed.conf ] && cp %B/pagespeed.conf-dist %B/pagespeed.conf
-@exec [ ! -f %B/pagespeed_libraries.conf ] && cp %B/pagespeed_libraries.conf-dist %B/pagespeed_libraries.conf
-@exec install -d -o %%WWWOWN%% -g %%WWWGRP%% -m 755 /var/mod_pagespeed
-@unexec rmdir /var/mod_pagespeed