Install this version:
emerge -a =sys-devel/cake-9999
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =sys-devel/cake-9999
Or alternatively:
emerge --autounmask-write -a =sys-devel/cake-9999
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs
DESCRIPTION="C23 front end and transpiler written in C"
HOMEPAGE="https://cakecc.org"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/thradams/cake.git"
else
SRC_URI="https://github.com/thradams/cake/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
IUSE="debug X wayland +cakeide"
REQUIRED_USE="cakeide? ( ^^ ( X wayland ) )"
DEPEND="
cakeide? (
X? ( x11-libs/libXft x11-libs/libX11 )
wayland? ( dev-libs/wayland x11-libs/libxkbcommon[wayland] media-libs/freetype media-libs/fontconfig )
)
"
# Section 7
LICENSE="GPL-3+"
SLOT="0"
PATCHES=(
"${FILESDIR}/noforceO3.patch"
)
# Wouldn't seem to work.
RESTRICT="test"
src_prepare() {
default
$(tc-getCC) ${CFLAGS} src/build.c -o src/build ${LDFLAGS} || die
}
src_compile() {
cd src
./build $(usev debug) $(usev X x11) $(usev wayland) $(usev !cakeide "-no-ide") -cflags "${CFLAGS}"
cd ..
}
src_install() {
insinto /usr/share/cake
doins src/cake.json
exeinto /usr/share/cake
if use cakeide; then
doexe src/cakeide
fi
doexe src/cake
if use cakeide; then
dosym -r /usr/share/cake/cakeide /usr/bin/cakeide
fi
dosym -r /usr/share/cake/cake /usr/bin/cake
}
Manage flags for this package:
euse -i <flag> -p sys-devel/cake |
euse -E <flag> -p sys-devel/cake |
euse -D <flag> -p sys-devel/cake
cakeide? ( X? ( x11-libs/libXft x11-libs/libX11 ) wayland? ( dev-libs/wayland x11-libs/libxkbcommon[wayland] media-libs/freetype media-libs/fontconfig ) )