]> git.pld-linux.org Git - packages/ruby-RMagick.git/commitdiff
- make sure correct ImageMagick version is used auto/th/ruby-RMagick-2.16.0-1
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 27 Dec 2016 08:07:02 +0000 (09:07 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 27 Dec 2016 08:07:02 +0000 (09:07 +0100)
magick6.patch [new file with mode: 0644]
ruby-RMagick.spec

diff --git a/magick6.patch b/magick6.patch
new file mode 100644 (file)
index 0000000..74107b9
--- /dev/null
@@ -0,0 +1,116 @@
+--- RMagick-2.16.0/ext/RMagick/extconf.rb.orig 2016-12-27 08:19:30.000000000 +0100
++++ RMagick-2.16.0/ext/RMagick/extconf.rb      2016-12-27 09:02:57.930941759 +0100
+@@ -63,12 +63,12 @@
+         $pkg_config = false
+         # Check for Magick-config
+-        if find_executable('Magick-config') && !has_graphicsmagick_libmagick_dev_compat?
++        if find_executable('Magick6-config') && !has_graphicsmagick_libmagick_dev_compat?
+           $magick_config = true
+-          $magick_version = `Magick-config --version`[/^(\d+\.\d+\.\d+)/]
++          $magick_version = `Magick6-config --version`[/^(\d+\.\d+\.\d+)/]
+         elsif find_executable('pkg-config')
+           $pkg_config = true
+-          $magick_version = `pkg-config MagickCore --modversion`[/^(\d+\.\d+\.\d+)/]
++          $magick_version = `pkg-config MagickCore6 --modversion`[/^(\d+\.\d+\.\d+)/]
+         else
+           exit_failure "Can't install RMagick #{RMAGICK_VERS}. Can't find Magick-config or pkg-config in #{ENV['PATH']}\n"
+         end
+@@ -101,34 +101,34 @@
+         if $with_magick_wand
+           if $magick_config
+             # Save flags
+-            $CFLAGS     = ENV['CFLAGS'].to_s   + ' ' + `MagickWand-config --cflags`.chomp
+-            $CPPFLAGS   = ENV['CPPFLAGS'].to_s + ' ' + `MagickWand-config --cppflags`.chomp
+-            $LDFLAGS    = ENV['LDFLAGS'].to_s  + ' ' + `MagickWand-config --ldflags`.chomp
+-            $LOCAL_LIBS = ENV['LIBS'].to_s     + ' ' + `MagickWand-config --libs`.chomp
++            $CFLAGS     = ENV['CFLAGS'].to_s   + ' ' + `MagickWand6-config --cflags`.chomp
++            $CPPFLAGS   = ENV['CPPFLAGS'].to_s + ' ' + `MagickWand6-config --cppflags`.chomp
++            $LDFLAGS    = ENV['LDFLAGS'].to_s  + ' ' + `MagickWand6-config --ldflags`.chomp
++            $LOCAL_LIBS = ENV['LIBS'].to_s     + ' ' + `MagickWand6-config --libs`.chomp
+           end
+           if $pkg_config
+             # Save flags
+-            $CFLAGS     = ENV['CFLAGS'].to_s   + ' ' + `pkg-config --cflags MagickWand`.chomp
+-            $CPPFLAGS   = ENV['CPPFLAGS'].to_s + ' ' + `pkg-config --cflags MagickWand`.chomp
+-            $LDFLAGS    = ENV['LDFLAGS'].to_s  + ' ' + `pkg-config --libs MagickWand`.chomp
+-            $LOCAL_LIBS = ENV['LIBS'].to_s     + ' ' + `pkg-config --libs MagickWand`.chomp
++            $CFLAGS     = ENV['CFLAGS'].to_s   + ' ' + `pkg-config --cflags MagickWand6`.chomp
++            $CPPFLAGS   = ENV['CPPFLAGS'].to_s + ' ' + `pkg-config --cflags MagickWand6`.chomp
++            $LDFLAGS    = ENV['LDFLAGS'].to_s  + ' ' + `pkg-config --libs MagickWand6`.chomp
++            $LOCAL_LIBS = ENV['LIBS'].to_s     + ' ' + `pkg-config --libs MagickWand6`.chomp
+           end
+         else
+           if $magick_config
+             # 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   + ' ' + `Magick6-config --cflags`.chomp
++            $CPPFLAGS   = ENV['CPPFLAGS'].to_s + ' ' + `Magick6-config --cppflags`.chomp
++            $LDFLAGS    = ENV['LDFLAGS'].to_s  + ' ' + `Magick6-config --ldflags`.chomp
++            $LOCAL_LIBS = ENV['LIBS'].to_s     + ' ' + `Magick6-config --libs`.chomp
+           end
+           if $pkg_config
+             # Save flags
+-            $CFLAGS     = ENV['CFLAGS'].to_s   + ' ' + `pkg-config --cflags MagickCore`.chomp
+-            $CPPFLAGS   = ENV['CPPFLAGS'].to_s + ' ' + `pkg-config --cflags MagickCore`.chomp
+-            $LDFLAGS    = ENV['LDFLAGS'].to_s  + ' ' + `pkg-config --libs MagickCore`.chomp
+-            $LOCAL_LIBS = ENV['LIBS'].to_s     + ' ' + `pkg-config --libs MagickCore`.chomp
++            $CFLAGS     = ENV['CFLAGS'].to_s   + ' ' + `pkg-config --cflags MagickCore6`.chomp
++            $CPPFLAGS   = ENV['CPPFLAGS'].to_s + ' ' + `pkg-config --cflags MagickCore6`.chomp
++            $LDFLAGS    = ENV['LDFLAGS'].to_s  + ' ' + `pkg-config --libs MagickCore6`.chomp
++            $LOCAL_LIBS = ENV['LIBS'].to_s     + ' ' + `pkg-config --libs MagickCore6`.chomp
+           end
+         end
+@@ -186,7 +186,7 @@
+     end
+     def has_graphicsmagick_libmagick_dev_compat?
+-      config_path = `which Magick-config`.chomp
++      config_path = `which Magick6-config`.chomp
+       if File.exist?(config_path) &&
+          File.symlink?(config_path) &&
+          File.readlink(config_path) =~ /GraphicsMagick/
+@@ -210,7 +210,7 @@
+       versions = []
+       path = ENV['PATH'].split(File::PATH_SEPARATOR)
+       path.each do |dir|
+-        file = File.join(dir, 'Magick-config')
++        file = File.join(dir, 'Magick6-config')
+         if File.executable? file
+           vers = `#{file} --version`.chomp.strip
+           prefix = `#{file} --prefix`.chomp.strip
+@@ -221,7 +221,7 @@
+       if versions.size > 1
+         msg = "\nWarning: Found more than one ImageMagick installation. This could cause problems at runtime.\n"
+         versions.each do |vers, prefix, dir|
+-          msg << "         #{dir}/Magick-config reports version #{vers} is installed in #{prefix}\n"
++          msg << "         #{dir}/Magick6-config reports version #{vers} is installed in #{prefix}\n"
+         end
+         msg << "Using #{versions[0][0]} from #{versions[0][1]}.\n\n"
+         Logging.message msg
+@@ -238,7 +238,7 @@
+       matches = [
+         prefix+'/lib/lib?agick*',
+         prefix+'/include/ImageMagick',
+-        prefix+'/bin/Magick-config',
++        prefix+'/bin/Magick6-config',
+       ].map do |file_glob|
+         Dir.glob(file_glob)
+       end
+@@ -335,8 +335,8 @@
+       if RUBY_PLATFORM !~ /mswin|mingw/
+         # check for pkg-config if Magick-config doesn't exist
+-        if $magick_config && `Magick-config --libs`[/\bl\s*(MagickCore|Magick)6?\b/]
+-        elsif $pkg_config && `pkg-config --libs MagickCore`[/\bl\s*(MagickCore|Magick)6?\b/]
++        if $magick_config && `Magick6-config --libs`[/\bl\s*(MagickCore|Magick)6?\b/]
++        elsif $pkg_config && `pkg-config --libs MagickCore6`[/\bl\s*(MagickCore|Magick)6?\b/]
+         else
+             exit_failure "Can't install RMagick #{RMAGICK_VERS}. " \
+                    "Can't find the ImageMagick library or one of the dependent libraries. " \
index a85bc3f13ea449c4ac06c1e777737ce9fb339700..2f53438a15ef5d830d813a98c32b84f746af00aa 100644 (file)
@@ -11,6 +11,7 @@ Source0:      http://rubygems.org/downloads/rmagick-%{version}.gem
 Patch0:                no-gem.patch
 Patch1:                disable-tests.patch
 Patch2:                no-git.patch
+Patch3:                magick6.patch
 URL:           https://github.com/gemhome/rmagick
 BuildRequires: ImageMagick6-coder-dot
 BuildRequires: ImageMagick6-coder-fpx
@@ -88,6 +89,7 @@ Dokumentacji w formacie ri dla %{pkgname}.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %{__rm} spec/rmagick/draw_spec.rb
 
This page took 0.123214 seconds and 4 git commands to generate.