commit:     573ece1977621f5842d46c4068e6a87f3e0d3afb
Author:     Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de>
AuthorDate: Wed Jan 25 23:34:46 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Jan 29 09:14:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=573ece19

www-apps/hugo: add 0.110.0

Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 www-apps/hugo/Manifest                             |  4 +-
 .../hugo/files/hugo-0.110.0-skip-some-tests.patch  | 78 ++++++++++++++++++
 www-apps/hugo/hugo-0.110.0.ebuild                  | 96 ++++++++++++++++++++++
 3 files changed, 176 insertions(+), 2 deletions(-)

diff --git a/www-apps/hugo/Manifest b/www-apps/hugo/Manifest
index b6e7a78f0cae..744804a5a9f4 100644
--- a/www-apps/hugo/Manifest
+++ b/www-apps/hugo/Manifest
@@ -1,4 +1,4 @@
-DIST hugo-0.107.0-vendor.tar.xz 5736140 BLAKE2B 
bca854d21e93b9d6296a6a60d61b800db0be9bdec63e8863f4f96266670ada8ee9e7b072234542c3380b24655c8257c44227c534f65d22b3089608fee3dd78a2
 SHA512 
0b3fe77d67ad739c8162bd2baff405403a50285ff349826cf5f3b83056f36260288f6efd67f313183e9fd0e27568b2ef6a6e3b3c7ac4d07afc11a179bc80b33c
-DIST hugo-0.107.0.tar.gz 29042775 BLAKE2B 
c03fd0725b3575471eae54549716897a12f83caea62d4c0561531d940529c4a0fae72f29c3a589ec06087a84003a65f6d4914cb9d704360dab67cd362680134a
 SHA512 
39a2b87e18dd91ac0e423f0009434f76c4228b80511233ee742d22964ff2419954e13745b17f0350f64a557c378942a234ca988ce3add7b2ab9127d66c688919
 DIST hugo-0.108.0-vendor.tar.xz 5759708 BLAKE2B 
6b3f93b0f29cb57afcb5a2e05ec2dc5ba276cb5d30cd2c3996fbed20fa2a9e8f464e580dd42302819d18b5cc35b2f2ab16e9e11faa175fc1c56591da56c2be31
 SHA512 
b4baaa6acc227e8d169362c9adcf60c2365413231beedb3ff21d7d7103e2a3d3bb19d30950e68978841de2923b3cc2171474ea3811f0dbcc1e0f173c453a8441
 DIST hugo-0.108.0.tar.gz 29048088 BLAKE2B 
dd9654985fe0221ddb6b5f74c4d7f3259e587ee71522d6304d102849e63d2abd926987699fd7bac35c1a3bd5c6a195b4308249039d1a86cadae6dad641b75085
 SHA512 
450030bd657468bcf62de9d60def0c4f977ed4ba4b8ff830eae146622f678fedf656e3637bbdb44ac4289f857f5a1259ea0cfa66a45a14ea92860eee86dbf9fa
+DIST hugo-0.110.0-vendor.tar.xz 5792924 BLAKE2B 
a70283d9b5764c3340591e40d6472c0f14b029e5bed086c4f294951e00a45041a869868884328ea39b75caccf8e2089250a98502a3ec38c730989a77e55c976b
 SHA512 
c6a0cd262934b6434eac7122a0ec257ca4eec1611b938585e6ee22d56991632fd5e52c061d552772e0e8bd10e13c23aecc461d52c23dff009e8e522b651642da
+DIST hugo-0.110.0.tar.gz 29055652 BLAKE2B 
d8c9e04c3141f02eeea1a951ba92c552148b604817e60041a3b944ccea37565ab8a6c3a47300877f5497d4575df4cdf598627d8dea65a1c935073b7bd8e99b70
 SHA512 
b64a6fa50201c0d95bf49fd0193138123163e0dad077491cc4c3e0d851de03ed2cd2e81482c1e6291d9a10d2d99f89c9dbbcfaafcd17f702906901dc6f28b3de

