aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/ruby-rbs/APKBUILD50
-rw-r--r--main/ruby-rbs/gemspec.patch11
2 files changed, 29 insertions, 32 deletions
diff --git a/main/ruby-rbs/APKBUILD b/main/ruby-rbs/APKBUILD
index 20d389b527..c4eb11938e 100644
--- a/main/ruby-rbs/APKBUILD
+++ b/main/ruby-rbs/APKBUILD
@@ -4,50 +4,52 @@ pkgname=ruby-rbs
_gemname=rbs
# Keep version in sync with "Bundled gems" (https://stdgems.org) for the
# packaged Ruby version.
-pkgver=1.4.0
+pkgver=2.1.0
pkgrel=0
pkgdesc="Type Signature for Ruby"
url="https://github.com/ruby/rbs"
-arch="noarch"
+arch="all"
license="BSD-2-Clause AND Ruby"
-depends="ruby"
+depends="ruby ruby-bundler"
checkdepends="ruby-rake ruby-test-unit"
-makedepends="ruby-rdoc"
+makedepends="ruby-dev ruby-rdoc"
subpackages="$pkgname-doc"
source="https://github.com/ruby/rbs/archive/v$pkgver/$_gemname-$pkgver.tar.gz
gemspec.patch
"
builddir="$srcdir/$_gemname-$pkgver"
-options="!check" # FIXME: require ruby-pry that is not packaged yet
-
-prepare() {
- default_prepare
- sed -i '/require .bundler/d' Rakefile
-}
+options="!check" # FIXME: require gems that are not packaged yet
build() {
gem build $_gemname.gemspec
+
+ gem install \
+ --local \
+ --install-dir dist \
+ --bindir dist/bin \
+ --ignore-dependencies \
+ --document ri \
+ --verbose \
+ $_gemname
}
check() {
- rake test
+ GEM_PATH='dist' rake test
}
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
+ cd "$builddir"/dist
+
+ mkdir -p "$gemdir"
+ cp -r doc extensions gems specifications "$gemdir"/
+
+ # Remove unnecessary files and rubbish...
+ find "$gemdir"/extensions/ -name mkmf.log -delete
- # Remove unnessecary files
- cd "$gemdir"
- rm -rf build_info cache extensions plugins
+ cd "$gemdir"/gems/$_gemname-$pkgver
+ rm -r ext/
}
doc() {
@@ -57,6 +59,6 @@ doc() {
}
sha512sums="
-831206afc76f6aabeb99916c715562f4cf32556cd2950ee94321755b947f5632d9ce0c7d14d8b4aa4310130a43e448819f79bcd9c9b49903f7744f4aecc853d0 rbs-1.4.0.tar.gz
-314ac25c79f5b643f80502158347d76a2149437192da3eae75426d54835d3035f3549e2e3462a230941ce54cf82ad03d16a7936ab40a7f7b42a17d51a2f6015f gemspec.patch
+2f815e20223f6b7b29bbe46df191900c8aa2895f486ad3d2163cb7f8b654f676fc400de0fac2b699e645507bd077776e498a7ee80cab0eed0c779258af9a2004 rbs-2.1.0.tar.gz
+dccca910f2c936007882c762b9b40c95e6281b3ba1c08daaaa81b711acd7e45f61a8c7cd6bf26acb5fd33c4a0c8895934100d59508ecde6c9cf0f5befc78ac46 gemspec.patch
"
diff --git a/main/ruby-rbs/gemspec.patch b/main/ruby-rbs/gemspec.patch
index 62a27e7358..52e6c1646e 100644
--- a/main/ruby-rbs/gemspec.patch
+++ b/main/ruby-rbs/gemspec.patch
@@ -1,13 +1,8 @@
--- a/rbs.gemspec
+++ b/rbs.gemspec
-@@ -27,9 +27,7 @@
-
- # Specify which files should be added to the gem when it is released.
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
+@@ -29,4 +29 @@
+- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|bin)/}) }
- end
-+ spec.files = Dir["core/**/*.rbs", "exe/*", "lib/**/*.rb", "schema/**/*.json", "sig/**/*.rbs", "stdlib/**/*.rbs"]
- spec.files << "lib/rbs/parser.rb"
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
++ spec.files = Dir["core/**/*.rbs", "exe/*", "ext/**/*", "lib/**/*.rb", "schema/**/*.json", "sig/**/*.rbs", "stdlib/**/*.rbs"]