blob: 4f859251f05ad920a3bd517e479da767dc550a0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Full-fledged command-line interface to Compiler Explorer instances"
# https://jemarch.net/godcc 404s for now
HOMEPAGE="https://git.sr.ht/~jemarch/godcc"
SRC_URI="https://jemarch.net/${P}.tar.gz"
LICENSE="GPL-3+"
SLOT="0"
#KEYWORDS="~amd64"
RDEPEND="dev-libs/boehm-gc"
DEPEND="${RDEPEND}"
# TODO: We will want a pkg_pretend check for whether the active compiler
# supports algol68 once eclass support is there.
BDEPEND="
sys-devel/gcc[algol68(-)]
"
src_configure() {
# This hack is needed as flag-o-matic.eclass doesn't yet support
# Algol 68, WIP.
export A68FLAGS="${A68FLAGS:--O2} -ftrampoline-impl=heap"
default
}
src_compile() {
# Workaround autoconf bug where configure-time A68FLAGS get
# clobbered to -O2 -g: https://savannah.gnu.org/support/index.php?111382
#
# -fno-lto because of -Wlto-type-mismatch with prelude (PR123982)
emake A68FLAGS="${A68FLAGS} -fno-lto"
}
src_install() {
default
dodoc "${FILESDIR}"/godbolt.stunnel
}
pkg_postinst() {
# https://git.sr.ht/~jemarch/godcc/tree/b49882aec95f56486bc2d08d3c324145c6a8d6c0/item/README.md
if [[ -z ${REPLACING_VERSIONS} ]] ; then
einfo "Unless running your own Compiler Explorer instance locally,"
einfo "you will likely need to run a proxy to strip HTTPS. The recommended"
einfo "setup for this is with net-misc/stunnel."
einfo ""
einfo "An example config is installed at ${BROOT}/usr/share/doc/${PF}/godbolt.stunnel,"
einfo "which can be used as:"
einfo " # stunnel godbolt.stunnel"
einfo " $ export GODCC_CEHOST=localhost GODCC_CEPORT=8888"
einfo " $ godcc ..."
fi
}
|