diff --git a/www-apps/hugo/files/hugo-0.110.0-skip-some-tests.patch 
b/www-apps/hugo/files/hugo-0.110.0-skip-some-tests.patch
new file mode 100644
index 000000000000..3ed70afb80e7
--- /dev/null
+++ b/www-apps/hugo/files/hugo-0.110.0-skip-some-tests.patch
@@ -0,0 +1,78 @@
+From d2adde5cff8cca3feb630336e706fcb60bfffa7d Mon Sep 17 00:00:00 2001
+From: tastytea <[email protected]>
+Date: Wed, 11 Jan 2023 19:30:15 +0100
+Subject: [PATCH] skip some tests
+
+reasons:
+  - needs to be in a git repo
+  - needs special test dependencies
+  - requires network access
+---
+ hugolib/page_test.go                                    | 1 +
+ modules/client_test.go                                  | 4 ++++
+ resources/resource_factories/create/integration_test.go | 1 +
+ 3 files changed, 6 insertions(+)
+
+diff --git a/hugolib/page_test.go b/hugolib/page_test.go
+index 1d9e3e34..e1b3920a 100644
+--- a/hugolib/page_test.go
++++ b/hugolib/page_test.go
+@@ -995,6 +995,7 @@ func TestPageWithDate(t *testing.T) {
+ }
+ 
+ func TestPageWithLastmodFromGitInfo(t *testing.T) {
++      t.Skip("We are not in a git repo")
+       if htesting.IsCI() {
+               // TODO(bep) figure out why this fails on GitHub actions.
+               t.Skip("Skip GitInfo test on CI")
+diff --git a/modules/client_test.go b/modules/client_test.go
+index 75e3c2b0..235d6ed3 100644
+--- a/modules/client_test.go
++++ b/modules/client_test.go
+@@ -68,6 +68,7 @@ github.com/gohugoio/hugoTestModules1_darwin/[email protected] 
github.com/gohugoio/h
+       }
+ 
+       c.Run("All", func(c *qt.C) {
++              c.Skip("Test dependencies not available")
+               client, clean := newClient(c, func(cfg *ClientConfig) {
+                       cfg.ModuleConfig = DefaultModuleConfig
+               }, defaultImport)
+@@ -107,6 +108,7 @@ project 
github.com/gohugoio/hugoTestModules1_darwin/[email protected]+vendor
+       })
+ 
+       c.Run("IgnoreVendor", func(c *qt.C) {
++              c.Skip("Test dependencies not available")
+               client, clean := newClient(
+                       c, func(cfg *ClientConfig) {
+                               cfg.ModuleConfig = DefaultModuleConfig
+@@ -125,6 +127,7 @@ project 
github.com/gohugoio/hugoTestModules1_darwin/[email protected]+vendor
+       })
+ 
+       c.Run("NoVendor", func(c *qt.C) {
++              c.Skip("Test dependencies not available")
+               mcfg := DefaultModuleConfig
+               mcfg.NoVendor = "**"
+               client, clean := newClient(
+@@ -144,6 +147,7 @@ project 
github.com/gohugoio/hugoTestModules1_darwin/[email protected]+vendor
+       })
+ 
+       c.Run("VendorClosest", func(c *qt.C) {
++              c.Skip("Test dependencies not available")
+               mcfg := DefaultModuleConfig
+               mcfg.VendorClosest = true
+ 
+diff --git a/resources/resource_factories/create/integration_test.go 
b/resources/resource_factories/create/integration_test.go
+index 2d9a700d..42185d9f 100644
+--- a/resources/resource_factories/create/integration_test.go
++++ b/resources/resource_factories/create/integration_test.go
+@@ -20,6 +20,7 @@ import (
+ )
+ 
+ func TestGetResourceHead(t *testing.T) {
++      t.Skip("Requires network access")
+ 
+       files := `
+ -- config.toml --
+-- 
+2.39.1
+

diff --git a/www-apps/hugo/hugo-0.110.0.ebuild 
b/www-apps/hugo/hugo-0.110.0.ebuild
new file mode 100644
index 000000000000..18b6e28bfd59
--- /dev/null
+++ b/www-apps/hugo/hugo-0.110.0.ebuild
@@ -0,0 +1,96 @@
+# Copyright 2018-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module bash-completion-r1
+
+DESCRIPTION="Fast static HTML and CSS website generator"
+HOMEPAGE="https://gohugo.io https://github.com/gohugoio/hugo";
+SRC_URI="
+       https://github.com/gohugoio/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+       https://tastytea.de/files/gentoo/${P}-vendor.tar.xz
+"
+
+# NOTE: To create the vendor tarball, run:
+# `go mod vendor && cd .. && tar -caf ${P}-vendor.tar.xz ${P}/vendor`
+
+LICENSE="Apache-2.0 BSD BSD-2 MIT Unlicense"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~loong ~x86"
+IUSE="doc +sass test"
+
+BDEPEND="
+       >=dev-lang/go-1.18
+       test? (
+               dev-python/docutils
+               dev-ruby/asciidoctor
+               virtual/pandoc
+       )
+"
+RDEPEND="
+       >=media-libs/libwebp-1.2.3-r1:=
+       sass? ( dev-libs/libsass:= )
+"
+DEPEND="${RDEPEND}"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.96.0-unbundle-libwebp-and-libsass.patch
+       "${FILESDIR}"/${PN}-0.110.0-skip-some-tests.patch
+       "${FILESDIR}"/${PN}-0.99.1-test-timeout.patch
+)
+
+src_configure() {
+       export CGO_ENABLED=1
+       export CGO_CFLAGS="${CFLAGS}"
+       export CGO_CPPFLAGS="${CPPFLAGS}"
+       export CGO_CXXFLAGS="${CXXFLAGS}"
+       export CGO_LDFLAGS="${LDFLAGS}"
+
+       MY_BUILDFLAGS="$(usev sass "-tags extended")"
+
+       default
+}
+
+src_compile() {
+       mkdir -pv bin || die
+       ego build -ldflags "-X 
github.com/gohugoio/hugo/common/hugo.vendorInfo=gentoo:${PVR}" \
+               ${MY_BUILDFLAGS} -o "${S}/bin/hugo"
+
+       bin/hugo gen man --dir man || die
+
+       mkdir -pv completions || die
+       bin/hugo completion bash > completions/hugo || die
+       bin/hugo completion fish > completions/hugo.fish || die
+       bin/hugo completion zsh > completions/_hugo || die
+
+       if use doc ; then
+               bin/hugo gen doc --dir doc || die
+       fi
+}
+
+src_test() {
+       # workaround for mysteriously added -buildmode=pie
+       # <https://github.com/gentoo/gentoo/pull/29069#discussion_r1085026796>
+       MY_BUILDFLAGS="-buildmode=exe ${MY_BUILDFLAGS}"
+       ego test -race "./..." ${MY_BUILDFLAGS}
+}
+
+src_install() {
+       dobin bin/*
+       doman man/*
+
+       dobashcomp completions/${PN}
+
+       insinto /usr/share/fish/vendor_completions.d
+       doins completions/${PN}.fish
+
+       insinto /usr/share/zsh/site-functions
+       doins completions/_${PN}
+
+       if use doc ; then
+               dodoc -r doc/*
+       fi
+}

Reply via email to