Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 97691 Details for
Bug 148572
Proposed x11-drm with Gentoo/FreeBSD support.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
x11-drm.diff
x11-drm.diff (text/plain), 6.76 KB, created by
Javier Villavicencio (RETIRED)
on 2006-09-21 13:09:46 UTC
(
hide
)
Description:
x11-drm.diff
Filename:
MIME Type:
Creator:
Javier Villavicencio (RETIRED)
Created:
2006-09-21 13:09:46 UTC
Size:
6.76 KB
patch
obsolete
>--- x11-drm-20060608.ebuild 2006-09-18 16:36:19 -0300 >+++ x11-drm-20060608-r1.ebuild 2006-09-21 17:04:36 -0300 >@@ -1,6 +1,6 @@ > # Copyright 1999-2006 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 >-# $Header: /var/cvsroot/gentoo-x86/x11-base/x11-drm/x11-drm-20060608.ebuild,v 1.8 2006/09/18 19:15:10 plasmaroo Exp $ >+# $Header: /var/cvsroot/gentoo-x86/x11-base/x11-drm/x11-drm-20060608.ebuild,v 1.6 2006/09/10 17:59:56 ticho Exp $ > > inherit eutils x11 linux-mod > >@@ -34,19 +34,22 @@ > > SLOT="0" > LICENSE="X11" >-KEYWORDS="~alpha ~amd64 ia64 ppc x86" >+KEYWORDS="x86 ~alpha ~ia64 ~ppc ~amd64 ~x86-fbsd" > > DEPEND=">=sys-devel/automake-1.7 > >=sys-devel/autoconf-2.59 > >=sys-devel/libtool-1.5.14 > >=sys-devel/m4-1.4 >- virtual/linux-sources >+ kernel_linux? ( virtual/linux-sources ) >+ kernel_FreeBSD? ( sys-freebsd/freebsd-sources >+ sys-freebsd/freebsd-mk-defs ) > >=sys-apps/portage-2.0.49-r13" > > pkg_setup() { >- get_version >+ # what's 'nicer' here? big if or all these 'use kernel_linux' ? >+ use kernel_linux && get_version > >- if kernel_is 2 6 >+ if use kernel_linux && kernel_is 2 6 > then > if linux_chkconfig_builtin "DRM" > then >@@ -59,13 +62,16 @@ > einfo "work, so you might want to double-check that setting. (CONFIG_AGP)" > echo > fi >- elif kernel_is 2 4 >+ elif use kernel_linux && kernel_is 2 4 > then > if ! linux_chkconfig_present "DRM" > then > die "Please enable DRM support in your kernel configuration. (CONFIG_DRM = y or m)." > echo > fi >+ elif use kernel_FreeBSD >+ then >+ K_RV=${CHOST/*-freebsd/} > fi > > # Set video cards to build for. >@@ -95,6 +101,18 @@ > > cp ${S}/tests/*.c ${SRC_BUILD} > >+ # Do FreeBSD stuff. >+ if use kernel_FreeBSD >+ then >+ # Link in freebsd kernel. >+ ln -s "/usr/src/sys-${K_RV}" "${WORKDIR}/sys" >+ # SUBDIR variable gets to all Makefiles, we need it only in the main one. >+ SUBDIRS=${VIDCARDS//.ko} >+ sed -ie "s:SUBDIR\ =.*:SUBDIR\ =\ drm ${SUBDIRS}:" ${SRC_BUILD}/Makefile >+ fi >+ >+ # if we don't build drmstat/dristat on g/fbsd these may go away... >+ # but, this step goes fine on g/fbsd. > cd ${S} > WANT_AUTOCONF="2.5" WANT_AUTOMAKE="1.7" autoreconf -v --install > } >@@ -102,17 +120,28 @@ > src_compile() { > einfo "Building DRM in ${SRC_BUILD}..." > cd ${SRC_BUILD} >- > # This now uses an M= build system. Makefile does most of the work. >- unset ARCH >- make M="${SRC_BUILD}" \ >- LINUXDIR="${KERNEL_DIR}" \ >- DRM_MODULES="${VIDCARDS}" \ >- modules || die_error >+ if use kernel_linux >+ then >+ unset ARCH >+ make M="${SRC_BUILD}" \ >+ LINUXDIR="${KERNEL_DIR}" \ >+ DRM_MODULES="${VIDCARDS}" \ >+ modules || die_error >+ elif use kernel_FreeBSD >+ then >+ # Environment CFLAGS overwrite kernel CFLAGS which is bad. >+ local svcflags=${CFLAGS}; local svldflags=${LDFLAGS} >+ unset CFLAGS; unset LDFLAGS >+ make NO_WERROR= SYSDIR="${WORKDIR}/sys" \ >+ KMODDIR="/boot/modules" || die "pmake failed." >+ export CFLAGS=${svcflags}; export LDFLAGS=${svldflags} >+ fi > > # Building the programs. These are useful for developers and getting info from DRI and DRM. > # > # libdrm objects are needed for drmstat. >+ # these also go well on g/fbsd. > cd ${S} > econf || die "libdrm configure failed." > emake || die "libdrm build failed." >@@ -121,38 +150,60 @@ > then > echo "Please disable in-kernel DRM support to use this package." > fi >- >- cd ${SRC_BUILD} >+ > # LINUXDIR is needed to allow Makefiles to find kernel release. >- make LINUXDIR="${KERNEL_DIR}" dristat || die "Building dristat failed." >- make LINUXDIR="${KERNEL_DIR}" drmstat || die "Building drmstat failed." >+ cd ${SRC_BUILD} >+ if use kernel_linux >+ then >+ make LINUXDIR="${KERNEL_DIR}" dristat || die "Building dristat failed." >+ make LINUXDIR="${KERNEL_DIR}" drmstat || die "Building drmstat failed." >+ elif use kernel_FreeBSD >+ then >+ echo "Do nothing. for now" >+ # So far i can't make these two compile. >+ # neither on this way: >+ #cd "${S}/tests" >+ #gmake dristat || die "Building dristat failed." >+ #gmake drmstat || die "Building drmstat failed." >+ # And neither the 'linux' way. >+ fi > } > > src_install() { > einfo "Installing DRM..." > cd ${SRC_BUILD} > >- unset ARCH >- kernel_is 2 6 && DRM_KMOD="drm.${KV_OBJ}" >- make KV="${KV_FULL}" \ >- LINUXDIR="${KERNEL_DIR}" \ >- DESTDIR="${D}" \ >- RUNNING_REL="${KV_FULL}" \ >- MODULE_LIST="${VIDCARDS} ${DRM_KMOD}" \ >- install || die "Install failed." >- >- dodoc README.drm >- >- dobin dristat >- dobin drmstat >- >- # Strip binaries, leaving /lib/modules untouched (bug #24415) >- strip_bins \/lib\/modules >- >- # Yoinked from the sys-apps/touchpad ebuild. Thanks to whoever made this. >- keepdir /etc/modules.d >- sed 's:%PN%:'${PN}':g' ${FILESDIR}/modules.d-${PN} > ${D}/etc/modules.d/${PN} >- sed -i 's:%KV%:'${KV_FULL}':g' ${D}/etc/modules.d/${PN} >+ if use kernel_linux >+ then >+ unset ARCH >+ kernel_is 2 6 && DRM_KMOD="drm.${KV_OBJ}" >+ make KV="${KV_FULL}" \ >+ LINUXDIR="${KERNEL_DIR}" \ >+ DESTDIR="${D}" \ >+ RUNNING_REL="${KV_FULL}" \ >+ MODULE_LIST="${VIDCARDS} ${DRM_KMOD}" \ >+ install || die "Install failed." >+ elif use kernel_FreeBSD >+ then >+ dodir "/boot/modules" >+ make install NO_WERROR= DESTDIR="${D}" KMODDIR="/boot/modules" >+ fi >+ >+ dodoc "${S}/linux-core/README.drm" >+ >+ if use kernel_linux >+ then >+ dobin dristat >+ dobin drmstat >+ >+ # Strip binaries, leaving /lib/modules untouched (bug #24415) >+ strip_bins \/lib\/modules >+ >+ # Yoinked from the sys-apps/touchpad ebuild. Thanks to whoever made this. >+ keepdir /etc/modules.d >+ sed 's:%PN%:'${PN}':g' ${FILESDIR}/modules.d-${PN} > ${D}/etc/modules.d/${PN} >+ sed -i 's:%KV%:'${KV_FULL}':g' ${D}/etc/modules.d/${PN} >+ fi > } > > pkg_postinst() { >@@ -170,13 +221,14 @@ > einfo "http://dri.freedesktop.org/wiki/ATIMach64." > fi > >- linux-mod_pkg_postinst >+ use kernel_linux && linux-mod_pkg_postinst > } > > # Functions used above are defined below: > > set_vidcards() { >- set_kvobj >+ use kernel_linux && set_kvobj >+ use kernel_FreeBSD && KV_OBJ="ko" > > POSSIBLE_VIDCARDS="mga tdfx r128 radeon i810 i830 i915 mach64 nv savage > sis via" >@@ -219,9 +271,11 @@ > # Handle exclusions based on the following... > # All trees (0**), Standard only (1**), Others (none right now) > # 2.4 vs. 2.6 kernels >- >- kernel_is 2 4 && mv -f ${PATCHDIR}/*kernel-2.6* ${EXCLUDED} >- kernel_is 2 6 && mv -f ${PATCHDIR}/*kernel-2.4* ${EXCLUDED} >+ if use kernel_linux >+ then >+ kernel_is 2 4 && mv -f ${PATCHDIR}/*kernel-2.6* ${EXCLUDED} >+ kernel_is 2 6 && mv -f ${PATCHDIR}/*kernel-2.4* ${EXCLUDED} >+ fi > > # There is only one tree being maintained now. No numeric exclusions need > # to be done based on DRM tree. >@@ -236,11 +290,14 @@ > } > > get_drm_build_dir() { >- if kernel_is 2 4 >+ if use kernel_linux && kernel_is 2 4 > then > SRC_BUILD="${S}/linux" >- elif kernel_is 2 6 >+ elif use kernel_linux && kernel_is 2 6 > then > SRC_BUILD="${S}/linux-core" >+ elif use kernel_FreeBSD >+ then >+ SRC_BUILD="${S}/bsd-core" > fi > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 148572
:
97690
| 97691