From 404058c5b12f7f9736e2b449a80c25b8cf854566 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 31 Mar 2023 12:52:28 -0400 Subject: [PATCH] user/ruby3.0-minitest: new aport --- user/ruby3.0-minitest/APKBUILD | 66 +++++++++++++++++++++++++++++ user/ruby3.0-minitest/gemspec.patch | 15 +++++++ 2 files changed, 81 insertions(+) create mode 100644 user/ruby3.0-minitest/APKBUILD create mode 100644 user/ruby3.0-minitest/gemspec.patch diff --git a/user/ruby3.0-minitest/APKBUILD b/user/ruby3.0-minitest/APKBUILD new file mode 100644 index 0000000..57dd96d --- /dev/null +++ b/user/ruby3.0-minitest/APKBUILD @@ -0,0 +1,66 @@ +# Contributor: Jakub Jirutka +# Maintainer: Jakub Jirutka +pkgname=ruby3.0-minitest +_gemname=minitest +# Keep version in sync with "Bundled gems" (https://stdgems.org) for the +# packaged Ruby version. +pkgver=5.14.4 +pkgrel=0 +pkgdesc="Suite of testing facilities supporting TDD, BDD, mocking, and benchmarking for Ruby" +url="https://github.com/seattlerb/minitest" +arch="noarch" +license="MIT" +depends="ruby3.0" +makedepends="ruby3.0-rdoc" +subpackages="$pkgname-doc" +source="https://github.com/seattlerb/minitest/archive/v$pkgver/$_gemname-$pkgver.tar.gz + https://rubygems.org/downloads/$_gemname-$pkgver.gem + " +builddir="$srcdir/$_gemname-$pkgver" + +prepare() { + default_prepare + + # Generate gemspec (there's no gemspec in the source). + gem specification -l --ruby "$srcdir"/$_gemname-$pkgver.gem \ + > "$builddir"/$_gemname.gemspec +} + +build() { + gem build $_gemname.gemspec +} + +check() { + ruby -Ilib -Itest -e "Dir.glob('./test/**/test_*.rb', &method(:require))" +} + +package() { + local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" + local geminstdir="$gemdir/gems/$_gemname-$pkgver" + + gem install \ + --local \ + --install-dir "$gemdir" \ + --ignore-dependencies \ + --document ri \ + --verbose \ + $_gemname + + # Remove unnessecary files + cd "$gemdir" + rm -rf build_info cache extensions plugins + + cd "$geminstdir" + rm -rf History.* Manifest.* README.* Rakefile test/ +} + +doc() { + pkgdesc="$pkgdesc (ri docs)" + + amove "$(ruby -e 'puts Gem.default_dir')"/doc +} + +sha512sums=" +e0b780d47e79adcfb68c2d521aa002ad00caefb5820d41d157cfcf34e2c9f987c76e4d31ba1a46b62b18a51c1e84c0add2637f30ab89899e511f3db7b2cea3e3 minitest-5.14.4.tar.gz +f967a11cfce82e167879905082859273b270e8d8e663a0c1c553964a345fb8564547627b8cf97418ac5bda544bb76c1385438ad74ec8e846666dc2952d55c9e9 minitest-5.14.4.gem +" diff --git a/user/ruby3.0-minitest/gemspec.patch b/user/ruby3.0-minitest/gemspec.patch new file mode 100644 index 0000000..a21a0c5 --- /dev/null +++ b/user/ruby3.0-minitest/gemspec.patch @@ -0,0 +1,15 @@ +--- a/webrick.gemspec ++++ b/webrick.gemspec +@@ -14,12 +14,6 @@ + + s.require_path = %w{lib} + s.files = [ +- "Gemfile", +- "LICENSE.txt", +- "README.md", +- "Rakefile", +- "bin/console", +- "bin/setup", + "lib/webrick.rb", + "lib/webrick/accesslog.rb", + "lib/webrick/cgi.rb",