[DRE-commits] [ruby-ffi-yajl] 04/06: use the packaged libyajl2, both during build, and at runtime.

Antonio Terceiro terceiro at moszumanska.debian.org
Sat Jun 13 16:08:25 UTC 2015


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

terceiro pushed a commit to branch master
in repository ruby-ffi-yajl.

commit ce43e17ee7ed74bd3c227d50630b3e5647b34a69
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sat Jun 13 12:57:00 2015 -0300

    use the packaged libyajl2, both during build, and at runtime.
---
 debian/changelog                                  |  2 +
 debian/patches/0001-Use-the-system-libyajl2.patch | 84 +++++++++++++++++++++++
 debian/patches/series                             |  1 +
 3 files changed, 87 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index bc6b44b..09a023c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
 ruby-ffi-yajl (2.2.0-1) UNRELEASED; urgency=medium
 
   * Initial release (Closes: #nnnn)
+  * debian/patches/0001-Use-the-system-libyajl2.patch: use the packaged
+    libyajl2, both during build, and at runtime.
 
  -- Antonio Terceiro <terceiro at debian.org>  Sat, 13 Jun 2015 12:29:08 -0300
diff --git a/debian/patches/0001-Use-the-system-libyajl2.patch b/debian/patches/0001-Use-the-system-libyajl2.patch
new file mode 100644
index 0000000..6297d61
--- /dev/null
+++ b/debian/patches/0001-Use-the-system-libyajl2.patch
@@ -0,0 +1,84 @@
+From: Antonio Terceiro <terceiro at debian.org>
+Date: Sat, 13 Jun 2015 12:54:04 -0300
+Subject: Use the system libyajl2
+
+---
+ ext/ffi_yajl/ext/encoder/extconf.rb |  5 -----
+ ext/ffi_yajl/ext/parser/extconf.rb  |  5 -----
+ lib/libyajl2.rb                     |  5 +++++
+ metadata.yml                        | 14 --------------
+ 4 files changed, 5 insertions(+), 24 deletions(-)
+ create mode 100644 lib/libyajl2.rb
+
+diff --git a/ext/ffi_yajl/ext/encoder/extconf.rb b/ext/ffi_yajl/ext/encoder/extconf.rb
+index f7f0116..68ac9b3 100644
+--- a/ext/ffi_yajl/ext/encoder/extconf.rb
++++ b/ext/ffi_yajl/ext/encoder/extconf.rb
+@@ -1,13 +1,8 @@
+ require 'mkmf'
+ require 'rubygems'
+-require 'libyajl2'
+ 
+ RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
+ 
+-# pick up the vendored libyajl2 out of the libyajl2 gem
+-$CFLAGS = " -I#{Libyajl2.include_path} #{$CFLAGS}"
+-$LDFLAGS = " -L#{Libyajl2.opt_path} #{$LDFLAGS}"
+-
+ # remove "-Wl,--no-undefined" flag if existent to allow for loading with dlopen
+ $LDFLAGS.slice!("-Wl,--no-undefined")
+ 
+diff --git a/ext/ffi_yajl/ext/parser/extconf.rb b/ext/ffi_yajl/ext/parser/extconf.rb
+index 0b13bca..9ab2489 100644
+--- a/ext/ffi_yajl/ext/parser/extconf.rb
++++ b/ext/ffi_yajl/ext/parser/extconf.rb
+@@ -1,13 +1,8 @@
+ require 'mkmf'
+ require 'rubygems'
+-require 'libyajl2'
+ 
+ RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
+ 
+-# pick up the vendored libyajl2 out of the libyajl2 gem
+-$CFLAGS = "-I#{Libyajl2.include_path} #{$CFLAGS}"
+-$LDFLAGS = "-L#{Libyajl2.opt_path} #{$LDFLAGS}"
+-
+ # remove "-Wl,--no-undefined" flag if existent to allow for loading with dlopen
+ $LDFLAGS.slice!("-Wl,--no-undefined")
+ 
+diff --git a/lib/libyajl2.rb b/lib/libyajl2.rb
+new file mode 100644
+index 0000000..7497bfb
+--- /dev/null
++++ b/lib/libyajl2.rb
+@@ -0,0 +1,5 @@
++module Libyajl2
++  def self.opt_path
++    '/path/to/whatever'
++  end
++end
+diff --git a/metadata.yml b/metadata.yml
+index d8b1fdd..7b6335c 100644
+--- a/metadata.yml
++++ b/metadata.yml
+@@ -81,20 +81,6 @@ dependencies:
+       - !ruby/object:Gem::Version
+         version: '1.16'
+ - !ruby/object:Gem::Dependency
+-  name: libyajl2
+-  requirement: !ruby/object:Gem::Requirement
+-    requirements:
+-    - - "~>"
+-      - !ruby/object:Gem::Version
+-        version: '1.2'
+-  type: :runtime
+-  prerelease: false
+-  version_requirements: !ruby/object:Gem::Requirement
+-    requirements:
+-    - - "~>"
+-      - !ruby/object:Gem::Version
+-        version: '1.2'
+-- !ruby/object:Gem::Dependency
+   name: ffi
+   requirement: !ruby/object:Gem::Requirement
+     requirements:
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d69acbc
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Use-the-system-libyajl2.patch

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



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