commit:     62032710b0a51f0bde4ccbe4771f144aa00fab7a
Author:     Alfred Persson Forsberg <cat <AT> catcream <DOT> org>
AuthorDate: Tue May 13 19:32:18 2025 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sat May 17 09:20:29 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62032710

net-irc/soju: add 0.9.0

Closes: https://github.com/gentoo/gentoo/pull/42077
Signed-off-by: Alfred Persson Forsberg <cat <AT> catcream.org>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 net-irc/soju/Manifest          |  2 ++
 net-irc/soju/soju-0.9.0.ebuild | 80 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+)

diff --git a/net-irc/soju/Manifest b/net-irc/soju/Manifest
index 7d4dd1823322..edcecc3c63fc 100644
--- a/net-irc/soju/Manifest
+++ b/net-irc/soju/Manifest
@@ -1,2 +1,4 @@
 DIST soju-0.8.2-deps.tar.xz 72699036 BLAKE2B 
5abfa3d683a0f06be7361bfeec751b6f4892fde51f1d9216cca163eac125e72f68a8116279b16b8ce6f5076293b7ad67b6098f887ac3cea3f099f2b27643ed48
 SHA512 
64fa60a90a33021661f51f2f6456bf8f2e8d01282143ad41b966ade105e6b4f2310f83f81f45bcea6baa2f76857e549f1548844ec1c3f17c1f1e0615523ef813
 DIST soju-0.8.2.tar.gz 155059 BLAKE2B 
17f220440c8135abeb570808d7a4cb5cdb6993c076ffe9eb2fa0bb0e8487f9b29831049b2702692cc0903277399603dbe8e0ad27ed6356b932c29979a6eeddef
 SHA512 
7e5bc27394223c021ce6e1b9d93b617ade5bd803f37e030ea05e079efdf343ff0128753803a2e1c86ca2c83786bdaf21600cb6457b4404dd0cf2ff0e5646c62b
+DIST soju-0.9.0-deps.tar.xz 165948980 BLAKE2B 
b6274b4b5fefd003c03948c58fcfb20095c9c27e3f9d6bb74155bc5cb63a53cce47727eecbe8d0a4e9b9ca37a7cd0beab8f98ac86787b3d4ad42a0405da46df8
 SHA512 
7bca581b5d455d761d16ae8786e3cc7ee5aff658dc1ae942aa9d220cc311320a3c00a7c303f3bc99965c4aa6337c31255d0d5a140220974938fc341c9beeac66
+DIST soju-0.9.0.tar.gz 164787 BLAKE2B 
58cfebf2f69c4b3ec54647ca869582c7874fd53902eaba16d2f28dc77fd0f82411b1b800983545333dce935e9dfb662539270c8c64939a1d1cf603118984b016
 SHA512 
13d1d1c172780a56d8751502015450cecbe09618b6b4f42305e014b19f1a032bd304a0bfb61e6ea56bd723838d8521ee8a1b90e92dfd82db574f0384338a3519

diff --git a/net-irc/soju/soju-0.9.0.ebuild b/net-irc/soju/soju-0.9.0.ebuild
new file mode 100644
index 000000000000..2711143890e2
--- /dev/null
+++ b/net-irc/soju/soju-0.9.0.ebuild
@@ -0,0 +1,80 @@
+# Copyright 2022-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+EAPI=8
+
+inherit go-module systemd tmpfiles
+
+DESCRIPTION="soju is a user-friendly IRC bouncer"
+HOMEPAGE="https://soju.im/";
+SRC_URI="https://codeberg.org/emersion/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+SRC_URI+=" https://github.com/alfredfo/${PN}-deps/raw/master/${P}-deps.tar.xz";
+S="${WORKDIR}/soju"
+
+LICENSE="AGPL-3 Apache-2.0 MIT BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv"
+IUSE="moderncsqlite +sqlite pam"
+REQUIRED_USE="?? ( moderncsqlite sqlite )"
+
+BDEPEND="
+       app-text/scdoc
+"
+RDEPEND="
+       acct-user/soju
+       acct-group/soju
+       sqlite? ( dev-db/sqlite:3 )
+"
+DEPEND="${RDEPEND}"
+
+src_compile() {
+       # musl removed legacy LFS64 interfaces in version 1.2.4 temporarily
+       # reenabled using _LARGEFILE64_SOURCE until this is resolved
+       # upstream https://github.com/mattn/go-sqlite3/issues/1164
+       CGO_CFLAGS="${CGO_CFLAGS}"
+       if use sqlite; then
+               GOFLAGS+=" -tags=libsqlite3"
+               CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
+       elif use moderncsqlite; then
+               GOFLAGS+=" -tags=moderncsqlite"
+               CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
+       else
+               GOFLAGS+=" -tags=nosqlite"
+       fi
+       # Only way to pass CFLAGS to CGO at the
+       # moment. https://github.com/gentoo/gentoo/pull/33539/
+       export CGO_CFLAGS
+       use pam && GOFLAGS+=" -tags=pam"
+
+       ego build ${GOFLAGS} ./cmd/soju
+       ego build ${GOFLAGS} ./cmd/sojudb
+       ego build ${GOFLAGS} ./cmd/sojuctl
+
+       scdoc <doc/soju.1.scd >doc/soju.1 || die
+       scdoc <doc/sojuctl.1.scd >doc/sojuctl.1 || die
+}
+
+src_install() {
+       dobin soju
+       dobin sojudb
+       dobin sojuctl
+
+       doman doc/soju.1
+       doman doc/sojuctl.1
+       systemd_dounit contrib/soju.service
+
+       newtmpfiles "${FILESDIR}/soju.tmpfiles" soju.conf
+
+       keepdir /etc/soju
+       insinto /etc/soju
+       newins config.in config
+       newinitd "${FILESDIR}"/soju.initd soju
+       einstalldocs
+}
+
+pkg_postinst() {
+       tmpfiles_process soju.conf
+
+       elog "${PN} requires a user database for authenticating clients."
+       elog "As the soju user, create a database using:"
+       elog "$ sojudb -config ${EROOT}/etc/soju/config create-user <username> 
[-admin]"
+}

Reply via email to