From b74f09f965c83a0ab6ab3e80260a1935c0e5033d Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Mon, 18 Aug 2014 20:15:30 +0200 Subject: eclass/linux-build: Drop compression, handle by kernel per MODULE_COMPRESS --- eclass/linux-build.eclass | 50 ++++++++++++++++++----------------------------- 1 file changed, 19 insertions(+), 31 deletions(-) (limited to 'eclass') diff --git a/eclass/linux-build.eclass b/eclass/linux-build.eclass index 69093ba1..a69ee72e 100644 --- a/eclass/linux-build.eclass +++ b/eclass/linux-build.eclass @@ -39,20 +39,12 @@ BUILDDIR="${WORKDIR}/build" KV_EXTRA="${EXTRAVERSION}" S="${SRCDIR}" -IUSE="build source zlib lzma" -REQUIRED_USE=" - ?? ( zlib lzma ) - zlib? ( build ) - lzma? ( build ) - symlink? ( source ) - " - -DEPEND=" - sys-devel/bc +IUSE="build source" +REQUIRED_USE="symlink? ( source )" + +DEPEND="sys-devel/bc sys-apps/diffutils - || ( - sys-apps/kmod[zlib?,lzma?] - )" + sys-apps/kmod" RDEPEND="" # @FUNCTION: _linux-build_configval @@ -132,6 +124,20 @@ _linux-build_src_prepare_build() { _linux-build_configval FHANDLE || ewarn "CONFIG_FHANDLE is needed for >=sys-fs/udev-210" _linux-build_configval NET || ewarn "CONFIG_NET is needed for >=sys-fs/udev-210" + if _linux-build_configval MODULE_COMPRESS ; then + if _linux-build_configval MODULE_COMPRESS_GZIP ; then + if ! has_version "app-arch/gzip" ; then + die "app-arch/gzip is required for CONFIG_MODULE_COMPRESS_GZIP" + fi + elif _linux-build_configval MODULE_COMPRESS_XZ ; then + if ! has_version "app-arch/xz-utils" ; then + die "app-arch/xz-utils is required for CONFIG_MODULE_COMPRESS_XZ" + fi + else + die "CONFIG_MODULE_COMPRESS needs one of ( CONFIG_MODULE_COMPRESS_GZIP CONFIG_MODULE_COMPRESS_XZ )" + fi + fi + if _linux-build_configval MODULE_SIG ; then if ! has_version "dev-libs/openssl" ; then die "dev-libs/openssl is required for CONFIG_MODULE_SIG" @@ -266,24 +272,6 @@ _linux-build_src_install_build() { INSTALL_MOD_PATH="${WORKDIR}" \ INSTALL_MOD_STRIP="${PORTAGE_STRIP_FLAGS}" - # kmod only support zlib and lzma - # See libkmod/libkmod-util.c / struct kmod_ext kmod_exts - if use zlib || use lzma ; then - local cmp ext - - use zlib && { cmp="gzip -9c" ext="gz" ; } - use lzma && { cmp="xz -9c" ext="xz" ; } - - einfo "Compressing modules" - find "${WORKDIR}/lib/modules" \ - -type f -name "*.ko" \ - | while read ; do - ${cmp} < "${REPLY}" > "${REPLY}.${ext}" \ - || die "${cmp} ${REPLY} failed" - rm "${REPLY}" - done - fi - einfo "Generating modules.dep" depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ || die "depmod failed" -- cgit v1.2.3