[DRE-commits] [ruby-rmagick] 07/15: fix gemspec
Antonio Terceiro
terceiro at moszumanska.debian.org
Sun Dec 4 15:34:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository ruby-rmagick.
commit d5f6dad92e0e2c1b457eccd73479f559ce6e1368
Author: Antonio Terceiro <terceiro at debian.org>
Date: Sat Dec 3 19:11:00 2016 -0200
fix gemspec
---
debian/changelog | 8 +++---
.../0006-gemspec-fix-error-when-loading.patch | 31 ++++++++++++++++++++++
debian/patches/0007-gemspec-drop-git-usage.patch | 21 +++++++++++++++
debian/patches/series | 2 ++
4 files changed, 59 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index bf15e9e..a683ce7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,12 @@
ruby-rmagick (2.16.0-1) UNRELEASED; urgency=medium
* New upstream version 2.16.0
- * debian/patches/0005-Allocate-DrawInfo-using-the-ImageMagick-API.patch:
- use ImageMagick API to allocate memory for DrawInfo struct, which is
- supposed to be opaque (Closes: #591419)
+ * 0005-Allocate-DrawInfo-using-the-ImageMagick-API.patch: use ImageMagick
+ API to allocate memory for DrawInfo struct, which is supposed to be opaque
+ (Closes: #591419)
* Drop ruby-setup from Build-Depends:, not really needed
+ * 0006-gemspec-fix-error-when-loading.patch,
+ 0007-gemspec-drop-git-usage.patch: adjust gemspec
-- Antonio Terceiro <terceiro at debian.org> Sat, 03 Dec 2016 10:26:54 -0200
diff --git a/debian/patches/0006-gemspec-fix-error-when-loading.patch b/debian/patches/0006-gemspec-fix-error-when-loading.patch
new file mode 100644
index 0000000..90b1c51
--- /dev/null
+++ b/debian/patches/0006-gemspec-fix-error-when-loading.patch
@@ -0,0 +1,31 @@
+From: Antonio Terceiro <terceiro at debian.org>
+Date: Sat, 3 Dec 2016 16:04:48 -0200
+Subject: gemspec: fix error when loading
+
+Trying to load the gemspec the way it is produces this:
+
+$ gem build .
+ERROR: Error loading gemspec. Aborting.
+$ ruby -e 'Gem::Specification.load("rmagick.gemspec")'
+Invalid gemspec in [rmagick.gemspec]: undefined method `v' for Gem::Specification:Class
+---
+ rmagick.gemspec | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/rmagick.gemspec b/rmagick.gemspec
+index f179839..d8d7f2d 100644
+--- a/rmagick.gemspec
++++ b/rmagick.gemspec
+@@ -2,8 +2,10 @@ require 'date'
+ require 'English'
+ require './lib/rmagick/version'
+
+-def v(version)
+- Gem::Version.new(version)
++class << Gem::Specification
++ def v(version)
++ Gem::Version.new(version)
++ end
+ end
+
+ RUBY = v(RUBY_VERSION.dup)
diff --git a/debian/patches/0007-gemspec-drop-git-usage.patch b/debian/patches/0007-gemspec-drop-git-usage.patch
new file mode 100644
index 0000000..43ab61e
--- /dev/null
+++ b/debian/patches/0007-gemspec-drop-git-usage.patch
@@ -0,0 +1,21 @@
+From: Antonio Terceiro <terceiro at debian.org>
+Date: Sat, 3 Dec 2016 19:10:09 -0200
+Subject: gemspec: drop git usage
+
+---
+ rmagick.gemspec | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rmagick.gemspec b/rmagick.gemspec
+index d8d7f2d..fed816d 100644
+--- a/rmagick.gemspec
++++ b/rmagick.gemspec
+@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
+ s.homepage = 'https://github.com/rmagick/rmagick'
+ s.license = 'MIT'
+
+- tracked_files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
++ tracked_files = Dir['**/*'] - Dir['debian/**/*']
+ file_exclusion_regex = %r{(\Alib/rvg/to_c.rb)}
+ files = tracked_files.reject{|file| file[file_exclusion_regex] }
+ test_files = files.grep(%r{^(test|spec|features)/})
diff --git a/debian/patches/series b/debian/patches/series
index 0f49c4a..a48d162 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,5 @@
0003-Use-deterministic-label-for-image.patch
0004-Seed-RNG-to-0-during-builds.patch
0005-Allocate-DrawInfo-using-the-ImageMagick-API.patch
+0006-gemspec-fix-error-when-loading.patch
+0007-gemspec-drop-git-usage.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rmagick.git
More information about the Pkg-ruby-extras-commits
mailing list