Skip to content

Commit

Permalink
net-irc/soju: pass -D_LARGEFILE64_SOURCE for musl-1.2.4
Browse files Browse the repository at this point in the history
[sam: The macro is not ideal at all but patching Go isn't exactly ideal
itself. Besides, this was arleady in the ebuild, but ignored b/c Go doesn't
yet in Gentoo respect CFLAGS et. al, although should soon.]

See-also: mattn/go-sqlite3#1164
Closes: https://bugs.gentoo.org/912311
Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
Closes: #33863
Signed-off-by: Sam James <sam@gentoo.org>
  • Loading branch information
alfredfo authored and thesamesam committed Nov 17, 2023
1 parent 8fc2ed9 commit 5f0751d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions net-irc/soju/soju-0.6.2.ebuild
Expand Up @@ -26,19 +26,22 @@ RDEPEND="
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
append-cflags "-D_LARGEFILE64_SOURCE"

# 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
Expand Down

0 comments on commit 5f0751d

Please sign in to comment.