sys-devel/cake - 9999 (mrchicken)

Search

Install

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

Package Information

Description:
C23 front end and transpiler written in C
Homepage:
https://cakecc.org
License:
GPL-3+

Ebuild Details

Version EAPI Keywords Slot
9999 8 ~amd64 ~x86 0
View Raw Ebuild
# 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
}

USE Flags

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

Global/Standard Flags

X
cakeide
❓ Default: Enabled (+)

Inherited Eclasses

Dependencies

DEPEND

	cakeide? (
		X? ( x11-libs/libXft x11-libs/libX11 )
		wayland? ( dev-libs/wayland x11-libs/libxkbcommon[wayland] media-libs/freetype media-libs/fontconfig )
	)