Install this version:
emerge -a =sys-fs/gdu-5.32.0
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =sys-fs/gdu-5.32.0
Or alternatively:
emerge --autounmask-write -a =sys-fs/gdu-5.32.0
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 5.32.0 | 8 | ~amd64 | 0 |
# Copyright 2026 mva
# Distributed under the terms of the Public Domain or CC0 License
EAPI=8
inherit go-module
DESCRIPTION="Disk usage analyzer with console interface written in Go"
HOMEPAGE="https://github.com/dundee/gdu"
SRC_URI="https://github.com/dundee/gdu/archive/v${PV}.tar.gz -> ${P}.tar.gz"
# SRC_URI+=" https://gentoo.kropotkin.rocks/go-pkgs/${P}-vendor.tar.xz"
SRC_URI+=" https://github.com/spikyatlinux/gdu-vendor-files/releases/download/v${PV}/${P}-vendor.tar.gz"
# TODO: make my own tarball and place it somewhere
# cd ${S}
# go mod vendor
# tar -czvf /tmp/${P}-vendor.tar.gz ../${P}/vendor
LICENSE="Apache-2.0 BSD MIT"
SLOT="0"
KEYWORDS="~amd64"
src_unpack() {
# default
mkdir -p "${S}"
ln -s ../vendor "${S}"/vendor # current tarball author made it bad way
go-module_src_unpack
}
src_compile() {
local my_ldflags=(
# -s -w
# 👆 causes QA notice about pre-stripped binary
-X "'github.com/dundee/gdu/v5/build.Version=${PV}'"
-X "'github.com/dundee/gdu/v5/build.Time=$(date +%Y-%m-%d\ %H:%M:%S)'"
-X "'github.com/dundee/gdu/v5/build.User=portage (Gentoo Package Manager)'"
)
ego build -ldflags "${my_ldflags[*]}" -v -x -work -o "${PN}" "./cmd/${PN}"
}
src_install() {
einstalldocs
dodoc -r README.md gdu.1.md
dobin gdu
doman gdu.1
}
src_test() {
ego test ./...
}
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | gdu-5.32.0-vendor.tar.gz | 5028067 bytes | https://github.com/spikyatlinux/gdu-vendor-files/releases/download/v5.32.0/gdu-5.32.0-vendor.tar.gz |
| DIST | gdu-5.32.0.tar.gz | 285471 bytes | https://github.com/dundee/gdu/archive/v5.32.0.tar.gz |