diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-03-29 00:42:51 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-03-29 00:42:51 +0200 |
commit | fdcff37daafb24149348e4b531117d15c48ca3ec (patch) | |
tree | 79711e0e3a3163d4373a9292a2604a04e24fac20 /community/ruby-mathematical/APKBUILD | |
parent | 0d42953156ad36105b7f484bd96b25fe2be8dd0e (diff) | |
download | aports-fdcff37daafb24149348e4b531117d15c48ca3ec.tar.bz2 aports-fdcff37daafb24149348e4b531117d15c48ca3ec.tar.xz |
community/ruby-mathematical: move from testing
Diffstat (limited to 'community/ruby-mathematical/APKBUILD')
-rw-r--r-- | community/ruby-mathematical/APKBUILD | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/community/ruby-mathematical/APKBUILD b/community/ruby-mathematical/APKBUILD new file mode 100644 index 0000000000..9ce9184bf0 --- /dev/null +++ b/community/ruby-mathematical/APKBUILD @@ -0,0 +1,78 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=ruby-mathematical +_gemname=${pkgname#ruby-} +pkgver=1.6.0 +pkgrel=1 +pkgdesc="Convert mathematical equations to SVGs, PNGs, or MathML" +url="https://www.gjtorikian.com/mathematical/" +arch="all" +license="MIT" +depends="ruby ruby-enum" +makedepends="cmake lasem-dev mtex2mml-dev ruby-dev" +checkdepends="mtex2mml-fixtures ruby-io-console ruby-irb ruby-minitest + ruby-nokogiri ruby-rake" +source="$pkgname-$pkgver.tar.gz::https://github.com/gjtorikian/$_gemname/archive/v$pkgver.tar.gz + use-system-mtex2mml.patch + fix-extconf.patch + use-system-mtex2mml-fixtures.patch + disable-test-assert-failing-on-32bit.patch + disable-unstable-delimiter-test.patch" +builddir="$srcdir/$_gemname-$pkgver" + +prepare() { + default_prepare + + # Don't load bundler, it messes with GEM_PATH. + sed -i "/^require\s*[\"']bundler\/setup/d" test/test_helper.rb +} + +build() { + cd "$builddir" + + gem build $_gemname.gemspec + gem install --local \ + --install-dir dist \ + --ignore-dependencies \ + --no-document \ + --verbose \ + $_gemname -- \ + --use-system-lasem \ + --use-system-mtex2MML +} + +check() { + local dev_deps + cd "$builddir" + + # Install missing development dependencies needed and used only for running + # tests. We can't install them easily with bundler, because there's + # no way how to force it to NOT update already satisifed dependencies. + # We can't install them directly with gem either, because there's no + # way how to force it to instally only dependencies, not the gem itself. + dev_deps=$(gem install --explain --development --minimal-deps $_gemname-$pkgver.gem \ + | head -n -1 | sed -En 's/-([^-]+)$/:\1/p') + gem install --instal-dir=.gem --conservative $dev_deps + + GEM_PATH='dist:.gem' ruby -S rake test +} + +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/ test/ Rakefile *.md *.txt || true +} + +sha512sums="3af398f5fe30b0feec52ddf1b0bcc06185a66aac115995e3d8ccf3c452c93786a482e55eb4bdb1823a8627753ba61a86e7f50bf4d3a125ab7c7055f7a36a708b ruby-mathematical-1.6.0.tar.gz +3a5cd16d26db53415c5d047a4ddec398872bdead1eb60f65629f5680487de9d6a1d1ffad528a1a97da47aabd4696bdee06da9792e0b0d0fed95c4fae7af96492 use-system-mtex2mml.patch +47ca73d585f322e98b580544c812f7d7d71f43cba21784a80438fb250952b156d18254ca4a885828e8d76f8b897165f23ef74772ff2e54d12edc58b10c8bcb99 fix-extconf.patch +35c691b2006e6c0bac26ebb0adac5ffa99fbc37100c94d5978508b91b3df84544e4fc8fa38b5de01ae0fcc644c1eeb97b6129f59b4488b467c1ded468277c400 use-system-mtex2mml-fixtures.patch +7d94779a665a4e055d2aed822568f5de9581af85e96cbb218b139627eaa103bb5338f61738cf3b4e82dcbfc4ad857f8ea80564655543176431b8b0ea8c7ccb93 disable-test-assert-failing-on-32bit.patch +396708b20db0c91df9434b548796b97fb707f6eed612226e73557830572e73bc0b2932ffbe809b83e09de434420189bdb825f5ef742897eaf2ad92ba5024e204 disable-unstable-delimiter-test.patch" |