commit:     56733569cebd71fe8d8fbb6445d9b7ed3b0d9bd9
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 18 12:41:44 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 18 12:42:18 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56733569

mail-filter/postforward: EAPI=8, use go-module.eclass

Closes: https://bugs.gentoo.org/844709
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 ...=> postforward-1.1.1-apply-sendmail-path.patch} |  0
 .../postforward/postforward-1.1.1-r1.ebuild        | 43 ++++++++++++++++++++
 mail-filter/postforward/postforward-1.1.1.ebuild   | 47 ----------------------
 3 files changed, 43 insertions(+), 47 deletions(-)

diff --git 
a/mail-filter/postforward/files/postforward_apply-sendmail-path.patch 
b/mail-filter/postforward/files/postforward-1.1.1-apply-sendmail-path.patch
similarity index 100%
rename from mail-filter/postforward/files/postforward_apply-sendmail-path.patch
rename to 
mail-filter/postforward/files/postforward-1.1.1-apply-sendmail-path.patch

diff --git a/mail-filter/postforward/postforward-1.1.1-r1.ebuild 
b/mail-filter/postforward/postforward-1.1.1-r1.ebuild
new file mode 100644
index 000000000000..12417c94def0
--- /dev/null
+++ b/mail-filter/postforward/postforward-1.1.1-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module
+
+DESCRIPTION="Postfix Sender Rewriting Scheme forwarding agent"
+HOMEPAGE="https://github.com/zoni/postforward";
+SRC_URI="https://github.com/zoni/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+RDEPEND="mail-filter/postsrsd"
+
+PATCHES=(
+       "${FILESDIR}/${P}-apply-sendmail-path.patch"
+)
+
+src_unpack() {
+       # This package has no dependencies, but go-module_src_unpack requires 
this directory
+       mkdir -p "${S}/vendor" || die
+
+       go-module_src_unpack
+}
+
+src_prepare() {
+       default
+
+       # Dynamically fix EPREFIX lines made by ${PN}_apply-sendmail-path.patch
+       sed -e "s/@GENTOO_PORTAGE_EPREFIX@/${EPREFIX}/" -i ${PN}.go || die
+}
+
+src_compile() {
+       ego build -o ${PN} ${PN}.go
+}
+
+src_install() {
+       einstalldocs
+       dosbin "${PN}"
+}

diff --git a/mail-filter/postforward/postforward-1.1.1.ebuild 
b/mail-filter/postforward/postforward-1.1.1.ebuild
deleted file mode 100644
index 13e50547a484..000000000000
--- a/mail-filter/postforward/postforward-1.1.1.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit golang-build
-
-DESCRIPTION="Postfix Sender Rewriting Scheme forwarding agent"
-EGO_PN="${PN}"
-SRC_URI="https://github.com/zoni/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-HOMEPAGE="https://github.com/zoni/postforward";
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-
-DEPEND="
-       dev-lang/go:0"
-RDEPEND="
-       mail-filter/postsrsd"
-
-PATCHES=( "${FILESDIR}/${PN}_apply-sendmail-path.patch" )
-
-src_prepare() {
-       default
-
-       # Dynamically fix EPREFIX lines made by ${PN}_apply-sendmail-path.patch
-       sed -i -e "s/@GENTOO_PORTAGE_EPREFIX@/${EPREFIX}/" *.go || die
-
-       # go build assumes files will be in src dir, but
-       # source files are in root in this package, so move
-       # them.
-       local new_src_dir="${S}/src/${EGO_PN}"
-       # Freak out if there's already something there because
-       # it means the package has changed and we'll need to
-       # adjust to it.
-       [[ -e "${new_src_dir}" ]] && die "${new_src_dir} already exists"
-       mkdir -p "${new_src_dir}" || die
-       mv *.go "${new_src_dir}" || die
-}
-
-# Standard golang-build src_install complains about pkg not
-# existing, so we go custom.
-src_install() {
-       einstalldocs
-       dosbin "${PN}"
-}

Reply via email to