source: dev-embedded/cc65/cc65-2.18.ebuild @ f3987e6

Revision f3987e6, 3.0 KB checked in by Mario Fetka <mario.fetka@…>, 10 months ago (diff)

Bump

  • Property mode set to 100644
Line 
1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# $Header: $
4
5EAPI="2"
6
7inherit eutils toolchain-funcs multilib
8
9DESCRIPTION="It's a complete cross development package for 65(C)02 systems"
10HOMEPAGE="http://www.cc65.org"
11#SRC_URI="ftp://ftp.musoftware.de/pub/uz/cc65/snapshot/cc65-snapshot-sources-${PV}.tar.bz2"
12#SRC_URI="ftp://ftp.musoftware.de/pub/uz/${PN}/${PN}-sources-${PV}.tar.bz2"
13SRC_URI="https://github.com/${PN}/${PN}/archive/V${PV}.tar.gz -> ${PN}-sources-${PV}.tar.gz"
14
15LICENSE="GPL-2"
16SLOT="0"
17KEYWORDS="~amd64 ~ppc ~sparc ~x86"
18IUSE="doc"
19
20DEPEND="doc? ( app-text/linuxdoc-tools )"
21RDEPEND=""
22
23#S="${WORKDIR}"/${PN}-snapshot-${PV}
24
25src_prepare() {
26        # uncomment to install sim65
27        #sed -i -e "s:od65:od65 sim65:g" src/make/gcc.mak
28
29        # correct paths for install (also in documentation)
30        sed -i -e "s:)/lib:)/$(get_libdir):g" make/gcc.mak
31        sed -e "s:/usr/lib/cc65:/usr/$(get_libdir)/cc65:g" \
32            -i src/ca65/make/gcc.mak -i doc/ca65.sgml \
33            -i src/cc65/make/gcc.mak -i doc/cc65.sgml \
34            -i src/ld65/make/gcc.mak -i doc/ld65.sgml
35
36        # solve conflict by renameing make.info to cc65make.info
37        sed -e "s:make.:cc65make.:g" -i doc/index.sgml -i doc/Makefile
38        mv doc/make.sgml doc/cc65make.sgml
39
40#       epatch "${FILESDIR}"/cc65-2.13.2-asneeded-1.patch
41}
42
43src_compile() {
44        # the build needs to be split otherwise we can't specify CC
45        # these makefiles are not parallel build aware
46        emake -j1 -C src -f make/gcc.mak CC="$(tc-getCC)" AR="$(tc-getAR)" \
47                CFLAGS="-g -O2 -Wall -W -std=c89 ${CFLAGS}" \
48                LDFLAGS="${LDFLAGS}" || die "src build fail"
49        emake -j1 -C libsrc || die "libsrc build fail"
50        use doc && emake -j1 -C doc html info
51}
52
53src_install() {
54        # can't trust the install target (sandbox violation) so do it by hand
55        dobin src/*65/*65 src/ca65html/ca65html src/grc/grc  || die "dobin fail"
56        insinto /usr/$(get_libdir)/cc65/emd
57        doins libsrc/*.emd || die "install memory map fail"
58        insinto /usr/$(get_libdir)/cc65/joy
59        doins libsrc/*.joy || die "install joystick driver fail"
60        insinto /usr/$(get_libdir)/cc65/mou
61        doins libsrc/*.mou || die "install mouse driver fail"
62        insinto /usr/$(get_libdir)/cc65/ser
63        doins libsrc/*.ser || die "install UART driver fail"
64        insinto /usr/$(get_libdir)/cc65/tgi
65        doins libsrc/*.tgi || die "install graphic driver fail"
66        insinto /usr/$(get_libdir)/cc65/asminc
67        doins asminc/*.inc || die "install asm include fail"
68        insinto /usr/$(get_libdir)/cc65/include
69        doins -r include/* || die "install include fail"
70        insinto /usr/$(get_libdir)/cc65/lib
71        doins libsrc/*.lib || die "install lib definations fail"
72        doins libsrc/*.o || die "install lib fail"
73        insinto /usr/$(get_libdir)/cc65/cfg
74        doins src/ld65/cfg/*.cfg || die "cfg install fail"
75        use doc && dohtml doc/*.htm*
76        use doc && insinto /usr/share/doc/${PF}/html
77        use doc && doins doc/*.txt
78        doman packages/debian/*.1 || die "man install fail"
79        use doc && doinfo doc/*.info
80        dodoc src/ca65/macpack/*.mac doc/readme.1st \
81                doc/BUGS doc/CREDITS || die "macro & doc install fail"
82}
Note: See TracBrowser for help on using the repository browser.