-
+#
+# Conditional build:
+%bcond_with xprint # Xprint server (broken, upstream doesn't intend to fix it)
+%bcond_with multigl # package libglx.so in a way allowing concurrent install with nvidia/fglrx drivers
+%bcond_with dri2 # DRI2 support
+%bcond_with hal # HAL support
+%bcond_with record # RECORD extension
+%bcond_with xtrap # XTrap extension (deprecated)
+#
# ABI versions, see hw/xfree86/common/xf86Module.h
-%define xorg_xserver_server_ansic_abi 0.3
-%define xorg_xserver_server_extension_abi 0.3
-%define xorg_xserver_server_font_abi 0.5
-%define xorg_xserver_server_videodrv_abi 2.0
-%define xorg_xserver_server_xinput_abi 2.0
+%define xorg_xserver_server_ansic_abi 0.4
+%define xorg_xserver_server_extension_abi 1.1
+%define xorg_xserver_server_font_abi 0.6
+%define xorg_xserver_server_videodrv_abi 4.1
+%define xorg_xserver_server_xinput_abi 2.1
Summary: X.org server
Summary(pl.UTF-8): Serwer X.org
Name: xorg-xserver-server
-Version: 1.4
-Release: 3
+Version: 1.5.1
+Release: 1%{?with_multigl:.mgl}
License: MIT
Group: X11/Servers
Source0: http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-%{version}.tar.bz2
-# Source0-md5: a06d9fe4f9f1d459ae02657f9ce64220
-%define mesa_version 7.0.1
-Source1: http://dl.sourceforge.net/mesa3d/MesaLib-%{mesa_version}.tar.bz2
-# Source1-md5: c056abd763e899114bf745c9eedbf9ad
+# Source0-md5: d16f5a033f001c9069b4141194614da2
Source2: xserver.pamd
Patch0: %{name}-ncurses.patch
Patch1: %{name}-xwrapper.patch
-# nasty hack for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30052
-Patch2: %{name}-gcc-x86_64-workaround.patch
-Patch3: %{name}-link.patch
-Patch4: %{name}-dbus.patch
+Patch2: %{name}-glyph.patch
URL: http://xorg.freedesktop.org/
+BuildRequires: Mesa-libGL-devel >= 7.1
# for glx headers
BuildRequires: OpenGL-GLX-devel
BuildRequires: autoconf >= 2.57
BuildRequires: automake
BuildRequires: cpp
+%if %{with hal}
BuildRequires: dbus-devel
BuildRequires: hal-devel
-BuildRequires: libdrm-devel >= 2.3.0
+%endif
+BuildRequires: libdrm-devel >= 2.3.1
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: pam-devel
BuildRequires: xorg-lib-libXxf86vm-devel
BuildRequires: xorg-lib-libdmx-devel
BuildRequires: xorg-lib-libfontenc-devel
-BuildRequires: xorg-lib-liblbxutil-devel
+BuildRequires: xorg-lib-libpciaccess-devel
BuildRequires: xorg-lib-libxkbfile-devel
BuildRequires: xorg-lib-libxkbui-devel >= 1.0.2
BuildRequires: xorg-lib-xtrans-devel
BuildRequires: xorg-proto-kbproto-devel >= 1.0.3
BuildRequires: xorg-proto-printproto-devel
BuildRequires: xorg-proto-randrproto-devel >= 1.2
-BuildRequires: xorg-proto-recordproto-devel
+%{?with_record:BuildRequires: xorg-proto-recordproto-devel}
BuildRequires: xorg-proto-renderproto-devel >= 0.9.3
BuildRequires: xorg-proto-resourceproto-devel
BuildRequires: xorg-proto-scrnsaverproto-devel >= 1.1.0
-BuildRequires: xorg-proto-trapproto-devel
+%{?with_xtrap:BuildRequires: xorg-proto-trapproto-devel}
BuildRequires: xorg-proto-videoproto-devel
BuildRequires: xorg-proto-xcmiscproto-devel
BuildRequires: xorg-proto-xextproto-devel
BuildRequires: xorg-proto-xf86bigfontproto-devel
BuildRequires: xorg-proto-xf86dgaproto-devel
-BuildRequires: xorg-proto-xf86driproto-devel
+BuildRequires: xorg-proto-xf86driproto-devel >= 2.0.4
BuildRequires: xorg-proto-xf86miscproto-devel
BuildRequires: xorg-proto-xf86vidmodeproto-devel
BuildRequires: xorg-proto-xineramaproto-devel
BuildRequires: xorg-proto-xproto-devel >= 7.0.9
BuildRequires: xorg-util-util-macros >= 0.99.2
-# xcalibrateproto, tslib (for KDRIVE only)
+#BR: xcalibrateproto, tslib (for KDRIVE only)
+#BR: glitz-devel >= 0.4.3 (for XGL and EGL only)
+Requires(triggerpostun): sed >= 4.0
+Requires: pixman >= 0.9.5
Requires: xkeyboard-config
-# glitz-devel >= 0.4.3 (for XGL and EGL only)
# for rgb.txt
Requires: xorg-app-rgb >= 0.99.3
Requires: xorg-app-xkbcomp
Summary(pl.UTF-8): Biblioteka rozszerzenia GLX dla serwera X.org
Group: X11/Servers
Requires: %{name} = %{version}-%{release}
-Provides: xorg-xserver-libglx(glapi) = %{mesa_version}
+# Mesa version glapi tables in glx/ dir come from
+Provides: xorg-xserver-libglx(glapi) = 7.1.0
Provides: xorg-xserver-modules-libglx
Obsoletes: X11-OpenGL-core < 1:7.0.0
Obsoletes: XFree86-OpenGL-core < 1:7.0.0
+%if %{without multigl}
Conflicts: xorg-driver-video-nvidia
+%endif
%description -n xorg-xserver-libglx
GLX extension library fo X.org server.
Biblioteka rozszerzenia GLX dla serwera X.org.
%prep
-%setup -q -a1 -n xorg-server-%{version}
+%setup -q -n xorg-server-%{version}
%patch0 -p1
%patch1 -p0
-%ifarch %{x8664} i486
%patch2 -p1
-%endif
-%patch3 -p1
-%patch4 -p0
# xserver uses pixman-1 API/ABI so put that explictly here
sed -i -e 's#<pixman\.h#<pixman-1/pixman.h#g' ./fb/fb.h ./include/miscstruct.h ./render/picture.h
%build
-if API=$(awk '/#define ABI_ANSIC_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' hw/xfree86/common/xf86Module.h) && \
- [ $API != %{xorg_xserver_server_ansic_abi} ]; then
- echo "Set %%define xorg_xserver_server_ansic_abi to $API and rerun."
- exit 1
+API=$(awk '/#define ABI_ANSIC_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' hw/xfree86/common/xf86Module.h)
+if [ $API != %{xorg_xserver_server_ansic_abi} ]; then
+ echo "Set %%define xorg_xserver_server_ansic_abi to $API and rerun."
+ exit 1
fi
-if API=$(awk '/#define ABI_EXTENSION_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' hw/xfree86/common/xf86Module.h) && \
- [ $API != %{xorg_xserver_server_extension_abi} ]; then
- echo "Set %%define xorg_xserver_server_extension_abi to $API and rerun."
- exit 1
+API=$(awk '/#define ABI_EXTENSION_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' hw/xfree86/common/xf86Module.h)
+if [ $API != %{xorg_xserver_server_extension_abi} ]; then
+ echo "Set %%define xorg_xserver_server_extension_abi to $API and rerun."
+ exit 1
fi
-if API=$(awk '/#define ABI_FONT_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' hw/xfree86/common/xf86Module.h) && \
- [ $API != %{xorg_xserver_server_font_abi} ]; then
- echo "Set %%define xorg_xserver_server_font_abi to $API and rerun."
- exit 1
+API=$(awk '/#define ABI_FONT_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' hw/xfree86/common/xf86Module.h)
+if [ $API != %{xorg_xserver_server_font_abi} ]; then
+ echo "Set %%define xorg_xserver_server_font_abi to $API and rerun."
+ exit 1
fi
-if API=$(awk '/#define ABI_VIDEODRV_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' hw/xfree86/common/xf86Module.h) && \
- [ $API != %{xorg_xserver_server_videodrv_abi} ]; then
- echo "Set %%define xorg_xserver_server_videodrv_abi to $API and rerun."
- exit 1
+API=$(awk '/#define ABI_VIDEODRV_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' hw/xfree86/common/xf86Module.h)
+if [ $API != %{xorg_xserver_server_videodrv_abi} ]; then
+ echo "Set %%define xorg_xserver_server_videodrv_abi to $API and rerun."
+ exit 1
fi
-if API=$(awk '/#define ABI_XINPUT_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' hw/xfree86/common/xf86Module.h) && \
- [ $API != %{xorg_xserver_server_xinput_abi} ]; then
- echo "Set %%define xorg_xserver_server_xinput_abi to $API and rerun."
- exit 1
+API=$(awk '/#define ABI_XINPUT_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' hw/xfree86/common/xf86Module.h)
+if [ $API != %{xorg_xserver_server_xinput_abi} ]; then
+ echo "Set %%define xorg_xserver_server_xinput_abi to $API and rerun."
+ exit 1
fi
%{__libtoolize}
%configure \
--with-os-name="PLD/Linux" \
--with-os-vendor="PLD/Team" \
+ --disable-builtin-fonts \
+ %{!?with_hal:--disable-config-hal} \
--enable-aiglx \
--enable-builddocs \
--enable-dga \
--enable-dmx \
--enable-glx-tls \
- --enable-lbx \
+ --enable-install-libxf86config \
+ %{?with_record:--enable-record} \
+ --enable-secure-rpc \
--enable-xevie \
--enable-xorgcfg \
- --enable-xprint \
+ %{?with_xtrap:--enable-xtrap} \
+ --%{?with_dri2:en}%{!?with_dri2:dis}able-dri2 \
+ --%{?with_xprint:en}%{!?with_xprint:dis}able-xprint \
--with-dri-driver-path=%{_libdir}/xorg/modules/dri \
--with-default-font-path="%{_fontsdir}/misc,%{_fontsdir}/TTF,%{_fontsdir}/OTF,%{_fontsdir}/Type1,%{_fontsdir}/100dpi,%{_fontsdir}/75dpi" \
- --with-mesa-source="`pwd`/Mesa-%{mesa_version}" \
--with-xkb-output=/var/lib/xkb
%{__make}
install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/xserver
install -d $RPM_BUILD_ROOT/etc/security/console.apps
install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{dri,drivers,input}
-install hw/xfree86/parser/xf86Parser.h $RPM_BUILD_ROOT%{_includedir}/xorg/xf86Parser.h
-install hw/xfree86/parser/xf86Optrec.h $RPM_BUILD_ROOT%{_includedir}/xorg/xf86Optrec.h
-install hw/xfree86/parser/libxf86config.a $RPM_BUILD_ROOT%{_libdir}/libxf86config.a
:> $RPM_BUILD_ROOT/etc/security/console.apps/xserver
:> $RPM_BUILD_ROOT/etc/security/blacklist.xserver
rm -f $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{*,*/*}.{la,a}
+%if %{with multigl}
+cd $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions
+mv -f libglx.so libglx.so.%{version}
+ln -sf libglx.so.%{version} libglx.so
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
+%if %{with multigl}
+%post -n xorg-xserver-libglx
+if [ ! -e %{_libdir}/xorg/modules/extensions/libglx.so ]; then
+ ln -sf libglx.so.%{version} %{_libdir}/xorg/modules/extensions/libglx.so
+fi
+%endif
+
+%triggerpostun -- xorg-xserver-server < 1.5.0
+if [ -f /etc/X11/xorg.conf ]; then
+ sed -i -e 's/^\s*RgbPath.*$/#& # obsolete option/' /etc/X11/xorg.conf
+ sed -i -e 's/^\s*Load\s*"type1".*$/#& # obsolete module/' /etc/X11/xorg.conf
+%if %{without record}
+ sed -i -e 's/^\s*Load\s*"record".*$/#& # module disabled in this build/' /etc/X11/xorg.conf
+%endif
+%if %{without xtrap}
+ sed -i -e 's/^\s*Load\s*"xtrap".*$/#& # deprecated module, disabled/' /etc/X11/xorg.conf
+%endif
+fi
+
%files
%defattr(644,root,root,755)
%doc COPYING ChangeLog
%attr(755,root,root) %{_bindir}/in[bwl]
%attr(755,root,root) %{_bindir}/ioport
%attr(755,root,root) %{_bindir}/out[bwl]
-%attr(755,root,root) %{_bindir}/pcitweak
-%attr(755,root,root) %{_bindir}/scanpci
%attr(755,root,root) %{_bindir}/xorgconfig
%{_libdir}/X11/Cards
%{_libdir}/X11/Options
%dir %{_libdir}/xorg
+%{_libdir}/xorg/protocol.txt
%dir %{_libdir}/xorg/modules
%dir %{_libdir}/xorg/modules/dri
%dir %{_libdir}/xorg/modules/drivers
%dir %{_libdir}/xorg/modules/extensions
-%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libGLcore.so
%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libdbe.so
%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libdri.so
+%{?with_dri2:%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libdri2.so}
%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libextmod.so
-%attr(755,root,root) %{_libdir}/xorg/modules/extensions/librecord.so
-%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libxtrap.so
+%{?with_record:%attr(755,root,root) %{_libdir}/xorg/modules/extensions/librecord.so}
+%{?with_xtrap:%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libxtrap.so}
%dir %{_libdir}/xorg/modules/fonts
%attr(755,root,root) %{_libdir}/xorg/modules/fonts/lib*.so
%dir %{_libdir}/xorg/modules/input
%dir %{_libdir}/xorg/modules/multimedia
%attr(755,root,root) %{_libdir}/xorg/modules/multimedia/*.so
%attr(755,root,root) %{_libdir}/xorg/modules/lib*.so
-%dir %{_libdir}/xserver
-%{_libdir}/xserver/SecurityPolicy
%dir /var/lib/xkb
/var/lib/xkb/README.compiled
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/xserver
%{_mandir}/man1/Xserver.1x*
%{_mandir}/man1/cvt.1*
%{_mandir}/man1/gtf.1x*
-%{_mandir}/man1/pcitweak.1x*
-%{_mandir}/man1/scanpci.1x*
%{_mandir}/man1/xorgconfig.1*
%{_mandir}/man4/exa.4*
%{_mandir}/man4/fbdevhw.4*
%{_mandir}/man5/xorg.conf.5x*
-%{_mandir}/man5/SecurityPolicy.5x*
%files -n xorg-xserver-Xdmx
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/Xnest
%{_mandir}/man1/Xnest.1x*
+%if %{with xprint}
%files -n xorg-xserver-Xprt
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/Xprt
%{_libdir}/X11/xserver
%{_mandir}/man1/Xprt.1x*
+%endif
%files -n xorg-xserver-Xvfb
%defattr(644,root,root,755)
%files -n xorg-xserver-libglx
%defattr(644,root,root,755)
+%if %{with multigl}
+%ghost %{_libdir}/xorg/modules/extensions/libglx.so
+%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libglx.so.%{version}
+%else
%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libglx.so
+%endif