Magellan Linux

Contents of /trunk/nonfree/ati-drivers/ati-drivers-8.493-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11831 - (show annotations) (download)
Wed Apr 18 22:33:00 2012 UTC (12 years, 1 month ago) by niro
File size: 7634 byte(s)
-import from old
1 # $Header: /magellan-cvs/smage/ati-drivers/ati-drivers-8.493-r1.smage2,v 1.1 2008/06/13 17:37:24 niro Exp $
2
3 PNAME="ati-drivers"
4 PVER="8.493"
5 PBUILD="r1"
6
7 PCATEGORIE="x11-drivers"
8 STATE="unstable"
9
10 DESCRIPTION="Display driver for the ATI Radeon and FireGL graphics accelerators with OpenGL suport."
11 HOMEPAGE="http://www.ati.com/"
12
13 # only for >= xorg-7.1.0
14 sminclude xorg xorg71 mtools xdg
15
16 DEPEND=">= x11-base/xorg-server-1
17 >= x11-base/opengl-update-magellan-2.4"
18
19 SDEPEND=">= x11-proto/xf86miscproto-1
20 >= x11-proto/xf86vidmodeproto-1"
21
22 PROVIDE="virtual/opengl
23 virtual/ati-drivers"
24
25 # both files must be fetch or our md5-logic breaks
26 SRCFILE="ati-driver-installer-8-5-x86.x86_64.run"
27 SRCDIR="${BUILDDIR}/ati-drivers"
28 ## use driver for xorg-6.9.0 with dll-loader libs
29 #ATI_XORG_SDIR_x86="${SRCDIR}/x690"
30 #ATI_XORG_SDIR_x86_64="${SRCDIR}/x690_64a"
31 #ATI_XORG_SDIR="$(eval echo \$ATI_XORG_SDIR_${ARCH/i*86/x86})"
32 # xorg 7.1.0 dll loader libs
33 ATI_XORG_DLL_SDIR_x86="${SRCDIR}/x710"
34 ATI_XORG_DLL_SDIR_x86_64="${SRCDIR}/x710_64a"
35 ATI_XORG_DLL_SDIR="$(eval echo \$ATI_XORG_DLL_SDIR_${ARCH/i*86/x86})"
36
37 # which xserver we use, ex. xfree/xorg
38 X11_IMPLEM="xorg"
39
40 # ati-module-sh cvs revision
41 MODULESH_REV=1.2
42
43 SRC_URI=(
44 http://www2.ati.com/drivers/linux/${SRCFILE}
45 mirror://${PNAME}/${SRCFILE}
46 mirror://${PNAME}/libGL.la-ati
47 mirror://${PNAME}/ati-module.sh-${MODULESH_REV}
48 )
49
50 # it's fatal if these drivers got stripped
51 export NOSTRIP=true
52 export CFLAGS="${CFLAGS/-s/}"
53 export CXXFLAGS="${CFLAGS}"
54
55
56 # check for libdri.so for >= xorg-6.9 !!!!!!!!!!
57 # frost ~ # ls /var/tmp/magebuild/builded/usr/X11R6/lib/modules/extensions/lib
58 # libdbe.so libextmod.so librecord.so
59 # libdri.so libGLcore.so libxtrap.so
60
61 src_prepare()
62 {
63 install -d ${SRCDIR} || die
64 cd ${SRCDIR}
65 sh ${SOURCEDIR}/${PNAME}/${SRCFILE} --extract ${SRCDIR} || die
66 }
67
68 # fake (needed with the include of xorg.sminc)
69 src_compile() { return 0; }
70
71 src_install()
72 {
73 cd ${SRCDIR}
74
75 # # use driver for xorg-6.9.0 with dll-loader libs
76 # local XORG_SDIR="${ATI_XORG_SDIR}"
77
78 # dll extensions
79 local DLL_EXT="so"
80 local DRM_DLL_EXT="so"
81
82 # arch specific stuff
83 local ARCH_SDIR="${SRCDIR}/arch/${ARCH/i*86/x86}"
84
85 local ATI_ROOT="/usr/$(mlibdir)/opengl/ati"
86 local X11_LIB_DIR="/usr/$(mlibdir)/xorg"
87
88 # needed directories
89 minstalldir /etc/env.d || die
90 minstalldir ${ATI_ROOT}/lib || die
91 minstalldir ${X11_LIB_DIR}/modules/dri || die
92 minstalldir ${X11_LIB_DIR}/modules/drivers || die
93 minstalldir ${X11_LIB_DIR}/modules/linux || die
94 minstalldir /usr/include/X11/extensions || die
95 minstalldir /usr/share || die
96 minstalldir /usr/sbin || die
97 minstalldir /opt/ati/bin || die
98
99 # glx libraries
100 minstallexec ${ARCH_SDIR}/usr/X11R6/lib/libGL.so.1.2 ${ATI_ROOT}/lib || die
101 mlink libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so.1 || die
102 mlink libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so || die
103
104 # same as the xorg implementation
105 mlink ../${X11_IMPLEM}/extensions ${ATI_ROOT}/extensions || die
106
107 # workaround missing linker file
108 minstallfile -s libGL.la-ati ${ATI_ROOT}/lib/libGL.la || die
109 mlink ../${X11_IMPLEM}/include ${ATI_ROOT}/include || die
110
111 # install drivers
112 minstallexec \
113 ${ATI_XORG_DLL_SDIR}/usr/X11R6/$(mlibdir)/modules/drivers/fglrx_drv.${DLL_EXT} \
114 ${X11_LIB_DIR}/modules/drivers || die
115
116 # xorg-modules
117 minstallexec \
118 ${ATI_XORG_DLL_SDIR}/usr/X11R6/$(mlibdir)/modules/esut.a \
119 ${X11_LIB_DIR}/modules || die
120 minstallexec \
121 ${ATI_XORG_DLL_SDIR}/usr/X11R6/$(mlibdir)/modules/glesx.so \
122 ${X11_LIB_DIR}/modules || die
123
124 # dri modules
125 minstallexec \
126 ${ARCH_SDIR}/usr/X11R6/$(mlibdir)/modules/dri/fglrx_dri.so \
127 ${X11_LIB_DIR}/modules/dri || die
128
129 # drm module
130 minstallexec \
131 ${ATI_XORG_DLL_SDIR}/usr/X11R6/$(mlibdir)/modules/linux/libfglrxdrm.${DRM_DLL_EXT} \
132 ${X11_LIB_DIR}/modules/linux || die
133
134 # other libs and apps
135 cp -pPR ${ARCH_SDIR}/usr/X11R6/$(mlibdir)/libfglrx_*.* ${BINDIR}/usr/$(mlibdir) || die
136
137 # includes
138 minstallfile ${SRCDIR}/common/usr/X11R6/include/X11/extensions/fglrx_gamma.h \
139 /usr/include/X11/extensions || die
140
141 # environment
142 echo "PATH=/opt/ati/bin" > ${BINDIR}/etc/env.d/09ati || die
143 echo "ROOTPATH=/opt/ati/bin" >> ${BINDIR}/etc/env.d/09ati || die
144 echo "LIBGL_DRIVERS_PATH=/usr/$(mlibdir)/xorg/modules/dri" >> ${BINDIR}/etc/env.d/09ati || die
145 # fixme: remove this if fixed upstream
146 # amdcccle is somewhat broken with libxcb and needs the sloppy-lock variable
147 # we force this system-wide by exporting this variable via the environment
148 echo "LIBXCB_ALLOW_SLOPPY_LOCK=1" >> ${BINDIR}/etc/env.d/09ati || die
149
150 # apps
151 # install -m 0755 -o root -g root ${XORG_SDIR}/usr/X11R6/bin/* ${BINDIR}/opt/ati/bin || die
152 minstallexec ${ARCH_SDIR}/usr/X11R6/bin/\* /opt/ati/bin || die
153
154 # ati custom stuff
155 cp -R ${SRCDIR}/common/usr/include ${BINDIR}/usr || die
156 cp -pPR ${SRCDIR}/common/etc/* ${BINDIR}/etc/ || die
157
158 # controlpanel stuff
159 cp -R ${SRCDIR}/common/usr/share/ati ${BINDIR}/usr/share || die
160 minstallpixmap ${SRCDIR}/common/usr/share/icons/ccc_small.xpm || die
161 minstallpixmap ${SRCDIR}/common/usr/share/icons/ccc_large.xpm || die
162 minstall_desktop_icon \
163 --name 'ATI Catalyst Control Center' \
164 --comment 'ATI graphics adapter settings' \
165 --exec amdcccle \
166 --file amdcccle \
167 --icon ccc_large.xpm \
168 --categories System \
169 || die
170
171 # we did not install ${ARCH_SDIR}/usr/sbin/atieventsd for acpi-support
172 # so we do not need its config file
173 rm ${BINDIR}/etc/ati/authatieventsd.sh || die
174
175 # for better support install systeminfo script
176 minstallexec ${SRCDIR}/common/usr/sbin/atigetsysteminfo.sh /usr/sbin || die
177
178 # install all related docs
179 minstalldocs common/usr/share/doc/fglrx/*LICENSE* || die
180 minstallhtml ${SRCDIR}/common/usr/share/doc/fglrx/*.html || die
181 local i
182 #for i in articles release-notes user-manual
183 for i in articles user-manual
184 do
185 cp -R ${SRCDIR}/common/usr/share/doc/fglrx/${i} \
186 ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/html || die ${i}
187 done
188
189 # create a driver tarball
190 cd ${SRCDIR}/common/lib/modules/fglrx
191 minstalldir /usr/src/ati-drivers || die
192 mv ${SRCDIR}/common/lib/modules/fglrx/{build_mod,ati-drivers} || die
193 # fix link issues; must be linked against the used xorg-lib
194 # so we copy them into our tarball
195 cp ${SRCDIR}/arch/${ARCH/i*86/x86}/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC* \
196 ${SRCDIR}/common/lib/modules/fglrx/ati-drivers || die
197 # from gentoo:
198 # When built with ati's make.sh it defines a bunch of macros if
199 # certain .config values are set, falling back to less reliable
200 # detection methods if linux/autoconf.h is not available. We
201 # simply use the linux/autoconf.h settings directly, bypassing the
202 # detection script.
203 sed -i "s:__SMP__:CONFIG_SMP:" ati-drivers/*.c ati-drivers/*.h || die
204 sed -i "s:ifdef\ MODVERSIONS:ifdef\ CONFIG_MODVERSIONS:" ati-drivers/*.c ati-drivers/*.h || die
205 tar cvjf ${BINDIR}/usr/src/ati-drivers/ati-drivers-${PVER}.tar.bz2 ati-drivers/ || die
206 # install module-build script
207 minstallexec -s ati-module.sh-${MODULESH_REV} /usr/src/ati-drivers/ati-module.sh || die
208 # fix pver in ati-module.sh
209 sed -i "s:@@PVER@@:${PVER}:" ${BINDIR}/usr/src/ati-drivers/ati-module.sh || die
210 }
211
212 postinstall()
213 {
214 ${MROOT}/usr/sbin/opengl-update --use-old ati
215
216 echo
217 echo "To use these driver you need to compile the kernel module first."
218 echo "Goto /usr/src/ati-drivers and run ati-module.sh:"
219 echo " 'cd /usr/src/ati-drivers && ./ati-module.sh'"
220 echo
221 echo "Please switch your opengl extension with: "
222 echo " 'opengl-update ati'"
223 echo
224 echo "Next step is to create a new xorg.conf with"
225 echo " 'aticonfig --initial --input=/etc/X11/xorg.conf'"
226 echo
227 echo "Run 'aticonfig --help' for more options."
228 echo
229 }

Properties

Name Value
svn:keywords Id