]> git.pld-linux.org Git - packages/XFree86-glx.git/blob - XFree86-glx.spec
- add BuildRequires: tcl
[packages/XFree86-glx.git] / XFree86-glx.spec
1 %define mesaversion     3.2.1
2 %define glx_ver latest
3
4 Summary:        OpenGL 1.2 compatible 3D graphics library
5 Summary(pl):    Bilioteka grfiki 3D kompatybilna z OpenGL 1.2
6 Name:           XFree86-glx
7 Version:        4.2.0
8 Release:        0.2
9 License:        LGPL
10 Vendor:         Brian Paul <brian_paul@mesa3d.org>
11 Group:          X11/Libraries
12 Source0:        ftp://ftp.mesa3d.org/pub/sourceforge/mesa3d/MesaLib-%{mesaversion}.tar.bz2
13 Source1:        ftp://ftp.mesa3d.org/pub/sourceforge/mesa3d/MesaDemos-%{mesaversion}.tar.bz2
14 Source2:        http://snow.ashlu.bc.ca/glx/snapshots/utah-glx-src-%{glx_ver}.tar.gz
15 URL:            http://www.mesa3d.org/
16 BuildPreReq:    binutils >= 2.9.1.0.19a
17 BuildRequires:  tcl
18 Conflicts:      XFree86 =< 4.1.0
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 Obsoletes:      Mesa
21 Obsoletes:      XFree86-OpenGL-core
22 Obsoletes:      XFree86-OpenGL-libs
23
24 %define         _prefix         /usr/X11R6
25 %define         _sysconfdir     /etc/X11
26
27 %description
28 This is an implementation of the Mesa 3D library and GLX with support
29 for hardware acceleration. GLX was developed by SGI as an extension to
30 the X window system to integrate OpenGL rendering functions. This
31 allows the Mesa 3D library to perform its 3D rendering functions
32 within the X server's process, rather than within the X client
33 program. This offers potential performance benefits, because the
34 rendered image does not have to be moved from the X client program to
35 the X server. (Only the commands required to render the image are
36 sent.) It also makes 3-D hardware acceleration much more practical
37 (and fast). This package includes a accelerated hardware drivers for
38 video card based on NVIDIA Riva series and ATI Rage Pro chipsets.
39
40 The Mesa 3D graphics library is a powerful and generic toolset for
41 creating hardware assisted computer graphics. To the extent that Mesa
42 utilizes the OpenGL command syntax or state machine, it is being used
43 with authorization from Silicon Graphics, Inc. However, the author
44 (Brian Paul) makes no claim that Mesa is in any way a compatible
45 replacement for OpenGL or associated with Silicon Graphics, Inc. Those
46 who want a licensed implementation of OpenGL should contact a licensed
47 vendor. However, Mesa is very similar to OpenGL, and you might find
48 Mesa to be a valid alternative to OpenGL.
49
50 This package is based on Mesa %{mesaver} and utah glx-%{glxver}.
51
52 please see http://utah-glx.sourceforge.net/ for more information.
53
54 %package        devel
55 Summary:        Development files for Mesa (OpenGL compatible 3D lib)
56 Summary(pl):    Pliki i biblioteki nag³ówkowe dla Mesy (biblioteka 3D OpenGL)
57 Group:          X11/Development/Libraries
58 Requires:       %{name}
59
60 %description devel
61 Mesa is an OpenGL 1.2 compatible 3D graphics library. Headers needed
62 to compile Mesa programs.
63
64 %prep
65 %setup -q -n Mesa-%{mesaversion} -b1 -a2
66 [ -d glx-xf4 ] && ln -s glx-xf4 glx;
67
68 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS| sed 's/-m486 *//g'`; export RPM_OPT_FLAGS;
69
70 perl -p -i -e "s/-O3/$RPM_OPT_FLAGS/" Make-config
71
72 %build
73 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS| sed 's/-m486 *//g'`; export RPM_OPT_FLAGS;
74 %ifarch i386 i486
75 CFLAGS="%{rpmcflags}" CXXFLAGS="%{rpmcflags}" \
76 ./configure     --prefix=%{_prefix} \
77                 --sysconfdir=%{_sysconfdir} \
78                 --disable-mmx \
79                 --disable-3dnow \
80                 --without-ggi \
81                 --enable-mga=no \
82                 --enable-mach64=no \
83                 --enable-tnt=yes \
84                 --enable-i810=no \
85                 --enable-s3virge=no \
86                 --enable-s3savage=no \
87                 --enable-sis6326=no
88
89 %endif
90 %ifarch i586 i686 k6 k7
91 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
92 ./configure     --prefix=%{_prefix} \
93                 --sysconfdir=%{_sysconfdir} \
94                 --with-glide=/usr \
95                 --without-ggi \
96                 --enable-mga=no \
97                 --enable-mach64=no \
98                 --enable-tnt=yes \
99                 --enable-i810=no \
100                 --enable-s3virge=no \
101                 --enable-s3savage=no \
102                 --enable-sis6326=no
103 %endif
104 %ifnarch i386 i486 i586 i686 k6 k7
105 ./configure     --prefix=%{_prefix} \
106                 --sysconfdir=%{_sysconfdir} \
107                 --disable-3dnow \
108                 --without-ggi \
109                 --enable-mga=no \
110                 --enable-mach64=no \
111                 --enable-tnt=yes \
112                 --enable-i810=no \
113                 --enable-s3virge=no \
114                 --enable-s3savage=no \
115                 --enable-sis6326=no
116 %endif
117
118 %{__make}
119
120 %ifarch alpha sparc sparc64 ppc # Skip utah_glx for alpha - (fg) also skip it for
121                                 # sparc - (jb) also added skip for ppc
122         echo 'utah_glx skipped for alpha, powerpc and sparcs'
123 %else
124 cd glx
125 cp -fv ../config.sub ./
126
127 CFLAGS="$RPM_OPT_FLAGS" \
128         ./autogen.sh    --with-chipset=both \
129                         --with-mesa=../ \
130                         --enable-extra \
131                         --disable-mtrr \
132                         --disable-agp \
133                         --disable-glut \
134                         --disable-GLU \
135                         --prefix=%{_prefix} \
136                         --sysconfdir=%{_sysconfdir} \
137                         --without-x86-asm \
138                         --without-mmx-asm \
139                         --without-3dnow-asm \
140                         --enable-mga=no \
141                         --enable-mach64=no \
142                         --enable-tnt=yes \
143                         --enable-i810=no \
144                         --enable-s3virge=no \
145                         --enable-s3savage=no \
146                         --enable-sis6326=no
147
148 # Arg docs sux ((Dadou) "are not OK", it's better ;)
149 cd docs
150 cat <<EOF > config.cache
151 ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'}
152 ac_cv_prog_CP=${ac_cv_prog_CP='cp -f'}
153 ac_cv_prog_LN_S=${ac_cv_prog_LN_S='ln -s'}
154 ac_cv_prog_MKDIR=${ac_cv_prog_MKDIR='mkdir -p'}
155 ac_cv_prog_MV=${ac_cv_prog_MV='mv -f'}
156 ac_cv_prog_RM=${ac_cv_prog_RM='rm -f'}
157 ac_cv_prog_have_dvips=${ac_cv_prog_have_dvips=no}
158 ac_cv_prog_have_jade=${ac_cv_prog_have_jade=no}
159 ac_cv_prog_have_jadetex=${ac_cv_prog_have_jadetex=no}
160 ac_cv_prog_have_lynx=${ac_cv_prog_have_lynx=no}
161 ac_cv_prog_have_ps2pdf=${ac_cv_prog_have_ps2pdf=no}
162 ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes}
163 EOF
164
165 ./configure     --enable-text \
166                 --enable-html \
167                 --enable-ps \
168                 --enable-pdf
169 cd ..
170
171 %{__make}
172 cd ..
173 %endif # Skip glx for Alpha
174
175 %install
176 rm -rf $RPM_BUILD_ROOT
177 install -d $RPM_BUILD_ROOT{%{_includedir}/GL,%{_sysconfdir},/usr/bin}
178 install -d $RPM_BUILD_ROOT%{_libdir}/modules
179
180 %{__make} DESTDIR=$RPM_BUILD_ROOT install
181 cp include/GL/svgamesa.h $RPM_BUILD_ROOT%{_includedir}/GL/
182 cp glx/servGL/libglx.so $RPM_BUILD_ROOT%{_libdir}/modules/
183
184 %ifarch alpha sparc sparc64 ppc
185 echo 'Skipping utah_glx'
186 %else
187 cat > $RPM_BUILD_ROOT/usr/bin/glx <<EOF
188 #!/bin/sh
189 LD_PRELOAD=%{_prefix}/lib/libGL.so.1.0 "\$@"
190 EOF
191
192 ## glx
193 cd glx
194 %{__make} DESTDIR=$RPM_BUILD_ROOT sysconfdir=%{_sysconfdir} install
195 cd ..
196 %endif # glx
197
198 cd $RPM_BUILD_ROOT/%{_prefix}/lib/
199 ln -sf libGL.so.1 libGL.so
200 ln -sf libGLU.so.1 libGLU.so
201 ln -sf libGLU.so.1 libGLU.so.3
202 ln -sf libglut.so.3 libglut.so
203
204 # (gc) add Mesa symlinks for compatibility
205 ln -sf libGL.so libMesaGL.so
206 ln -sf libGL.so.1 libMesaGL.so.1
207 ln -sf libGL.so.1.0 libMesaGL.so.1.0
208 ln -sf libGLU.so libMesaGLU.so
209 ln -sf libGLU.so.1 libMesaGLU.so.1
210
211 %clean
212 [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
213
214 %post   -p /sbin/ldconfig
215 %postun -p /sbin/ldconfig
216
217 %files
218 %defattr(644,root,root,755)
219 %doc docs/{COPYRIGHT,README*,COPYING,DEVINFO,CONFORM,VERSIONS} glx/docs/README.*
220 %attr(755,root,root) /usr/bin/glx
221 %{_libdir}/*.so.*
222 %config %{_sysconfdir}/mesa.conf
223 %ifarch i386 i486 i586 i686 k6 k7
224 # %{_prefix}/lib/modules/*
225 %config %{_sysconfdir}/glx.conf
226 %endif
227
228 %files devel
229 %defattr(644,root,root,755)
230 %dir %{_includedir}/GL
231 %{_includedir}/GL/gl*.h
232 %{_includedir}/GL/o*.h
233 %{_includedir}/GL/x*.h
234 %ifarch i386 i486 i586 i686 k6 k7
235 %{_includedir}/GL/svgamesa.h
236 %endif
237 %{_prefix}/lib/lib*.so
238 %{_prefix}/lib/lib*.la
This page took 0.129115 seconds and 3 git commands to generate.