Gentoo Archives: gentoo-commits

From: "Jeffrey Gardner (je_fro)" <je_fro@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-drivers/ati-drivers: ChangeLog ati-drivers-8.452.ebuild
Date: Fri, 25 Jan 2008 05:15:04
Message-Id: E1JIGu4-0002na-0Y@stork.gentoo.org
1 je_fro 08/01/25 05:15:00
2
3 Modified: ChangeLog
4 Added: ati-drivers-8.452.ebuild
5 Log:
6 The latest and greatest driver from ATI, thanks to Jory Pratt.
7 (Portage version: 2.1.4)
8
9 Revision Changes Path
10 1.104 x11-drivers/ati-drivers/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?rev=1.104&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?rev=1.104&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?r1=1.103&r2=1.104
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v
19 retrieving revision 1.103
20 retrieving revision 1.104
21 diff -u -r1.103 -r1.104
22 --- ChangeLog 24 Dec 2007 19:16:46 -0000 1.103
23 +++ ChangeLog 25 Jan 2008 05:14:59 -0000 1.104
24 @@ -1,6 +1,12 @@
25 # ChangeLog for x11-drivers/ati-drivers
26 -# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.103 2007/12/24 19:16:46 je_fro Exp $
28 +# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
29 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.104 2008/01/25 05:14:59 je_fro Exp $
30 +
31 +*ati-drivers-8.452 (25 Jan 2008)
32 +
33 + 25 Jan 2008; Jeff Gardner <je_fro@g.o>
34 + +files/8.452/ati-powermode-opt-path-2.patch, +ati-drivers-8.452.ebuild:
35 + The latest and greatest from ATI, thanks to Jory Pratt.
36
37 24 Dec 2007; Jeff Gardner <je_fro@g.o>
38 files/8.443.1/ati-powermode-opt-path-2.patch,
39
40
41
42 1.1 x11-drivers/ati-drivers/ati-drivers-8.452.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.452.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.452.ebuild?rev=1.1&content-type=text/plain
46
47 Index: ati-drivers-8.452.ebuild
48 ===================================================================
49 # Copyright 1999-2008 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.452.ebuild,v 1.1 2008/01/25 05:14:59 je_fro Exp $
52
53 IUSE="acpi debug"
54
55 inherit eutils multilib linux-mod toolchain-funcs versionator
56
57 DESCRIPTION="Ati precompiled drivers for recent chipsets"
58 HOMEPAGE="http://www.ati.com"
59 ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
60 SRC_URI="${ATI_URL}/ati-driver-installer-8-01-x86.x86_64.run"
61
62 LICENSE="AMD GPL-2 QPL-1.0 as-is"
63 KEYWORDS="~amd64 ~x86"
64
65 # The portage dep is for COLON_SEPARATED support in env-update.
66 # The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update.
67 RDEPEND="x11-base/xorg-server
68 !x11-apps/ati-drivers-extra
69 >=app-admin/eselect-1.0.9
70 app-admin/eselect-opengl
71 =virtual/libstdc++-3.3*
72 amd64? ( app-emulation/emul-linux-x86-xlibs )
73 acpi? (
74 x11-apps/xauth
75 sys-power/acpid
76 )
77 x11-libs/libXrandr
78 >=sys-apps/portage-2.1.1-r1"
79
80 DEPEND="${RDEPEND}
81 x11-proto/xf86miscproto
82 x11-proto/xf86vidmodeproto"
83
84 EMULTILIB_PKG="true"
85
86 QA_EXECSTACK_x86="usr/lib/dri/fglrx_dri.so
87 usr/lib/opengl/ati/lib/libGL.so.1.2
88 opt/bin/amdcccle"
89 QA_EXECSTACK_amd64="usr/lib64/dri/fglrx_dri.so
90 usr/lib32/dri/fglrx_dri.so
91 usr/lib64/opengl/ati/lib/libGL.so.1.2
92 usr/lib32/opengl/ati/lib/libGL.so.1.2
93 opt/bin/amdcccle"
94 QA_TEXTRELS_x86="usr/lib/dri/fglrx_dri.so
95 usr/lib/xorg/modules/drivers/fglrx_drv.so
96 usr/lib/opengl/ati/lib/libGL.so.1.2
97 usr/lib/xorg/modules/glesx.so"
98 QA_TEXTRELS_amd64="
99 usr/lib64/opengl/ati/lib/libGL.so.1.2
100 usr/lib32/opengl/ati/lib/libGL.so.1.2
101 usr/lib64/dri/fglrx_dri.so
102 usr/lib32/dri/fglrx_dri.so
103 usr/lib32/xorg/modules/glesx.so
104 usr/lib64/xorg/modules/glesx.so"
105
106 S="${WORKDIR}"
107
108 pkg_setup() {
109
110 # Define module dir.
111 MODULE_DIR="${S}/common/lib/modules/fglrx/build_mod"
112
113 #check kernel and sets up KV_OBJ
114 MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
115 BUILD_TARGETS="kmod_build"
116 linux-mod_pkg_setup
117 BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"
118
119 if ! kernel_is 2 6; then
120 eerror "Need a 2.6 kernel to compile against!"
121 die "Need a 2.6 kernel to compile against!"
122 fi
123
124 if kernel_is ge 2 6 24; then
125 CONFIG_CHECK="PCI_LEGACY"
126 ERROR_PCI_LEGACY="${P} requires support for pci_find_slot (CONFIG_PCI_LEGACY)."
127 fi
128
129 if ! linux_chkconfig_present MTRR; then
130 ewarn "You don't have MTRR support enabled, the direct rendering will not work."
131 fi
132
133 if linux_chkconfig_builtin DRM; then
134 ewarn "You have DRM support enabled builtin, the direct rendering will not work."
135 fi
136
137 if ! linux_chkconfig_present AGP && \
138 ! linux_chkconfig_present PCIEPORTBUS; then
139 ewarn "You need AGP and/or PCI Express support for direct rendering to work."
140 fi
141
142 if linux_chkconfig_present PARAVIRT; then
143 eerror "The current ati-drivers don't compile when having"
144 eerror "paravirtualization active due to GPL symbol export"
145 eerror "restrictions."
146 eerror "Please disable it:"
147 eerror " CONFIG_PARAVIRT=n"
148 eerror "in /usr/src/linux/.config or"
149 eerror " Processor type and features -->"
150 eerror " [ ] Paravirtualization support (EXPERIMENTAL)"
151 eerror "in 'menuconfig'"
152 die "CONFIG_PARAVIRT enabled"
153 fi
154
155 # Only support xorg-server >=1.1
156 BASE_DIR="${S}/x710"
157
158 # This is used like $(get_libdir) for paths in ati's package.
159 if use amd64 ; then
160 BASE_DIR="${BASE_DIR}_64a"
161 PKG_LIBDIR=lib64
162 ARCH_DIR="${S}/arch/x86_64"
163 else
164 PKG_LIBDIR=lib
165 ARCH_DIR="${S}/arch/x86"
166 fi
167 }
168
169 src_unpack() {
170 #Switching to a standard way to extract the files since otherwise no signature file
171 #would be created
172 local src="${DISTDIR}/${A}"
173 sh "${src}" --extract "${S}" 2&>1 /dev/null
174
175 # These are the userspace utilities that we also have source for.
176 # We rebuild these later.
177 rm \
178 "${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \
179 "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \
180 || die "bin rm failed"
181
182 if use debug; then
183 # Enable debug mode in the Source Code.
184 sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
185 "${MODULE_DIR}/firegl_public.c" \
186 || die "Failed to enable debug output."
187 fi
188
189 if use acpi; then
190 sed -i \
191 -e "s:/var/lib/xdm/authdir/:/etc/X11/xdm/authdir/:" \
192 -e "s:/var/lib/gdm/:/var/gdm/:" \
193 -e "s/#ffff#/#ffff##:.*MIT-MAGIC-COOKIE/" \
194 "${S}/common/etc/ati/authatieventsd.sh" \
195 || die "sed failed."
196
197 # Since "who" is in coreutils, we're using that one instead of "finger".
198 sed -i -e 's:finger:who:' \
199 "${S}/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \
200 || die "Replacing 'finger' with 'who' failed."
201 # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and
202 # add funktion to detect default state.
203 epatch "${FILESDIR}"/${PV}/ati-powermode-opt-path-2.patch
204 fi
205
206 pushd ${MODULE_DIR} >/dev/null
207 ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
208 || die "symlinking precompiled core failed"
209
210 convert_to_m 2.6.x/Makefile || die "convert_to_m failed"
211
212 # When built with ati's make.sh it defines a bunch of macros if
213 # certain .config values are set, falling back to less reliable
214 # detection methods if linux/autoconf.h is not available. We
215 # simply use the linux/autoconf.h settings directly, bypassing the
216 # detection script.
217 sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed"
218 sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \
219 || die "MODVERSIONS sed failed"
220 popd >/dev/null
221
222 mkdir extra || die "mkdir failed"
223 cd extra
224 unpack ./../common/usr/src/ati/fglrx_sample_source.tgz
225 sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \
226 lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
227 # Add a category.
228 mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
229 cd ..
230 }
231
232 src_compile() {
233 linux-mod_src_compile
234
235 einfo "Building fgl_glxgears"
236 cd "${S}"/extra/fgl_glxgears
237 # These extra libs/utils either have an Imakefile that does not
238 # work very well without tweaking or a Makefile ignoring CFLAGS
239 # and the like. We bypass those.
240
241 # The -DUSE_GLU is needed to compile using nvidia headers
242 # according to a comment in ati-drivers-extra-8.33.6.ebuild.
243 "$(tc-getCC)" -o fgl_fglxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
244 -I"${S}"/common/usr/include fgl_glxgears.c \
245 -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
246
247 einfo "Building fglrx_gamma lib"
248 cd "${S}"/extra/lib/fglrx_gamma
249 "$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
250 -DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
251 -lXext || die "fglrx_gamma lib build failed"
252 ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
253 ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"
254
255 einfo "Building fglrx_gamma util"
256 cd "${S}"/extra/programs/fglrx_gamma
257 "$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
258 -I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
259 fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
260 || die "fglrx_gamma util build failed"
261
262 }
263
264 src_install() {
265 linux-mod_src_install
266
267 # We can do two things here, and neither of them is very nice.
268
269 # For direct rendering libGL has to be able to load one or more
270 # dri modules (files ending in _dri.so, like fglrx_dri.so).
271 # Gentoo's mesa looks for these files in the location specified by
272 # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded
273 # location /usr/$(get_libdir)/dri. Ati's libGL does the same
274 # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri
275 # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64
276 # 64bit. So we can either put the .so files in that (unusual,
277 # compared to "normal" mesa libGL) location or set
278 # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug
279 # 101539.
280
281 # The problem with this approach is that LIBGL_DRIVERS_PATH
282 # *overrides* the default hardcoded location, it does not extend
283 # it. So if ati-drivers is merged but a non-ati libGL is selected
284 # and its hardcoded path does not match our LIBGL_DRIVERS_PATH
285 # (because it changed in a newer mesa or because it was compiled
286 # for a different set of multilib abis than we are) stuff breaks.
287
288 # We create one file per ABI to work with "native" multilib, see
289 # below.
290
291 echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep"
292 doenvd "${T}/03ati-colon-sep"
293
294 # All libraries that we have a 32 bit and 64 bit version of on
295 # amd64 are installed in src_install-libs. Everything else
296 # (including libraries only available in native 64bit on amd64)
297 # goes in here.
298
299 # There used to be some code here that tried to detect running
300 # under a "native multilib" portage ((precursor of)
301 # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it
302 # should just work (only doing some duplicate work). --marienz
303 if has_multilib_profile; then
304 local OABI=${ABI}
305 for ABI in $(get_install_abis); do
306 src_install-libs
307 done
308 ABI=${OABI}
309 unset OABI
310 else
311 src_install-libs
312 fi
313
314 # This is sorted by the order the files occur in the source tree.
315
316 # X modules.
317 exeinto /usr/$(get_libdir)/xorg/modules/drivers
318 doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
319 exeinto /usr/$(get_libdir)/xorg/modules/linux
320 doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
321 exeinto /usr/$(get_libdir)/xorg/modules
322 doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{esut.a,glesx.so}
323
324 # Arch-specific files.
325 # (s)bin.
326 into /opt
327 if use acpi; then
328 dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
329 fi
330 # We cleaned out the compilable stuff in src_unpack
331 dobin "${ARCH_DIR}"/usr/X11R6/bin/*
332
333 # lib.
334 exeinto /usr/$(get_libdir)
335 # Everything except for the libGL.so installed in src_install-libs.
336 doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
337 -maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
338 insinto /usr/$(get_libdir)
339 doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
340 -maxdepth 1 -type f -not -name '*.so*')
341
342 # Common files.
343 # etc.
344 insinto /etc/ati
345 # Everything except for the authatieventsd.sh script.
346 doins common/etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default}
347 if use acpi; then
348 doins common/etc/ati/authatieventsd.sh
349 fi
350
351 # include.
352 insinto /usr
353 doins -r common/usr/include
354 insinto /usr/include/X11/extensions
355 doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h
356
357 # Just the atigetsysteminfo.sh script.
358 into /usr
359 dosbin common/usr/sbin/*
360
361 # data files for the control panel.
362 insinto /usr/share
363 doins -r common/usr/share/ati
364 insinto /usr/share/pixmaps
365 doins common/usr/share/icons/ccc_{large,small}.xpm
366 make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
367 ccc_large.xpm System
368
369 # doc.
370 dohtml -r common/usr/share/doc/fglrx
371
372 if use acpi; then
373 doman common/usr/share/man/man8/atieventsd.8
374
375 pushd common/usr/share/doc/fglrx/examples/etc/acpi >/dev/null
376
377 exeinto /etc/acpi
378 doexe ati-powermode.sh
379 insinto /etc/acpi/events
380 doins events/*
381
382 popd >/dev/null
383 fi
384
385 # Done with the "source" tree. Install tools we rebuilt:
386 dobin extra/fgl_glxgears/fgl_fglxgears
387 newdoc extra/fgl_glxgears/README README.fgl_glxgears
388
389 dolib extra/lib/fglrx_gamma/*so*
390 newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma
391
392 dobin extra/programs/fglrx_gamma/fglrx_xgamma
393 doman extra/programs/fglrx_gamma/fglrx_xgamma.1
394 newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma
395
396 # Gentoo-specific stuff:
397 if use acpi; then
398 newinitd "${FILESDIR}"/atieventsd.init atieventsd \
399 || die "Failed to install atieventsd.init.d"
400 echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
401 newconfd "${T}"/atieventsd.conf atieventsd
402 fi
403 }
404
405 src_install-libs() {
406 if [[ "${ABI}" == "amd64" ]]; then
407 local pkglibdir=lib64
408 local MY_ARCH_DIR="${S}/arch/x86_64"
409 else
410 local pkglibdir=lib
411 local MY_ARCH_DIR="${S}/arch/x86"
412 fi
413 einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system"
414
415 local ATI_ROOT=/usr/$(get_libdir)/opengl/ati
416 # To make sure we do not miss a spot when these change.
417 local libmajor=1 libminor=2
418 local libver=${libmajor}.${libminor}
419
420 # The GLX libraries
421 # (yes, this really is "lib" even on amd64/multilib --marienz)
422 exeinto ${ATI_ROOT}/lib
423 doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver}
424 dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
425 dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
426
427 # Same as the xorg implementation (eselect opengl does not fall
428 # back to xorg-x11 if we omit this symlink, meaning no glx).
429 dosym ../xorg-x11/extensions ${ATI_ROOT}/extensions
430
431 # DRI modules, installed into the path used by recent versions of mesa.
432 exeinto /usr/$(get_libdir)/dri
433 doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
434
435 # Make up a libGL.la. Ati does not provide one, but mesa does. If
436 # a (libtool-based) libfoo is built with libGL.la present a
437 # reference to it is put into libfoo.la, and compiling
438 # (libtool-based) things that link too libfoo.la will complain if
439 # libGL.la disappears. So if we do not make up a libGL.la
440 # switching between mesa and ati becomes painful.
441 local revision=$(printf '%d%02d%02d' $(get_version_components))
442 sed -e "s:\${libmajor}:${libmajor}:g" \
443 -e "s:\${libminor}:${libminor}:g" \
444 -e "s:\${libdir}:$(get_libdir):g" \
445 -e "s:\${revision}:${revision}:g" \
446 "${FILESDIR}"/libGL.la.in > "${D}"/${ATI_ROOT}/lib/libGL.la \
447 || die "sed failed to make libGL.la"
448
449 local envname="${T}"/04ati-dri-path
450 if [[ -n ${ABI} ]]; then
451 envname="${envname}-${ABI}"
452 fi
453 echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
454 doenvd "${envname}"
455 }
456
457 pkg_postinst() {
458 /usr/bin/eselect opengl set --use-old ati
459
460 elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
461 elog "To change your xorg.conf you can use the bundled \"aticonfig\""
462 elog
463 elog "If you experience unexplained segmentation faults and kernel crashes"
464 elog "with this driver and multi-threaded applications such as wine,"
465 elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
466 elog
467 elog "You will have to source /etc/profile (or logout and back in) for dri"
468 elog "to work, unless you previously had ati-drivers installed."
469
470 # Workaroud screen corruption
471 ewarn "If you experience screen corruption with this driver, try putting"
472 ewarn ' Option "XAANoOffscreenPixmaps" "true"'
473 ewarn "in the Device Section of /etc/X11/xorg.conf."
474
475 linux-mod_pkg_postinst
476 }
477
478 pkg_postrm() {
479 linux-mod_pkg_postrm
480 /usr/bin/eselect opengl set --use-old xorg-x11
481 }
482
483
484
485 --
486 gentoo-commits@l.g.o mailing list