|
|
inherit eutils linux-info multilib | inherit eutils linux-info multilib |
EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm | EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm |
| |
IUSE="" # don't put pcmcia here, rather in the ebuilds that actually support pcmcia |
IUSE="" |
SLOT="0" | SLOT="0" |
DESCRIPTION="Based on the $ECLASS eclass" | DESCRIPTION="Based on the $ECLASS eclass" |
RDEPEND="kernel_linux? ( virtual/modutils |
RDEPEND="kernel_linux? ( virtual/modutils )" |
pcmcia? ( virtual/pcmcia ) )" |
|
DEPEND="${RDEPEND} | DEPEND="${RDEPEND} |
sys-apps/sed" | sys-apps/sed" |
| |
|
|
fi | fi |
} | } |
| |
unpack_pcmcia_sources() { |
|
# So while the two eclasses exist side-by-side and also the ebuilds inherit |
|
# both we need to check for PCMCIA_SOURCE_DIR, and if we find it, then we |
|
# bail out and assume pcmcia.eclass is working on it. |
|
[[ -n ${PCMCIA_SOURCE_DIR} ]] && return 1 |
|
|
|
if [[ -f "${1}" ]]; then |
|
PCMCIA_SOURCE_DIR="${WORKDIR}/pcmcia-cs/" |
|
|
|
ebegin "Decompressing pcmcia-cs sources" |
|
mkdir -p ${PCMCIA_SOURCE_DIR} |
|
tar -xjf ${1} -C ${PCMCIA_SOURCE_DIR} |
|
eend $? |
|
|
|
if [[ -f ${PCMCIA_SOURCE_DIR}/pcmcia-cs-version ]]; then |
|
PCMCIA_VERSION=$(cat ${PCMCIA_SOURCE_DIR}/pcmcia-cs-version) |
|
einfo "Found pcmcia-cs-${PCMCIA_VERSION}" |
|
fi |
|
fi |
|
} |
|
|
|
# Dummy function for compatibility. |
|
pcmcia_configure() { return 0; } |
|
|
|
pcmcia_src_unpack() { |
|
local pcmcia_tbz="${ROOT}/usr/src/pcmcia-cs/pcmcia-cs-build-env.tbz2" |
|
|
|
# if the kernel has pcmcia support built in, then we just ignore all this. |
|
if linux_chkconfig_present PCMCIA; then |
|
einfo "Kernel based PCMCIA support has been detected." |
|
else |
|
if kernel_is 2 4; then |
|
unpack_pcmcia_sources ${pcmcia_tbz}; |
|
else |
|
einfo "We have detected that you are running a 2.6 kernel" |
|
einfo "but you are not using the built-in PCMCIA support." |
|
einfo "We will assume you know what you are doing, but please" |
|
einfo "consider using the built in PCMCIA support instead." |
|
epause 10 |
|
|
|
unpack_pcmcia_sources ${pcmcia_tbz}; |
|
fi |
|
fi |
|
} |
|
|
|
use_m() { | use_m() { |
# if we haven't determined the version yet, we need too. | # if we haven't determined the version yet, we need too. |
get_version; | get_version; |