]> git.pld-linux.org Git - packages/Mesa.git/blob - Mesa.spec
- added Obsoletes for XFree86-OpenGL-*
[packages/Mesa.git] / Mesa.spec
1 #
2 # _without_glide: without GLIDE
3 #
4 # _with_dri: add GLX/DRI support (taken from rawhide)
5 # (does it make any sense? we have XFree86-OpenGL-* packages...)
6 #
7 Summary:        Free OpenGL implementation
8 Summary(pl):    Bezp³atna implementacja standardu OpenGL
9 Name:           Mesa
10 Version:        3.4.2
11 Release:        2
12 License:        MIT (core), LGPL (libGLU), SGI (libGLw) and others - see COPYRIGHT file
13 Group:          X11/Libraries
14 Group(de):      X11/Libraries
15 Group(es):      X11/Bibliotecas
16 Group(pl):      X11/Biblioteki
17 Source0:        ftp://download.sourceforge.net/pub/sourceforge/mesa3d/%{name}Lib-%{version}.tar.bz2
18 Source1:        ftp://download.sourceforge.net/pub/sourceforge/mesa3d/%{name}Demos-%{version}.tar.bz2
19 %{?_with_dri:Source2:   XFree86-4.0.2-GLonly.tar.gz}
20 Patch0:         %{name}-paths.patch
21 Patch1:         %{name}-badlibtool.patch
22 Patch2:         %{name}-glibc-2.2.patch
23 Patch3:         %{name}-am.patch
24 Patch4:         %{name}-libGLw.patch
25 %{?_with_dri:Patch5:            %{name}-XF86DRI-4.0.2.patch}
26 #Patch6:        %{name}-3.3-glXcontext.patch
27 URL:            http://www.mesa3d.org/
28 BuildRequires:  XFree86-devel
29 BuildRequires:  motif-devel
30 %{!?_without_glide:BuildRequires:       Glide_V3-DRI-devel}
31 BuildRequires:  perl
32 BuildRequires:  autoconf
33 BuildRequires:  automake
34 Provides:       OpenGL
35 Obsoletes:      XFree86-OpenGL-core XFree86-OpenGL-libs
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         _prefix         /usr/X11R6
39 %define         _mandir         %{_prefix}/man
40
41 %description
42 Mesa is a 3-D graphics library with an API which is very similar to
43 that of OpenGL*. To the extent that Mesa utilizes the OpenGL command
44 syntax or state machine, it is being used with authorization from
45 Silicon Graphics, Inc. However, the author makes no claim that Mesa is
46 in any way a compatible replacement for OpenGL or associated with
47 Silicon Graphics, Inc. Those who want a licensed implementation of
48 OpenGL should contact a licensed vendor. This software is distributed
49 under the terms of the GNU Library General Public License, see the
50 LICENSE file for details.
51
52 - OpenGL(R) is a registered trademark of Silicon Graphics, Inc.
53
54 %description -l pl
55 Mesa jest bibliotek± 3D bêd±c± darmowym odpowiednikiem standardu
56 OpenGL(*).
57
58 - OpenGL jest zastrze¿onym znakiem towarowym firmy Silicon Graphics,
59   Inc.
60
61 %package devel
62 Summary:        Development environment for Mesa
63 Summary(pl):    ¦rodowisko programistyczne biblioteki Mesa
64 Group:          Development/Libraries
65 Group(de):      Entwicklung/Libraries
66 Group(fr):      Development/Librairies
67 Group(pl):      Programowanie/Biblioteki
68 Requires:       %{name} = %{version}
69 Requires:       XFree86-devel
70 Provides:       OpenGL-devel
71 Obsoletes:      XFree86-OpenGL-devel
72
73 %description devel
74 Header files and documentation needed for development.
75
76 %description -l pl devel
77 Pliki nag³ówkowe i dokumentacja do Mesy.
78
79 %package static
80 Summary:        Mesa static libraries
81 Summary(pl):    Biblioteki statyczne Mesy
82 Group:          Development/Libraries
83 Group(de):      Entwicklung/Libraries
84 Group(fr):      Development/Librairies
85 Group(pl):      Programowanie/Biblioteki
86 Requires:       %{name}-devel = %{version}
87 Provides:       OpenGL-static
88 Obsoletes:      XFree86-OpenGL-static
89
90 %description static
91 The static version of the Mesa libraries.
92
93 %description -l pl static
94 Biblioteki statyczne Mesy.
95
96 %package demos
97 Summary:        Mesa Demos
98 Summary(pl):    Demonstracje mo¿liwo¶ci bibliotek Mesa
99 Group:          Development/Libraries
100 Group(de):      Entwicklung/Libraries
101 Group(fr):      Development/Librairies
102 Group(pl):      Programowanie/Biblioteki
103 Requires:       %{name} = %{version}
104
105 %description demos
106 Demonstration programs for the Mesa libraries.
107
108 %description -l pl demos
109 Programy demonstracyjne dla bibliotek Mesa.
110
111 %prep
112 %setup -q -n Mesa-%{version} -b 1
113
114 %if %{?_with_dri:1}%{!?_with_dri:0}
115         mkdir -p src/DRI/GL
116         tar xzf %{SOURCE2}
117         ln -f `find xc -type f` src/DRI
118         mv -f src/DRI/glxmd.h src/DRI/GL/glxmd.h
119 %endif
120
121 %patch0 -p1
122 %patch1 -p1
123 %patch2 -p1
124 %patch3 -p1
125 %patch4 -p1
126 %{?_with_dri:%patch5 -p1}
127 #%patch6 -p1
128 # fix demos
129 perl -pi -e "s,\.\./images/,%{_examplesdir}/Mesa/images/,g" demos/*
130
131 %build
132 aclocal -I .
133 autoheader
134 automake -a -c
135 autoconf
136 %configure \
137         --enable-static \
138         --enable-shared \
139         --with-ggi="no" \
140         --with-svga="no" \
141         --disable-ggi-fbdev \
142         --disable-ggi-genkgi \
143         --enable-optimize \
144         %{?_without_glide:--without-glide} \
145 %ifarch %{ix86} \
146         --enable-x86 \
147   %ifarch i586 i686 \
148         --enable-mmx \
149         --enable-3dnow \
150     %ifarch i686 \
151         --enable-katmai \
152     %else \
153         --disable-katmai \
154     %endif \
155   %else \
156     %ifarch k6 \
157         --enable-mmx \
158         --enable-3dnow \
159     %else \
160         --disable-mmx \
161         --disable-3dnow \
162     %endif \
163   %endif \
164 %else \
165         --disable-x86 \
166         --disable-mmx \
167         --disable-3dnow
168 %endif
169
170 %{__make}
171         
172 (cd widgets-mesa
173 %configure \
174         --with-motif
175 %{__make}
176 )
177
178 (cd widgets-sgi
179 touch depend
180 %{__make} dep
181 %{__make} linux OPTFLAGS="%{rpmcflags}"
182 )
183
184 %install
185 rm -rf $RPM_BUILD_ROOT
186 %{__make} install DESTDIR=$RPM_BUILD_ROOT
187
188 install -d $RPM_BUILD_ROOT%{_mandir}/man3
189
190 (cd widgets-mesa
191 %{__make} install \
192         prefix=$RPM_BUILD_ROOT%{_prefix} \
193         mandir=$RPM_BUILD_ROOT%{_mandir}/man3
194 # Mesa widgets are not binary compatible with SGI ones
195 cd $RPM_BUILD_ROOT%{_includedir}/GL
196 mkdir Mesa-widgets
197 mv -f GLw*.h Mesa*.h Mesa-widgets
198 )
199
200 install widgets-sgi/libGLw* $RPM_BUILD_ROOT%{_libdir}
201 install widgets-sgi/GLw*.h $RPM_BUILD_ROOT%{_includedir}/GL
202
203 install -d $RPM_BUILD_ROOT/usr/src/examples/Mesa
204 for l in book demos samples xdemos images ; do
205         cp -Rf $l $RPM_BUILD_ROOT%{_examplesdir}/Mesa/$l
206 done
207
208 gzip -9nf docs/*
209
210 %post   -p /sbin/ldconfig
211 %postun -p /sbin/ldconfig
212
213 %clean
214 rm -fr $RPM_BUILD_ROOT
215
216 %files
217 %defattr(644,root,root,755)
218 %doc docs/CONFIG.gz
219 %attr(755,root,root) %{_libdir}/libGL*.so.*.*
220
221 %files devel
222 %defattr(644,root,root,755)
223 %doc docs/{IAFA-PACKAGE,README,RELNOTES-*,VERSIONS,CONFORM,COPYRIGHT,DEVINFO,*.spec}.gz
224 %doc docs/README.{3DFX,GGI,MITS,QUAKE,X11,THREADS}.gz
225 %attr(755,root,root) %{_libdir}/libGL*.so
226 %{_libdir}/libMesaGLw*.a
227 %{_libdir}/libGLw.a
228 %dir %{_includedir}/GL
229 %{_includedir}/GL/Mesa-widgets
230 %{_includedir}/GL/GLwDrawA.h
231 %{_includedir}/GL/GLwDrawAP.h
232 %{_includedir}/GL/GLwMDrawA.h
233 %{_includedir}/GL/GLwMDrawAP.h
234 %{_includedir}/GL/gl.h
235 %{_includedir}/GL/glext.h
236 %{_includedir}/GL/gl_mangle.h
237 %{_includedir}/GL/glu.h
238 %{_includedir}/GL/glu_mangle.h
239 %{_includedir}/GL/glx.h
240 %{_includedir}/GL/glx_mangle.h
241 %{_includedir}/GL/osmesa.h
242 %{_includedir}/GL/xmesa.h
243 %{_includedir}/GL/xmesa_x.h
244 %{_includedir}/GL/xmesa_xf86.h
245 %{_mandir}/man3/*
246
247 %files static
248 %defattr(644,root,root,755)
249 %{_libdir}/libGL.a
250 %{_libdir}/libGLU.a
251
252 %files demos
253 %defattr(644,root,root,755)
254 %dir /usr/src/examples/Mesa
255 %dir /usr/src/examples/Mesa/book
256 %dir /usr/src/examples/Mesa/demos
257 %dir /usr/src/examples/Mesa/samples
258 %dir /usr/src/examples/Mesa/xdemos
259
260 %doc /usr/src/examples/Mesa/book/*
261 %doc /usr/src/examples/Mesa/demos/*
262 %doc /usr/src/examples/Mesa/samples/*
263 %doc /usr/src/examples/Mesa/xdemos/*
This page took 0.041251 seconds and 4 git commands to generate.