[DRE-commits] [ruby-mysql2] 03/05: Refresh remove_rpath_compilation_flag.patch
Cédric Boutillier
boutil at moszumanska.debian.org
Tue Nov 26 17:41:17 UTC 2013
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository ruby-mysql2.
commit da572d6bb2edc6104302bc985bb217a3e11747a8
Author: Cédric Boutillier <boutil at debian.org>
Date: Tue Nov 26 18:26:12 2013 +0100
Refresh remove_rpath_compilation_flag.patch
---
debian/changelog | 1 +
debian/patches/remove_rpath_compilation_flag.patch | 46 +++++++++++++++++-----
2 files changed, 37 insertions(+), 10 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index b895cdc..88bc70a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ ruby-mysql2 (0.3.14-1) UNRELEASED; urgency=low
* use canonical URI in Vcs-* fields
* Imported Upstream version 0.3.14
* Copy example configuration in spec/ for use in tests
+ * Refresh remove_rpath_compilation_flag.patch
-- Cédric Boutillier <boutil at debian.org> Tue, 26 Nov 2013 16:16:45 +0100
diff --git a/debian/patches/remove_rpath_compilation_flag.patch b/debian/patches/remove_rpath_compilation_flag.patch
index 66a81cc..a29036c 100644
--- a/debian/patches/remove_rpath_compilation_flag.patch
+++ b/debian/patches/remove_rpath_compilation_flag.patch
@@ -1,17 +1,43 @@
Description: Remove rpath from compilation flags
This patch is required to pass the binary-or-shlib-defines-rpath lintian
- test. To fix this problem, the -Wl and --rpath argument has been removed
- from the global variable $LDFLAGS inside of ext/mysql2/extconf.rb
+ test. To fix this problem, any attempt to add rpath to $LDFLAGS
+ inside of ext/mysql2/extconf.rb is patched out
Author: Michael Franzl <office at michaelfranzl.com>
+Last-Update: 2013-11-26
---- ruby-mysql2-0.3.11.orig/ext/mysql2/extconf.rb
-+++ ruby-mysql2-0.3.11/ext/mysql2/extconf.rb
-@@ -67,7 +67,7 @@ end
- # $CFLAGS << ' -O0 -ggdb3 -Wextra'
-
- if hard_mysql_path = $libs[%r{-L(/[^ ]+)}, 1]
-- $LDFLAGS << " -Wl,-rpath,#{hard_mysql_path}"
-+ $LDFLAGS << "#{hard_mysql_path}"
+--- a/ext/mysql2/extconf.rb
++++ b/ext/mysql2/extconf.rb
+@@ -98,33 +98,4 @@
+ $CFLAGS << gcc_flags
end
+-case explicit_rpath = with_config('mysql-rpath')
+-when true
+- abort "-----\nOption --with-mysql-rpath must have an argument\n-----"
+-when false
+- warn "-----\nOption --with-mysql-rpath has been disabled at your request\n-----"
+-when String
+- # The user gave us a value so use it
+- rpath_flags = " -Wl,-rpath,#{explicit_rpath}"
+- warn "-----\nSetting mysql rpath to #{explicit_rpath}\n-----"
+- $LDFLAGS << rpath_flags
+-else
+- if libdir = rpath_dir[%r{(-L)?(/[^ ]+)}, 2]
+- rpath_flags = " -Wl,-rpath,#{libdir}"
+- if RbConfig::CONFIG["RPATHFLAG"].to_s.empty? && try_link('int main() {return 0;}', rpath_flags)
+- # Usually Ruby sets RPATHFLAG the right way for each system, but not on OS X.
+- warn "-----\nSetting rpath to #{libdir}\n-----"
+- $LDFLAGS << rpath_flags
+- else
+- if RbConfig::CONFIG["RPATHFLAG"].to_s.empty?
+- # If we got here because try_link failed, warn the user
+- warn "-----\nDon't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load\n-----"
+- end
+- # Make sure that LIBPATH gets set if we didn't explicitly set the rpath.
+- warn "-----\nSetting libpath to #{libdir}\n-----"
+- $LIBPATH << libdir unless $LIBPATH.include?(libdir)
+- end
+- end
+-end
+-
create_makefile('mysql2/mysql2')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-mysql2.git
More information about the Pkg-ruby-extras-commits
mailing list