aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-11-25 02:33:48 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-11-25 02:53:47 +0100
commite48ccbfc128b06171139716557ae4a771be0f952 (patch)
treedf9880271e0c3fe7e8d160d1078842b51e61af0f /testing
parent5240cde47a249e6d325d29f383c5ec3384808840 (diff)
downloadaports-e48ccbfc128b06171139716557ae4a771be0f952.tar.bz2
aports-e48ccbfc128b06171139716557ae4a771be0f952.tar.xz
testing/ruby-hpricot: new aport
https://github.com/hpricot/hpricot A swift, liberal HTML parser with a fantastic library (legacy)
Diffstat (limited to 'testing')
-rw-r--r--testing/ruby-hpricot/APKBUILD52
-rw-r--r--testing/ruby-hpricot/rakefile.patch9
2 files changed, 61 insertions, 0 deletions
diff --git a/testing/ruby-hpricot/APKBUILD b/testing/ruby-hpricot/APKBUILD
new file mode 100644
index 0000000000..e176d91577
--- /dev/null
+++ b/testing/ruby-hpricot/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+# Note: This project is dead, but it's needed for some packages.
+pkgname=ruby-hpricot
+_gemname=hpricot
+pkgver=0.8.6
+pkgrel=0
+pkgdesc="A swift, liberal HTML parser with a fantastic library (legacy)"
+url="https://github.com/hpricot/hpricot"
+arch="all"
+license="MIT"
+checkdepends="ruby-test-unit"
+makedepends="ruby-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/hpricot/$_gemname/archive/$pkgver.tar.gz
+ rakefile.patch"
+builddir="$srcdir/$_gemname-$pkgver"
+
+build() {
+ cd "$builddir"
+
+ gem build $_gemname.gemspec
+ gem install --local \
+ --install-dir dist \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ $_gemname
+}
+
+check() {
+ cd "$builddir"
+
+ local file; for file in test/test_*.rb; do
+ ruby -I dist/gems/$_gemname-$pkgver/lib -I test $file
+ done
+}
+
+package() {
+ local gemdir="$pkgdir/$(ruby -rubygems -e 'puts Gem.default_dir')"
+ cd "$builddir"/dist
+
+ mkdir -p "$gemdir"
+ cp -r extensions gems specifications "$gemdir"/
+
+ # Remove unnecessary files and rubbish...
+ find "$gemdir"/extensions/ -name mkmf.log -delete
+ cd "$gemdir"/gems/$_gemname-$pkgver
+ rm -r ext/ lib/*.so test/ CHANGELOG* COPYING README* Rakefile
+}
+
+sha512sums="0b35295745d36483fbd0c0ea7751c9e9672efdc3738145991a4799e3e2f75ec05cc833b28eacb45631a805b760b6f83a179bbbd830a3b30ea25749d243f527d7 ruby-hpricot-0.8.6.tar.gz
+3e6c479302af5964a036ca2c9a9616f3e65f5c0dc60aaf11d3ea5eae2016babd0fd88dfbc6c914a56fd85a2641f6d9ec1b75099bebe0599da530f35e81f26df0 rakefile.patch"
diff --git a/testing/ruby-hpricot/rakefile.patch b/testing/ruby-hpricot/rakefile.patch
new file mode 100644
index 0000000000..3ccf91873d
--- /dev/null
+++ b/testing/ruby-hpricot/rakefile.patch
@@ -0,0 +1,9 @@
+Don't load bundler.
+
+--- a/Rakefile
++++ b/Rakefile
+@@ -1,4 +1,3 @@
+-require 'bundler/setup'
+ ENV.delete('RUBYOPT') # Don't propagate RUBYOPT/Bundler to subprocesses
+ require 'rake/clean'
+ require 'rubygems/package_task'