diff options
Diffstat (limited to 'sys-apps/sparc-utils/sparc-utils-1.9-r4.ebuild')
-rw-r--r-- | sys-apps/sparc-utils/sparc-utils-1.9-r4.ebuild | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/sys-apps/sparc-utils/sparc-utils-1.9-r4.ebuild b/sys-apps/sparc-utils/sparc-utils-1.9-r4.ebuild new file mode 100644 index 000000000000..9a01a2b71ad1 --- /dev/null +++ b/sys-apps/sparc-utils/sparc-utils-1.9-r4.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/sparc-utils/sparc-utils-1.9-r4.ebuild,v 1.1 2007/04/11 17:32:17 gustavoz Exp $ + +inherit eutils toolchain-funcs + +DESCRIPTION="Various sparc utilities from Debian GNU/Linux" +HOMEPAGE="http://www.debian.org/" +SRC_URI=" http://http.us.debian.org/debian/pool/main/s/${PN}/${PN}_${PV}.orig.tar.gz + http://http.us.debian.org/debian/pool/main/s/${PN}/${PN}_${PV}-3.diff.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~sparc" +IUSE="" + +DEPEND="virtual/os-headers" +RDEPEND="sys-apps/setarch" + +S=${WORKDIR}/${P}.orig + +# NOTE: If a system has >=sys-kernel/linux-headers-2.6.0, don't build audioctl +# as the SPARC sound drivers have been replaced by their ALSA equivalents + +pkg_setup() { + has_version '>=sys-kernel/linux-headers-2.6.0' && \ + einfo "Linux 2.6 kernel headers detected, not building audioctl" +} + +src_unpack() { + unpack ${A} + epatch ${WORKDIR}/${PN}_${PV}-3.diff +} + +src_compile() { + emake -C elftoaout-2.3 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die + emake -C src piggyback piggyback64 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die + emake -C prtconf-1.3 CC="$(tc-getCC)" all || die + has_version '>=sys-kernel/linux-headers-2.6.0' || \ + emake -C audioctl-1.3 CC="$(tc-getCC)" || die +} + +src_install() { + # since the debian/piggyback64.1 manpage is a pointer to the + # debian/piggyback.1 manpage, copy debian/piggyback.1 to + # debian/piggyback64.1 + + cp ${S}/debian/piggyback.1 ${S}/debian/piggyback64.1 + + dobin elftoaout-2.3/elftoaout || die + dobin src/piggyback || die + dobin src/piggyback64 || die + dosbin prtconf-1.3/prtconf || die + dosbin prtconf-1.3/eeprom || die + + if ! has_version '>=sys-kernel/linux-headers-2.6.0'; then + dobin audioctl-1.3/audioctl || die + newinitd "${FILESDIR}"/audioctl.init audioctl || die + newconfd debian/audioctl.def audioctl || die + doman audioctl-1.3/audioctl.1 + fi + + doman elftoaout-2.3/elftoaout.1 + doman prtconf-1.3/prtconf.8 + doman prtconf-1.3/eeprom.8 + doman debian/piggyback.1 + doman debian/piggyback64.1 +} + +pkg_postinst() { + ewarn "In order to /usr/sbin/eeprom, make sure you build /dev/openprom" + ewarn "device support (CONFIG_SUN_OPENPROMIO) into the kernel, or as a" + ewarn "module (and that the module is loaded)." +} |