diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-10-04 21:44:06 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-10-04 21:46:16 +0200 |
commit | ae746606f328634fa3af6b0664256ee1959477e8 (patch) | |
tree | f0ebb08a874886093fde4c5d6f69b22b80fe4705 | |
parent | 8b0a1e5fd988fbf9f8e2c88bd97a103068f6e603 (diff) | |
download | aports-ae746606f328634fa3af6b0664256ee1959477e8.tar.bz2 aports-ae746606f328634fa3af6b0664256ee1959477e8.tar.xz |
testing/ruby-rmagick: new aport
https://rmagick.github.io/
Ruby bindings for ImageMagick
-rw-r--r-- | testing/ruby-rmagick/APKBUILD | 61 | ||||
-rw-r--r-- | testing/ruby-rmagick/gemspec.patch | 54 | ||||
-rw-r--r-- | unmaintained/ruby-rmagick/APKBUILD | 37 | ||||
-rw-r--r-- | unmaintained/ruby-rmagick/rmagick-2.13.2.gem | bin | 1305088 -> 0 bytes |
4 files changed, 115 insertions, 37 deletions
diff --git a/testing/ruby-rmagick/APKBUILD b/testing/ruby-rmagick/APKBUILD new file mode 100644 index 0000000000..587505bceb --- /dev/null +++ b/testing/ruby-rmagick/APKBUILD @@ -0,0 +1,61 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=ruby-rmagick +_gemname=rmagick +pkgver=2.16.0 +_pkgver=${pkgver//./-} +pkgrel=0 +pkgdesc="Ruby bindings for ImageMagick" +url="https://rmagick.github.io/" +arch="all" +license="MIT" +depends="ghostscript-fonts" +checkdepends="ruby-rake" +makedepends="imagemagick6-dev ruby ruby-dev" +source="https://github.com/rmagick/rmagick/archive/RMagick_$_pkgver.tar.gz + gemspec.patch" +builddir="$srcdir/rmagick-RMagick_$_pkgver" + +build() { + cd "$builddir" + + gem build $_gemname.gemspec + gem install --local \ + --install-dir dist \ + --ignore-dependencies \ + --no-document \ + --verbose \ + $_gemname +} + +check() { + cd "$builddir" + + # Install missing development dependencies needed and used only for running + # tests. We can't install them easily with bundler, because there's + # no way how to force it to NOT update already satisifed dependencies. + # We can't install them directly with gem either, because there's no + # way how to force it to instally only dependencies, not the gem itself. + local dev_deps=$(gem install --explain --development --minimal-deps $_gemname-$pkgver.gem \ + | head -n -1 | sed -En 's/-([^-]+)$/:\1/p') + gem install --instal-dir=.gem --conservative $dev_deps + + GEM_PATH='dist:.gem' .gem/bin/rspec +} + +package() { + local gemdir="$pkgdir/$(ruby -rubygems -e 'puts Gem.default_dir')" + cd "$builddir"/dist + + mkdir -p "$gemdir" + cp -r extensions gems specifications "$gemdir"/ + + # Remove unnecessary files and rubbish... + find "$gemdir"/extensions/ -name mkmf.log -delete + + cd "$gemdir"/gems/$_gemname-$pkgver + rm -r ext/ lib/*.so +} + +sha512sums="2ff7c482815a31c383e0d761d9e1e5a1921b00f83c3701bc253bb96cb82fefb3313e7b73ca80f5a320323488ed697a826ac6f890130bc11c3b41ea46c0eaa191 RMagick_2-16-0.tar.gz +b609012c32bda1405bdd55110aaa000914a6e0a23f8527673508cc0244a601fa0ac65374a8c00f595cb9d8118d8cae256435036df4faa80a2d686dd3f62ed281 gemspec.patch" diff --git a/testing/ruby-rmagick/gemspec.patch b/testing/ruby-rmagick/gemspec.patch new file mode 100644 index 0000000000..a282a3076f --- /dev/null +++ b/testing/ruby-rmagick/gemspec.patch @@ -0,0 +1,54 @@ +--- a/rmagick.gemspec ++++ b/rmagick.gemspec +@@ -2,13 +2,6 @@ + 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 +@@ -20,7 +13,7 @@ + s.homepage = 'https://github.com/rmagick/rmagick' + s.license = 'MIT' + +- tracked_files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR) ++ tracked_files = Dir['deprecated/*', 'ext/**/*', 'lib/**/*', '*.gemspec'] + 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)/}) +@@ -38,26 +31,6 @@ + s.requirements << "ImageMagick #{Magick::MIN_IM_VERSION} or later" + + s.add_development_dependency 'rspec', '~> 3.2.0' +- +- 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 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 ++ s.add_development_dependency 'test-unit', '~> 2' ++ s.add_development_dependency 'rake-compiler' + end diff --git a/unmaintained/ruby-rmagick/APKBUILD b/unmaintained/ruby-rmagick/APKBUILD deleted file mode 100644 index a8d527a51a..0000000000 --- a/unmaintained/ruby-rmagick/APKBUILD +++ /dev/null @@ -1,37 +0,0 @@ -# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org> -# Maintainer: Natanael Copa <ncopa@alpinelinux.org> -pkgname=ruby-rmagick -_gemname=rmagick -pkgver=2.15.4 -pkgrel=0 -pkgdesc="Ruby ImageMagick interface" -url="http://rmagick.rubyforge.org" -arch="all" -license="custom" -depends="ruby ghostscript-fonts" -depends_dev="ruby-dev imagemagick-dev freetype-dev libjpeg-turbo-dev zlib-dev" -makedepends="$depends_dev" -install="" -subpackages="" -source="http://gems.rubyforge.org/gems/$_gemname-$pkgver.gem" - -build() { - return 0 -} - -package() { - local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" - local _geminstdir=$_gemdir/gems/$_gemname-$pkgver - mkdir -p "$pkgdir" || return 1 - - gem install --local --install-dir "$pkgdir"/$_gemdir \ - --ignore-dependencies --verbose --no-rdoc --no-ri \ - "$srcdir"/$_gemname-$pkgver.gem || return 1 - rm -rf "$pkgdir"/$_gemdir/cache \ - "$pkgdir"/$_geminstdir/ext \ - "$pkgdir"/$_geminstdir/.require_paths -} - -md5sums="ca28bf18354103aada43bbe070c3df4d rmagick-2.15.4.gem" -sha256sums="69db6635c2630ffd63c1858646cbc280226f31a7bc34e1c9d1322c2c73e1e386 rmagick-2.15.4.gem" -sha512sums="9cb43632e510e3592e3a643117d61020d6cbec932acecc19c1e977cca001ccc04bae46669895fa2f5f0e8d43c09f1c2c429595a9358a4a74cbdbb4ecd8957b80 rmagick-2.15.4.gem" diff --git a/unmaintained/ruby-rmagick/rmagick-2.13.2.gem b/unmaintained/ruby-rmagick/rmagick-2.13.2.gem Binary files differdeleted file mode 100644 index b208397a25..0000000000 --- a/unmaintained/ruby-rmagick/rmagick-2.13.2.gem +++ /dev/null |