Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix hard-coded ImageMagick version number in summary message

  • Loading branch information...
commit 49f10f56937580fd0edecec16af4c46e1a1563a7 1 parent ae0ecf6
rmagick authored
Showing with 23 additions and 19 deletions.
  1. +23 −19 ext/RMagick/extconf.rb
View
42 ext/RMagick/extconf.rb
@@ -7,19 +7,6 @@
MIN_IM_VERS = "6.3.0"
MIN_IM_VERS_NO = MIN_IM_VERS.tr(".","").to_i
-SUMMARY = <<"END_SUMMARY"
-
-
-#{"=" * 70}
-#{DateTime.now.strftime("%a %d%b%y %T")}
-This installation of RMagick #{RMAGICK_VERS} is configured
-for Ruby #{RUBY_VERSION} (#{RUBY_PLATFORM}) and ImageMagick 6.3.7.
-#{"=" * 70}
-
-
-END_SUMMARY
-
-
# Test for a specific value in an enum type
@@ -104,6 +91,8 @@ def exit_failure(msg)
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
+
# Ensure ImageMagick is not configured for HDRI
unless checking_for("HDRI disabled version of ImageMagick") do
not (`Magick-config --version`["HDRI"])
@@ -121,12 +110,13 @@ def exit_failure(msg)
else # mswin
- `convert -version` =~ /Version: ImageMagick (\d\.\d\.\d+) /
- abort "Unable to get ImageMagick version" unless $1
- $CFLAGS = "-W3"
- $CPPFLAGS = %Q{-I"C:\\Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Include" -I"C:\\Program Files\\ImageMagick-#{$1}-Q8\\include"}
+ `convert -version` =~ /Version: ImageMagick (\d\.\d\.\d+) /
+ abort "Unable to get ImageMagick version" unless $1
+ $magick_version = $1
+ $CFLAGS = "-W3"
+ $CPPFLAGS = %Q{-I"C:\\Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Include" -I"C:\\Program Files\\ImageMagick-#{$magick_version}-Q8\\include"}
# The /link option is required by the Makefile but causes warnings in the mkmf.log file.
- $LDFLAGS = %Q{/link /LIBPATH:"C:\\Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Lib" /LIBPATH:"C:\\Program Files\\ImageMagick-#{$1}-Q8\\lib" /LIBPATH:"C:\\ruby\\lib"}
+ $LDFLAGS = %Q{/link /LIBPATH:"C:\\Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Lib" /LIBPATH:"C:\\Program Files\\ImageMagick-#{$magick_version}-Q8\\lib" /LIBPATH:"C:\\ruby\\lib"}
$LOCAL_LIBS = 'CORE_RL_magick_.lib X11.lib'
end
@@ -210,7 +200,8 @@ def exit_failure(msg)
"ParzenFilter", # 6.3.6-4
"LagrangeFilter", # 6.3.7-2
"BohmanFilter", # 6.3.7-2
- "BartlettFilter"], headers) # 6.3.7-2
+ "BartlettFilter", # 6.3.7-2
+ "SentinelFilter"], headers) # 6.3.7-2
have_enum_value("InterpolatePixelMethod", "SplineInterpolatePixel", headers) # 6.3.5
have_enum_values("InterlaceType", ["GIFInterlace", # 6.3.4
"JPEGInterlace", # 6.3.4
@@ -252,5 +243,18 @@ def exit_failure(msg)
create_makefile("RMagick2")
+
+SUMMARY = <<"END_SUMMARY"
+
+
+#{"=" * 70}
+#{DateTime.now.strftime("%a %d%b%y %T")}
+This installation of RMagick #{RMAGICK_VERS} is configured for
+Ruby #{RUBY_VERSION} (#{RUBY_PLATFORM}) and ImageMagick #{$magick_version}
+#{"=" * 70}
+
+
+END_SUMMARY
+
Logging::message SUMMARY
message SUMMARY
Please sign in to comment.
Something went wrong with that request. Please try again.