linamh/dev-embedded/cc65/cc65-2.19-r1.ebuild

45 lines
1.3 KiB
Bash
Raw Normal View History

2022-11-24 21:26:54 +01:00
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# $Header: $
2023-07-20 20:28:34 +02:00
EAPI=8
2022-11-24 21:26:54 +01:00
2024-03-12 20:41:02 +01:00
inherit toolchain-funcs
2022-11-24 21:26:54 +01:00
MRUSTC="0.8.1"
DESCRIPTION="It's a complete cross development package for 65(C)02 systems"
2024-03-12 20:41:02 +01:00
HOMEPAGE="https://www.cc65.org/"
SRC_URI="https://github.com/${PN}/${PN}/archive/V${PV}.tar.gz -> ${PN}-sources-${PV}.tar.gz"
2022-11-24 21:26:54 +01:00
LICENSE="GPL-2"
SLOT="0"
2024-03-12 20:41:02 +01:00
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
2022-11-24 21:26:54 +01:00
IUSE="doc"
2024-03-12 20:41:02 +01:00
DEPEND="virtual/libc
doc? ( app-text/linuxdoc-tools )"
RDEPEND=${DEPEND}
2022-11-24 21:26:54 +01:00
PATCHES=(
2024-03-12 20:41:02 +01:00
"${FILESDIR}/cc65-mrustc.patch"
2022-11-24 21:26:54 +01:00
)
src_compile() {
# the build needs to be split otherwise we can't specify CC
# these makefiles are not parallel build aware
2024-03-12 20:41:02 +01:00
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"
2022-11-24 21:26:54 +01:00
use doc && emake -C doc html info
}
src_install() {
2024-03-12 20:41:02 +01:00
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
2022-11-24 21:26:54 +01:00
}