[DRE-commits] [ruby-rbnacl] 01/04: d/p/provide_libsodium.patch: Specify what version of libsodium we have.
Unit 193
unit193-guest at moszumanska.debian.org
Wed Dec 27 06:40:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
unit193-guest pushed a commit to branch master
in repository ruby-rbnacl.
commit 229307cf40a6fb855f0792b0b36b51484fc384b0
Author: Unit 193 <unit193 at ubuntu.com>
Date: Wed Dec 27 01:37:19 2017 -0500
d/p/provide_libsodium.patch: Specify what version of libsodium we have.
---
debian/patches/provide_libsodium.patch | 33 ++++++++++++++++++++++++++-------
1 file changed, 26 insertions(+), 7 deletions(-)
diff --git a/debian/patches/provide_libsodium.patch b/debian/patches/provide_libsodium.patch
index 6463e2c..be040aa 100644
--- a/debian/patches/provide_libsodium.patch
+++ b/debian/patches/provide_libsodium.patch
@@ -1,7 +1,6 @@
-From: Debian Ruby Extras Maintainers
- <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
+From: Unit 193 <unit193 at ubuntu.com>
Date: Sat, 8 Jul 2017 23:04:03 +0200
-Subject: provide_libsodium
+Subject: Provide rbnacl-libsodium
Last-Update: 2017-01-03
---
@@ -14,7 +13,27 @@ new file mode 100644
index 0000000..94d04a7
--- /dev/null
+++ b/lib/rbnacl/libsodium.rb
-@@ -0,0 +1,3 @@
-+module RbNaCl; module LibSodium
-+ require 'rbnacl'
-+end; end
+@@ -0,0 +1,8 @@
++require 'rbnacl'
++
++module RbNaCl
++ module Libsodium
++ send(:remove_const, :VERSION) if const_defined?(:VERSION)
++ VERSION = RbNaCl::Sodium::Version::STRING
++ end
++end
+diff --git a/lib/rbnacl/libsodium/version.rb b/lib/rbnacl/libsodium/version.rb
+new file mode 100644
+index 0000000..94d04a7
+--- /dev/null
++++ b/lib/rbnacl/libsodium/version.rb
+@@ -0,0 +1,9 @@
++module RbNaCl
++ module Libsodium
++ if defined?(RbNaCl::Sodium::Version::STRING)
++ VERSION = RbNaCl::Sodium::Version::STRING
++ elsif system('pkg-config --exists libsodium')
++ VERSION = `pkg-config --modversion libsodium`
++ end
++ end
++end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rbnacl.git
More information about the Pkg-ruby-extras-commits
mailing list