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