[DRE-commits] [ruby-gpgme] 02/02: [evol] don't use embedded libraries anymore (and avoid useless link deps as much as possible)

Marc Dequènes duck at alioth.debian.org
Mon Aug 12 16:04:18 UTC 2013


This is an automated email from the git hooks/post-receive script.

duck pushed a commit to branch master
in repository ruby-gpgme.

commit bb684f7a05c5a450a391508e2c367824f855da0b
Author: Marc Dequènes (Duck) <Duck at DuckCorp.org>
Date:   Mon Aug 12 18:03:28 2013 +0200

    [evol] don't use embedded libraries anymore (and avoid useless link deps as much as possible)
---
 debian/changelog                   |    9 +++++-
 debian/patches/dynamic_build.patch |   62 ++++++++++++++++++++++++++++++++++++
 debian/patches/series              |    1 +
 3 files changed, 71 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 7be4a2e..9acb5b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,15 @@
 ruby-gpgme (2.0.0-3) UNRELEASED; urgency=low
 
+  * Team upload.
+
+  [ Gunnar Wolf ]
   * Removed the build of transitional packages required for Wheezy
 
- -- Gunnar Wolf <gwolf at debian.com>  Mon, 12 Aug 2013 09:33:17 -0500
+  [ Marc Dequènes (Duck) ]
+  * Patched buildsys to link with gpgme dynamically (and not with
+    embedded libraries).
+
+ -- Marc Dequènes (Duck) <Duck at DuckCorp.org>  Mon, 12 Aug 2013 18:01:47 +0200
 
 ruby-gpgme (2.0.0-2) unstable; urgency=low
 
diff --git a/debian/patches/dynamic_build.patch b/debian/patches/dynamic_build.patch
new file mode 100644
index 0000000..78cfb1e
--- /dev/null
+++ b/debian/patches/dynamic_build.patch
@@ -0,0 +1,62 @@
+Index: ruby-gpgme/ext/gpgme/extconf.rb
+===================================================================
+--- ruby-gpgme.orig/ext/gpgme/extconf.rb	2011-10-30 11:29:15.566972501 +0100
++++ ruby-gpgme/ext/gpgme/extconf.rb	2013-08-12 17:50:57.364714506 +0200
+@@ -4,50 +4,18 @@
+ SRC     = File.expand_path(File.dirname(__FILE__))
+ PREFIX  = "#{BUILD}/dst/"
+ 
+-def sys(*cmd)
+-  puts "  -- #{cmd.join(' ')}"
++$CFLAGS << " " + `gpgme-config --cflags`.strip
++$LDFLAGS << " " + `gpgme-config --libs`.strip
+ 
+-  unless ret = xsystem(cmd.join(' '))
+-    raise "#{cmd.join(' ')} failed!"
+-  end
++# avoid useless links wrongly introduced by gpgme-config
++$LDFLAGS.gsub!(/-l(assuan|gpg-error)/, "")
+ 
+-  ret
+-end
+-
+-def build(tgz, *flags)
+-  sys("tar xjvf #{tgz}")
+-
+-  Dir.chdir(File.basename(tgz, '.tar.bz2')) do
+-    sys("./configure --prefix=#{PREFIX} --disable-shared --enable-static --with-pic", *flags)
+-    sys("make")
+-    sys("make install")
+-  end
+-end
+-
+-libgpg_error_tgz  = File.join(SRC, 'libgpg-error-1.10.tar.bz2')
+-libassuan_tgz     = File.join(SRC, 'libassuan-2.0.2.tar.bz2')
+-gpgme_tgz         = File.join(SRC, 'gpgme-1.3.1.tar.bz2')
+-
+-# build deps
+-
+-build(libgpg_error_tgz, "--disable-nls")
+-build(libassuan_tgz, "--with-gpg-error-prefix=#{PREFIX}")
+-build(gpgme_tgz, "--with-gpg-error-prefix=#{PREFIX}", "--with-libassuan-prefix=#{PREFIX}")
+-
+-# copy gpgme
+-
+-
+-%w[ libassuan libgpg-error libgpgme ].each do |lib|
+-  FileUtils.cp "#{PREFIX}/lib/#{lib}.a", "#{BUILD}/#{lib}_ext.a"
+-end
+-
+-$INCFLAGS[0,0] = " -I#{PREFIX}/include "
+-#$LDFLAGS << " -L#{PREFIX}/lib "
+-$CFLAGS << " -fPIC "
++puts "CFLAGS: #{$CFLAGS}"
++puts "LDFLAGS: #{$LDFLAGS}"
+ 
+ # build gpgme extension
+ 
+-unless have_library 'gpg-error_ext' and have_library 'gpgme_ext' and have_library 'assuan_ext' and have_library 'gpg-error_ext' and have_header 'gpgme.h'
++unless have_library 'gpgme' and have_header 'gpgme.h'
+   STDERR.puts "\n\n"
+   STDERR.puts "*********************************************************"
+   STDERR.puts "********* error compiling and linking libgpgme. *********"
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2fe44ab
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+dynamic_build.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-gpgme.git



More information about the Pkg-ruby-extras-commits mailing list