summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2021-07-11 09:10:15 +0200
committerHans de Graaff <graaff@gentoo.org>2021-07-11 09:10:32 +0200
commitf16d6fcb20eca1f49386e941c3acba37032dc6bc (patch)
tree9f1355c277159aa7e5accbbc1891f125d78deedd /www-apps/nanoc-core
parentwww-apps/nanoc-cli: initial import of 4.12.2 (diff)
downloadgentoo-f16d6fcb20eca1f49386e941c3acba37032dc6bc.tar.gz
gentoo-f16d6fcb20eca1f49386e941c3acba37032dc6bc.tar.bz2
gentoo-f16d6fcb20eca1f49386e941c3acba37032dc6bc.zip
www-apps/nanoc-core: add 4.12.2
Package-Manager: Portage-3.0.20, Repoman-3.0.2 Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'www-apps/nanoc-core')
-rw-r--r--www-apps/nanoc-core/Manifest1
-rw-r--r--www-apps/nanoc-core/files/nanoc-core-4.12.2-contracts.patch16
-rw-r--r--www-apps/nanoc-core/nanoc-core-4.12.2.ebuild74
3 files changed, 91 insertions, 0 deletions
diff --git a/www-apps/nanoc-core/Manifest b/www-apps/nanoc-core/Manifest
index 94faa65dd386..773ac6576894 100644
--- a/www-apps/nanoc-core/Manifest
+++ b/www-apps/nanoc-core/Manifest
@@ -1 +1,2 @@
DIST nanoc-core-4.11.12.tar.gz 310160 BLAKE2B ef34bf6d28d5a9287053a939ef14bc59f99bde003d7bbcd7eee861ab882a6beaa48812137c8ad87fe464d27e371cfd40022467f8d10ac5f85ff16ef19215e340 SHA512 0503d0a6a0cf1ca9a9c57b831f320abb5102a3e7aa82c016d1f72c4d9f614ef53a0e4df30d50e05a98107fecacae4d70dfa5ee5c15910d575bc30df411430863
+DIST nanoc-core-4.12.2.tar.gz 331400 BLAKE2B f7a22b05a4805f15a8e93601ae21bffdc19fe17c6550378465d85e63c498c5773c1dcd49d685b7d4367488300394c2f5bf9e6a6dc6aea589617a27fe1bd6ed4a SHA512 3fe574c061d8d0dd034137800c88a34844d246e6ab9a7816aadb03cd2c43b5fe6d614f42e6b41bcd4df98be551edc69e35ca992f2d5ee8158f9c7eb3c7635750
diff --git a/www-apps/nanoc-core/files/nanoc-core-4.12.2-contracts.patch b/www-apps/nanoc-core/files/nanoc-core-4.12.2-contracts.patch
new file mode 100644
index 000000000000..ec3e11df41b2
--- /dev/null
+++ b/www-apps/nanoc-core/files/nanoc-core-4.12.2-contracts.patch
@@ -0,0 +1,16 @@
+Support for contracts is a development-only mechanism which impacts performance.
+It produces a warning on each run that is not easy to act on for our users,
+so patch this out altogether.
+
+--- a/lib/nanoc/core/contracts_support.rb 2021-07-11 08:54:09.979327770 +0200
++++ b/lib/nanoc/core/contracts_support.rb 2021-05-28 11:33:52.000000000 +0200
+@@ -90,8 +90,7 @@
+
+ contracts_loadable =
+ begin
++ false
+- require 'contracts'
+- true
+ rescue LoadError
+ false
+ end
diff --git a/www-apps/nanoc-core/nanoc-core-4.12.2.ebuild b/www-apps/nanoc-core/nanoc-core-4.12.2.ebuild
new file mode 100644
index 000000000000..cc5e34a4979c
--- /dev/null
+++ b/www-apps/nanoc-core/nanoc-core-4.12.2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+USE_RUBY="ruby26 ruby27"
+
+RUBY_FAKEGEM_EXTRADOC="NEWS.md README.md"
+
+RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="nanoc is a simple but very flexible static site generator written in Ruby"
+HOMEPAGE="https://nanoc.ws/"
+SRC_URI="https://github.com/nanoc/nanoc/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="MIT"
+
+KEYWORDS="~amd64"
+SLOT="0"
+IUSE="${IUSE} minimal"
+
+DEPEND+="test? ( app-text/asciidoc app-text/highlight )"
+
+RUBY_S="nanoc-${PV}/nanoc-core"
+
+ruby_add_rdepend "
+ >=dev-ruby/concurrent-ruby-1.1:1
+ dev-ruby/ddmemoize:1
+ dev-ruby/ddmetrics:1
+ dev-ruby/ddplugin:1
+ =dev-ruby/hamster-3*
+ >=dev-ruby/json_schema-0.19:0
+ dev-ruby/slow_enumerator_tools:1
+ >=dev-ruby/tty-platform-0.2:0
+ >=dev-ruby/zeitwerk-2.1:2
+"
+
+ruby_add_bdepend "test? (
+ dev-ruby/bundler
+ dev-ruby/rspec:3
+ dev-ruby/rspec-its
+ dev-ruby/fuubar
+ dev-ruby/minitest
+ dev-ruby/timecop
+ dev-ruby/yard
+ www-apps/nanoc-spec
+)
+"
+
+PATCHES=( "${FILESDIR}/${P}-contracts.patch" )
+
+all_ruby_prepare() {
+ # Avoid unneeded development dependencies
+ sed -i -e '/simplecov/I s:^:#:' \
+ -e '/codecov/I s:^:#:' ../common/spec/spec_helper_head_core.rb || die
+ sed -i -e '/coverall/I s:^:#:' \
+ -e '/rubocop/ s:^:#:' Rakefile || die
+ sed -i -e '1i require "tmpdir"; require "pathname"' spec/spec_helper.rb || die
+
+ echo "-r ./spec/spec_helper.rb" > .rspec || die
+
+ sed -i -e "s:require_relative 'lib:require './lib:" ${RUBY_FAKEGEM_GEMSPEC} || die
+
+ # Use useable tmp dir
+ sed -i -e 's:/tmp/whatever:'${T}'/whatever:' spec/nanoc/core/checksummer_spec.rb || die
+
+ # Avoid circular dependency on www-apps/nanoc
+ sed -i -e '/.all_outdated/,/^ end/ s:^:#:' spec/nanoc/core/feature_spec.rb || die
+ rm -f spec/nanoc/core_spec.rb || die
+}
+
+each_ruby_test() {
+ RUBYLIB="${S}/lib" ${RUBY} -S rake spec || die
+}