File ruby-qml-no-rpath.patch of Package rubygem-qml
Index: ruby-qml/ext/qml/extconf.rb
===================================================================
--- ruby-qml.orig/ext/qml/extconf.rb
+++ ruby-qml/ext/qml/extconf.rb
@@ -27,7 +27,14 @@ when QML::Platform.mac?
when QML::Platform.windows?
# TODO
else
- $LDFLAGS << " -Wl,-rpath #{qmlbind_dir}"
+ if RUBY_PLATFORM.gsub(/-.*/,'') == "x86_64" then
+ libdir = "/usr/lib64"
+ else
+ libdir = "/usr/lib"
+ end
+ rb_ver = RUBY_VERSION.split(".")[0] + "." + RUBY_VERSION.split(".")[1] + ".0"
+ qml_version = `pwd`.gsub(/^.*qml-/,'').gsub(/\/ext.*$/,'').strip!
+ $LDFLAGS << " -L#{qmlbind_dir} -lqmlbind -Wl,-R#{libdir}/ruby/gems/#{rb_ver}/gems/qml-#{qml_version}/ext/qml/lib/libqmlbind/qmlbind/"
end
# build plugin