From c1d3da9ca87c414100b1cb969e36b8d7d05b9a74 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 10 Aug 2022 09:16:34 +0100 Subject: added ovmf, lolcat, spice, and squashfstools --- repo/ruby-nokogiri/ruby-nokogiri.xibuild | 62 ++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 repo/ruby-nokogiri/ruby-nokogiri.xibuild (limited to 'repo/ruby-nokogiri/ruby-nokogiri.xibuild') 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"/ +} + -- cgit v1.2.1