linamh/dev-embedded/cc65/cc65-2.19-r1.ebuild
Mario Fetka c9f516dab4 Bump
2023-07-20 20:28:34 +02:00

49 lines
1.7 KiB
Bash

# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=8
inherit toolchain-funcs multilib
MRUSTC="0.8.1"
DESCRIPTION="It's a complete cross development package for 65(C)02 systems"
HOMEPAGE="http://www.cc65.org"
#SRC_URI="ftp://ftp.musoftware.de/pub/uz/cc65/snapshot/cc65-snapshot-sources-${PV}.tar.bz2"
#SRC_URI="ftp://ftp.musoftware.de/pub/uz/${PN}/${PN}-sources-${PV}.tar.bz2"
SRC_URI="https://github.com/${PN}/${PN}/archive/V${PV}.tar.gz -> ${PN}-sources-${PV}.tar.gz
https://github.com/thepowersgang/mrustc/archive/refs/tags/v${MRUSTC}.tar.gz -> ${PN}-mrustc-${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
#KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE="doc"
DEPEND="doc? ( app-text/linuxdoc-tools )"
RDEPEND=""
#S="${WORKDIR}"/${PN}-snapshot-${PV}
PATCHES=(
"${FILESDIR}/cc65-mrustc.patch"
)
#src_prepare() {
# epatch "${FILESDIR}"/package-version.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
exit 1
}
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
}