From e5129bf63080728a25f782b12ceab9219628564a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Wed, 11 Jun 2014 14:09:43 +0200 Subject: [PATCH] Patch to fix loading native extension. --- native_dir.patch | 19 +++++++++++++++++++ rubygem-passenger.spec | 6 ++++++ 2 files changed, 25 insertions(+) create mode 100644 native_dir.patch diff --git a/native_dir.patch b/native_dir.patch new file mode 100644 index 0000000..61aa6d6 --- /dev/null +++ b/native_dir.patch @@ -0,0 +1,19 @@ +commit 205809c540c1648f1d92c821a53cdbc01d3c8fbc +Author: František Dvořák +Date: Wed Jun 11 14:05:11 2014 +0200 + + Native library location. + +diff --git a/lib/phusion_passenger/native_support.rb b/lib/phusion_passenger/native_support.rb +index 8f048bf..4083f91 100644 +--- a/lib/phusion_passenger/native_support.rb ++++ b/lib/phusion_passenger/native_support.rb +@@ -386,7 +386,7 @@ private + # to force it to be loaded. + $LOADED_FEATURES.reject! { |fn| File.basename(fn) == library_name } + begin +- require(name_or_filename) ++ require "%%NATIVE_SUPPORT_DIR%%/native/#{name_or_filename}" + return defined?(PhusionPassenger::NativeSupport) + rescue LoadError => e + if e.to_s =~ /dlopen/ diff --git a/rubygem-passenger.spec b/rubygem-passenger.spec index 5f540ff..72ae748 100644 --- a/rubygem-passenger.spec +++ b/rubygem-passenger.spec @@ -61,6 +61,10 @@ Patch107: rubygem-passenger-4.0.18-GLIBC_HAVE_LONG_LONG.patch # Until rubygem-bluecloth is in Fedora, don't use it Patch201: rubygem-passenger-4.0.18-correct_docs.patch +# Load native library from proper directory +Patch202: native_dir.patch + + Requires: rubygems # XXX: Needed to run passenger standalone Requires: rubygem(daemon_controller) >= 1.0.0 @@ -194,6 +198,8 @@ rebuilding this package. # Until bluecloth is in Fedora, don't use it %patch201 -p1 -b .docs +%patch202 -p1 -b .native + # Don't use bundled libev %{__rm} -rf ext/libev -- 1.8.2.3