kmod -> kernel-mod, deprecating koutput stuff (applied patch from bug #68453. -r6...
authorBryan Stine <battousai@gentoo.org>
Thu, 4 Nov 2004 21:29:43 +0000 (21:29 +0000)
committerBryan Stine <battousai@gentoo.org>
Thu, 4 Nov 2004 21:29:43 +0000 (21:29 +0000)
x11-base/x11-drm/ChangeLog
x11-base/x11-drm/Manifest
x11-base/x11-drm/files/digest-x11-drm-4.3.0-r6
x11-base/x11-drm/x11-drm-20040827.ebuild

index 7115973fa5ee72f107ffda6b7c6cc81e22b55fc0..0d52ab93327632f64814ec764a8c963f7a0ccb28 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for x11-base/x11-drm
 # Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-base/x11-drm/ChangeLog,v 1.6 2004/11/01 02:26:05 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/x11-drm/ChangeLog,v 1.7 2004/11/04 21:29:43 battousai Exp $
+
+  04 Nov 2004; Bryan Stine <battousai@gentoo.org> x11-drm-20040827.ebuild:
+  Updated 20040827 snapshot ebuild for the kmod deprecation. Thanks to Stefan
+  Schweizer <sschweizer@gmail.com> for the patch. This closes bug #68453.
 
   31 Oct 2004; Donnie Berkholz <spyderous@gentoo.org>; :
   Restore changelog entries from when it was xfree-drm.
index 818de4891333115179ac4a7ed3b62864aba16319..d6cfd4c954be20897385492ab9356afe935086ee 100644 (file)
@@ -1,9 +1,9 @@
+MD5 ca1ffc1ff3194055d760da2fa73c14ed ChangeLog 14883
 MD5 b67cc82ec3e8786dbc0f8f5e7e37bcfc metadata.xml 360
-MD5 ac996d7e1ef197afa6978d08832c6d23 x11-drm-20040827.ebuild 6034
 MD5 e5c172d3adecfbf90820c2320aa6370d x11-drm-4.3.0-r6.ebuild 5741
+MD5 de296fd72719b4173677623770a3872f x11-drm-20040827.ebuild 6090
 MD5 bb032bf32a1ea94e65c245ac3f7f9219 x11-drm-4.3.0-r7.ebuild 7037
-MD5 8b2dc593bf6530e9e393d2589c54caec ChangeLog 14655
 MD5 7774a8ffb259c750552463655c1eee45 files/digest-x11-drm-20040827 252
-MD5 916b08e6047de0eeabce236b45a16b34 files/digest-x11-drm-4.3.0-r6 169
+MD5 1d67ddc03a5c604e0d35b0742623a35c files/digest-x11-drm-4.3.0-r6 169
 MD5 db87006ec48bc9579dcdc989c5ed86d6 files/digest-x11-drm-4.3.0-r7 363
 MD5 88b8c90e440b3db246a7d06cf53640ae files/modules.d-x11-drm 40
index 47da13b6e139bb26decec312e1aee08203dcd19c..d740eb78dfe65eaad6c0a35a9f1e63b1b2219da6 100644 (file)
@@ -1,2 +1,2 @@
 MD5 26820c1cf12ba2b2b71b4a3806875e9c linux-drm-4.3.0-kernelsource-20030714.tar.gz 329112
-MD5 7c6e58d1dc5c5d5f768937c832c08236 xfree-drm-4.3.0-r6-gentoo-0.4.tar.bz2 9280
+MD5 f24e9942f0a2ad38f20782de07777806 xfree-drm-4.3.0-r6-gentoo-0.4.tar.bz2 9289
index 1759fe3f23044282dc5c1e905b5561749bad9d1d..ef192c75744039a43198f34983afa50a20bcc005 100644 (file)
@@ -1,8 +1,8 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-base/x11-drm/x11-drm-20040827.ebuild,v 1.4 2004/10/29 06:34:29 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/x11-drm/x11-drm-20040827.ebuild,v 1.5 2004/11/04 21:29:43 battousai Exp $
 
-inherit eutils x11 kmod
+inherit eutils x11 kernel-mod
 
 IUSE="gatos"
 IUSE_VIDEO_CARDS="3dfx ffb i810 i830 i915 mach64 matrox rage128 radeon savage sis via"
@@ -41,12 +41,6 @@ pkg_setup() {
                die "Please set at least one video card in VIDEO_CARDS in make.conf or the environment. Possible VIDEO_CARDS values are: ${IUSE_VIDEO_CARDS}."
        fi
 
-#      if [ "`is_kernel 2 6`" -a ! "`is_koutput`" -a "${KV_PATCH}" -lt 6 ]
-#      then
-#                      eerror "Building DRM against 2.6 kernels without proper build systems is unsupported."
-#                      die "Non-koutput and non-M 2.6 kernel tree"
-#      fi
-
        if [ "${ARCH}" != "sparc" ] && use video_cards_ffb
        then
                die "The ffb driver is for sparc-specific hardware. Please remove it from your VIDEO_CARDS."
@@ -59,9 +53,12 @@ pkg_setup() {
                then
                        die "Remove gatos from your USE flags. It does not work with cards other than radeon and rage128."
                fi
-               is_kernel 2 6 && die "GATOS does not work with 2.6 kernels. Only 2.4 is supported at this time."
+               kernel-mod_is_2_6_kernel && die "GATOS does not work with 2.6 kernels. Only 2.4 is supported at this time."
        fi
 
+       ewarn "Using koutput kernels is now deprecated. If you use a koutput kernel, please"
+       ewarn "switch to kernel >=2.6.6 with a normal build system."
+
        # Set video cards to build for.
        set_vidcards
 
@@ -93,11 +90,10 @@ src_unpack() {
 src_compile() {
        einfo "Building DRM..."
 
-       # This now uses a kmod-driven build system. Makefile does most of the work.
+       # This now uses an M= build system. Makefile does most of the work.
        unset ARCH
        make M="${S}" \
                LINUXDIR="${ROOT}/usr/src/linux" \
-               LINUXOUTPUT="${KV_OUTPUT}" \
                DRM_MODULES="${VIDCARDS}" \
                DRMSRCDIR="${S}" \
                modules || die_error
@@ -115,7 +111,6 @@ src_install() {
        unset ARCH
        make KV="${KV}" \
                LINUXDIR="${ROOT}/usr/src/linux" \
-               LINUXOUTPUT="${KV_OUTPUT}" \
                DRM_MODULES="${VIDCARDS}" \
                DESTDIR="${D}" \
                install || die "Install failed."
@@ -138,11 +133,6 @@ src_install() {
 }
 
 pkg_postinst() {
-       if [ "${ROOT}" = "/" ]
-       then
-               /sbin/modules-update
-       fi
-
        if use video_cards_sis
        then
                einfo "SiS direct rendering only works on 300 series chipsets."
@@ -156,11 +146,22 @@ pkg_postinst() {
                einfo "For more information, see:"
                einfo "http://dri.sourceforge.net/cgi-bin/moin.cgi/ATIMach64?value=CategoryHardwareChipset."
        fi
+
+       einfo "Checking kernel module dependencies"
+       test -r "${ROOT}/usr/src/linux/System.map" && \
+               depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV}
 }
 
 # Functions used above are defined below:
 
 set_vidcards() {
+       if kernel-mod_is_2_6_kernel
+       then
+               KV_OBJ="ko"
+       else
+               KV_OBJ="o"
+       fi
+
        # To get the kernel module extension
 #      get_kernel_info
 
@@ -199,8 +200,8 @@ patch_prepare() {
        #     GATOS (2xx*) vs. Standard trees (1xx*)
        #     2.4 vs. 2.6 kernels
 
-       is_kernel 2 4 && mv -f ${PATCHDIR}/*kernel-2.6* ${EXCLUDED}
-       is_kernel 2 6 && mv -f ${PATCHDIR}/*kernel-2.4* ${EXCLUDED}
+       kernel-mod_is_2_4_kernel && mv -f ${PATCHDIR}/*kernel-2.6* ${EXCLUDED}
+       kernel-mod_is_2_6_kernel && mv -f ${PATCHDIR}/*kernel-2.4* ${EXCLUDED}
 
        if use gatos
        then
@@ -217,7 +218,7 @@ patch_prepare() {
 die_error() {
        eerror "Portage could not build the DRM modules. If you see an ACCESS DENIED error,"
        eerror "this could mean that you were using an unsupported kernel build system. All"
-       eerror "2.4 kernels are supported, but only 2.6 kernels with koutput enabled or"
-       eerror "kernels 2.6.6 and above are supported."
+       eerror "2.4 kernels are supported, but only 2.6 kernels at least as new as 2.6.6"
+       eerror "are supported."
        die "Unable to build DRM modules."
 }