/[gentoo-x86]/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-4.1.8.ebuild
Gentoo

Contents of /x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-4.1.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Thu Apr 26 18:22:05 2012 UTC (2 years, 7 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Version bump. Removed old.

(Portage version: 2.2.0_alpha101/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-4.1.8.ebuild,v 1.5 2012/04/09 12:05:29 maekke Exp $
4
5 EAPI=2
6
7 inherit eutils linux-mod multilib python versionator toolchain-funcs
8
9 MY_P=VirtualBox-${PV}
10 DESCRIPTION="VirtualBox video driver"
11 HOMEPAGE="http://www.virtualbox.org/"
12 SRC_URI="http://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="amd64 x86"
17 IUSE="dri"
18
19 RDEPEND="x11-base/xorg-server[-minimal]
20 x11-libs/libXcomposite"
21 DEPEND="${RDEPEND}
22 >=dev-util/kbuild-0.1.999
23 =dev-lang/python-2*
24 >=dev-lang/yasm-0.6.2
25 sys-devel/dev86
26 sys-power/iasl
27 x11-proto/fontsproto
28 x11-proto/randrproto
29 x11-proto/renderproto
30 x11-proto/xextproto
31 x11-proto/xineramaproto
32 x11-proto/xproto
33 x11-libs/libXdmcp
34 x11-libs/libXau
35 x11-libs/libX11
36 x11-libs/libXfixes
37 x11-libs/libXext
38 dri? ( x11-proto/xf86driproto
39 >=x11-libs/libdrm-2.4.5 )"
40
41 BUILD_TARGETS="all"
42 BUILD_TARGET_ARCH="${ARCH}"
43 MODULE_NAMES="vboxvideo(misc:${WORKDIR}/vboxvideo_drm:${WORKDIR}/vboxvideo_drm)"
44
45 S="${WORKDIR}/${MY_P}_OSE"
46
47 QA_TEXTRELS_x86="usr/lib/VBoxOGL.so"
48
49 pkg_setup() {
50 linux-mod_pkg_setup
51 BUILD_PARAMS="KERN_DIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
52
53 python_set_active_version 2
54 python_pkg_setup
55 }
56
57 src_prepare() {
58 # Prepare the vboxvideo_drm sources and Makefile in ${WORKDIR}
59 cp -a "${S}"/src/VBox/Additions/linux/drm \
60 "${WORKDIR}/vboxvideo_drm" || die "cannot copy vboxvideo_drm directory"
61 cp "${FILESDIR}/${PN}-3-vboxvideo_drm.makefile" \
62 "${WORKDIR}/vboxvideo_drm/Makefile" || die "cannot copy vboxvideo_drm Makefile"
63
64 # stupid new header references...
65 for vboxheader in {product,version}-generated.h ; do
66 ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
67 "${WORKDIR}/vboxvideo_drm/${vboxheader}"
68 done
69
70 # Remove shipped binaries (kBuild,yasm), see bug #232775
71 rm -rf kBuild/bin tools
72
73 # Disable things unused or splitted into separate ebuilds
74 cp "${FILESDIR}/${PN}-3-localconfig" LocalConfig.kmk
75
76 # Ugly hack to build the opengl part of the video driver
77 epatch "${FILESDIR}/${PN}-2.2.0-enable-opengl.patch"
78
79 # unset useless/problematic checks in configure
80 epatch "${FILESDIR}/${PN}-3.2.8-mesa-check.patch" \
81 "${FILESDIR}/${PN}-4-makeself-check.patch" \
82 "${FILESDIR}/${PN}-4-mkisofs-check.patch"
83
84 # Patch to link with lazy on hardened #394757
85 if gcc-specs-now ; then
86 epatch "${FILESDIR}/${PN}-link-lazy.patch"
87 fi
88 }
89
90 src_configure() {
91 # build the user-space tools, warnings are harmless
92 ./configure --nofatal \
93 --disable-xpcom \
94 --disable-sdl-ttf \
95 --disable-pulse \
96 --disable-alsa \
97 --build-headless || die "configure failed"
98 source ./env.sh
99 }
100
101 src_compile() {
102 for each in /src/VBox/{Runtime,Additions/common/VBoxGuestLib} \
103 /src/VBox/{GuestHost/OpenGL,Additions/x11/x11stubs,Additions/common/crOpenGL} \
104 /src/VBox/Additions/x11/vboxvideo ; do
105 cd "${S}"${each}
106 MAKE="kmk" emake TOOL_YASM_AS=yasm \
107 KBUILD_PATH="${S}/kBuild" \
108 || die "kmk failed"
109 done
110
111 if use dri; then
112 # Now creating the kernel modules. We must do this _after_
113 # we compiled the user-space tools as we need two of the
114 # automatically generated header files. (>=3.2.0)
115 linux-mod_src_compile
116 fi
117 }
118
119 src_install() {
120 if use dri; then
121 linux-mod_src_install
122 fi
123
124 cd "${S}/out/linux.${ARCH}/release/bin/additions"
125 insinto /usr/$(get_libdir)/xorg/modules/drivers
126
127 # xorg-server-1.11.x
128 if has_version ">=x11-base/xorg-server-1.11" ; then
129 newins vboxvideo_drv_111.so vboxvideo_drv.so
130 # xorg-server-1.10.x
131 elif has_version ">=x11-base/xorg-server-1.10" ; then
132 newins vboxvideo_drv_110.so vboxvideo_drv.so
133 # xorg-server-1.9.x
134 else
135 newins vboxvideo_drv_19.so vboxvideo_drv.so
136 fi
137
138 # Guest OpenGL driver
139 insinto /usr/$(get_libdir)
140 doins -r VBoxOGL* || die
141
142 if use dri ; then
143 dosym /usr/$(get_libdir)/VBoxOGL.so /usr/$(get_libdir)/dri/vboxvideo_dri.so
144 fi
145 }
146
147 pkg_postinst() {
148 elog "You need to edit the file /etc/X11/xorg.conf and set:"
149 elog ""
150 elog " Driver \"vboxvideo\""
151 elog ""
152 elog "in the Graphics device section (Section \"Device\")"
153 elog ""
154 if use dri; then
155 elog "To use the kernel drm video driver, please add:"
156 elog "\"vboxvideo\" to:"
157 if has_version sys-apps/openrc; then
158 elog "/etc/conf.d/modules"
159 else
160 elog "/etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}"
161 fi
162 elog ""
163 fi
164 }

  ViewVC Help
Powered by ViewVC 1.1.20