2007-12-31 17:30:09 +01:00
|
|
|
# Copyright 1999-2007 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
|
|
|
inherit eutils toolchain-funcs multilib linux-mod
|
|
|
|
|
|
|
|
DESCRIPTION="OpenCBM is a package to control and use serial devices as used by most Commodore (CBM) 8-bit mach"
|
|
|
|
HOMEPAGE="http://opencbm.trikaliotis.net/"
|
|
|
|
SRC_URI="mirror://sourceforge/${PN}/${P}-src.zip"
|
|
|
|
|
|
|
|
LICENSE="GPL-2"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64 ~ppc ~x86"
|
|
|
|
IUSE="doc"
|
|
|
|
|
|
|
|
DEPEND="virtual/linux-sources
|
|
|
|
dev-embedded/cc65
|
|
|
|
app-text/linuxdoc-tools"
|
|
|
|
|
|
|
|
BUILD_PARAMS="KDIR=$KERNEL_DIR"
|
|
|
|
MODULE_NAMES="cbm(misc:${S}/sys/linux:${S}/sys/linux)"
|
|
|
|
BUILD_TARGETS="all"
|
|
|
|
MODULESD_NOVFS_ENABLED=""
|
|
|
|
|
|
|
|
src_unpack() {
|
|
|
|
unpack ${A}
|
|
|
|
cd ${S}
|
2007-12-31 17:34:22 +01:00
|
|
|
# convert linefeed
|
2007-12-31 17:30:09 +01:00
|
|
|
edos2unix `find . -name '*' -type f`
|
2007-12-31 17:34:22 +01:00
|
|
|
# 6502 sources ar always up to date
|
2007-12-31 17:30:09 +01:00
|
|
|
touch `find . -name '*.?65' -type f`
|
2007-12-31 17:34:22 +01:00
|
|
|
# add debian patches no demo & doc & no kernel
|
2007-12-31 17:30:09 +01:00
|
|
|
epatch ${FILESDIR}/${PV}/*
|
2007-12-31 17:34:22 +01:00
|
|
|
# sed correct path
|
2007-12-31 17:30:09 +01:00
|
|
|
sed -e 's,^PREFIX.*,PREFIX = /usr,' \
|
|
|
|
-e 's,/man/man1,/share/man/man1,g' \
|
|
|
|
-e 's,/info,/share/info,g' -i ${S}/LINUX/config.make
|
2007-12-31 17:34:22 +01:00
|
|
|
# copy module makefile that don't itefer with gentoo kernel build system
|
2007-12-31 17:30:09 +01:00
|
|
|
cp ${FILESDIR}/Makefile ${S}/sys/linux/Makefile
|
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
|
|
|
emake -f LINUX/Makefile CC="$(tc-getCC)" AR="$(tc-getAR)" showvars
|
|
|
|
emake -f LINUX/Makefile CC="$(tc-getCC)" AR="$(tc-getAR)"
|
|
|
|
linux-mod_src_compile
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
emake -f LINUX/Makefile PREFIX="${D}/usr" install
|
|
|
|
linux-mod_src_install
|
|
|
|
generate_modulesd
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
linux-mod_pkg_postinst
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postrm() {
|
|
|
|
linux-mod_pkg_postrm
|
|
|
|
}
|