[DRE-commits] [ruby-rmagick] 01/01: Replace Magick-config by pkg-config

Vincent Fourmond fourmond at moszumanska.debian.org
Tue Aug 19 23:03:28 UTC 2014


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

fourmond pushed a commit to branch master
in repository ruby-rmagick.

commit 32eb1d84cf721994f831c9d84a41fa2eda788b50
Author: Vincent Fourmond <fourmond at debian.org>
Date:   Tue Aug 19 23:26:57 2014 +0200

    Replace Magick-config by pkg-config
---
 debian/changelog                            |  7 +++
 debian/patches/extconf-use-pkg-config.patch | 86 +++++++++++++++++++++++++++++
 debian/patches/series                       |  1 +
 3 files changed, 94 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 0d348e7..266e453 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ruby-rmagick (2.13.2-4) unstable; urgency=low
+
+  * Replaces the calls to now-deprecated Magick-config by calls to
+    pkg-config (closes: #758435)
+
+ -- Vincent Fourmond <fourmond at debian.org>  Tue, 19 Aug 2014 23:24:30 +0200
+
 ruby-rmagick (2.13.2-3) unstable; urgency=medium
 
   * Team upload
diff --git a/debian/patches/extconf-use-pkg-config.patch b/debian/patches/extconf-use-pkg-config.patch
new file mode 100644
index 0000000..939e145
--- /dev/null
+++ b/debian/patches/extconf-use-pkg-config.patch
@@ -0,0 +1,86 @@
+Description: Do not use Magick-config anymore
+ This dirty hack just disables a fair bit of (unused ?) checks in the 
+ configuration process and now uses pkg-config rather than Magick-config
+ (which is not provided anymore)
+Author: Vincent Fourmond <fourmond at debian.org>
+Index: ruby-rmagick/ext/RMagick/extconf.rb
+===================================================================
+--- ruby-rmagick.orig/ext/RMagick/extconf.rb
++++ ruby-rmagick/ext/RMagick/extconf.rb
+@@ -132,40 +132,42 @@ if RUBY_PLATFORM !~ /mswin|mingw/
+   end
+ 
+   # Check for Magick-config
+-  unless find_executable("Magick-config")
+-    exit_failure "Can't install RMagick #{RMAGICK_VERS}. Can't find Magick-config in #{ENV['PATH']}\n"
+-  end
++  # unless find_executable("Magick-config")
++  #   exit_failure "Can't install RMagick #{RMAGICK_VERS}. Can't find Magick-config in #{ENV['PATH']}\n"
++  # end
+ 
+-  check_multiple_imagemagick_versions()
+-  check_partial_imagemagick_versions()
++  # check_multiple_imagemagick_versions()
++  # check_partial_imagemagick_versions()
+ 
+-  # Ensure minimum ImageMagick version
+-  unless checking_for("ImageMagick version >= #{MIN_IM_VERS}")  do
+-    version = `Magick-config --version`.chomp.tr(".","").to_i
+-    version >= MIN_IM_VERS_NO
+-  end
+-    exit_failure "Can't install RMagick #{RMAGICK_VERS}. You must have ImageMagick #{MIN_IM_VERS} or later.\n"
+-  end
++  # # Ensure minimum ImageMagick version
++  # unless checking_for("ImageMagick version >= #{MIN_IM_VERS}")  do
++  #   version = `Magick-config --version`.chomp.tr(".","").to_i
++  #   version >= MIN_IM_VERS_NO
++  # end
++  #   exit_failure "Can't install RMagick #{RMAGICK_VERS}. You must have ImageMagick #{MIN_IM_VERS} or later.\n"
++  # end
+ 
+ 
+ 
+ 
+-  $magick_version = `Magick-config --version`.chomp
++  # $magick_version = `Magick-config --version`.chomp
+ 
+-  # Ensure ImageMagick is not configured for HDRI
+-  unless checking_for("HDRI disabled version of ImageMagick") do
+-    not (`Magick-config --version`["HDRI"])
+-  end
+-    exit_failure "\nCan't install RMagick #{RMAGICK_VERS}."+
+-           "\nRMagick does not work when ImageMagick is configured for High Dynamic Range Images."+
+-           "\nDon't use the --enable-hdri option when configuring ImageMagick.\n"
+-  end
++  # # Ensure ImageMagick is not configured for HDRI
++  # unless checking_for("HDRI disabled version of ImageMagick") do
++  #   not (`Magick-config --version`["HDRI"])
++  # end
++  #   exit_failure "\nCan't install RMagick #{RMAGICK_VERS}."+
++  #          "\nRMagick does not work when ImageMagick is configured for High Dynamic Range Images."+
++  #          "\nDon't use the --enable-hdri option when configuring ImageMagick.\n"
++  # end
++
++  $magick_version = `pkg-config --modversion ImageMagick`
+ 
+   # Save flags
+-  $CFLAGS     = ENV["CFLAGS"].to_s   + " " + `Magick-config --cflags`.chomp
+-  $CPPFLAGS   = ENV["CPPFLAGS"].to_s + " " + `Magick-config --cppflags`.chomp
+-  $LDFLAGS    = ENV["LDFLAGS"].to_s  + " " + `Magick-config --ldflags`.chomp
+-  $LOCAL_LIBS = ENV["LIBS"].to_s     + " " + `Magick-config --libs`.chomp
++  $CFLAGS     = ENV["CFLAGS"].to_s   + " " + `pkg-config ImageMagick --cflags`.chomp
++  $CPPFLAGS   = ENV["CPPFLAGS"].to_s + " " + `pkg-config ImageMagick --cflags-only-I`.chomp
++  $LDFLAGS    = ENV["LDFLAGS"].to_s  + " " + `pkg-config ImageMagick --libs`.chomp
++  $LOCAL_LIBS = ENV["LIBS"].to_s     + " " + `pkg-config ImageMagick --libs`.chomp
+ 
+ elsif RUBY_PLATFORM =~ /mingw/  # mingw
+ 
+@@ -205,7 +207,7 @@ end
+ 
+ if RUBY_PLATFORM !~ /mswin|mingw/
+ 
+-  unless `Magick-config --libs`[/\bl\s*(MagickCore|Magick)\b/]
++  unless `pkg-config ImageMagick --libs`[/\bl\s*(MagickCore|Magick)\b/]
+     exit_failure "Can't install RMagick #{RMAGICK_VERS}. " +
+            "Can't find the ImageMagick library or one of the dependent libraries. " +
+            "Check the mkmf.log file for more detailed information.\n"
diff --git a/debian/patches/series b/debian/patches/series
index f27a0c2..821a3c8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ disable-version-check.diff
 #fail-on-doc-failure.dpatch
 fix_example_shebang.patch
 format-security.patch
+extconf-use-pkg-config.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