--- pcmcia.eclass.bak 2004-02-08 21:03:27.000000000 -0500 +++ pcmcia.eclass.bak 2004-02-09 01:16:36.854560960 -0500 @@ -39,6 +39,7 @@ SRC_URI="pcmcia? ( mirror://sourceforge/pcmcia-cs/${PCMCIA_BASE_VERSION}.tar.gz \ http://dev.gentoo.org/~latexer/files/patches/${PCMCIA_BASE_VERSION}-module-init-tools.diff.gz http://dev.gentoo.org/~latexer/files/patches/${PCMCIA_BASE_VERSION}-SMP-fix.diff.gz + http://dev.gentoo.org/~latexer/files/patches/${PCMCIA_BASE_VERSION}-koutput.diff.gz http://dev.gentoo.org/~latexer/files/patches/${PATCH_TO_3_2_6} \ http://dev.gentoo.org/~latexer/files/patches/${PATCH_TO_3_2_7} )" @@ -52,10 +53,17 @@ pcmcia_src_unpack() { + if [ -z "${KV_OUTPUT}" ] + then + eerror "pcmcia_src_unpack() must be called after kernel-mod_src_unpack()" + error "so the build environment is sane." + die "pcmcia_src_unpack() called in invalid context" + fi + cd ${WORKDIR} if [ -n "`use pcmcia`" ]; then - if egrep '^CONFIG_PCMCIA=[ym]' /usr/src/linux/.config >&/dev/null + if egrep '^CONFIG_PCMCIA=[ym]' ${KV_OUTPUT}/.config >&/dev/null then # Sadly, we still need to download these sources in SRC_URI # til portage can handle more dynamic SRC_URIs @@ -68,6 +76,7 @@ unpack ${PCMCIA_BASE_VERSION}.tar.gz cd ${PCMCIA_SOURCE_DIR} epatch ${DISTDIR}/${PCMCIA_BASE_VERSION}-module-init-tools.diff.gz + epatch ${DISTDIR}/${PCMCIA_BASE_VERSION}-koutput.diff.gz epatch ${DISTDIR}/${PCMCIA_BASE_VERSION}-SMP-fix.diff.gz PCMCIA_CS_EBUILD=(/var/db/pkg/sys-apps/pcmcia-cs-*/pcmcia-cs-*.ebuild) ## use bash globbing if [ ! -f "${PCMCIA_CS_EBUILD}" ]; then @@ -97,7 +106,7 @@ pcmcia_configure() { if [ -n "`use pcmcia`" ]; then - if ! egrep '^CONFIG_PCMCIA=[ym]' /usr/src/linux/.config >&/dev/null + if ! egrep '^CONFIG_PCMCIA=[ym]' ${KV_OUTPUT}/.config >&/dev/null then cd ${PCMCIA_SOURCE_DIR} local myarch @@ -114,6 +123,7 @@ --target=${D} \ --srctree \ --kernel=/usr/src/linux \ + --koutput=${KV_OUTPUT} \ --kflags="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer" \ --arch="${myarch}" \ --uflags="${CFLAGS}" || die "failed configuring pcmcia-cs"