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