# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=ruby-ox _gemname=${pkgname#ruby-} pkgver=2.14.16 pkgrel=0 pkgdesc="A fast XML parser and object serializer for Ruby" url="https://github.com/ohler55/ox" # armhf,armv7: fails to build (invalid storage class for function ...) arch="all !armhf !armv7" license="MIT" checkdepends="ruby ruby-test-unit" makedepends="ruby-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/ohler55/$_gemname/archive/v$pkgver.tar.gz gemspec.patch sax_test-omit-failing.patch " builddir="$srcdir/$_gemname-$pkgver" build() { gem build $_gemname.gemspec gem install --local \ --install-dir dist \ --ignore-dependencies \ --no-document \ --verbose \ $_gemname cd dist/extensions/*/*/$_gemname-*/ # ox expects ox.so to be in ox/ subdirectory, but does not install it here. mkdir ox && mv ./*.so ox/ # Needed for tests. cp -l ox/*.so "$builddir"/ext/$_gemname/ } check() { ./test/tests.rb ./test/sax/sax_test.rb > sax_test.log || { tail -n 50 sax_test.log return 1 } } package() { local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" cd "$builddir"/dist mkdir -p "$gemdir" cp -r extensions gems specifications "$gemdir"/ # Remove unnecessary and duplicated files. cd "$gemdir"/gems/$_gemname-$pkgver rm -r ext/ lib/*.so || true } sha512sums=" 211cbf48fb580c339e57e352991b7be98efc8490ba97b559c61fd573853e26fcba87b7e0e05c720ecab9ef188b9d0d2cbd511620b197c5341c6bdb02370ffcb3 ruby-ox-2.14.16.tar.gz 0dfdc63ae24d2293f3bc2cab05264b054c16096dc26602f4ac896d7a0bcf4478f1d2e19dd833577fb441f8a68a06e17a817c64fdfb93d660da0f70eb4ebe3334 gemspec.patch 68ad29ceea7092eaf21a92f56092b1a075d319d2f735c9ca4688ca340cb62e44aeecd0f0b820d4444b93d37017e1ad4ac6618c5b5f86994f3a89f4a9b07fab8e sax_test-omit-failing.patch "