#
# Conditional build:
%bcond_without verbose # verbose build (V=1)
+%bcond_with sse2 # use SSE2 instructions
# NOTE
# - relase notes: https://developers.google.com/speed/pagespeed/module/release_notes
# beta: 1.9.32.x-beta
# stable: 1.9.32.x-stable
Version: 1.9.32.4
-Release: 3
+Release: 4
License: Apache v2.0
Group: Networking/Daemons/HTTP
Source0: modpagespeed-%{version}.tar.xz
Patch4: no-dev-stdout.patch
Patch5: apache24-config.patch
Patch6: no-force-xxbit.patch
+Patch7: no-arch-opt.patch
URL: https://developers.google.com/speed/pagespeed/module
BuildRequires: %{apxs}
BuildRequires: apache-devel >= 2.2
BuildRequires: glib2-devel
BuildRequires: gperf
BuildRequires: libicu-devel
+BuildRequires: libjpeg-turbo-devel
+BuildRequires: libpng-devel
BuildRequires: libselinux-devel
BuildRequires: libstdc++-devel >= 5:4.1
BuildRequires: opencv-devel >= 2.3.1
%prep
%setup -q -n modpagespeed-%{version}
-%patch0 -p2
+%patch0 -p1
%patch1 -p0
%patch2 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
%if 0
sh -x %{_sourcedir}/clean-source.sh
%endif
-rm -r third_party/icu/source
-rm -r third_party/icu/genfiles
+%{__rm} -r third_party/icu/source
+%{__rm} -r third_party/icu/genfiles
install -d third_party/icu/source/{common,i18n}
ln -s %{_includedir}/unicode third_party/icu/source/i18n/unicode
ln -s %{_includedir}/unicode third_party/icu/source/common/unicode
--format=make \
--depth=. \
build/all.gyp \
+ %{!?with_sse2:-Ddisable_sse2=1} \
-Duse_openssl=1 \
-Duse_system_apache_dev=1 \
-Duse_system_icu=1 \
CC.host="%{__cc}" \
CXX.host="%{__cxx}" \
LINK.host="%{__cxx}" \
- CFLAGS="%{rpmcflags} %{rpmcppflags}" \
- CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
+ CFLAGS="%{rpmcflags} %{rpmcppflags} -DUSE_SYSTEM_LIBJPEG" \
+ CXXFLAGS="%{rpmcxxflags} %{rpmcppflags} -DUSE_SYSTEM_LIBJPEG" \
%{nil}
%install
--- /dev/null
+--- modpagespeed-1.8.31.6/third_party/mod_spdy/src/build/common.gypi~ 2015-01-27 23:51:31.000000000 +0100
++++ modpagespeed-1.8.31.6/third_party/mod_spdy/src/build/common.gypi 2016-05-29 11:38:30.139293222 +0200
+@@ -584,11 +584,6 @@
+ },
+ 'conditions': [
+ [ 'target_arch=="ia32"', {
+- 'asflags': [
+- # Needed so that libs with .s files (e.g. libicudata.a)
+- # are compatible with the general 32-bit-ness.
+- '-32',
+- ],
+ # All floating-point computations on x87 happens in 80-bit
+ # precision. Because the C and C++ language standards allow
+ # the compiler to keep the floating-point values in higher
+@@ -621,28 +616,7 @@
+ '-msse2',
+ '-mfpmath=sse',
+ ],
+- }, { # else: sse2 disabled
+- 'cflags': [
+- '-march=i686',
+- ],
+ }],
+- # Install packages have started cropping up with
+- # different headers between the 32-bit and 64-bit
+- # versions, so we have to shadow those differences off
+- # and make sure a 32-bit-on-64-bit build picks up the
+- # right files.
+- ['host_arch!="ia32"', {
+- 'include_dirs+': [
+- '/usr/include32',
+- ],
+- }],
+- ],
+- # -mmmx allows mmintrin.h to be used for mmx intrinsics.
+- # video playback is mmx and sse2 optimized.
+- 'cflags': [
+- '-mmmx',
+- ],
+- 'ldflags': [
+ ],
+ }],
+ ['linux_fpic==1', {
+--- modpagespeed-1.8.31.6/third_party/chromium/src/build/common.gypi~ 2015-01-27 23:51:10.000000000 +0100
++++ modpagespeed-1.8.31.6/third_party/chromium/src/build/common.gypi 2016-05-29 11:39:54.573657091 +0200
+@@ -3178,11 +3178,6 @@
+ ['target_arch=="ia32"', {
+ 'target_conditions': [
+ ['_toolset=="target"', {
+- 'asflags': [
+- # Needed so that libs with .s files (e.g. libicudata.a)
+- # are compatible with the general 32-bit-ness.
+- '-32',
+- ],
+ # All floating-point computations on x87 happens in 80-bit
+ # precision. Because the C and C++ language standards allow
+ # the compiler to keep the floating-point values in higher
+@@ -3235,24 +3230,6 @@
+ '-fuse-ld=gold',
+ ],
+ }],
+- # Install packages have started cropping up with
+- # different headers between the 32-bit and 64-bit
+- # versions, so we have to shadow those differences off
+- # and make sure a 32-bit-on-64-bit build picks up the
+- # right files.
+- # For android build, use NDK headers instead of host headers
+- ['host_arch!="ia32" and OS!="android"', {
+- 'include_dirs+': [
+- '/usr/include32',
+- ],
+- }],
+- ],
+- # -mmmx allows mmintrin.h to be used for mmx intrinsics.
+- # video playback is mmx and sse2 optimized.
+- 'cflags': [
+- '-mmmx',
+- ],
+- 'ldflags': [
+ ],
+ }],
+ ],
---- modpagespeed/src/build/install.gyp~ 2012-06-24 15:31:45.000000000 +0300
-+++ modpagespeed/src/build/install.gyp 2012-07-07 15:41:33.416812382 +0300
+--- modpagespeed/build/install.gyp~ 2012-06-24 15:31:45.000000000 +0300
++++ modpagespeed/build/install.gyp 2012-07-07 15:41:33.416812382 +0300
@@ -43,7 +43,6 @@
],
'packaging_files_binaries': [
],
'flock_bash': ['flock', '--', '/tmp/linux_package_lock', 'bash'],
'deb_build': '<(PRODUCT_DIR)/install/debian/build.sh',
+--- modpagespeed-1.8.31.6/build/pagespeed_overrides.gypi~ 2015-01-27 23:50:30.000000000 +0100
++++ modpagespeed-1.8.31.6/build/pagespeed_overrides.gypi 2016-05-29 11:16:44.940121546 +0200
+@@ -44,9 +44,9 @@
+ # (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_libjpeg': 0,
+- 'use_system_libpng': 0,
+- 'use_system_zlib': 0,
++ 'use_system_libjpeg': 1,
++ 'use_system_libpng': 0,
++ 'use_system_zlib': 1,
+
+ # We don't use google API keys in the PageSpeed build, so disable them.
+ 'use_official_google_api_keys': 0,