Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 3931 Details for
Bug 7940
compiling extra modules for pcmcia-cs-3.2.1
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
improved ebuild to compile pcmcia-cs modules regardless
pcmcia-cs-3.2.1-r1.ebuild (text/plain), 6.09 KB, created by
Alastair Tse (RETIRED)
on 2002-09-15 02:50:54 UTC
(
hide
)
Description:
improved ebuild to compile pcmcia-cs modules regardless
Filename:
MIME Type:
Creator:
Alastair Tse (RETIRED)
Created:
2002-09-15 02:50:54 UTC
Size:
6.09 KB
patch
obsolete
># Copyright 1999-2002 Gentoo Technologies, Inc. ># Distributed under the terms of the GNU General Public License, v2 or later ># $Header: /home/cvsroot/gentoo-x86/sys-apps/pcmcia-cs/pcmcia-cs-3.2.1.ebuild,v 1.1 2002/08/24 07:21:30 cardoe Exp $ > >S=${WORKDIR}/${P} >DESCRIPTION="PCMCIA tools for Linux" >SRC_URI="mirror://sourceforge/pcmcia-cs/${P}.tar.gz > http://ozlabs.org/people/dgibson/dldwd/orinoco-0.12b.tar.gz" > >HOMEPAGE="http://pcmcia-cs.sourceforge.net" >DEPEND="sys-kernel/linux-headers" >RDEPEND="" >SLOT="0" >LICENSE="GPL-2" >KEYWORDS="x86" > ># check arch for configure >if [ ${ARCH} = "x86" ] ; then > MY_ARCH="i386" >else > MY_ARCH="ppc" >fi > ># Note: To use this ebuild, you should have the usr/src/linux symlink to ># the kernel directory that pcmcia-cs should use for configuration. > >src_unpack() { > unpack ${P}.tar.gz > > if [ -z "`use wavelan`" ] ; then > > unpack orinoco-0.12b.tar.gz > cd ${S} > mv ../orinoco-0.12b/hermes*.{c,h} \ > ../orinoco-0.12b/orinoco*.{c,h} \ > ../orinoco-0.12b/ieee802_11.h wireless/ > > fi > > cd ${S} > cp Configure Configure.orig > sed -e 's:usr/man:usr/share/man:g' Configure.orig > Configure > #man pages will now install into /usr/share/man > > cd ${S} > ### As per the SourceForge web site reqs and bug #3400 > # We'll replace all ide_cs with ide-cs > cp etc/config etc/config.orig > sed -e 's:ide_cs:ide-cs:g' etc/config.orig > etc/config > rm -f etc/config.orig > >} > >src_compile() { > local myconf > if [ -n "`use trusted`" ] ; then > myconf="--trust" > else > myconf="--notrust" > fi > > if [ -n "`use apm`" ] ; then > myconf="$myconf --apm" > else > myconf="$myconf --noapm" > fi > > if [ -n "`use pnp`" ] ; then > myconf="$myconf --pnp" > else > myconf="$myconf --nopnp" > fi > > if [ -n "`use nocardbus`" ] ; then > myconf="$myconf --nocardbus" > else > myconf="$myconf --cardbus" > fi > > #use $CFLAGS for user tools, but standard kernel optimizations for the kernel modules (for compatibility) > ./Configure -n \ > --target=${D} \ > --srctree \ > --kernel=/usr/src/linux \ > --arch="${MY_ARCH}" \ > --uflags="$CFLAGS" \ > --kflags="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer" \ > $myconf || die "failed configuring" > # nopnp and noapm are important, because without them the pcmcia-cs > # tools will require a kernel with ISA PnP and/or APM support, > # which cannot be guaranteed. We need to make sure the tools > # work *all* the time, not just some of the time. > > # The --srctree option tells pcmcia-cs to configure for the kernel in /usr/src/linux > # rather than the currently-running kernel. It's Gentoo Linux policy to configure for > # the kernel in /usr/src/linux > emake all || die "failed compiling" > > # compile the wireless modules and client modules even though > # we have pcmcia enabled in the kernel. This gives us more > # driver support without needing the pcmcia-cs controller modules. > > einfo "Compiling modules manually .." > > cd ${S} > if [ -n "`grep -E '^CONFIG_PCMCIA\=y' config.mk`" ]; then > # patch version.h so that they won't complain that > # Card Services is wrong. > cd ${S}/include/pcmcia > > # get kernel CS_RELEASE : > if [ -f /usr/src/linux/include/pcmcia/version.h ]; then > KERNEL_RELEASE=`grep -E '^#define CS_RELEASE ' /usr/src/linux/include/pcmcia/version.h | awk '{print $3}'` > KERNEL_RELEASE_CODE=`grep -E '^#define CS_RELEASE_CODE ' /usr/src/linux/include/pcmcia/version.h | awk '{print $3}'` > else > die "unable to find /usr/src/linux/include/pcmcia/version.h" > fi > > # replace CS_PKG_RELEASE : > if [ -f version.h ]; then > sed "s|\(#define CS_PKG_RELEASE.*\)\".*\"|\1$KERNEL_RELEASE|" version.h > version.h.new > sed "s|\(#define CS_PKG_RELEASE_CODE.*\)0x.*|\1$KERNEL_RELEASE_CODE|" version.h.new > version.h > fi > > # now we compile the modules > cd ${S}/wireless > emake all || die "failed compiling modules" > cd ${S}/clients > emake all || die "failed compiling modules" > fi >} > >src_install () { > > # before we make install - change the /etc/pcmcia/config.opts > # if we compiled the pcmcia modules manually we didn't get > # the cardbus modules, so we replace them with the kernel > # equivalents. > > if [ -n "`grep -E '^CONFIG_PCMCIA\=y' config.mk`" ]; then > cd {S} > if sed -e 's:3c575_cb:3c59x:' etc/config > etc/config.new; then > mv etc/config.new etc/config > fi > fi > > make PREFIX=${D} install || die "failed installing" > > # if we compiled more pcmcia modules, we have to install them as > # well. > > cd ${S} > if [ -n "`grep -E '^CONFIG_PCMCIA\=y' config.mk`" ]; then > cd ${S}/wireless > make PREFIX=${D} install || die "failed installing modules" > cd ${S}/clients > make PREFIX=${D} install || die "failed installing modules" > fi > > cd ${D} > rm -rf etc/rc*.d > # remove X > # this is simply much easier than patching configure or the makefiles > # not to build them in the first place > rm -rf usr/X11R6 > # todo: if they are nstalled, move them to /usr > > insinto /etc/conf.d > newins ${FILESDIR}/${P}-pcmcia.conf pcmcia > > exeinto /etc/pcmcia > doexe ${FILESDIR}/network > > # install our own init script > exeinto /etc/init.d > newexe ${FILESDIR}/${P}-pcmcia.init pcmcia > if [ -z "`use build`" ] > then > cd ${S} > # install docs > dodoc BUGS CHANGES COPYING LICENSE MAINTAINERS README \ > README-2.4 SUPPORTED.CARDS doc/* > else > rm -rf ${D}/usr/share/man > fi > rm -f ${D}/etc/modules.conf > rm -rf ${D}/var/lib/pcmcia > > # if on ppc set the ppc revised config.opts > if [ ${ARCH} = "ppc" ] ; then > insinto /etc/pcmcia > newins ${FILESDIR}/ppc.config.opts config.opts > fi >} > >pkg_postinst() { > einfo "If you have PCMCIA/Cardbus (CONFIG_PCMCIA) enabled under your kernel config" > einfo "this will still install the extra pcmcia modules and fixes the CardServices" > einfo "version mismatch errors." > einfo "" > einfo "If you have PCMCIA/Cardbus (CONFIG_PCMCIA) enabled under your kernel config" > einfo "you should use yenta_socket module, otherwise you should use the i82365" > einfo "module." > einfo "" > einfo "If you *don't* want to use Orinoco drivers or if they don't work for you," > einfo "add +wavelan to USE" >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7940
: 3931 |
3932
|
3933
|
6530