1 |
commit: 573ece1977621f5842d46c4068e6a87f3e0d3afb |
2 |
Author: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de> |
3 |
AuthorDate: Wed Jan 25 23:34:46 2023 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 29 09:14:04 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=573ece19 |
7 |
|
8 |
www-apps/hugo: add 0.110.0 |
9 |
|
10 |
Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de> |
11 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
12 |
|
13 |
www-apps/hugo/Manifest | 4 +- |
14 |
.../hugo/files/hugo-0.110.0-skip-some-tests.patch | 78 ++++++++++++++++++ |
15 |
www-apps/hugo/hugo-0.110.0.ebuild | 96 ++++++++++++++++++++++ |
16 |
3 files changed, 176 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/www-apps/hugo/Manifest b/www-apps/hugo/Manifest |
19 |
index b6e7a78f0cae..744804a5a9f4 100644 |
20 |
--- a/www-apps/hugo/Manifest |
21 |
+++ b/www-apps/hugo/Manifest |
22 |
@@ -1,4 +1,4 @@ |
23 |
-DIST hugo-0.107.0-vendor.tar.xz 5736140 BLAKE2B bca854d21e93b9d6296a6a60d61b800db0be9bdec63e8863f4f96266670ada8ee9e7b072234542c3380b24655c8257c44227c534f65d22b3089608fee3dd78a2 SHA512 0b3fe77d67ad739c8162bd2baff405403a50285ff349826cf5f3b83056f36260288f6efd67f313183e9fd0e27568b2ef6a6e3b3c7ac4d07afc11a179bc80b33c |
24 |
-DIST hugo-0.107.0.tar.gz 29042775 BLAKE2B c03fd0725b3575471eae54549716897a12f83caea62d4c0561531d940529c4a0fae72f29c3a589ec06087a84003a65f6d4914cb9d704360dab67cd362680134a SHA512 39a2b87e18dd91ac0e423f0009434f76c4228b80511233ee742d22964ff2419954e13745b17f0350f64a557c378942a234ca988ce3add7b2ab9127d66c688919 |
25 |
DIST hugo-0.108.0-vendor.tar.xz 5759708 BLAKE2B 6b3f93b0f29cb57afcb5a2e05ec2dc5ba276cb5d30cd2c3996fbed20fa2a9e8f464e580dd42302819d18b5cc35b2f2ab16e9e11faa175fc1c56591da56c2be31 SHA512 b4baaa6acc227e8d169362c9adcf60c2365413231beedb3ff21d7d7103e2a3d3bb19d30950e68978841de2923b3cc2171474ea3811f0dbcc1e0f173c453a8441 |
26 |
DIST hugo-0.108.0.tar.gz 29048088 BLAKE2B dd9654985fe0221ddb6b5f74c4d7f3259e587ee71522d6304d102849e63d2abd926987699fd7bac35c1a3bd5c6a195b4308249039d1a86cadae6dad641b75085 SHA512 450030bd657468bcf62de9d60def0c4f977ed4ba4b8ff830eae146622f678fedf656e3637bbdb44ac4289f857f5a1259ea0cfa66a45a14ea92860eee86dbf9fa |
27 |
+DIST hugo-0.110.0-vendor.tar.xz 5792924 BLAKE2B a70283d9b5764c3340591e40d6472c0f14b029e5bed086c4f294951e00a45041a869868884328ea39b75caccf8e2089250a98502a3ec38c730989a77e55c976b SHA512 c6a0cd262934b6434eac7122a0ec257ca4eec1611b938585e6ee22d56991632fd5e52c061d552772e0e8bd10e13c23aecc461d52c23dff009e8e522b651642da |
28 |
+DIST hugo-0.110.0.tar.gz 29055652 BLAKE2B d8c9e04c3141f02eeea1a951ba92c552148b604817e60041a3b944ccea37565ab8a6c3a47300877f5497d4575df4cdf598627d8dea65a1c935073b7bd8e99b70 SHA512 b64a6fa50201c0d95bf49fd0193138123163e0dad077491cc4c3e0d851de03ed2cd2e81482c1e6291d9a10d2d99f89c9dbbcfaafcd17f702906901dc6f28b3de |
29 |
|
30 |
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 |
31 |
new file mode 100644 |
32 |
index 000000000000..3ed70afb80e7 |
33 |
--- /dev/null |
34 |
+++ b/www-apps/hugo/files/hugo-0.110.0-skip-some-tests.patch |
35 |
@@ -0,0 +1,78 @@ |
36 |
+From d2adde5cff8cca3feb630336e706fcb60bfffa7d Mon Sep 17 00:00:00 2001 |
37 |
+From: tastytea <tastytea@××××××××.de> |
38 |
+Date: Wed, 11 Jan 2023 19:30:15 +0100 |
39 |
+Subject: [PATCH] skip some tests |
40 |
+ |
41 |
+reasons: |
42 |
+ - needs to be in a git repo |
43 |
+ - needs special test dependencies |
44 |
+ - requires network access |
45 |
+--- |
46 |
+ hugolib/page_test.go | 1 + |
47 |
+ modules/client_test.go | 4 ++++ |
48 |
+ resources/resource_factories/create/integration_test.go | 1 + |
49 |
+ 3 files changed, 6 insertions(+) |
50 |
+ |
51 |
+diff --git a/hugolib/page_test.go b/hugolib/page_test.go |
52 |
+index 1d9e3e34..e1b3920a 100644 |
53 |
+--- a/hugolib/page_test.go |
54 |
++++ b/hugolib/page_test.go |
55 |
+@@ -995,6 +995,7 @@ func TestPageWithDate(t *testing.T) { |
56 |
+ } |
57 |
+ |
58 |
+ func TestPageWithLastmodFromGitInfo(t *testing.T) { |
59 |
++ t.Skip("We are not in a git repo") |
60 |
+ if htesting.IsCI() { |
61 |
+ // TODO(bep) figure out why this fails on GitHub actions. |
62 |
+ t.Skip("Skip GitInfo test on CI") |
63 |
+diff --git a/modules/client_test.go b/modules/client_test.go |
64 |
+index 75e3c2b0..235d6ed3 100644 |
65 |
+--- a/modules/client_test.go |
66 |
++++ b/modules/client_test.go |
67 |
+@@ -68,6 +68,7 @@ github.com/gohugoio/hugoTestModules1_darwin/modh2_2@v1.4.0 github.com/gohugoio/h |
68 |
+ } |
69 |
+ |
70 |
+ c.Run("All", func(c *qt.C) { |
71 |
++ c.Skip("Test dependencies not available") |
72 |
+ client, clean := newClient(c, func(cfg *ClientConfig) { |
73 |
+ cfg.ModuleConfig = DefaultModuleConfig |
74 |
+ }, defaultImport) |
75 |
+@@ -107,6 +108,7 @@ project github.com/gohugoio/hugoTestModules1_darwin/modh2_2_2@v1.3.0+vendor |
76 |
+ }) |
77 |
+ |
78 |
+ c.Run("IgnoreVendor", func(c *qt.C) { |
79 |
++ c.Skip("Test dependencies not available") |
80 |
+ client, clean := newClient( |
81 |
+ c, func(cfg *ClientConfig) { |
82 |
+ cfg.ModuleConfig = DefaultModuleConfig |
83 |
+@@ -125,6 +127,7 @@ project github.com/gohugoio/hugoTestModules1_darwin/modh2_2_2@v1.3.0+vendor |
84 |
+ }) |
85 |
+ |
86 |
+ c.Run("NoVendor", func(c *qt.C) { |
87 |
++ c.Skip("Test dependencies not available") |
88 |
+ mcfg := DefaultModuleConfig |
89 |
+ mcfg.NoVendor = "**" |
90 |
+ client, clean := newClient( |
91 |
+@@ -144,6 +147,7 @@ project github.com/gohugoio/hugoTestModules1_darwin/modh2_2_2@v1.3.0+vendor |
92 |
+ }) |
93 |
+ |
94 |
+ c.Run("VendorClosest", func(c *qt.C) { |
95 |
++ c.Skip("Test dependencies not available") |
96 |
+ mcfg := DefaultModuleConfig |
97 |
+ mcfg.VendorClosest = true |
98 |
+ |
99 |
+diff --git a/resources/resource_factories/create/integration_test.go b/resources/resource_factories/create/integration_test.go |
100 |
+index 2d9a700d..42185d9f 100644 |
101 |
+--- a/resources/resource_factories/create/integration_test.go |
102 |
++++ b/resources/resource_factories/create/integration_test.go |
103 |
+@@ -20,6 +20,7 @@ import ( |
104 |
+ ) |
105 |
+ |
106 |
+ func TestGetResourceHead(t *testing.T) { |
107 |
++ t.Skip("Requires network access") |
108 |
+ |
109 |
+ files := ` |
110 |
+ -- config.toml -- |
111 |
+-- |
112 |
+2.39.1 |
113 |
+ |
114 |
|
115 |
diff --git a/www-apps/hugo/hugo-0.110.0.ebuild b/www-apps/hugo/hugo-0.110.0.ebuild |
116 |
new file mode 100644 |
117 |
index 000000000000..18b6e28bfd59 |
118 |
--- /dev/null |
119 |
+++ b/www-apps/hugo/hugo-0.110.0.ebuild |
120 |
@@ -0,0 +1,96 @@ |
121 |
+# Copyright 2018-2023 Gentoo Authors |
122 |
+# Distributed under the terms of the GNU General Public License v2 |
123 |
+ |
124 |
+EAPI=8 |
125 |
+ |
126 |
+inherit go-module bash-completion-r1 |
127 |
+ |
128 |
+DESCRIPTION="Fast static HTML and CSS website generator" |
129 |
+HOMEPAGE="https://gohugo.io https://github.com/gohugoio/hugo" |
130 |
+SRC_URI=" |
131 |
+ https://github.com/gohugoio/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz |
132 |
+ https://tastytea.de/files/gentoo/${P}-vendor.tar.xz |
133 |
+" |
134 |
+ |
135 |
+# NOTE: To create the vendor tarball, run: |
136 |
+# `go mod vendor && cd .. && tar -caf ${P}-vendor.tar.xz ${P}/vendor` |
137 |
+ |
138 |
+LICENSE="Apache-2.0 BSD BSD-2 MIT Unlicense" |
139 |
+SLOT="0" |
140 |
+KEYWORDS="~amd64 ~arm64 ~loong ~x86" |
141 |
+IUSE="doc +sass test" |
142 |
+ |
143 |
+BDEPEND=" |
144 |
+ >=dev-lang/go-1.18 |
145 |
+ test? ( |
146 |
+ dev-python/docutils |
147 |
+ dev-ruby/asciidoctor |
148 |
+ virtual/pandoc |
149 |
+ ) |
150 |
+" |
151 |
+RDEPEND=" |
152 |
+ >=media-libs/libwebp-1.2.3-r1:= |
153 |
+ sass? ( dev-libs/libsass:= ) |
154 |
+" |
155 |
+DEPEND="${RDEPEND}" |
156 |
+ |
157 |
+RESTRICT="!test? ( test )" |
158 |
+ |
159 |
+PATCHES=( |
160 |
+ "${FILESDIR}"/${PN}-0.96.0-unbundle-libwebp-and-libsass.patch |
161 |
+ "${FILESDIR}"/${PN}-0.110.0-skip-some-tests.patch |
162 |
+ "${FILESDIR}"/${PN}-0.99.1-test-timeout.patch |
163 |
+) |
164 |
+ |
165 |
+src_configure() { |
166 |
+ export CGO_ENABLED=1 |
167 |
+ export CGO_CFLAGS="${CFLAGS}" |
168 |
+ export CGO_CPPFLAGS="${CPPFLAGS}" |
169 |
+ export CGO_CXXFLAGS="${CXXFLAGS}" |
170 |
+ export CGO_LDFLAGS="${LDFLAGS}" |
171 |
+ |
172 |
+ MY_BUILDFLAGS="$(usev sass "-tags extended")" |
173 |
+ |
174 |
+ default |
175 |
+} |
176 |
+ |
177 |
+src_compile() { |
178 |
+ mkdir -pv bin || die |
179 |
+ ego build -ldflags "-X github.com/gohugoio/hugo/common/hugo.vendorInfo=gentoo:${PVR}" \ |
180 |
+ ${MY_BUILDFLAGS} -o "${S}/bin/hugo" |
181 |
+ |
182 |
+ bin/hugo gen man --dir man || die |
183 |
+ |
184 |
+ mkdir -pv completions || die |
185 |
+ bin/hugo completion bash > completions/hugo || die |
186 |
+ bin/hugo completion fish > completions/hugo.fish || die |
187 |
+ bin/hugo completion zsh > completions/_hugo || die |
188 |
+ |
189 |
+ if use doc ; then |
190 |
+ bin/hugo gen doc --dir doc || die |
191 |
+ fi |
192 |
+} |
193 |
+ |
194 |
+src_test() { |
195 |
+ # workaround for mysteriously added -buildmode=pie |
196 |
+ # <https://github.com/gentoo/gentoo/pull/29069#discussion_r1085026796> |
197 |
+ MY_BUILDFLAGS="-buildmode=exe ${MY_BUILDFLAGS}" |
198 |
+ ego test -race "./..." ${MY_BUILDFLAGS} |
199 |
+} |
200 |
+ |
201 |
+src_install() { |
202 |
+ dobin bin/* |
203 |
+ doman man/* |
204 |
+ |
205 |
+ dobashcomp completions/${PN} |
206 |
+ |
207 |
+ insinto /usr/share/fish/vendor_completions.d |
208 |
+ doins completions/${PN}.fish |
209 |
+ |
210 |
+ insinto /usr/share/zsh/site-functions |
211 |
+ doins completions/_${PN} |
212 |
+ |
213 |
+ if use doc ; then |
214 |
+ dodoc -r doc/* |
215 |
+ fi |
216 |
+} |