# Copyright 2025-2026 illogician # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit flag-o-matic go-module desktop DESCRIPTION="A password generator that's easy to use" HOMEPAGE="https://codeberg.org/illogician/passgen-il" SRC_URI="https://codeberg.org/illogician/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" SRC_URI+=" https://codeberg.org/illogician/illogician-overlay/raw/branch/main/app-admin/passgen-il/${PN}-1.5-vendor-r1.tar.xz" S="${WORKDIR}/${PN}" LICENSE="GPL-3" SLOT="0" KEYWORDS="amd64" IUSE="+gui +wayland" REQUIRED_USE="!gui? ( !wayland )" BDEPEND="dev-lang/go gui? ( sys-devel/gcc x11-libs/gtk+:3 wayland? ( x11-libs/gtk+:3[wayland] ) dev-util/pkgconf )" src_unpack() { default } src_prepare() { default use !gui && sed -i /flagged/d main.go use !wayland && cd ${WORKDIR} && eapply ${FILESDIR}/bind_cgo.patch && cd ${S} ego build -x } src_install() { dobin passgen-il use gui && doicon ${S}/misc/passgen-il-lock.svg use gui && domenu ${S}/misc/${PN}.desktop }