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