Allow users to compile without old modutils via USE=no-old-linux #43671 by Christophe...
authorMike Frysinger <vapier@gentoo.org>
Sun, 3 Oct 2004 09:44:09 +0000 (09:44 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sun, 3 Oct 2004 09:44:09 +0000 (09:44 +0000)
sys-apps/module-init-tools/ChangeLog
sys-apps/module-init-tools/Manifest
sys-apps/module-init-tools/module-init-tools-3.0-r2.ebuild

index 8311fdcb7fa34c7099f48fbd43b4e0bbe3913296..b95db9a9666442770c59d548cd463f84c66b0324 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for sys-apps/module-init-tools
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/ChangeLog,v 1.69 2004/10/03 06:40:46 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/ChangeLog,v 1.70 2004/10/03 09:44:09 vapier Exp $
+
+  03 Oct 2004; Mike Frysinger <vapier@gentoo.org>
+  module-init-tools-3.0-r2.ebuild:
+  Allow users to compile without old modutils via USE=no-old-linux #43671 by
+  Christophe Saout.
 
   03 Oct 2004; Mike Frysinger <vapier@gentoo.org>
   module-init-tools-3.0-r2.ebuild:
index 8e400f6a6ab526a1de3ae134bcc0756260ca21df..087fe84c9b53fd9487b15173d6f80233cfeed221 100644 (file)
@@ -1,9 +1,9 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 5405ce61dcbe6feb1b365f2e030c5cdc ChangeLog 13605
+MD5 ec9bb45f8eefb40291acb0500b8e331b ChangeLog 13788
 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
-MD5 cbcb04474eda7d3c27c48b869c5e65e5 module-init-tools-3.0-r2.ebuild 5110
+MD5 5ac54064b74d6525808079a21a126c78 module-init-tools-3.0-r2.ebuild 5336
 MD5 83210e779956a7d7b917a6fb8202dd4b files/digest-module-init-tools-3.0-r2 142
 MD5 d179298a960a2576683689fe19818c8b files/generate-modprobe-assume-kernel.patch 3767
 MD5 07aa415fd57ac42cd0c11527edc9782d files/module-init-tools-0.9.15-legacy-modext-support.patch 481
@@ -11,7 +11,7 @@ MD5 060ce311606657915548168939e965b4 files/modutils-2.4.22-no-above-below.patch
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.9.10 (GNU/Linux)
 
-iD8DBQFBX574HTu7gpaalycRAk9uAJ97krl7/ekMbT1uUN7F0Hr6UPuJ0wCfVXjw
-uNHWfL3OmTsFSLLzSYTafsw=
-=t6nr
+iD8DBQFBX8nzHTu7gpaalycRAr8YAKCXvDyj6S1rR4zMTkAEadW5S54l+QCdHNCf
+Bb/F2OA3MNzWXr/manh+Pfw=
+=0RrN
 -----END PGP SIGNATURE-----
index 239ef91f250b057b584bce213cc647e9273b8349..63876b5f726a602e454276f1543b9bb842ce86d9 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.0-r2.ebuild,v 1.9 2004/10/03 06:40:46 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.0-r2.ebuild,v 1.10 2004/10/03 09:44:09 vapier Exp $
 
 # This ebuild includes backwards compatability for stable 2.4 kernels
 
@@ -13,12 +13,12 @@ DESCRIPTION="Kernel module tools for the development kernel >=2.5.48"
 HOMEPAGE="http://www.kernel.org/pub/linux/kernel/people/rusty/modules"
 SRC_URI="mirror://kernel/linux/kernel/people/rusty/modules/${MYP}.tar.bz2
        mirror://kernel/linux/kernel/people/rusty/modules/old/${MYP}.tar.bz2
-       mirror://kernel/linux/utils/kernel/modutils/v2.4/modutils-${MODUTILS_PV}.tar.bz2"
+       !no-old-linux? ( mirror://kernel/linux/utils/kernel/modutils/v2.4/modutils-${MODUTILS_PV}.tar.bz2 )"
 
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86"
-IUSE=""
+IUSE="no-old-linux"
 
 DEPEND="virtual/libc
        sys-libs/zlib
@@ -36,8 +36,10 @@ src_unpack() {
        # together.
        #
        # <drobbins@gentoo.org> (26 Mar 2003)
-       cd ${WORKDIR}/modutils-${MODUTILS_PV}
-       epatch ${FILESDIR}/modutils-2.4.22-no-above-below.patch
+       if ! use no-old-linux ; then
+               cd ${WORKDIR}/modutils-${MODUTILS_PV}
+               epatch ${FILESDIR}/modutils-2.4.22-no-above-below.patch
+       fi
 
        # Support legacy .o modules
        cd ${S}; epatch ${FILESDIR}/${PN}-0.9.15-legacy-modext-support.patch
@@ -55,26 +57,27 @@ src_unpack() {
 
        cd ${S}
        gnuconfig_update
-       cp config.{guess,sub} ${WORKDIR}/modutils-${MODUTILS_PV}/
+       if ! use no-old-linux ; then
+               cp config.{guess,sub} ${WORKDIR}/modutils-${MODUTILS_PV}/
+       fi
 }
 
 src_compile() {
        filter-flags -fPIC
 
-       einfo "Building modutils..."
-       cd ${WORKDIR}/modutils-${MODUTILS_PV}
-       econf \
-               --disable-strip \
-               --prefix=/ \
-               --enable-insmod-static \
-               --disable-zlib \
-               || die "econf failed"
-       local mymake=""
-       if [ "${ARCH}" = "hppa" ]
-       then
-               mymake="ARCH=hppa"
+       if ! use no-old-linux ; then
+               einfo "Building modutils..."
+               cd ${WORKDIR}/modutils-${MODUTILS_PV}
+               econf \
+                       --disable-strip \
+                       --prefix=/ \
+                       --enable-insmod-static \
+                       --disable-zlib \
+                       || die "econf failed"
+               local mymake=""
+               [ "${ARCH}" = "hppa" ] && mymake="ARCH=hppa"
+               emake ${mymake} || die "emake modutils failed"
        fi
-       emake ${mymake} || die "emake modutils failed"
 
        einfo "Building module-init-tools..."
        cd ${S}
@@ -86,56 +89,56 @@ src_compile() {
 }
 
 src_install() {
-       local mymake=""
-       if [ "${ARCH}" = "hppa" ]
-       then
-               mymake="ARCH=hppa"
+       if ! use no-old-linux ; then
+               local mymake=""
+               [ "${ARCH}" = "hppa" ] && mymake="ARCH=hppa"
+               cd ${WORKDIR}/modutils-${MODUTILS_PV}
+               einstall prefix="${D}" ${mymake}
+
+               docinto modutils-${MODUTILS_PV}
+               dodoc CREDITS ChangeLog NEWS README TODO
+
+               cd ${S}
+               # This copies the old version of modutils to *.old so it still works
+               # with kernels <= 2.4; new versions will execve() the .old version if
+               # a 2.4 kernel is running...
+               # This code was borrowed from the module-init-tools Makefile
+               local runme=
+               local f=
+               for f in lsmod modprobe rmmod depmod insmod insmod.static modinfo
+               do
+                       if [ -L ${D}/sbin/${f} ]
+                       then
+                               einfo "Moving symlink $f to ${f}.old"
+                               #runme = the target of the symlink with a .old tagged on.
+                               runme="`ls -l ${D}/sbin/${f} | sed 's/.* -> //'`.old"
+                               [ ! -e ${D}/sbin/${runme} ] || einfo "${D}/sbin/${runme} not found"
+                               dosym $runme /sbin/${f} || die
+                       elif [ -e ${D}/sbin/${f} ]
+                       then
+                               einfo "Moving executable $f to ${f}.old"
+                       fi
+                       mv -f ${D}/sbin/${f} ${D}/sbin/${f}.old
+               done
+               # Move the man pages as well.  We only do this for the man pages of the
+               # tools that module-init-tools will replace.
+               for f in ${D}/usr/share/man/man8/{lsmod,modprobe,rmmod,depmod,insmod}.8
+               do
+                       mv -f ${f} ${f%\.*}.old.${f##*\.}
+               done
+               # Fix the ksyms links #35601
+               for f in ksyms kallsyms ; do
+                       dosym insmod.old /sbin/${f}
+                       dosym insmod.static.old /sbin/${f}.static
+               done
        fi
-       cd ${WORKDIR}/modutils-${MODUTILS_PV}
-       einstall prefix="${D}" ${mymake}
-
-       docinto modutils-${MODUTILS_PV}
-       dodoc CREDITS ChangeLog NEWS README TODO
 
        cd ${S}
-       # This copies the old version of modutils to *.old so it still works
-       # with kernels <= 2.4; new versions will execve() the .old version if
-       # a 2.4 kernel is running...
-       # This code was borrowed from the module-init-tools Makefile
-       local runme=
-       local f=
-       for f in lsmod modprobe rmmod depmod insmod insmod.static modinfo
-       do
-               if [ -L ${D}/sbin/${f} ]
-               then
-                       einfo "Moving symlink $f to ${f}.old"
-                       #runme = the target of the symlink with a .old tagged on.
-                       runme="`ls -l ${D}/sbin/${f} | sed 's/.* -> //'`.old"
-                       [ ! -e ${D}/sbin/${runme} ] || einfo "${D}/sbin/${runme} not found"
-                       dosym $runme /sbin/${f} || die
-               elif [ -e ${D}/sbin/${f} ]
-               then
-                       einfo "Moving executable $f to ${f}.old"
-               fi
-               mv -f ${D}/sbin/${f} ${D}/sbin/${f}.old
-       done
-       # Move the man pages as well.  We only do this for the man pages of the
-       # tools that module-init-tools will replace.
-       for f in ${D}/usr/share/man/man8/{lsmod,modprobe,rmmod,depmod,insmod}.8
-       do
-               mv -f ${f} ${f%\.*}.old.${f##*\.}
-       done
-       # Fix the ksyms links #35601
-       for f in ksyms kallsyms ; do
-               dosym insmod.old /sbin/${f}
-               dosym insmod.static.old /sbin/${f}.static
-       done
-
        einstall prefix=${D}
 
        # Install compat symlink
        dosym ../bin/lsmod /sbin/lsmod
-       dosym ../sbin/insmod.old /bin/lsmod.old
+       use no-old-linux || dosym ../sbin/insmod.old /bin/lsmod.old
        # Install the modules.conf2modprobe.conf tool, so we can update
        # modprobe.conf.
        into /