linamh/dev-embedded/cc65/cc65-2.19-r1.ebuild
Mario Fetka a14b80a8cf Bump
2024-03-12 20:41:02 +01:00

45 lines
1.3 KiB
Bash

# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=8
inherit toolchain-funcs
MRUSTC="0.8.1"
DESCRIPTION="It's a complete cross development package for 65(C)02 systems"
HOMEPAGE="https://www.cc65.org/"
SRC_URI="https://github.com/${PN}/${PN}/archive/V${PV}.tar.gz -> ${PN}-sources-${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE="doc"
DEPEND="virtual/libc
doc? ( app-text/linuxdoc-tools )"
RDEPEND=${DEPEND}
PATCHES=(
"${FILESDIR}/cc65-mrustc.patch"
)
src_compile() {
# the build needs to be split otherwise we can't specify CC
# these makefiles are not parallel build aware
emake -C src CC="$(tc-getCC)" AR="$(tc-getAR)" PREFIX="/usr" \
BUILD_ID="Gentoo ${PV}${PR}" || die "src build fail"
emake -C libsrc CC="$(tc-getCC)" AR="$(tc-getAR)" PREFIX="/usr" \
BUILD_ID="Gentoo ${PV}${PR}" || die "libsrc build fail"
use doc && emake -C doc html info
}
src_install() {
emake -C src CC="$(tc-getCC)" AR="$(tc-getAR)" PREFIX="${D}/usr" \
BUILD_ID="Gentoo ${PV}${PR}" install || die "src install failed"
emake -C libsrc CC="$(tc-getCC)" AR="$(tc-getAR)" PREFIX="${D}/usr" \
BUILD_ID="Gentoo ${PV}${PR}" install || die "libsrc install failed"
use doc && emake CC="$(tc-getCC)" AR="$(tc-getAR)" PREFIX="${D}/usr" \
BUILD_ID="Gentoo ${PV}${PR}" doc html info
}