diff options
Diffstat (limited to 'sys-apps/pcmcia-cs-modules/pcmcia-cs-modules-3.2.8.ebuild')
-rw-r--r-- | sys-apps/pcmcia-cs-modules/pcmcia-cs-modules-3.2.8.ebuild | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/sys-apps/pcmcia-cs-modules/pcmcia-cs-modules-3.2.8.ebuild b/sys-apps/pcmcia-cs-modules/pcmcia-cs-modules-3.2.8.ebuild new file mode 100644 index 000000000000..5c1acd0de848 --- /dev/null +++ b/sys-apps/pcmcia-cs-modules/pcmcia-cs-modules-3.2.8.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcmcia-cs-modules/pcmcia-cs-modules-3.2.8.ebuild,v 1.1 2005/04/25 12:00:25 brix Exp $ + +inherit eutils flag-o-matic toolchain-funcs linux-info + +MY_P=${P/-modules/} +S=${WORKDIR}/${MY_P} + +DESCRIPTION="PCMCIA modules for Linux" +HOMEPAGE="http://pcmcia-cs.sourceforge.net" +SRC_URI="mirror://sourceforge/pcmcia-cs/${MY_P}.tar.gz + http://ozlabs.org/people/dgibson/dldwd/monitor-0.13e.patch" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" + +IUSE="cardbus" +DEPEND="virtual/linux-sources + app-arch/tar + >=sys-apps/sed-4" +RDEPEND="" + +pkg_setup() { + linux-info_pkg_setup + + if kernel_is gt 2 4; then + ewarn + ewarn "The recommended PCMCIA configuration for linux-2.6.x is to" + ewarn "use the in-kernel PCMCIA drivers." + ewarn + ebeep 5 + fi + + if (linux_chkconfig_present PCMCIA || linux_chkconfig_present PCCARD); then + eerror + eerror "This package requires the in-kernel PCMCIA drivers to be disabled." + eerror + die "Kernel PCMCIA support detected" + fi +} + +src_unpack() { + unpack ${MY_P}.tar.gz + + cd ${S}/wireless + epatch ${DISTDIR}/monitor-0.13e.patch + + cd ${S} + epatch ${FILESDIR}/${MY_P}-orinoco-gcc34.patch + epatch ${FILESDIR}/${MY_P}-modules-only.patch +} + +src_compile() { + local config CONFIG_FILE + + if use cardbus; then + einfo "CardBus support enabled" + config="${config} --cardbus" + else + einfo "CardBus support disabled" + config="${config} --nocardbus" + fi + + if linux_chkconfig_present PM; then + einfo "Power management support enabled" + config="${config} --apm" + else + einfo "Power management support disabled" + config="${config} --noapm" + fi + + if linux_chkconfig_present PNP; then + einfo "Plug and Play support enabled" + config="${config} --pnp" + else + einfo "Plug and Play support disabled" + config="${config} --nopnp" + fi + + ${S}/Configure \ + --noprompt \ + --kernel=${KV_DIR} \ + --moddir=/lib/modules/${KV_FULL} \ + --target=${D} \ + --arch=$(tc-arch-kernel) \ + --ucc=$(tc-getCC) \ + --kcc=$(tc-getCC) \ + --ld=$(tc-getLD) \ + --uflags="${CFLAGS}" \ + --kflags="$(getfilevar HOSTCFLAGS ${KV_DIR}/Makefile)" \ + --srctree \ + --nox11 \ + ${config} \ + || die "Configure failed" + + ebegin "Saving pcmcia-cs development environment" + echo ${PV} > ${S}/pcmcia-cs-version + cd ${S} + tar -cjf ${T}/pcmcia-cs-build-env.tbz2 . + eend ${?} + + emake all || die "emake all failed" +} + +src_install () { + emake install || die "emake install failed" + + # remove bogus modules.conf file + rm -f ${D}/etc/modules.conf + + # install the pcmcia-cs development environment tarball + # (used by linux-mod.eclass) + insinto /usr/src/pcmcia-cs + doins ${T}/pcmcia-cs-build-env.tbz2 +} + +pkg_postinst() { + einfo + einfo "It is adviced that you re-merge all external PCMCIA modules" + einfo "after installing a new version of ${PN}." + einfo +} |