File xorg-x11-driver-video.spec of Package xorg-x11-driver-video
#
# spec file for package xorg-x11-driver-video
#
# Copyright (c) 2011 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 http://bugs.opensuse.org/
#
# norootforbuild
%define broken_kms_blacklist 0
Name: xorg-x11-driver-video
BuildRequires: Mesa-devel libdrm-devel pkgconfig xorg-x11-proto-devel xorg-x11-server-sdk
Url: http://xorg.freedesktop.org/
Version: 7.6
Release: 53.<RELEASE56>
License: MIT License (or similar)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: System/X11/Servers/XF86_4
Provides: xorg-x11-driver-video-nvidia 855resolution 915resolution
Provides: intel-i810-xorg-x11 xorg-x11-driver-video-intel
Requires: VIDEO_ABI_VERSION = 8
Requires: libdrm >= 2.4.21
Obsoletes: xorg-x11-driver-video-nvidia 855resolution 915resolution
Obsoletes: intel-i810-xorg-x11 xorg-x11-driver-video-intel
Supplements: xorg-x11-server
Summary: X.Org video drivers
ExcludeArch: s390 s390x
Source0: xf86-video-apm-1.2.3.tar.bz2
Source1: xf86-video-ark-0.7.3.tar.bz2
Source2: xf86-video-ast-0.91.10.tar.bz2
Source4: xf86-video-chips-1.2.3.tar.bz2
Source5: xf86-video-cirrus-1.3.2.tar.bz2
Source7: xf86-video-dummy-0.3.4.tar.bz2
Source8: xf86-video-fbdev-0.4.2.tar.bz2
Source9: xf86-video-glint-1.2.5.tar.bz2
Source10: xf86-video-i128-1.3.4.tar.bz2
Source11: xf86-video-i740-1.3.2.tar.bz2
Source14: xf86-video-mga-1.4.13.tar.bz2
Source15: xf86-video-neomagic-1.2.5.tar.bz2
Source16: xf86-video-newport-0.2.3.tar.bz2
Source18: xf86-video-nv-2.1.18.tar.bz2
Source19: xf86-video-rendition-4.2.4.tar.bz2
Source20: xf86-video-s3-0.6.3.tar.bz2
Source21: xf86-video-s3virge-1.10.4.tar.bz2
Source22: xf86-video-savage-2.3.2.tar.bz2
Source23: xf86-video-siliconmotion-1.7.4.tar.bz2
Source24: xf86-video-sis-0.10.3.tar.bz2
Source25: xf86-video-sisusb-0.9.4.tar.bz2
Source33: xf86-video-tdfx-1.4.3.tar.bz2
Source34: xf86-video-tga-1.2.1.tar.bz2
Source35: xf86-video-trident-1.3.4.tar.bz2
Source36: xf86-video-tseng-1.2.4.tar.bz2
Source37: xf86-video-v4l-0.2.0.tar.bz2
Source38: xf86-video-vesa-2.3.0.tar.bz2
Source41: xf86-video-vmware-11.0.3.tar.bz2
Source42: xf86-video-voodoo-1.2.4.tar.bz2
Source44: HALlib-4.1.tar.gz
Source45: xf86-video-intel-2.14.0.tar.bz2
Source46: xf86-video-ati-6.14.0.tar.bz2
Source51: xf86-video-geode-2.11.10.tar.bz2
Source54: xf86-video-mach64-6.8.2.tar.bz2
Source55: xf86-video-r128-6.8.1.tar.bz2
Source56: intel-gpu-tools-1.0.2-20101210-292ae45.tar.bz2
Source57: xf86-video-xgi-1.6.0.tar.bz2
Source58: xf86-video-xgixp-1.8.0.tar.bz2
Source99: baselibs.conf
Source100: sax2-hwinfo-data.tar.gz
%if %broken_kms_blacklist
Source101: kms-blacklist.tar.bz2
%endif
Source102: xorg-confd-snippets.tar.bz2
Patch10: xf86-video-tdfx.diff
Patch12: xf86-video-mga-hal.diff
Patch14: xf86-video-rendition.diff
Patch35: xf86-video-trident-1.3.3.dif
Patch46: xf86-video-ati.diff
Patch47: xf86-video-vmware-10.15.2.diff
Patch56: xf86-video-mga-g200se-swcursor.diff
Patch64: xf86-video-vesa_DefaultRefresh.diff
Patch68: xf86-video-ati-bug474071-fix2.diff
Patch69: xf86-video-ati-ia64_screen_blank.diff
Patch71: xf86-video-fbdev.diff
Patch104: xf86-video-ati-disable-dri-bug437651-ia64only.diff
Patch130: xf86-video-intel-buildfix.diff
Patch131: xf86-video-ati-bug519261-increase-virtual.diff
Patch132: xf86-video-nv-bug519261-increase-virtual.diff
Patch137: xf86-video-newport-commit-48f48e5.diff
#Patch140: xf86-video-ati-6.7.197-r128-xvideo.patch
#Patch141: xf86-video-ati-theatre.patch
#Patch142: xf86-video-ati-theatre-pciaccess.patch
Patch143: xf86-video-xgi-buildfix.diff
Patch144: xf86-video-xgi-symbols.diff
Patch145: xf86-video-xgixp-symbols.diff
Patch150: xf86-video-intel-dell_backlight.diff
Patch200: xf86-video-intel-damage-fix.diff
Patch201: xf86-video-intel-gen6-Invalidate-texture-cache.patch
%description
This package contains X.Org video drivers.
%prep
%setup -q -T -c %{name}
for i in $RPM_SOURCE_DIR/xf86-video-*.tar.bz2; do tar xjf $i; done
tar xjf %{SOURCE56}
# Geode LX/GX is x86 only
%ifnarch %ix86
rm -rf xf86-video-geode*
%endif
pushd xf86-video-trident-1.3.4
%patch35 -p0
popd
pushd xf86-video-mga-*
tar xzf %{SOURCE44} -C src
%ifarch %ix86
%patch12
%endif
%patch56
popd
pushd xf86-video-tdfx-*
%patch10
popd
pushd xf86-video-rendition-*
%patch14
popd
pushd xf86-video-ati-*
%patch46
%ifarch ia64
%patch104 -p1
%endif
popd
pushd xf86-video-vmware-*
%patch47
popd
pushd xf86-video-vesa-*
%patch64 -p1
popd
pushd xf86-video-ati-*
%patch68 -p2
%patch69 -p2
%patch131 -p1
popd
pushd xf86-video-fbdev-*
%patch71
popd
pushd xf86-video-intel-*
%patch130 -p0
%patch150 -p1
%patch200 -p1
%patch201 -p1
popd
pushd xf86-video-nv-*
%patch132 -p1
popd
pushd xf86-video-newport-*
%patch137 -p1
popd
#cp xf86-video-ati-*/src/{generic_bus.h,theatre_reg.h,theatre.h,theatre_detect.h,theatre_detect.c,theatre_detect_module.c,theatre.c,theatre_module.c} xf86-video-r128-*/src
#pushd xf86-video-r128-*
#%patch140 -p1
#%patch141 -p1
#%patch142 -p1
#popd
pushd xf86-video-xgi-*
%patch143 -p1
%patch144 -p1
popd
pushd xf86-video-xgixp-*
%patch145 -p1
popd
%build
for dir in $(ls -d xf86-video-*) intel-gpu-tools-*; do
pushd $dir
case $dir in
xf86-video-mga-*) rm -f configure ;;
*) ;;
esac
test -f configure || autoreconf -fi
%configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%{__make} %{?jobs:-j%jobs}
popd
done
%install
for dir in $(ls -d xf86-video-*) intel-gpu-tools-*; do
make -C $dir install DESTDIR=$RPM_BUILD_ROOT
done
%ifarch %ix86
pushd xf86-video-mga-*/src
gcc -m32 \
-o $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/mgahal_drv.so \
-shared \
.libs/mga_halmod.o .libs/clientlx.o HALlib/mgaHALlib.a \
-Wl,-Bstatic -Wl,-Bdynamic
popd
%endif
tar xf $RPM_SOURCE_DIR/sax2-hwinfo-data.tar.gz -C $RPM_BUILD_ROOT
%if %broken_kms_blacklist
tar xf $RPM_SOURCE_DIR/kms-blacklist.tar.bz2 -C $RPM_BUILD_ROOT
%endif
tar xf $RPM_SOURCE_DIR/xorg-confd-snippets.tar.bz2 -C $RPM_BUILD_ROOT
%clean
rm -rf "$RPM_BUILD_ROOT"
%post
/sbin/ldconfig
if ls var/lib/hardware/ids/* &> /dev/null; then
cat var/lib/hardware/ids/* > var/lib/hardware/hd.ids
else
rm -f var/lib/hardware/hd.ids
fi
exit 0
%postun
/sbin/ldconfig
if ls var/lib/hardware/ids/* &> /dev/null; then
cat var/lib/hardware/ids/* > var/lib/hardware/hd.ids
else
rm -f var/lib/hardware/hd.ids
fi
exit 0
%files
%defattr(-,root,root)
%dir /etc/X11/xorg.conf.d
%dir /usr/share/sax
%dir /usr/share/sax/api
%dir /usr/share/sax/api/data
%dir /usr/share/sax/api/data/cdb
%dir /usr/share/sax/sysp
%dir /usr/share/sax/sysp/maps
%dir /usr/share/sax/sysp/maps/update
%dir /var/lib/hardware
%dir /var/lib/hardware/ids
%if %broken_kms_blacklist
%config /etc/X11/kms-blacklist.local
/etc/X11/kms-blacklist.nouveau
/etc/X11/kms-blacklist.radeon
/etc/modprobe.d/99-kms.conf
%endif
/usr/bin/intel_*
%{_libdir}/lib*
%{_libdir}/xorg/modules/
%{_mandir}/man1/*
%{_mandir}/man4/*
/usr/share/sax/api/data/cdb/Cards.20.%{name}
/usr/share/sax/sysp/maps/update/Identity.map.20.%{name}
%if %broken_kms_blacklist
/sbin/kms_loader.sh
%endif
/var/lib/hardware/ids/20.%{name}
%config /etc/X11/xorg.conf.d/*
%changelog