[packages/apache-mod_rails] update CXXFLAGS patch from fedora

glen glen at pld-linux.org
Wed May 1 19:31:59 CEST 2013


commit f41b67ce17974626993063c89996c15839b9e37d
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed May 1 20:09:45 2013 +0300

    update CXXFLAGS patch from fedora

 apache-mod_rails-build.patch       | 40 --------------------------------------
 apache-mod_rails.spec              |  6 ++----
 passenger_apache_fix_autofoo.patch | 14 +++++++++++++
 3 files changed, 16 insertions(+), 44 deletions(-)
---
diff --git a/apache-mod_rails.spec b/apache-mod_rails.spec
index 8f389ca..6b79a30 100644
--- a/apache-mod_rails.spec
+++ b/apache-mod_rails.spec
@@ -25,7 +25,7 @@ Source0:	https://github.com/FooBarWidget/passenger/archive/release-%{version}.ta
 Source1:	%{name}.conf
 Patch0:		%{name}-nogems.patch
 Patch1:		%{name}-alias+public.patch
-Patch2:		%{name}-build.patch
+Patch2:		passenger_apache_fix_autofoo.patch
 URL:		http://www.modrails.com
 BuildRequires:	apache-base >= 2.0.55-1
 BuildRequires:	apache-devel >= 2.0.55-1
@@ -70,9 +70,7 @@ Dokumentacji w formacie ri dla Apache mod_rails.
 %setup -q -n %{gem_name}-release-%{version}
 %patch0 -p1
 %patch1 -p0
-#%patch2 -p1
-
-%{__sed} -i~ -e 's!/usr/lib/!%{_libdir}/!g' ext/common/ResourceLocator.h
+%patch2 -p0
 
 %build
 (cd ext/libev; %{__autoconf})
diff --git a/apache-mod_rails-build.patch b/apache-mod_rails-build.patch
deleted file mode 100644
index 7b59c14..0000000
--- a/apache-mod_rails-build.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- apache-mod_rails-3.0.5/build/config.rb~	2011-03-11 12:11:27.000000000 +0100
-+++ apache-mod_rails-3.0.5/build/config.rb	2011-03-30 22:02:43.754874026 +0200
-@@ -24,9 +24,10 @@
- OPTIMIZE = boolean_option("OPTIMIZE")
- CC       = string_option("CC", "gcc")
- CXX      = string_option("CXX", "g++")
-+CXXFLAGS = string_option("CXXFLAGS", "")
- # TODO: consider -fcommon
- if OPTIMIZE
--	OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -O2 -DBOOST_DISABLE_ASSERTS".strip
-+	OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -DBOOST_DISABLE_ASSERTS".strip
- else
- 	OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS".strip
- end
-@@ -32,10 +33,11 @@
- 
- # Extra compiler flags that should always be passed to the C/C++ compiler.
- # Should be included last in the command string, even after PlatformInfo.portability_cflags.
--EXTRA_CXXFLAGS = "-Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long"
-+EXTRA_CXXFLAGS = "-Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long"
- EXTRA_CXXFLAGS << " -Wno-missing-field-initializers" if PlatformInfo.compiler_supports_wno_missing_field_initializers_flag?
- EXTRA_CXXFLAGS << " -mno-tls-direct-seg-refs" if PlatformInfo.requires_no_tls_direct_seg_refs? && PlatformInfo.compiler_supports_no_tls_direct_seg_refs_option?
- EXTRA_CXXFLAGS << " #{OPTIMIZATION_FLAGS}" if !OPTIMIZATION_FLAGS.empty?
-+EXTRA_CXXFLAGS << " #{CXXFLAGS}" if !CXXFLAGS.empty?
- 
- # Extra linker flags that should always be passed to the linker.
- # Should be included last in the command string, even after PlatformInfo.portability_ldflags.
---- apache-mod_rails-3.0.5/ext/libev/configure.ac~	2011-03-11 12:11:27.000000000 +0100
-+++ apache-mod_rails-3.0.5/ext/libev/configure.ac	2011-03-31 11:39:27.773936137 +0200
-@@ -8,10 +8,6 @@
- AC_PROG_INSTALL
- AC_PROG_LIBTOOL
- 
--if test "x$GCC" = xyes ; then
--  CFLAGS="$CFLAGS -O3"
--fi
--
- m4_include([libev.m4])
- 
- AC_CONFIG_FILES([Makefile])
diff --git a/passenger_apache_fix_autofoo.patch b/passenger_apache_fix_autofoo.patch
new file mode 100644
index 0000000..e244e8f
--- /dev/null
+++ b/passenger_apache_fix_autofoo.patch
@@ -0,0 +1,14 @@
+--- build/config.rb.orig	2012-08-14 16:40:28.375910357 -0400
++++ build/config.rb	2012-08-14 16:41:29.850088472 -0400
+@@ -26,9 +26,9 @@
+ CXX      = string_option("CXX", "g++")
+ # TODO: consider -fcommon
+ if OPTIMIZE
+-	OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -O2 -DBOOST_DISABLE_ASSERTS".strip
++	OPTIMIZATION_FLAGS = "#{ENV['CXXFLAGS']} #{PlatformInfo.debugging_cflags} -O2 -DBOOST_DISABLE_ASSERTS".strip
+ else
+-	OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS".strip
++	OPTIMIZATION_FLAGS = "#{ENV['CXXFLAGS']} #{PlatformInfo.debugging_cflags} -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS".strip
+ end
+ 
+ # Extra compiler flags that should always be passed to the C/C++ compiler.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/apache-mod_rails.git/commitdiff/d211a771443d279f8325d566e625656d7544adb3



More information about the pld-cvs-commit mailing list