aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2020-05-24 16:46:46 +0200
committerJakub Jirutka <jakub@jirutka.cz>2020-05-24 16:47:50 +0200
commit762522aa6dbb5448c23913866a8d03e656313c93 (patch)
tree8262998cf63ecdf90895c99f9e2fc30cd820c10a
parentfd532c5a437790ae03fc5befe6af2cbd7f1cc393 (diff)
downloadaports-762522aa6dbb5448c23913866a8d03e656313c93.tar.gz
aports-762522aa6dbb5448c23913866a8d03e656313c93.tar.bz2
aports-762522aa6dbb5448c23913866a8d03e656313c93.tar.xz
community/ruby-concurrent-ruby: upgrade to 1.1.6
-rw-r--r--community/ruby-concurrent-ruby/APKBUILD60
-rw-r--r--community/ruby-concurrent-ruby/rakefile-remove-dock.patch11
-rw-r--r--community/ruby-concurrent-ruby/ungit-gemspec.patch50
3 files changed, 89 insertions, 32 deletions
diff --git a/community/ruby-concurrent-ruby/APKBUILD b/community/ruby-concurrent-ruby/APKBUILD
index d719216d98..e1d7643e71 100644
--- a/community/ruby-concurrent-ruby/APKBUILD
+++ b/community/ruby-concurrent-ruby/APKBUILD
@@ -2,18 +2,20 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby-concurrent-ruby
_gemname=${pkgname#ruby-}
-pkgver=1.0.5
-pkgrel=5
+pkgver=1.1.6
+pkgrel=0
pkgdesc="Modern concurrency tools for Ruby"
url="http://www.concurrent-ruby.com"
arch="all"
license="MIT"
-depends="ruby"
-makedepends="ruby-dev"
-checkdepends="ruby-rake ruby-rake-compiler ruby-rspec ruby-timecop"
-subpackages="$pkgname-ext"
+depends="ruby ruby-etc"
+makedepends="jruby openjdk8 ruby-dev ruby-rake ruby-rake-compiler"
+checkdepends="ruby-rspec ruby-timecop"
+subpackages="$pkgname-java::noarch $pkgname-ext"
source="$pkgname-$pkgver.tar.gz::https://github.com/ruby-concurrency/$_gemname/archive/v$pkgver.tar.gz
- ungit-gemspec.patch"
+ ungit-gemspec.patch
+ rakefile-remove-dock.patch
+ "
builddir="$srcdir/$_gemname-$pkgver"
case "$CARCH" in
@@ -22,44 +24,54 @@ case "$CARCH" in
esac
build() {
- cd "$builddir"
+ export PATH="/usr/lib/jvm/java-1.8-openjdk/bin:$PATH"
+ export JRUBY_HOME="/usr/share/jruby"
- gem build $_gemname.gemspec
+ rake repackage
- gem build $_gemname-ext.gemspec
RUBYLIB="$(pwd)/lib" gem install --local \
- --install-dir dist \
+ --install-dir dist-ext \
--ignore-dependencies \
--no-document \
--verbose \
- $_gemname-ext
+ pkg/$_gemname-ext-$pkgver.gem
}
check() {
- cd "$builddir"
+ gem install --local \
+ --install-dir .gems \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ pkg/$_gemname-*.gem
- rake compile
- rspec --tag ~unfinished --tag ~buggy --tag ~edge spec
+ GEM_PATH=".gems" rspec --tag ~unfinished --tag ~buggy --tag ~edge spec
}
package() {
local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
- cd "$builddir"
-
gem install --local \
--install-dir "$gemdir" \
--ignore-dependencies \
--no-document \
--verbose \
- $_gemname
+ pkg/$_gemname-$pkgver.gem
# Remove unnecessary files.
rm -r "$gemdir"/cache \
"$gemdir"/build_info \
"$gemdir"/doc
cd "$gemdir"/gems/$_gemname-$pkgver
- rm *.md *.txt
+ rm Gemfile Rakefile *.md
+}
+
+java() {
+ pkgdesc="$pkgdesc (Java extension)"
+ depends="$pkgname=$pkgver-r$pkgrel"
+ install_if="$pkgname=$pkgver-r$pkgrel jruby"
+
+ amove $(ruby -e 'puts Gem.default_dir')/gems/$_gemname-$pkgver/ext
}
ext() {
@@ -68,7 +80,7 @@ ext() {
local gemdir="$subpkgdir/$(ruby -e 'puts Gem.default_dir')"
- cd "$builddir"/dist
+ cd "$builddir"/dist-ext
mkdir -p "$gemdir"
cp -r extensions gems specifications "$gemdir"/
@@ -76,8 +88,10 @@ ext() {
# Remove unnecessary files and rubbish...
find "$gemdir"/extensions/ -name mkmf.log -delete
cd "$gemdir"/gems/$_gemname-ext-$pkgver
- rm -r ext/ lib/concurrent/*.so *.md *.txt
+ rm -r ext/ lib/concurrent/*.so *.md
+ rmdir -p --ignore-fail-on-non-empty "$(pwd)/lib/concurrent"
}
-sha512sums="fdf7324b56bb37b4a79dc89882354e452ee838a097f522fb906c20a06856303cfbbae16f2500255cbfb4bba33ee1b3b3ee8facf3d0156e976add64209e349da6 ruby-concurrent-ruby-1.0.5.tar.gz
-3138b42e004efa6e270aa0153125ee65a73691c981eae6484d86919539b811b8190b8b67a51c4df8bb7a94100070f045a3fcaffaccefc2bdd6c5458e26f972b1 ungit-gemspec.patch"
+sha512sums="45b841761ab7060e437b334f8a1a6bcc60e230483cbf3176d6224020b6f7232fe61b0364a7ebe95b80e895847675a5ba0ae075bafcc35b709a60e288c32f2db3 ruby-concurrent-ruby-1.1.6.tar.gz
+4f464764072f8870a99c7b1ea263993f95e98edaf1c7f7ad350321ab74676d6511659eed779786d5dc9d31eae83c45651fc4a8895ea7082a7ebcf29398dd05d4 ungit-gemspec.patch
+964384305dbe7d0578e80117587235acd2ab8e812aaa9353a13157ad92574b6db632fe96b144950e64377f94af26fa2ec1bad1c829493c48d379c0c91e1282b7 rakefile-remove-dock.patch"
diff --git a/community/ruby-concurrent-ruby/rakefile-remove-dock.patch b/community/ruby-concurrent-ruby/rakefile-remove-dock.patch
new file mode 100644
index 0000000000..4dbdcaab81
--- /dev/null
+++ b/community/ruby-concurrent-ruby/rakefile-remove-dock.patch
@@ -0,0 +1,11 @@
+--- a/Rakefile
++++ b/Rakefile
+@@ -37,7 +37,7 @@
+ end
+ end
+
+-require 'rake_compiler_dock'
++#require 'rake_compiler_dock'
+ namespace :repackage do
+ desc '* with Windows fat distributions'
+ task :all do
diff --git a/community/ruby-concurrent-ruby/ungit-gemspec.patch b/community/ruby-concurrent-ruby/ungit-gemspec.patch
index 100b650a8b..28cf2edbf6 100644
--- a/community/ruby-concurrent-ruby/ungit-gemspec.patch
+++ b/community/ruby-concurrent-ruby/ungit-gemspec.patch
@@ -1,10 +1,42 @@
---- a/support/file_map.rb
-+++ b/support/file_map.rb
-@@ -1,6 +1,6 @@
- module FileMap
+--- a/concurrent-ruby.gemspec
++++ b/concurrent-ruby.gemspec
+@@ -2,8 +2,6 @@
+ require File.join(File.dirname(__FILE__ ), 'lib/concurrent-ruby/concurrent/utility/engine')
-- GIT_FILES = `git ls-files`.split("\n")
-+ GIT_FILES = Dir['lib/**/*']
- ALL_LIB_FILES = Dir['lib/concurrent/**/*.rb'] & GIT_FILES
- EDGE_LIB_FILES = Dir['lib/concurrent/actor.rb',
- 'lib/concurrent/actor/**/*.rb',
+ Gem::Specification.new do |s|
+- git_files = `git ls-files`.split("\n")
+-
+ s.name = 'concurrent-ruby'
+ s.version = Concurrent::VERSION
+ s.platform = Gem::Platform::RUBY
+@@ -13,8 +11,8 @@
+ s.summary = 'Modern concurrency tools for Ruby. Inspired by Erlang, Clojure, Scala, Haskell, F#, C#, Java, and classic concurrency patterns.'
+ s.license = 'MIT'
+ s.date = Time.now.strftime('%Y-%m-%d')
+- s.files = [*Dir['lib/concurrent-ruby/**/*.rb'] & git_files,
+- *Dir['ext/concurrent-ruby/**/*'] & git_files,
++ s.files = [*Dir['lib/concurrent-ruby/**/*.rb'],
++ *Dir['ext/concurrent-ruby/**/*'],
+ 'Rakefile',
+ 'Gemfile',
+ 'lib/concurrent-ruby/concurrent/concurrent_ruby.jar'
+--- a/concurrent-ruby-edge.gemspec
++++ b/concurrent-ruby-edge.gemspec
+@@ -2,8 +2,6 @@
+ require File.join(File.dirname(__FILE__ ), 'lib/concurrent-ruby-edge/concurrent/edge/version')
+
+ Gem::Specification.new do |s|
+- git_files = `git ls-files`.split("\n")
+-
+ s.name = 'concurrent-ruby-edge'
+ s.version = Concurrent::EDGE_VERSION
+ s.platform = Gem::Platform::RUBY
+@@ -13,7 +11,7 @@
+ s.summary = 'Edge features and additions to the concurrent-ruby gem.'
+ s.license = 'MIT'
+ s.date = Time.now.strftime('%Y-%m-%d')
+- s.files = Dir['lib/concurrent-ruby-edge/**/*.rb'] & git_files
++ s.files = Dir['lib/concurrent-ruby-edge/**/*.rb']
+ s.extra_rdoc_files = Dir['README*', 'LICENSE*', 'CHANGELOG*']
+ s.require_paths = ['lib/concurrent-ruby-edge']
+ s.description = <<-TXT