diff options
author | davidovski <david@davidovski.xyz> | 2022-08-10 09:16:34 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-08-10 09:16:34 +0100 |
commit | c1d3da9ca87c414100b1cb969e36b8d7d05b9a74 (patch) | |
tree | 1cd983a42e1a221991d09783e08c6c162d4be5cf /repo/ruby-nokogiri/ruby-nokogiri.xibuild | |
parent | 9a26d3fdc7fca2df6f824b56034ab9a823e898d8 (diff) |
added ovmf, lolcat, spice, and squashfstools
Diffstat (limited to 'repo/ruby-nokogiri/ruby-nokogiri.xibuild')
-rw-r--r-- | repo/ruby-nokogiri/ruby-nokogiri.xibuild | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/repo/ruby-nokogiri/ruby-nokogiri.xibuild b/repo/ruby-nokogiri/ruby-nokogiri.xibuild new file mode 100644 index 0000000..dec12d1 --- /dev/null +++ b/repo/ruby-nokogiri/ruby-nokogiri.xibuild @@ -0,0 +1,62 @@ +#!/bin/sh + +NAME="ruby-nokogiri" +DESC="An HTML, XML, SAX, and Reader parser" + +MAKEDEPS="libxml2 libxslt ruby ruby-mini_portile2" + +_gemname=${pkgname#ruby-} + +PKG_VER=1.13.4 +SOURCE="https://github.com/sparklemotion/$_gemname/archive/v$PKG_VER/$_gemname-$PKG_VER.tar.gz" + +ADDITIONAL=" +gemspec-fix-deps.patch +shutdown-libxml2-warning.patch +test-helper-remove-unnecessary-deps.patch +" + +build() { + gem build $_gemname.gemspec + gem install \ + --local \ + --install-dir dist \ + --ignore-dependencies \ + --no-document \ + --verbose \ + $_gemname-$PKG_VER.gem -- \ + --use-system-libraries + + # Remove unnecessary files and rubbish... + find dist/extensions/ -name mkmf.log -delete + cd dist/gems/$_gemname-$PKG_VER/ + rm -rf ext/ patches/ + rm ./*.md ./*.yml + rm lib/*.jar + rm lib/nokogiri/*.so + rm lib/nokogiri/css/*.rex lib/nokogiri/css/*.y +} + +check() { + local extpath=$(dirname dist/extensions/*/*/$_gemname-$PKG_VER/gem_make.out) + + case "$CARCH" in + # Fix NotImplementedError: Compaction isn't available on this platform. + ppc64le) export NOKOGIRI_TEST_GC_LEVEL=major;; + esac + + # Note: This is based on Fedora package. + LANG="C.UTF-8" RUBYLIB=".:dist/gems/$_gemname-$PKG_VER/lib:test:$extpath" ruby \ + -e 'require "test/helper"' \ + -e 'Dir.glob("test/**/test_*.rb") {|f| require f }' +} + +package() { + local gemdir="$PKG_DEST/$(ruby -e 'puts Gem.default_dir')" + + cd "$BUILD_ROOT"/dist + + mkdir -p "$gemdir" + cp -r bin extensions gems specifications "$gemdir"/ +} + |