Commit 623c69a2 authored by Antonio Terceiro's avatar Antonio Terceiro

New upstream version 2.16.0

parent 96da6115
......@@ -22,6 +22,8 @@ env:
before_install:
- source before_install_$TRAVIS_OS_NAME.sh
install: bundle install --verbose
rvm:
- 1.8
- 1.9
......
......@@ -3,6 +3,10 @@
All notable changes to this project are documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## RMagick 2.16.0
- Support ImageMagick 6.9+ - @ZipoKing
## RMagick 2.15.4
- Improved C extension building process - @u338steven
......
......@@ -36,6 +36,8 @@ On Ubuntu, you can run:
bc. sudo apt-get install libmagickwand-dev
*Note to Windows users:* Please make sure that you choose an ImageMagick version that matches the bitness of your Ruby version.
h2(#install). Installing RMagick
h4. Installing via Bundler
......@@ -54,6 +56,14 @@ Run:
bc. gem install rmagick
h4. Versioning
RMagick is versioned according to Semantic Versioning.
For stable version compatible with Ruby 1.8+, use `~> 2.0`.
Upcoming version 3 will work on Ruby 2.x only.
h2(#usage). Using RMagick
Require RMagick in your project as follows:
bc. require 'rmagick'
......
......@@ -24,3 +24,9 @@ if [[ $TRAVIS_RUBY_VERSION =~ ^1.8 ]]; then
echo "Set the stack size to unlimited to avoid segfault for Ruby 1.8"
ulimit -s unlimited
fi
# Fixes this error:
# NoMethodError: undefined method `spec' for nil:NilClass
# Travis uses Bundler 1.7.6 by default and it has this bug
# https://github.com/rubygems/rubygems/issues/1419
gem install bundler
......@@ -649,10 +649,13 @@ title.annotate(montage, 0,0,0,40, 'Named Colors') {
<h4>Description</h4>
<p>Returns information for a specific string if rendered on a
image. The <code>get_multiline_type_metrics</code> method is
the same as <code>get_type_metrics</code>, except the former
returns the maximum height and width for multiple lines of
text. (Text lines are separated by "\n" characters.)</p>
image. Metrics are derived from either the <a href="#attributes">
annotate attributes</a> or from the <a href="info.html">image
info attributes</a>, but not from any drawing primitive methods.
The <code>get_multiline_type_metrics</code> method is the same as
<code>get_type_metrics</code>, except the former returns the
maximum height and width for multiple lines of text. (Text lines
are separated by "\n" characters.)</p>
<p>The Magick++ documentation for its TypeMetric class provides
this useful additional information. (I've changed it a bit to
......
......@@ -21,6 +21,7 @@ module RMagick
def configured_compile_options
{
:magick_config => $magick_config,
:with_magick_wand => $with_magick_wand,
:pkg_config => $pkg_config,
:magick_version => $magick_version,
:local_libs => $LOCAL_LIBS,
......@@ -57,6 +58,7 @@ module RMagick
end
# ugly way to handle which config tool we're going to use...
$with_magick_wand = false
$magick_config = false
$pkg_config = false
......@@ -84,21 +86,50 @@ module RMagick
end
end
# either set flags using Magick-config or pkg-config (new Debian default)
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
# From ImageMagick 6.9 binaries are split to two and we have to use
# MagickWand instead of MagickCore
checking_for("presence of MagickWand API (ImageMagick version >= #{Magick::MIN_WAND_VERSION})") do
$with_magick_wand = Gem::Version.new($magick_version) >= Gem::Version.new(Magick::MIN_WAND_VERSION)
if $with_magick_wand
Logging.message('Detected 6.9+ version, using MagickWand API')
else
Logging.message('Older version detected, using MagickCore API')
end
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
# either set flags using Magick-config, MagickWand-config or pkg-config (new Debian default)
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
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
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
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
end
end
if RUBY_PLATFORM =~ /darwin/ # osx
......
module Magick
VERSION = '2.15.4'
VERSION = '2.16.0'
MIN_RUBY_VERSION = '1.8.5'
MIN_IM_VERSION = '6.4.9'
MIN_WAND_VERSION = '6.9.0'
end
......@@ -1812,7 +1812,6 @@ module Magick
end
def slice(*args)
current = get_current
slice = @images.slice(*args)
if slice
ilist = self.class.new
......
This diff is collapsed.
......@@ -2,6 +2,13 @@ require 'date'
require 'English'
require './lib/rmagick/version'
def v(version)
Gem::Version.new(version)
end
RUBY = v(RUBY_VERSION.dup)
RUBYGEMS = v(Gem::VERSION.dup)
Gem::Specification.new do |s|
s.name = 'rmagick'
s.version = Magick::VERSION
......@@ -29,14 +36,28 @@ Gem::Specification.new do |s|
s.has_rdoc = false
s.required_ruby_version = ">= #{Magick::MIN_RUBY_VERSION}"
s.requirements << "ImageMagick #{Magick::MIN_IM_VERSION} or later"
s.add_development_dependency 'rake-compiler'
s.add_development_dependency 'rspec', '~> 3.2.0'
if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('1.9.2')
if RUBY < v('1.9.0')
s.add_development_dependency 'rake', '~> 10.0'
end
if RUBY < v('2.0.0')
s.add_development_dependency 'json', '~> 1.0'
end
if RUBY >= v('1.9.2')
s.add_development_dependency 'rubocop', '~> 0.33.0'
end
if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.0')
if RUBY >= v('2.2.0')
s.add_development_dependency 'test-unit', '~> 2'
end
if RUBYGEMS < v('1.8.25')
s.add_development_dependency 'rake-compiler', '~> 0.8.0'
else
s.add_development_dependency 'rake-compiler'
end
end
box: centos:6
build:
steps:
- script:
name: deps
code: sudo yum install -y ruby ruby-devel rubygems ImageMagick-devel gcc git
- bundle-install
- script:
name: tests
code: bundle exec rake
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment