]> git.pld-linux.org Git - packages/Mesa.git/blobdiff - Mesa.spec
- dropped multigl bcond
[packages/Mesa.git] / Mesa.spec
index 0369b9703e853f0d1734136b29ca196417357bc9..3bfe363a0c0100213bc8aad8b5157527d92f1559 100644 (file)
--- a/Mesa.spec
+++ b/Mesa.spec
@@ -1,5 +1,8 @@
 #
 # TODO:
+# - consider:
+#   --enable-shared-glapi (for libGL; required if the same app uses GL and GLES)
+#   --enable-shared-dricore
 # - subpackage with non-dri libGL for use with X-servers with missing GLX extension?
 # - resurrect static if it's useful
 #
 %bcond_without egl     # build egl
 %bcond_without gallium # don't build gallium
 %bcond_with    gallium_intel   # gallium i915 driver (but doesn't work with AIGLX)
-%bcond_with    gallium_radeon  # gallium radeon driver
+%bcond_without gallium_radeon  # gallium radeon driver
 %bcond_without gallium_nouveau # gallium nouveau driver
 %bcond_without motif   # build static libGLw without Motif interface
-%bcond_with    multigl # package libGL in a way allowing concurrent install with nvidia/fglrx drivers
 %bcond_without osmesa  # don't build osmesa
-%bcond_with    static  # static libraries
+%bcond_with    static_libs     # static libraries
 #
 # minimal supported xserver version
 %define                xserver_ver     1.5.0
 %define                dri2proto_ver   2.6
 %define                glproto_ver     1.4.11
 #
-%define                rel 3
+%define                rel 1
 #
 Summary:       Free OpenGL implementation
 Summary(pl.UTF-8):     Wolnodostępna implementacja standardu OpenGL
 Name:          Mesa
-Version:       7.11
-Release:       %{rel}.%{?with_multigl:.mgl}
+Version:       7.11.2
+Release:       %{rel}
 License:       MIT (core), SGI (GLU,libGLw) and others - see license.html file
 Group:         X11/Libraries
 Source0:       ftp://ftp.freedesktop.org/pub/mesa/%{version}/%{name}Lib-%{version}.tar.bz2
-# Source0-md5: ff03aca82d0560009a076a87c888cf13
+# Source0-md5: 0837c52698fe3252369c3fdb5195afcc
 Patch0:                %{name}-realclean.patch
 Patch1:                %{name}-git.patch
 Patch2:                %{name}-selinux.patch
@@ -43,13 +45,13 @@ URL:                http://www.mesa3d.org/
 BuildRequires: autoconf >= 2.59
 BuildRequires: automake
 BuildRequires: expat-devel
+BuildRequires: gcc >= 5:3.3
 BuildRequires: libdrm-devel >= %{libdrm_ver}
-# drop when 2.4.24 is released
-%{?with_nouveau:BuildRequires: libdrm-devel >= 2.4.24}
 BuildRequires: libselinux-devel
 BuildRequires: libstdc++-devel >= 5:3.3.0
 BuildRequires: libtalloc-devel >= 2:2.0.1
 BuildRequires: libtool >= 2:1.4d
+# for Gallium R300
 BuildRequires: llvm-devel >= 2.9
 %{?with_motif:BuildRequires:   motif-devel}
 BuildRequires: pixman-devel
@@ -80,10 +82,11 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %if %{without gallium}
 %undefine      with_gallium_intel
+%undefine      with_gallium_nouveau
 %undefine      with_gallium_radeon
 %endif
 
-# unresolved symbol _glapi_tls_Dispatch
+# _glapi_tls_Dispatch is defined in libglapi, but it's some kind of symbol ldd -r doesn't notice(?)
 %define                skip_post_check_so      libGLESv1_CM.so.1.* libGLESv2.so.2.*
 
 %description
@@ -106,8 +109,14 @@ Summary:   Mesa implementation of EGL Native Platform Graphics Interface library
 Summary(pl.UTF-8):     Implementacja Mesa biblioteki interfejsu EGL
 License:       MIT
 Group:         Libraries
+# glx driver in libEGL dlopens libGL.so
 Requires:      OpenGL >= 1.2
+Requires:      libdrm >= %{libdrm_ver}
+%if %{with gallium}
+# for egl_gallium.so
+Requires:      Mesa-libOpenVG = %{version}-%{release}
 Requires:      udev-libs >= 150
+%endif
 Provides:      EGL = 1.4
 
 %description libEGL
@@ -127,8 +136,14 @@ Summary(pl.UTF-8): Pliki nagłówkowe implementacji Mesa biblioteki EGL
 License:       MIT
 Group:         Development/Libraries
 Requires:      %{name}-libEGL = %{version}-%{release}
-Requires:      OpenGL-devel >= 1.2
-Requires:      libstdc++-devel
+Requires:      libdrm-devel >= %{libdrm_ver}
+Requires:      xorg-lib-libX11-devel
+Requires:      xorg-lib-libXdamage-devel
+Requires:      xorg-lib-libXext-devel
+Requires:      xorg-lib-libXfixes-devel
+Requires:      xorg-lib-libXxf86vm-devel
+Requires:      xorg-proto-dri2proto-devel >= %{dri2proto_ver}
+Requires:      xorg-proto-glproto-devel >= %{glproto_ver}
 Provides:      EGL-devel = 1.4
 
 %description libEGL-devel
@@ -138,39 +153,18 @@ Header files for Mesa implementation of EGL library.
 Pliki nagłówkowe implementacji Mesa biblioteki EGL.
 
 %package libEGL-static
-Summary:       Mesa libEGL library
-Summary(pl.UTF-8):     Statyczna biblioteka Mesa libEGL
+Summary:       Static Mesa EGL library
+Summary(pl.UTF-8):     Statyczna biblioteka Mesa EGL
 License:       MIT
 Group:         Development/Libraries
 Requires:      %{name}-libEGL-devel = %{version}-%{release}
 Provides:      EGL-static = 1.4
 
 %description libEGL-static
-Static Mesa libEGL library.
+Static Mesa EGL library.
 
 %description libEGL-static -l pl.UTF-8
-Statyczna biblioteka Mesa libEGL.
-
-%package libGLES
-Summary:       Mesa libGLES runtime libraries
-Group:         Libraries
-
-%description libGLES
-Mesa GLES runtime libraries.
-
-%description libGLES -l pl.UTF-8
-Biblioteka Mesa GLES.
-
-%package libGLES-devel
-Summary:       Header files for libGLES library
-Group:         Development/Libraries
-Requires:      %{name}-libGLES = %{version}-%{release}
-
-%description libGLES-devel
-Header files for libGLES library.
-
-%description libGLES-devel -l pl.UTF-8
-Pliki nagłówkowe biblioteki libGLES.
+Statyczna biblioteka Mesa EGL.
 
 %package libGL
 Summary:       Free Mesa3D implementation of libGL OpenGL library
@@ -179,7 +173,6 @@ License:    MIT
 Group:         X11/Libraries
 Requires:      libdrm >= %{libdrm_ver}
 Provides:      OpenGL = 2.1
-# reports version 1.3, but supports glXGetProcAddress() from 1.4
 Provides:      OpenGL-GLX = 1.4
 Obsoletes:     Mesa
 Obsoletes:     Mesa-dri
@@ -254,6 +247,42 @@ Static Mesa3D libGL library. It uses software renderer.
 Statyczna biblioteka libGL z projektu Mesa3D. Używa programowego
 renderingu.
 
+%package libGLES
+Summary:       Mesa implementation of GLES (OpenGL ES) libraries
+Summary(pl.UTF-8):     Implementacja Mesa bibliotek GLES (OpenGL ES)
+Group:         Libraries
+# only for libglapi.so.0
+Requires:      %{name}-libEGL = %{version}-%{release}
+
+%description libGLES
+This package contains shared libraries of Mesa implementation of GLES
+(OpenGL ES) - cross-platform API for full-function 2D and 3D graphics
+on embedded systems. OpenGL ES specification can be found on Khronos
+Group site: <http://www.khronos.org/opengles/>. Mesa implements OpenGL
+ES 1.1 and 2.0.
+
+%description libGLES -l pl.UTF-8
+Ten pakiet zawiera biblioteki współdzielone implementacji Mesa
+standardu GLES (OpenGL ES) - wieloplatformowego API do w pełni
+funkcjonalnej grafiki 2D i 3D na systemach wbudowanych. Specyfikację
+OpenGL ES można znaleźć na stronie Khronos Group:
+<http://www.khronos.org/opengles/>. Mesa zawiera implementacją OpenGL
+ES 1.1 i 2.0.
+
+%package libGLES-devel
+Summary:       Header files for Mesa GLES libraries
+Summary(pl.UTF-8):     Pliki nagłówkowe bibliotek Mesa GLES
+Group:         Development/Libraries
+# EGL for libglapi.so, <KHR/khrplatform.h> always required, <EGL/egl.h> for <GLES/egl.h>
+Requires:      %{name}-libEGL-devel = %{version}-%{release}
+Requires:      %{name}-libGLES = %{version}-%{release}
+
+%description libGLES-devel
+Header files for Mesa GLES libraries.
+
+%description libGLES-devel -l pl.UTF-8
+Pliki nagłówkowe bibliotek Mesa GLES.
+
 %package libGLU
 Summary:       SGI implementation of libGLU OpenGL library
 Summary(pl.UTF-8):     Implementacja SGI biblioteki libGLU ze standardu OpenGL
@@ -326,6 +355,8 @@ License:    SGI MIT-like
 Group:         Development/Libraries
 Requires:      %{name}-libGLw = %{version}-%{release}
 Requires:      OpenGL-devel >= 1.2
+Requires:      xorg-lib-libX11-devel
+Requires:      xorg-lib-libXt-devel
 Provides:      OpenGL-GLw-devel
 
 %description libGLw-devel
@@ -369,6 +400,7 @@ Group:              Development/Libraries
 Requires:      %{name}-libOSMesa = %{version}-%{release}
 # for <GL/gl.h> only
 Requires:      OpenGL-devel
+Requires:      libselinux-devel
 
 %description libOSMesa-devel
 Header file for OSMesa (off-screen renderer) library.
@@ -392,45 +424,41 @@ Static OSMesa (off-screen renderer) library.
 Biblioteka statyczna OSMesa (renderująca bitmapy w pamięci).
 
 %package libOpenVG
-Summary:       OpenVG API implementation
-Summary(pl.UTF-8):     Implementacja API OpenVG
+Summary:       Mesa implementation of OpenVG (Vector Graphics Accelleration) API
+Summary(pl.UTF-8):     Implementacja Mesa API OpenVG (akceleracji grafiki wektorowej)
 License:       MIT
 Group:         Libraries
 # doesn't require base
 
 %description libOpenVG
-OpenVG API implementation.
+This package contains Mesa implementation of OpenVG - cross-platform
+API that provides a low-level hardware acceleration interface for
+vector graphics libraries such as Flash and SVG. OpenVG specification
+can be found on Khronos Group site: <http://www.khronos.org/openvg/>.
+Mesa implements OpenVG 1.1.
 
 %description libOpenVG -l pl.UTF-8
-Implementacja API OpenVG.
+Ten pakiet zawiera implementację Mesa standardu OpenVG -
+wieloplatfomowego API zapewniającego niskopoziomowy interfejs
+akceleracji sprzętowej dla bibliotek grafiki wektorowej, takiej
+jak Flash czy SVG. Specyfikację OpenVG można znaleźć na stronie
+Khronos Group: <http://www.khronos.org/openvg/>. Mesa zawiera
+implementację OpenVG w wersji 1.1.
 
 %package libOpenVG-devel
-Summary:       Header file for libOpenVG library
-Summary(pl.UTF-8):     Plik nagłówkowy biblioteki libOpenVG
+Summary:       Header file for Mesa OpenVG library
+Summary(pl.UTF-8):     Plik nagłówkowy biblioteki Mesa OpenVG
 License:       MIT
 Group:         Development/Libraries
-# for <KHR/khrplatform.h>
+# EGL headers for <KHR/khrplatform.h>
 Requires:      %{name}-libEGL-devel = %{version}-%{release}
 Requires:      %{name}-libOpenVG = %{version}-%{release}
 
 %description libOpenVG-devel
-Header file for libOpenVG library.
+Header file for Mesa OpenVG library.
 
 %description libOpenVG-devel -l pl.UTF-8
-Plik nagłówkowy biblioteki libOpenVG.
-
-%package utils
-Summary:       OpenGL utilities from Mesa3D
-Summary(pl.UTF-8):     Programy narzędziowe OpenGL z projektu Mesa3D
-License:       MIT
-Group:         X11/Applications/Graphics
-# loose deps on libGL/libGLU
-
-%description utils
-OpenGL utilities from Mesa3D: glxgears and glxinfo.
-
-%description utils -l pl.UTF-8
-Programy narzędziowe OpenGL z projektu Mesa3D: glxgears i glxinfo.
+Plik nagłówkowy biblioteki Mesa OpenVG.
 
 %package dri-driver-ati-mach64
 Summary:       X.org DRI driver for ATI Mach64 card family
@@ -732,10 +760,13 @@ X.org DRI driver for VMWare.
 %description dri-driver-vmwgfx -l pl.UTF-8
 Sterownik X.org DRI dla VMware.
 
+# llvm build broken
+%define                filterout_ld    -Wl,--as-needed
+
 %prep
 %setup -q
 %patch0 -p0
-%patch1 -p1
+#%patch1 -p1
 %patch2 -p1
 
 %build
@@ -766,7 +797,7 @@ i915 \
 i965 \
 %endif
 %if %{with gallium_radeon}
-radeon \
+r300 \
 r600 \
 %endif
 %if %{with gallium_nouveau}
@@ -777,33 +808,35 @@ nouveau \
 gallium_drivers=$(echo $gallium_drivers | xargs | tr ' ' ',')
 
 common_flags="\
-       --enable-shared \
-       --enable-selinux \
-       --enable-pic \
        --enable-glx-tls \
+       --enable-pic \
+       --enable-selinux \
+       %{?with_static_libs:--enable-static} \
        --disable-glut \
-%if %{with egl}
-       --enable-egl \
-       --enable-gles1 \
-       --enable-gles2 \
-%endif
 "
 
 osmesa_common_flags="\
        --with-driver=osmesa \
        --disable-asm \
-       --disable-glu \
-       --disable-egl"
+       --disable-egl \
+       --disable-glu"
 
 %if %{with osmesa}
 %configure $common_flags $osmesa_common_flags \
        --with-osmesa-bits=8
 %{__make}
+%{__make} -C src/mesa osmesa.pc
 mv %{_lib} osmesa8
+cp -p src/mesa/osmesa.pc osmesa8
 %{__make} clean
 %endif
 
 %configure $common_flags \
+%if %{with egl}
+       --enable-egl \
+       --enable-gles1 \
+       --enable-gles2 \
+%endif
 %if %{with gallium}
        --enable-openvg \
        --enable-gallium-egl \
@@ -820,39 +853,23 @@ mv %{_lib} osmesa8
 %install
 rm -rf $RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-
 # libs without drivers
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
 %if %{with osmesa}
-cp -Pp osmesa*/*OSMesa* $RPM_BUILD_ROOT%{_libdir}
+cp -p osmesa8/libOSMesa* $RPM_BUILD_ROOT%{_libdir}
+cp -p osmesa8/osmesa.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
 %endif
 
-rm -rf $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*/{.deps,CVS,Makefile.{BeOS*,win,cygnus,DJ,dja}}
-
 # strip out undesirable headers
-olddir=$(pwd)
-cd $RPM_BUILD_ROOT%{_includedir}/GL
-rm [a-fh-np-wyz]*.h glf*.h
-cd $RPM_BUILD_ROOT%{_libdir}
-cd $olddir
+%{__rm} $RPM_BUILD_ROOT%{_includedir}/GL/{glfbdev,mesa_wgl,vms_x_fix,wglext,wmesa}.h
 
 %if %{with gallium}
 # use gallium swrastg as swrast
 mv $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri/swrastg_dri.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri/swrast_dri.so
 %endif
 
-%if %{with multigl}
-install -d $RPM_BUILD_ROOT{%{_libdir}/Mesa,%{_sysconfdir}/ld.so.conf.d}
-
-mv -f $RPM_BUILD_ROOT%{_libdir}/libGL.so.* $RPM_BUILD_ROOT%{_libdir}/Mesa
-ln -sf Mesa/libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
-
-echo %{_libdir}/Mesa >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/Mesa.conf
-%endif
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -888,10 +905,6 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_libdir}/egl
 %attr(755,root,root) %{_libdir}/egl/egl_gallium.so
 %attr(755,root,root) %{_libdir}/egl/st_GL.so
-%if %{with gallium_radeon}
-%attr(755,root,root) %{_libdir}/egl/pipe_r300.so
-%attr(755,root,root) %{_libdir}/egl/pipe_r600.so
-%endif
 %if %{with gallium_intel}
 %attr(755,root,root) %{_libdir}/egl/pipe_i915.so
 %attr(755,root,root) %{_libdir}/egl/pipe_i965.so
@@ -910,7 +923,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/KHR/khrplatform.h
 %{_pkgconfigdir}/egl.pc
 
-%if %{with static}
+%if %{with static_libs}
 %files libEGL-static
 %defattr(644,root,root,755)
 %{_libdir}/libEGL.a
@@ -920,25 +933,15 @@ rm -rf $RPM_BUILD_ROOT
 %files libGL
 %defattr(644,root,root,755)
 %doc docs/{*.html,README.{3DFX,GGI,MITS,QUAKE,THREADS},RELNOTES*}
-%if %{with multigl}
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf.d/Mesa.conf
-%dir %{_libdir}/Mesa
-%attr(755,root,root) %{_libdir}/Mesa/libGL.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/Mesa/libGL.so.1
-%else
 %attr(755,root,root) %{_libdir}/libGL.so.*.*
 %attr(755,root,root) %ghost %{_libdir}/libGL.so.1
 # symlink for binary apps which fail to conform Linux OpenGL ABI
-# (and dlopen libGL.so instead of libGL.so.1)
+# (and dlopen libGL.so instead of libGL.so.1; the same does Mesa libEGL)
 %attr(755,root,root) %{_libdir}/libGL.so
-%endif
 
 %files libGL-devel
 %defattr(644,root,root,755)
 %doc docs/*.spec
-%if %{with multigl}
-%attr(755,root,root) %{_libdir}/libGL.so
-%endif
 %dir %{_includedir}/GL
 %{_includedir}/GL/gl.h
 %{_includedir}/GL/glext.h
@@ -951,23 +954,27 @@ rm -rf $RPM_BUILD_ROOT
 %{_pkgconfigdir}/dri.pc
 %{_pkgconfigdir}/gl.pc
 
+%if %{with static_libs}
+%files libGL-static
+%defattr(644,root,root,755)
+%{_libdir}/libGL.a
+%endif
+
 %files libGLES
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libGLES*.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libGLES*.so.[0-9]
+%attr(755,root,root) %{_libdir}/libGLESv1_CM.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libGLESv1_CM.so.1
+%attr(755,root,root) %{_libdir}/libGLESv2.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libGLESv2.so.2
 
 %files libGLES-devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libGLES*.so
+%attr(755,root,root) %{_libdir}/libGLESv1_CM.so
+%attr(755,root,root) %{_libdir}/libGLESv2.so
 %{_includedir}/GLES
 %{_includedir}/GLES2
-%{_pkgconfigdir}/gles*.pc
-
-%if %{with static}
-%files libGL-static
-%defattr(644,root,root,755)
-%{_libdir}/libGL.a
-%endif
+%{_pkgconfigdir}/glesv1_cm.pc
+%{_pkgconfigdir}/glesv2.pc
 
 %files libGLU
 %defattr(644,root,root,755)
@@ -981,7 +988,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/GL/glu_mangle.h
 %{_pkgconfigdir}/glu.pc
 
-%if %{with static}
+%if %{with static_libs}
 %files libGLU-static
 %defattr(644,root,root,755)
 %{_libdir}/libGLU.a
@@ -1001,7 +1008,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/GL/GLwMDrawAP.h
 %{_pkgconfigdir}/glw.pc
 
-%if %{with static}
+%if %{with static_libs}
 %files libGLw-static
 %defattr(644,root,root,755)
 %{_libdir}/libGLw.a
@@ -1010,31 +1017,32 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with osmesa}
 %files libOSMesa
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libOSMesa*.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libOSMesa*.so.7
+%attr(755,root,root) %{_libdir}/libOSMesa.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libOSMesa.so.7
 
 %files libOSMesa-devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libOSMesa*.so
+%attr(755,root,root) %{_libdir}/libOSMesa.so
 %{_includedir}/GL/osmesa.h
+%{_pkgconfigdir}/osmesa.pc
 
-%if %{with static}
+%if %{with static_libs}
 %files libOSMesa-static
 %defattr(644,root,root,755)
-%{_libdir}/libOSMesa*.a
+%{_libdir}/libOSMesa.a
 %endif
 %endif
 
 %if %{with gallium}
 %files libOpenVG
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libOpenVG.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libOpenVG.so.1
-%attr(755,root,root) %{_libdir}/libOpenVG.so.1.0.0
 
 %files libOpenVG-devel
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libOpenVG.so
 %{_includedir}/VG
-%{_libdir}/libOpenVG.so
 %{_pkgconfigdir}/vg.pc
 %endif
 
@@ -1095,13 +1103,11 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/xorg/modules/dri/mga_dri.so
 
-%if %{with gallium}
 %if %{with gallium_nouveau}
 %files dri-driver-nouveau
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/xorg/modules/dri/nouveau_dri.so
 %endif
-%endif
 
 %files dri-driver-savage
 %defattr(644,root,root,755)
This page took 0.071149 seconds and 4 git commands to generate.