Gentoo Archives: gentoo-commits

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