[arch-commits] Commit in (6 files)

Tim Meusel bastelfreak at gemini.archlinux.org
Wed Dec 1 11:51:13 UTC 2021


    Date: Wednesday, December 1, 2021 @ 11:51:13
  Author: bastelfreak
Revision: 1059259

initial release

Added:
  ruby-toml/
  ruby-toml/packages/
  ruby-toml/trunk/
  ruby-toml/trunk/PKGBUILD
  ruby-toml/trunk/disable_simplecov.patch
  ruby-toml/trunk/toml.gemspec.patch

-------------------------+
 PKGBUILD                |   51 ++++++++++++++++++++++++++++++++++++++++++++++
 disable_simplecov.patch |   36 ++++++++++++++++++++++++++++++++
 toml.gemspec.patch      |   19 +++++++++++++++++
 3 files changed, 106 insertions(+)

Added: ruby-toml/trunk/PKGBUILD
===================================================================
--- ruby-toml/trunk/PKGBUILD	                        (rev 0)
+++ ruby-toml/trunk/PKGBUILD	2021-12-01 11:51:13 UTC (rev 1059259)
@@ -0,0 +1,51 @@
+# Maintainer: Tim Meusel <tim at bastelfreak.de>
+
+_gemname='toml'
+pkgname="ruby-${_gemname}"
+pkgver=0.2.0
+pkgrel=1
+pkgdesc='Parser construction library with great error reporting in Ruby'
+arch=('any')
+url="https://github.com/jm/${_gemname}"
+license=('MIT')
+makedepends=('ruby-rake' 'ruby-rdoc' 'ruby-bundler')
+checkdepends=('ruby-multi_json' 'ruby-minitest')
+depends=('ruby' 'ruby-parslet')
+source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz" 'disable_simplecov.patch' 'toml.gemspec.patch')
+options=("!emptydirs")
+sha512sums=('6587501de81dfe76d0516755ecb7c581d915fffeac00e8bc0cbcab71c2e49f557285a7ee596f3277b4959e19b84f76624caa248d3dd9d8221a9163bf4d87353f'
+            'c363263059cad44c3faa10553f1d8760c6f3cc072efa1f1cbdcf0a715da4173e9fac98dabdf72144d796c2ebc1496554438096018a1e41c088f8e513e0d8efdb'
+            '7caad4d0f0672cb2f7d25d506f0bde3b7ff7ad94f9196017dd86c67676cf81e91c88613eaf4f3b862b4ccf90fe1799ebecdc728d0dd9dc6e3a25661a7693f1b1')
+
+prepare() {
+  cd "${_gemname}-${pkgver}"
+  sed --in-place '/simplecov/d' Gemfile
+  patch --forward --verbose --strip=1 --input='../disable_simplecov.patch'
+  patch --forward --verbose --strip=1 --input='../toml.gemspec.patch'
+  # fix broken test
+  # that's fixed on master
+  sed --in-place 's/assert_equal original_date.to_time.to_s, parsed_date.to_time.to_s/assert_equal original_date.to_time.utc.to_s, parsed_date.to_time.utc.to_s/' test/test_generator.rb
+}
+
+build() {
+  cd "${_gemname}-${pkgver}"
+  gem build "${_gemname}.gemspec"
+}
+
+check() {
+  cd "${_gemname}-${pkgver}"
+  rake test
+}
+
+package() {
+  cd "${_gemname}-${pkgver}"
+  local _gemdir="$(gem env gemdir)"
+  gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
+
+  install -Dm 644 README.md CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
+
+  rm -rf "${pkgdir}/${_gemdir}/cache"
+}
+
+# vim: ts=2 sw=2 et:

Added: ruby-toml/trunk/disable_simplecov.patch
===================================================================
--- ruby-toml/trunk/disable_simplecov.patch	                        (rev 0)
+++ ruby-toml/trunk/disable_simplecov.patch	2021-12-01 11:51:13 UTC (rev 1059259)
@@ -0,0 +1,36 @@
+diff --git a/Rakefile b/Rakefile
+index 24425f3..165c995 100644
+--- a/Rakefile
++++ b/Rakefile
+@@ -40,31 +40,6 @@ task :test do
+   Dir['./test/**/test_*.rb'].each {|f| require f }
+ end
+
+-desc "Generate RCov test coverage and open in your browser"
+-task :coverage do
+-  if RUBY_VERSION =~ /^1\./
+-    require 'rubygems'
+-    require 'bundler'
+-    Bundler.setup(:test)
+-    require 'simplecov'
+-    require 'simplecov-gem-adapter'
+-
+-    sh "rm -fr coverage"
+-    SimpleCov.command_name 'Unit Tests'
+-    SimpleCov.start 'gem'
+-    Rake::Task[:test].invoke
+-    SimpleCov.at_exit do
+-      SimpleCov.result.format!
+-      sh "open coverage/index.html"
+-    end
+-  else
+-    require 'rcov'
+-    sh "rm -fr coverage"
+-    sh "rcov test/test_*.rb"
+-    sh "open coverage/index.html"
+-  end
+-end
+-
+ require 'rdoc/task'
+ Rake::RDocTask.new do |rdoc|
+   rdoc.rdoc_dir = 'rdoc'

Added: ruby-toml/trunk/toml.gemspec.patch
===================================================================
--- ruby-toml/trunk/toml.gemspec.patch	                        (rev 0)
+++ ruby-toml/trunk/toml.gemspec.patch	2021-12-01 11:51:13 UTC (rev 1059259)
@@ -0,0 +1,19 @@
+diff --git a/toml.gemspec b/toml.gemspec
+index ffe2492..292c3ce 100644
+--- a/toml.gemspec
++++ b/toml.gemspec
+@@ -26,12 +26,10 @@ Gem::Specification.new do |s|
+   s.rdoc_options = ["--charset=UTF-8"]
+   s.extra_rdoc_files = %w[README.md LICENSE CHANGELOG.md]
+
+-  s.add_dependency "parslet", "~> 1.8.0"
++  s.add_dependency "parslet", ">= 1.8.0"
+
+   s.add_development_dependency "rake"
+
+-  all_files       = `git ls-files -z`.split("\x0")
+-  s.files         = all_files.grep(%r{^(bin|lib)/})
+-  s.executables   = all_files.grep(%r{^bin/}) { |f| File.basename(f) }
++  s.files         = `find . -print0`.split("\u0000").grep(/.\/lib/)
+   s.require_paths = ["lib"]
+ end



More information about the arch-commits mailing list