openbsd-ports/www/ruby-passenger/patches/patch-Rakefile
2009-09-01 17:45:43 +00:00

60 lines
2.5 KiB
Plaintext

$OpenBSD: patch-Rakefile,v 1.2 2009/09/01 17:45:43 bernd Exp $
--- Rakefile.orig Tue Sep 1 10:51:22 2009
+++ Rakefile Tue Sep 1 19:26:08 2009
@@ -36,13 +36,13 @@ OPTIMIZE = ["yes", "on", "true"].include?(ENV['OPTIMIZ
include PlatformInfo
-CC = "gcc"
-CXX = "g++"
+CC = ENV['CC']
+CXX = ENV['CXX']
LIBEXT = PlatformInfo.library_extension
if OPTIMIZE
- OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -O2 -DBOOST_DISABLE_ASSERTS"
+ OPTIMIZATION_FLAGS = "#{ENV['CFLAGS']} -DBOOST_DISABLE_ASSERTS"
else
- OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS"
+ OPTIMIZATION_FLAGS = "#{ENV['CFLAGS']} #{PlatformInfo.debugging_cflags} -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS"
end
# Extra compiler flags that should always be passed to the C/C++ compiler.
@@ -736,7 +736,7 @@ Rake::Task['package:force'].prerequisites.unshift(:doc
task :clobber => :'package:clean'
desc "Create a fakeroot, useful for building native packages"
-task :fakeroot => [:apache2, :native_support, :doc] do
+task :fakeroot => [:native_support, :doc] do
require 'rbconfig'
include Config
fakeroot = "pkg/fakeroot"
@@ -744,11 +744,11 @@ task :fakeroot => [:apache2, :native_support, :doc] do
# We don't use CONFIG['archdir'] and the like because we want
# the files to be installed to /usr, and the Ruby interpreter
# on the packaging machine might be in /usr/local.
- libdir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}"
+ libdir = "#{fakeroot}/usr/local/lib/ruby/#{CONFIG['ruby_version']}"
extdir = "#{libdir}/#{CONFIG['arch']}"
- bindir = "#{fakeroot}/usr/bin"
- docdir = "#{fakeroot}/usr/share/doc/phusion_passenger"
- libexecdir = "#{fakeroot}/usr/lib/phusion_passenger"
+ bindir = "#{fakeroot}/usr/local/bin"
+ docdir = "#{fakeroot}/usr/local/share/doc/phusion_passenger"
+ libexecdir = "#{fakeroot}/usr/local/lib/phusion_passenger"
sh "rm -rf #{fakeroot}"
sh "mkdir -p #{fakeroot}"
@@ -763,9 +763,9 @@ task :fakeroot => [:apache2, :native_support, :doc] do
sh "cp bin/* #{bindir}/"
sh "mkdir -p #{libexecdir}"
- sh "cp ext/apache2/mod_passenger.so #{libexecdir}/"
- sh "mv #{fakeroot}/usr/bin/passenger-spawn-server #{libexecdir}/"
- sh "cp ext/apache2/ApplicationPoolServerExecutable #{libexecdir}/"
+# sh "cp ext/apache2/mod_passenger.so #{libexecdir}/"
+ sh "mv #{fakeroot}/usr/local/bin/passenger-spawn-server #{libexecdir}/"
+# sh "cp ext/apache2/ApplicationPoolServerExecutable #{libexecdir}/"
sh "mkdir -p #{docdir}"
sh "cp -R doc/* #{docdir}/"