mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-21 05:31:25 +02:00
1) Failure: Mathematical::MathJaxTest#test_/usr/share/mtex2MML/fixtures/MathJax/LaTeXToMathML-tex/non-standard/Tiny-1.txt [/builds/alpine/aports/community/ruby-mathematical/src/mathematical-1.6.14/test/mathematical/mathjax_test.rb:22]: Expected [#<Nokogiri::XML::Element:0x14a name="svg" attributes=[#<Nokogiri::XML::Attr:0xdc name="xmlns" value="http://www.w3.org/2000/svg">, #<Nokogiri::XML::Attr:0xe6 name="xmlns:xlink" value="http://www.w3.org/1999/xlink">, #<Nokogiri::XML::Attr:0xf0 name="width" value="0pt">, #<Nokogiri::XML::Attr:0xfa name="height" value="0pt">, #<Nokogiri::XML::Attr:0x104 name="viewbox" value="0 0 0 0">, #<Nokogiri::XML::Attr:0x10e name="version" value="1.1">] children=[#<Nokogiri::XML::Text:0x118 "\n">, #<Nokogiri::XML::Element:0x136 name="g" attributes=[#<Nokogiri::XML::Attr:0x122 name="id" value="surface5927">] children=[#<Nokogiri::XML::Text:0x12c "\n">]>, #<Nokogiri::XML::Text:0x140 "\n">]>] to be empty. 2) Failure: Mathematical::MathJaxTest#test_/usr/share/mtex2MML/fixtures/MathJax/LaTeXToMathML-tex/layout/spaces-1.txt [/builds/alpine/aports/community/ruby-mathematical/src/mathematical-1.6.14/test/mathematical/mathjax_test.rb:23]: Expected [#<Nokogiri::XML::Element:0x1c2 name="svg" attributes=[#<Nokogiri::XML::Attr:0x154 name="xmlns" value="http://www.w3.org/2000/svg">, #<Nokogiri::XML::Attr:0x15e name="xmlns:xlink" value="http://www.w3.org/1999/xlink">, #<Nokogiri::XML::Attr:0x168 name="width" value="2.666664pt">, #<Nokogiri::XML::Attr:0x172 name="height" value="0pt">, #<Nokogiri::XML::Attr:0x17c name="viewbox" value="0 0 2.666664 0">, #<Nokogiri::XML::Attr:0x186 name="version" value="1.1">] children=[#<Nokogiri::XML::Text:0x190 "\n">, #<Nokogiri::XML::Element:0x1ae name="g" attributes=[#<Nokogiri::XML::Attr:0x19a name="id" value="surface5937">] children=[#<Nokogiri::XML::Text:0x1a4 "\n">]>, #<Nokogiri::XML::Text:0x1b8 "\n">]>] to be empty. 3) Failure: Mathematical::MathJaxTest#test_/usr/share/mtex2MML/fixtures/MathJax/LaTeXToMathML-tex/other/mathsize-1.txt [/builds/alpine/aports/community/ruby-mathematical/src/mathematical-1.6.14/test/mathematical/mathjax_test.rb:22]: Expected [#<Nokogiri::XML::Element:0x23a name="svg" attributes=[#<Nokogiri::XML::Attr:0x1cc name="xmlns" value="http://www.w3.org/2000/svg">, #<Nokogiri::XML::Attr:0x1d6 name="xmlns:xlink" value="http://www.w3.org/1999/xlink">, #<Nokogiri::XML::Attr:0x1e0 name="width" value="0pt">, #<Nokogiri::XML::Attr:0x1ea name="height" value="0pt">, #<Nokogiri::XML::Attr:0x1f4 name="viewbox" value="0 0 0 0">, #<Nokogiri::XML::Attr:0x1fe name="version" value="1.1">] children=[#<Nokogiri::XML::Text:0x208 "\n">, #<Nokogiri::XML::Element:0x226 name="g" attributes=[#<Nokogiri::XML::Attr:0x212 name="id" value="surface5987">] children=[#<Nokogiri::XML::Text:0x21c "\n">]>, #<Nokogiri::XML::Text:0x230 "\n">]>] to be empty. 236 runs, 3278 assertions, 3 failures, 0 errors, 0 skips
89 lines
2.6 KiB
Plaintext
89 lines
2.6 KiB
Plaintext
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
|
pkgname=ruby-mathematical
|
|
_gemname=${pkgname#ruby-}
|
|
pkgver=1.6.14
|
|
pkgrel=2
|
|
pkgdesc="Convert mathematical equations to SVGs, PNGs, or MathML"
|
|
url="https://www.gjtorikian.com/mathematical/"
|
|
arch="all !s390x" # limited by ruby-nokogiri
|
|
license="MIT"
|
|
depends="ruby ruby-enum"
|
|
makedepends="
|
|
cmake
|
|
lasem-dev
|
|
mtex2mml-dev
|
|
ruby-dev
|
|
"
|
|
checkdepends="
|
|
font-bakoma-ttf
|
|
mtex2mml-fixtures
|
|
ruby-minitest
|
|
ruby-nokogiri
|
|
ruby-rake
|
|
"
|
|
source="https://github.com/gjtorikian/$_gemname/archive/v$pkgver/$pkgname-$pkgver.tar.gz
|
|
use-system-mtex2mml-fixtures.patch
|
|
"
|
|
builddir="$srcdir/$_gemname-$pkgver"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
# Don't load bundler, it messes with GEM_PATH.
|
|
sed -i "/^require\s*[\"']bundler/d" Rakefile test/test_helper.rb
|
|
|
|
# Some tests in this file are unstable (randomly fails).
|
|
# https://github.com/gjtorikian/mathematical/issues/73
|
|
rm test/mathematical/delimiters_test.rb
|
|
}
|
|
|
|
build() {
|
|
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
|
|
|
|
# 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 --no-document $dev_deps
|
|
|
|
local rc=0
|
|
GEM_PATH='dist:.gem' ruby -S rake test || rc=$?
|
|
|
|
case "$CARCH" in
|
|
armhf | armv7) return 0;; # FIXME: 3 tests fail, ignore it for now
|
|
*) return $rc;;
|
|
esac
|
|
}
|
|
|
|
package() {
|
|
local gemdir="$pkgdir/$(ruby -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 -rf -- ext/ test/ Rakefile *.md *.txt
|
|
}
|
|
|
|
sha512sums="05201ee54795a410635affbe7bf84fd4d332a64a8e476ce27672ecdc4b8ebac58036b1f7fcf7a47ffd13d5210706c2679a0bed5c8138cd91a92e8473334003c7 ruby-mathematical-1.6.14.tar.gz
|
|
35c691b2006e6c0bac26ebb0adac5ffa99fbc37100c94d5978508b91b3df84544e4fc8fa38b5de01ae0fcc644c1eeb97b6129f59b4488b467c1ded468277c400 use-system-mtex2mml-fixtures.patch"
|