File glamor.spec of Package glamor

# spec file for package glamor
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           glamor
Version:        0.6.0
Release:        0
Summary:        Open-source graphics common driver based on GL library
License:        MIT
Group:          System/X11/Servers/XF86_4

BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(dri2proto) >= 2.6
BuildRequires:  pkgconfig(egl)
BuildRequires:  pkgconfig(gbm)
BuildRequires:  pkgconfig(gl) >= 7.1.0
BuildRequires:  pkgconfig(glesv2)
BuildRequires:  pkgconfig(libdrm) >= 2.4.23
BuildRequires:  pkgconfig(xorg-server) >= 1.10
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExcludeArch:    s390 s390x
# make sure we rebuild when Mesa changes
%requires_eq    Mesa-libGL1

The glamor module is an open-source 2D graphics common driver for the X Window
System as implemented by It supports a variety of graphics chipsets which
have OpenGL/EGL/GBM supports.

It’s a GL-based rendering acceleration library for X server:

  * It uses GL functions and shader to complete the 2D graphics operations.
  * It uses normal texture to represent a drawable pixmap if possible.
  * It calls GL functions to render to the texture directly.

It’s somehow hardware independently. And could be a building block of any
X server’s DDX driver:

  * Xorg’s DDX driver could leverage glamor-egl package to create an egl context
    without any native X system. Now the xf86-intel-video driver uses glamor as
    one of its option. When you build it with --enable-glamor, then it will use
    glamor as its rendering enginee.

This package can support every platform which has OpenGL and gbm and drm libraries.

%package devel
Summary:        Development files for %{name}
Group:          Development/Languages/C and C++
Requires:       %{name} = %{version}

%description devel
Development files for %{name}

%setup -q -n %{name}-egl-%{version}

autoreconf -fi
%configure \
 --disable-static \
make %{?_smp_mflags}

make install DESTDIR=%{buildroot}
# No longer required with current radeon drivers; also it harms
# when being used together with fglrx driver
rm %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/glamor.conf
mkdir -p %{buildroot}%{_sysconfdir}/
cat <<EOF >%{buildroot}%{_sysconfdir}/{name}.conf

%post   -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files devel
%exclude %{_libdir}/
%exclude %{_libdir}/xorg/modules/*.la

openSUSE Build Service is sponsored by