aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ruby-unf_ext
diff options
context:
space:
mode:
authorKeith Maxwell <keith.maxwell@gmail.com>2019-05-20 17:49:05 +0100
committerKevin Daudt <kdaudt@alpinelinux.org>2019-05-21 13:38:37 +0000
commitdad002e808bbc06da294cdf0a4a279d30374b08d (patch)
tree7dbf7a8d6d90f8fef2c2d1ffbf5f9d6fe8cb3260 /testing/ruby-unf_ext
parent9b98e2e03da4d14e0fe14d97e9f93201cf9669a6 (diff)
downloadaports-dad002e808bbc06da294cdf0a4a279d30374b08d.tar.bz2
aports-dad002e808bbc06da294cdf0a4a279d30374b08d.tar.xz
testing/ruby-unf_ext: new package
Diffstat (limited to 'testing/ruby-unf_ext')
-rw-r--r--testing/ruby-unf_ext/APKBUILD57
-rw-r--r--testing/ruby-unf_ext/gemspec.patch34
-rw-r--r--testing/ruby-unf_ext/test-helper.patch20
3 files changed, 111 insertions, 0 deletions
diff --git a/testing/ruby-unf_ext/APKBUILD b/testing/ruby-unf_ext/APKBUILD
new file mode 100644
index 0000000000..02c9cafdb9
--- /dev/null
+++ b/testing/ruby-unf_ext/APKBUILD
@@ -0,0 +1,57 @@
+# Contributor: Keith Maxwell <keith.maxwell@gmail.com>
+# Maintainer: Keith Maxwell <keith.maxwell@gmail.com>
+pkgname=ruby-unf_ext
+_gemname=unf_ext
+pkgver=0.0.7.6
+pkgrel=0
+pkgdesc="Unicode Normalization Form support library for CRuby"
+url="https://github.com/knu/ruby-unf_ext/"
+arch="all"
+license="MIT"
+makedepends="ruby-dev"
+checkdepends="ruby-test-unit"
+source="https://rubygems.org/gems/$_gemname-$pkgver.gem
+ gemspec.patch
+ test-helper.patch
+ "
+
+builddir="$srcdir/$_gemname-$pkgver"
+
+unpack() {
+ default_unpack
+
+ cd "$srcdir"
+ gem unpack "$_gemname-$pkgver.gem"
+}
+
+build() {
+ cd "$builddir/ext/unf_ext"
+ ruby extconf.rb
+ make
+
+ cd "$builddir"
+ cp ext/unf_ext/unf_ext.so lib/unf_ext.so
+ gem build ./unf_ext.gemspec
+}
+
+check() {
+ ruby -Ilib:test:. test/test_unf_ext.rb
+}
+
+package() {
+ local _gemdir
+ _gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
+ gem install --local \
+ --install-dir "$_gemdir" \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ "$builddir/$_gemname-$pkgver.gem"
+ cd "$_gemdir"
+ rm -r cache
+ rmdir build_info doc extensions
+}
+
+sha512sums="c6b6bc797015875b0a3422dc1e9656eae6c42d2263fd6e73ba41a1789ac1ffe927f81d5d9874973fd8d9bd9486494efa725b081e553954121588818d454db7f2 unf_ext-0.0.7.6.gem
+4a8ce282f732d3236d63494bac20d0a566b74b6d20b5ecc3df08a960cded2f72978795cb05c3fea6269867faf8b371b38d84a2228981d0b139a77566413eaa6b gemspec.patch
+fe494139d2d0d4fe183ac2079db90dfffab04736568a8d24e484f6ce0e71326a955e936d516a9f10362dc53706c6a98c408b4afce46fea4325b127f371a6d0c5 test-helper.patch"
diff --git a/testing/ruby-unf_ext/gemspec.patch b/testing/ruby-unf_ext/gemspec.patch
new file mode 100644
index 0000000000..662f0bf092
--- /dev/null
+++ b/testing/ruby-unf_ext/gemspec.patch
@@ -0,0 +1,34 @@
+--- a/unf_ext.gemspec
++++ b/unf_ext.gemspec
+@@ -13,30 +13,6 @@
+ gem.homepage = "https://github.com/knu/ruby-unf_ext"
+ gem.licenses = ["MIT"]
+
+- gem.files = `git ls-files`.split($/)
+- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
+- gem.test_files = gem.files.grep(%r{^(test|spec|features)/}).grep(%r{/test_[^/]+\.rb$})
++ gem.files = ["lib/unf_ext.rb", "lib/unf_ext/version.rb", "lib/unf_ext.so"]
+ gem.require_paths = ["lib"]
+- gem.extensions = ["ext/unf_ext/extconf.rb"]
+-
+- gem.extra_rdoc_files = [
+- "LICENSE.txt",
+- "README.md"
+- ]
+-
+- if RUBY_VERSION < "1.9"
+- gem.add_development_dependency("rake", [">= 0.9.2.2", "< 11"])
+- gem.add_development_dependency('i18n', '< 0.7.0')
+- # Cap dependency on activesupport with < 4.0 on behalf of
+- # shoulda-matchers to satisfy bundler.
+- gem.add_development_dependency("activesupport", ["< 4.0"])
+- gem.add_development_dependency("test-unit", ["= 3.1.5"])
+- else
+- gem.add_development_dependency("rake", [">= 0.9.2.2"])
+- gem.add_development_dependency("test-unit")
+- end
+- gem.add_development_dependency("rdoc", ["> 2.4.2"])
+- gem.add_development_dependency("bundler", [">= 1.2"])
+- gem.add_development_dependency("rake-compiler", [">= 0.7.9"])
+- gem.add_development_dependency("rake-compiler-dock", ["~> 0.7.0"])
+ end
diff --git a/testing/ruby-unf_ext/test-helper.patch b/testing/ruby-unf_ext/test-helper.patch
new file mode 100644
index 0000000000..40c17a7d83
--- /dev/null
+++ b/testing/ruby-unf_ext/test-helper.patch
@@ -0,0 +1,20 @@
+--- a/test/helper.rb
++++ b/test/helper.rb
+@@ -1,17 +1,4 @@
+-require 'rubygems'
+-require 'bundler'
+-begin
+- Bundler.setup(:default, :development)
+-rescue Bundler::BundlerError => e
+- $stderr.puts e.message
+- $stderr.puts "Run `bundle install` to install missing gems"
+- exit e.status_code
+-end
+ require 'test/unit'
+-
+-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..'))
+-$LOAD_PATH.unshift(File.dirname(__FILE__))
+ require 'unf_ext'
+
+ class Test::Unit::TestCase