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-mustache/fix-test-race-condition.patch | 36 +++++++++++++++++++ repo/ruby-mustache/ruby-mustache.xibuild | 46 ++++++++++++++++++++++++ repo/ruby-mustache/skip-simplecov.patch | 13 +++++++ 3 files changed, 95 insertions(+) create mode 100644 repo/ruby-mustache/fix-test-race-condition.patch create mode 100644 repo/ruby-mustache/ruby-mustache.xibuild create mode 100644 repo/ruby-mustache/skip-simplecov.patch (limited to 'repo/ruby-mustache') diff --git a/repo/ruby-mustache/fix-test-race-condition.patch b/repo/ruby-mustache/fix-test-race-condition.patch new file mode 100644 index 0000000..824825b --- /dev/null +++ b/repo/ruby-mustache/fix-test-race-condition.patch @@ -0,0 +1,36 @@ +From 407c6a5db6c1f1cfb40bd6113f07f067d07885a4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Mon, 27 Apr 2020 11:16:17 +0200 +Subject: [PATCH] Fix test race condition. + +The test suite randomly fails with errors such as: + +~~~ + 1) Failure: +AutoloadingTest#test_autoload_lowercase [/builddir/build/BUILD/mustache-1.1.1/usr/share/gems/gems/mustache-1.1.1/test/autoloading_test.rb:17]: +Expected: Comments + Actual: nil +~~~ + +This happens when `test_namespaced*` test cases are executed earlier +than the remaining test cases, because they are defining +`view_namespace` but not cleaning up afterwards. +--- + test/autoloading_test.rb | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/test/autoloading_test.rb b/test/autoloading_test.rb +index 0a7ad762..77eb3557 100644 +--- a/test/autoloading_test.rb ++++ b/test/autoloading_test.rb +@@ -7,6 +7,10 @@ def setup + Mustache.view_path = File.dirname(__FILE__) + '/fixtures' + end + ++ def teardown ++ Mustache.remove_instance_variable(:@view_namespace) if Mustache.instance_variable_defined?(:@view_namespace) ++ end ++ + def test_autoload + klass = Mustache.view_class(:Comments) + assert_equal Comments, klass diff --git a/repo/ruby-mustache/ruby-mustache.xibuild b/repo/ruby-mustache/ruby-mustache.xibuild new file mode 100644 index 0000000..8074a81 --- /dev/null +++ b/repo/ruby-mustache/ruby-mustache.xibuild @@ -0,0 +1,46 @@ +#!/bin/sh + +NAME="ruby-mustache" +_gemname=mustache +DESC="Logic-less Ruby templates" + +MAKEDEPS="" + +PKG_VER=1.1.1 +SOURCE="ruby-mustache-$PKG_VER.tar.gz::https://github.com/mustache/mustache/archive/v$PKG_VER.tar.gz" + +ADDITIONAL=" +fix-test-race-condition.patch +skip-simplecov.patch +" + +prepare () { + apply_patches +} + +build() { + gem build $_gemname.gemspec +} + +check() { + rake test +} + +package() { + local gemdir="$PKG_DEST/$(ruby -e 'puts Gem.default_dir')" + local geminstdir="$gemdir/gems/$_gemname-$PKG_VER" + + gem install --local \ + --install-dir "$gemdir" \ + --ignore-dependencies \ + --no-document \ + --verbose \ + $_gemname + + # Remove unnecessary files and rubbish... + cd "$gemdir" + rm -r cache build_info doc + cd "$geminstdir" + rm -r test man Rakefile *.md +} + diff --git a/repo/ruby-mustache/skip-simplecov.patch b/repo/ruby-mustache/skip-simplecov.patch new file mode 100644 index 0000000..99f0afd --- /dev/null +++ b/repo/ruby-mustache/skip-simplecov.patch @@ -0,0 +1,13 @@ +Don't run code coverage analyser to avoid additional dependency. + +--- a/test/helper.rb.orig ++++ b/test/helper.rb +@@ -1,8 +1,3 @@ +-require 'simplecov' +-SimpleCov.start do +- add_filter '/test/' +-end +- + require 'minitest/autorun' + + Dir[File.dirname(__FILE__) + '/fixtures/*.rb'].each do |f| -- cgit v1.2.1