aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2021-10-18 12:45:27 +0200
committerJakub Jirutka <jakub@jirutka.cz>2021-10-18 18:44:42 +0200
commit5e0d9cea9f56b24f117de20c3b9a099477d6f65c (patch)
tree099be0f60e146eab1f25e16357ae43b4224f204e
parent75ffc3a9dad2fb1419ac1680f88b041c5008bbf1 (diff)
downloadaports-5e0d9cea9f56b24f117de20c3b9a099477d6f65c.tar.gz
aports-5e0d9cea9f56b24f117de20c3b9a099477d6f65c.tar.bz2
aports-5e0d9cea9f56b24f117de20c3b9a099477d6f65c.tar.xz
main/ruby-rake: new aport
This gem was bundled in main/ruby and it's on the list of the "Bundled gems" (https://stdgems.org/#bundled-gems-ruby-302) for Ruby 3.0.2. I'm moving it to a separate aport to provide a correct pkgver - to avoid confusion and future complications if the upstream decide to remove it from the "Bundled gems" (as they did for some other gems with 3.0.0 release).
-rw-r--r--main/ruby-rake/APKBUILD58
-rw-r--r--main/ruby-rake/gemspec.patch12
2 files changed, 70 insertions, 0 deletions
diff --git a/main/ruby-rake/APKBUILD b/main/ruby-rake/APKBUILD
new file mode 100644
index 0000000000..a9efd025b5
--- /dev/null
+++ b/main/ruby-rake/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ruby-rake
+_gemname=rake
+# Keep version in sync with "Bundled gems" (https://stdgems.org) for the
+# packaged Ruby version.
+pkgver=13.0.3
+pkgrel=0
+pkgdesc="A Ruby task runner, inspired by make"
+url="https://github.com/ruby/rake"
+arch="noarch"
+license="MIT"
+depends="ruby"
+checkdepends="ruby-minitest"
+makedepends="ruby-rdoc"
+subpackages="$pkgname-doc"
+source="https://github.com/ruby/rake/archive/v$pkgver/$_gemname-$pkgver.tar.gz
+ gemspec.patch
+ "
+builddir="$srcdir/$_gemname-$pkgver"
+
+build() {
+ gem build $_gemname.gemspec
+}
+
+check() {
+ # FIXME: Fix test_signal_propagation_in_tests
+ ruby -Ilib -Itest -e "Dir.glob('./test/**/test_*.rb', &method(:require))" -- \
+ --exclude=test_signal_propagation_in_tests
+}
+
+package() {
+ local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
+
+ gem install \
+ --local \
+ --install-dir "$gemdir" \
+ --bindir "$pkgdir/usr/bin" \
+ --ignore-dependencies \
+ --document ri \
+ --verbose \
+ $_gemname
+
+ # Remove unnessecary files
+ cd "$gemdir"
+ rm -rf build_info cache extensions plugins
+}
+
+doc() {
+ pkgdesc="$pkgdesc (ri docs)"
+
+ amove "$(ruby -e 'puts Gem.default_dir')"/doc
+}
+
+sha512sums="
+aff09bbfa58620cd6902e6679ae3f54d90424bfac40c7ad6efcc590a1c9624ae7a0c5597b8b05b378d90e422285c41d781485b9aebe1819c0c2eaf5f2624afa2 rake-13.0.3.tar.gz
+f96cf62c017962145e6553534c4c1e0ae678821781e52b3000ea21ea908a010fc1a25d505d1b0f7262db70b1354a790a1ef3f2f9e59bba23bd701beda69686d2 gemspec.patch
+"
diff --git a/main/ruby-rake/gemspec.patch b/main/ruby-rake/gemspec.patch
new file mode 100644
index 0000000000..f661ddde53
--- /dev/null
+++ b/main/ruby-rake/gemspec.patch
@@ -0,0 +1,12 @@
+--- a/rake.gemspec
++++ b/rake.gemspec
+@@ -30,8 +30,7 @@
+ "source_code_uri" => "https://github.com/ruby/rake/tree/v#{s.version}",
+ }
+
+- s.files = %x[git ls-files -z].split("\x0").reject { |f| f.match(%r{^(test|spec|features|\.github)/}) } -
+- %w[.rubocop.yml .gitignore .travis.yml appveyor.yml]
++ s.files = Dir["exe/*", "lib/**/*.rb"]
+ s.bindir = "exe"
+ s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ s.require_paths = ["lib".freeze]