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.ebuild
Date: Fri, 21 Dec 2007 05:02:10
Message-Id: E1J5a1G-00044O-PK@stork.gentoo.org
1 je_fro 07/12/21 05:01:58
2
3 Modified: ChangeLog
4 Added: ati-drivers-8.443.1.ebuild
5 Log:
6 Version bump, thanks to Bernd Steinhauser and especially Jory Pratt.
7 (Portage version: 2.1.4_rc10)
8
9 Revision Changes Path
10 1.100 x11-drivers/ati-drivers/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?rev=1.100&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?rev=1.100&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?r1=1.99&r2=1.100
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v
19 retrieving revision 1.99
20 retrieving revision 1.100
21 diff -u -r1.99 -r1.100
22 --- ChangeLog 1 Dec 2007 20:06:44 -0000 1.99
23 +++ ChangeLog 21 Dec 2007 05:01:58 -0000 1.100
24 @@ -1,6 +1,13 @@
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.99 2007/12/01 20:06:44 je_fro Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.100 2007/12/21 05:01:58 je_fro Exp $
29 +
30 +*ati-drivers-8.443.1 (21 Dec 2007)
31 +
32 + 21 Dec 2007; <jeff@g.o>
33 + +files/8.443.1/ati-powermode-opt-path-1.patch,
34 + +ati-drivers-8.443.1.ebuild:
35 + Version bump, thanks to Bernd Steinhauser and especially Jory Pratt.
36
37 01 Dec 2007; Jeff Gardner <je_fro@g.o> ati-drivers-8.433.ebuild:
38 Adding emul-linux-x86-xlibs as a dep for amd64 systems
39
40
41
42 1.1 x11-drivers/ati-drivers/ati-drivers-8.443.1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.443.1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.443.1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: ati-drivers-8.443.1.ebuild
48 ===================================================================
49 # Copyright 1999-2007 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.443.1.ebuild,v 1.1 2007/12/21 05:01:58 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-${PV}-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-1.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 # Fix Suspend on 2.6.23 kernel.
223 if kernel_is ge 2 6 23; then
224 sed -i 's:CONFIG_SUSPEND_SMP:CONFIG_PM_SLEEP_SMP:' \
225 "${MODULE_DIR}/firegl_public.h" \
226 || die "Fixing suspend for kernel 2.6.23 failed."
227 fi
228
229 mkdir extra || die "mkdir failed"
230 cd extra
231 unpack ./../common/usr/src/ati/fglrx_sample_source.tgz
232 sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \
233 lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
234 # Add a category.
235 mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
236 cd ..
237 }
238
239 src_compile() {
240 linux-mod_src_compile
241
242 einfo "Building fgl_glxgears"
243 cd "${S}"/extra/fgl_glxgears
244 # These extra libs/utils either have an Imakefile that does not
245 # work very well without tweaking or a Makefile ignoring CFLAGS
246 # and the like. We bypass those.
247
248 # The -DUSE_GLU is needed to compile using nvidia headers
249 # according to a comment in ati-drivers-extra-8.33.6.ebuild.
250 "$(tc-getCC)" -o fgl_fglxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
251 -I"${S}"/common/usr/include fgl_glxgears.c \
252 -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
253
254 einfo "Building fglrx_gamma lib"
255 cd "${S}"/extra/lib/fglrx_gamma
256 "$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
257 -DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
258 -lXext || die "fglrx_gamma lib build failed"
259 ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
260 ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"
261
262 einfo "Building fglrx_gamma util"
263 cd "${S}"/extra/programs/fglrx_gamma
264 "$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
265 -I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
266 fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
267 || die "fglrx_gamma util build failed"
268
269 }
270
271 src_install() {
272 linux-mod_src_install
273
274 # We can do two things here, and neither of them is very nice.
275
276 # For direct rendering libGL has to be able to load one or more
277 # dri modules (files ending in _dri.so, like fglrx_dri.so).
278 # Gentoo's mesa looks for these files in the location specified by
279 # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded
280 # location /usr/$(get_libdir)/dri. Ati's libGL does the same
281 # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri
282 # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64
283 # 64bit. So we can either put the .so files in that (unusual,
284 # compared to "normal" mesa libGL) location or set
285 # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug
286 # 101539.
287
288 # The problem with this approach is that LIBGL_DRIVERS_PATH
289 # *overrides* the default hardcoded location, it does not extend
290 # it. So if ati-drivers is merged but a non-ati libGL is selected
291 # and its hardcoded path does not match our LIBGL_DRIVERS_PATH
292 # (because it changed in a newer mesa or because it was compiled
293 # for a different set of multilib abis than we are) stuff breaks.
294
295 # We create one file per ABI to work with "native" multilib, see
296 # below.
297
298 echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep"
299 doenvd "${T}/03ati-colon-sep"
300
301 # All libraries that we have a 32 bit and 64 bit version of on
302 # amd64 are installed in src_install-libs. Everything else
303 # (including libraries only available in native 64bit on amd64)
304 # goes in here.
305
306 # There used to be some code here that tried to detect running
307 # under a "native multilib" portage ((precursor of)
308 # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it
309 # should just work (only doing some duplicate work). --marienz
310 if has_multilib_profile; then
311 local OABI=${ABI}
312 for ABI in $(get_install_abis); do
313 src_install-libs
314 done
315 ABI=${OABI}
316 unset OABI
317 else
318 src_install-libs
319 fi
320
321 # This is sorted by the order the files occur in the source tree.
322
323 # X modules.
324 exeinto /usr/$(get_libdir)/xorg/modules/drivers
325 doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
326 exeinto /usr/$(get_libdir)/xorg/modules/linux
327 doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
328 exeinto /usr/$(get_libdir)/xorg/modules
329 doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{esut.a,glesx.so}
330
331 # Arch-specific files.
332 # (s)bin.
333 into /opt
334 if use acpi; then
335 dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
336 fi
337 # We cleaned out the compilable stuff in src_unpack
338 dobin "${ARCH_DIR}"/usr/X11R6/bin/*
339
340 # lib.
341 exeinto /usr/$(get_libdir)
342 # Everything except for the libGL.so installed in src_install-libs.
343 doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
344 -maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
345 insinto /usr/$(get_libdir)
346 doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
347 -maxdepth 1 -type f -not -name '*.so*')
348
349 # Common files.
350 # etc.
351 insinto /etc/ati
352 # Everything except for the authatieventsd.sh script.
353 doins common/etc/ati/{logo*,control,atiogl.xml,signature}
354 if use acpi; then
355 doins common/etc/ati/authatieventsd.sh
356 fi
357
358 # include.
359 insinto /usr
360 doins -r common/usr/include
361 insinto /usr/include/X11/extensions
362 doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h
363
364 # Just the atigetsysteminfo.sh script.
365 into /usr
366 dosbin common/usr/sbin/*
367
368 # data files for the control panel.
369 insinto /usr/share
370 doins -r common/usr/share/ati
371 insinto /usr/share/pixmaps
372 doins common/usr/share/icons/ccc_{large,small}.xpm
373 make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
374 ccc_large.xpm System
375
376 # doc.
377 dohtml -r common/usr/share/doc/fglrx
378
379 if use acpi; then
380 doman common/usr/share/man/man8/atieventsd.8
381
382 pushd common/usr/share/doc/fglrx/examples/etc/acpi >/dev/null
383
384 exeinto /etc/acpi
385 doexe ati-powermode.sh
386 insinto /etc/acpi/events
387 doins events/*
388
389 popd >/dev/null
390 fi
391
392 # Done with the "source" tree. Install tools we rebuilt:
393 dobin extra/fgl_glxgears/fgl_fglxgears
394 newdoc extra/fgl_glxgears/README README.fgl_glxgears
395
396 dolib extra/lib/fglrx_gamma/*so*
397 newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma
398
399 dobin extra/programs/fglrx_gamma/fglrx_xgamma
400 doman extra/programs/fglrx_gamma/fglrx_xgamma.1
401 newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma
402
403 # Gentoo-specific stuff:
404 if use acpi; then
405 newinitd "${FILESDIR}"/atieventsd.init atieventsd \
406 || die "Failed to install atieventsd.init.d"
407 echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
408 newconfd "${T}"/atieventsd.conf atieventsd
409 fi
410 }
411
412 src_install-libs() {
413 if [[ "${ABI}" == "amd64" ]]; then
414 local pkglibdir=lib64
415 local MY_ARCH_DIR="${S}/arch/x86_64"
416 else
417 local pkglibdir=lib
418 local MY_ARCH_DIR="${S}/arch/x86"
419 fi
420 einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system"
421
422 local ATI_ROOT=/usr/$(get_libdir)/opengl/ati
423 # To make sure we do not miss a spot when these change.
424 local libmajor=1 libminor=2
425 local libver=${libmajor}.${libminor}
426
427 # The GLX libraries
428 # (yes, this really is "lib" even on amd64/multilib --marienz)
429 exeinto ${ATI_ROOT}/lib
430 doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver}
431 dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
432 dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
433
434 # Same as the xorg implementation (eselect opengl does not fall
435 # back to xorg-x11 if we omit this symlink, meaning no glx).
436 dosym ../xorg-x11/extensions ${ATI_ROOT}/extensions
437
438 # DRI modules, installed into the path used by recent versions of mesa.
439 exeinto /usr/$(get_libdir)/dri
440 doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
441
442 # Make up a libGL.la. Ati does not provide one, but mesa does. If
443 # a (libtool-based) libfoo is built with libGL.la present a
444 # reference to it is put into libfoo.la, and compiling
445 # (libtool-based) things that link too libfoo.la will complain if
446 # libGL.la disappears. So if we do not make up a libGL.la
447 # switching between mesa and ati becomes painful.
448 local revision=$(printf '%d%02d%02d' $(get_version_components))
449 sed -e "s:\${libmajor}:${libmajor}:g" \
450 -e "s:\${libminor}:${libminor}:g" \
451 -e "s:\${libdir}:$(get_libdir):g" \
452 -e "s:\${revision}:${revision}:g" \
453 "${FILESDIR}"/libGL.la.in > "${D}"/${ATI_ROOT}/lib/libGL.la \
454 || die "sed failed to make libGL.la"
455
456 local envname="${T}"/04ati-dri-path
457 if [[ -n ${ABI} ]]; then
458 envname="${envname}-${ABI}"
459 fi
460 echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
461 doenvd "${envname}"
462 }
463
464 pkg_postinst() {
465 /usr/bin/eselect opengl set --use-old ati
466
467 elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
468 elog "To change your xorg.conf you can use the bundled \"aticonfig\""
469 elog
470 elog "If you experience unexplained segmentation faults and kernel crashes"
471 elog "with this driver and multi-threaded applications such as wine,"
472 elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
473 elog
474 elog "You will have to source /etc/profile (or logout and back in) for dri"
475 elog "to work, unless you previously had ati-drivers installed."
476
477 # Workaroud screen corruption
478 ewarn "If you experience screen corruption with this driver, try putting"
479 ewarn ' Option "XAANoOffscreenPixmaps" "true"'
480 ewarn "in the Device Section of /etc/X11/xorg.conf."
481
482 # Warning per bug #199720
483 elog "***** Warning *****"
484 elog "ATI has stated this is not a complete release version and should"
485 elog "not be distributed. Although it is the version presented on their"
486 elog "website for certain chipsets/cards. Due to this version being"
487 elog "incomplete, some users will experience \"(EE) No devices detected.\""
488 elog "errors. This is known and please mask this version locally if you"
489 elog "experience that. For further information please see the following"
490 elog "http://www2.ati.com/drivers/linux/catalyst_711_linux.html"
491
492 linux-mod_pkg_postinst
493 }
494
495 pkg_postrm() {
496 linux-mod_pkg_postrm
497 /usr/bin/eselect opengl set --use-old xorg-x11
498 }
499
500
501
502 --
503 gentoo-commits@g.o mailing list