Patch to fix loading native extension.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 11 Jun 2014 12:09:43 +0000 (14:09 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 11 Jun 2014 12:09:43 +0000 (14:09 +0200)
native_dir.patch [new file with mode: 0644]
rubygem-passenger.spec

diff --git a/native_dir.patch b/native_dir.patch
new file mode 100644 (file)
index 0000000..61aa6d6
--- /dev/null
@@ -0,0 +1,19 @@
+commit 205809c540c1648f1d92c821a53cdbc01d3c8fbc
+Author: František Dvořák <valtri@civ.zcu.cz>
+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/
index 5f540ff..72ae748 100644 (file)
@@ -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