commit: b7cc2bc4ae3378172b568b123823594e8283208d Author: William Hubbs <williamh <AT> gentoo <DOT> org> AuthorDate: Wed Feb 26 18:49:02 2025 +0000 Commit: William Hubbs <williamh <AT> gentoo <DOT> org> CommitDate: Wed Feb 26 18:50:27 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7cc2bc4
www-apps/hugo: add 0.144.2 Signed-off-by: William Hubbs <williamh <AT> gentoo.org> www-apps/hugo/Manifest | 2 + www-apps/hugo/hugo-0.144.2.ebuild | 124 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) diff --git a/www-apps/hugo/Manifest b/www-apps/hugo/Manifest index a65d300adc62..c233d10d0bf6 100644 --- a/www-apps/hugo/Manifest +++ b/www-apps/hugo/Manifest @@ -4,3 +4,5 @@ DIST hugo-0.129.0-vendor.tar.xz 6766128 BLAKE2B 31f723bdefd45a8e595c09b2d579ff68 DIST hugo-0.129.0.tar.gz 20241492 BLAKE2B aaa6ced77b936a34e0ebe24f2a2c51cd992464cbfd93b33682f0b0c501e6809d5c13960c1bec82611ebd043631bb2e2bae13348475641e8b7736b4980a3b3a1f SHA512 0845f417af97ee068ad0c971684522fa49fcfca47de5db71f0026fd3c59baddcc03c73560275ff91e4c85286cf855a2b3b0271ee019141d71e04f6b31a91ae87 DIST hugo-0.131.0-vendor.tar.xz 6925652 BLAKE2B 352cf39d95cf30ab502d91a816b151e2e94e1b57e59e6b3171caf83908dbc8726e03413fdf89a6fa7a360ee8b6ee0a3122f9f1fff2143985e1d33693ee3de114 SHA512 e1265f15e19f531360d447f9fc77da5dc894a3fd1d289df41bfbcfcc740b10e43ce1c872c69d0dfcf32cdff5c5a5edf34df64f107e6c20869eec3bf1668bdea1 DIST hugo-0.131.0.tar.gz 20323531 BLAKE2B b88be13c6d1008a777114e5c0f42dac0277f37ba36ea601903f9a6e63b06fad3d847950aada082ad32dea544df54f1ad90c2ecbddebbcd70e73a74c416aebaf9 SHA512 53bb387bde6c6e92568036d06db1dfeaa9f897806f7f51cb4b9c3fd93026a41410ea61598370da79abb5df20e81b18616e3ec49e7cec1bb1e470d5035b594ef6 +DIST hugo-0.144.2-vendor.tar.xz 7508632 BLAKE2B 9ba0bfed07fca2f7184222dc292e1e0cadc011dbe570aeff9e63b8273b4b9ebf3984abdcdcd575928fad1a878f433eca9b2415318e2bbe1c35d26fe3a304c6e5 SHA512 16a06dbecea91dc9f74649401d611a217225bd78c4ad60f42c56a30e21cb50ae3b855faaf20669a2cd61342cc585f37d0d41f82e1c8c60ab4e82ec2a92c0f063 +DIST hugo-0.144.2.tar.gz 14641815 BLAKE2B 2c886cf30d378527b634593c44105a839b305bc1dd722018221811ce2f8decf61e8aa95f8bffbb2d670ccaa8a8accd44ce9be8b5f5c741525493afbef141959e SHA512 ab948b3a64cdb76fe2acfb0bdefde3c80842e4d944861383f87acc9a3e51533cb4c72eec01ab5838c9411263f7293841f9fa388255d61458394961697f91b2ea diff --git a/www-apps/hugo/hugo-0.144.2.ebuild b/www-apps/hugo/hugo-0.144.2.ebuild new file mode 100644 index 000000000000..959509d43442 --- /dev/null +++ b/www-apps/hugo/hugo-0.144.2.ebuild @@ -0,0 +1,124 @@ +# Copyright 2018-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit check-reqs go-module shell-completion + +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://dev.gentoo.org/~williamh/dist/${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 MPL-2.0 Unlicense" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~loong ~riscv ~x86" +IUSE="doc +extended test" + +BDEPEND=" + test? ( + dev-python/docutils + dev-ruby/asciidoctor + ) +" +RDEPEND=" + extended? ( + dev-libs/libsass:= + >=media-libs/libwebp-1.3.2:= + ) +" +DEPEND="${RDEPEND}" + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-0.121.0-unbundle-libwebp-and-libsass.patch + "${FILESDIR}"/${PN}-0.128.0-skip-some-tests.patch +) + +_check_reqs() { + if [[ ${MERGE_TYPE} == binary ]] ; then + return 0 + fi + + if has test ${FEATURES}; then + CHECKREQS_DISK_BUILD="4G" + else + CHECKREQS_DISK_BUILD="1500M" + fi + check-reqs_${EBUILD_PHASE_FUNC} +} + +pkg_pretend() { + _check_reqs +} + +pkg_setup() { + _check_reqs +} + +src_configure() { + export CGO_ENABLED=1 + export CGO_CFLAGS="${CFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export MY_BUILD_FLAGS="$(usev extended "-tags extended")" + + default +} + +src_prepare() { + # wants to run command that require network access + rm testscripts/commands/mod{,_vendor,__disable,_get,_get_u,_npm{,_withexisting}}.txt || die + + default +} + +src_compile() { + mkdir -pv bin || die + ego build -ldflags "-X github.com/gohugoio/hugo/common/hugo.vendorInfo=gentoo:${PVR}" \ + ${MY_BUILD_FLAGS} -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() { + if ! has_version -b virtual/pandoc ; then + elog "You're missing virtual/pandoc - some tests will be skipped." + fi + + ego test "./..." ${MY_BUILD_FLAGS} +} + +src_install() { + dobin bin/* + doman man/* + + dobashcomp completions/${PN} + dofishcomp completions/${PN}.fish + dozshcomp completions/_${PN} + + if use doc ; then + dodoc -r doc/* + fi +} + +pkg_postinst() { + elog "the sass USE-flag was renamed to extended. the functionality is the" \ + "same, except it also toggles the dependency on libwebp (for encoding)" +}
