File xorg-x11-libX11.spec of Package xorg-x11-libX11
#
# spec file for package xorg-x11-libX11
#
# 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
Name: xorg-x11-libX11
%define xcb 1
%define dirsuffix 1.4.0
BuildRequires: fdupes pkgconfig xorg-x11-libXau-devel xorg-x11-libXdmcp-devel xorg-x11-proto-devel xorg-x11-xtrans-devel zlib-devel
%if %xcb
BuildRequires: xorg-x11-libxcb-devel
%endif
PreReq: coreutils
Url: http://xorg.freedesktop.org/
Version: 7.6
Release: 21
License: MIT License (or similar)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: System/Libraries
Provides: xorg-x11-libs:/usr/X11R6/%{_lib}/libX11.so.6
Summary: X.Org X11 library
Source: libX11-%{dirsuffix}.tar.bz2
%if %suse_version <= 1010
Source1: xorg-x11-libX11.sh
Source2: xorg-x11-libX11.csh
%endif
Source3: baselibs.conf
Patch: bug153744.diff
Patch4: p_new-locales.diff
Patch6: p_sr_CS-compose.diff
Patch7: p_khmer-compose.diff
Patch8: p_khmer-locale.diff
Patch9: p_xlib_skip_ext_env.diff
Patch10: bug-239698_libx11.diff
Patch13: bug-221326-xim-sync.patch
Patch15: en-locales.diff
Patch17: Xcms.diff
Patch18: compose-zh_CN.UTF-8.diff
Patch19: 0001--XIM-Revert-commit-1a1a42a3.patch
%description
This package contains the X.Org X11 library.
Authors:
--------
Bob Scheifler
Bruno Haible
Hideki Hiura
Hiroyuki Miyamoto
Holger Veit
Jim Gettys
Katsuhisi Yano
Kazunori Nishihara
Keith Packard
Li Yuhong
Sebastien Marineau
Seiji Kuwari
Shigeru Yamada
Stephen Gildea
Takashi Fujiwara
Warren Turkal
%package devel
License: MIT License (or similar)
Summary: Include Files and Libraries mandatory for Development.
Group: Development/Libraries/X11
Provides: xorg-x11-devel:/usr/X11R6/%{_lib}/libX11.so
Requires: xorg-x11-proto-devel %{name} = %{version}
%if %xcb
Requires: xorg-x11-libxcb-devel
%endif
PreReq: coreutils
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
Authors:
--------
Bob Scheifler
Bruno Haible
Hideki Hiura
Hiroyuki Miyamoto
Holger Veit
Jim Gettys
Katsuhisi Yano
Kazunori Nishihara
Keith Packard
Li Yuhong
Sebastien Marineau
Seiji Kuwari
Shigeru Yamada
Stephen Gildea
Takashi Fujiwara
Warren Turkal
%prep
%setup -q -n libX11-%{dirsuffix}
# make legal department happy (Bug #153744)
test -f nls/ja.U90/XLC_LOCALE.pre && exit 1
test -f nls/ja.S90/XLC_LOCALE.pre && exit 1
%patch
%patch4
%patch6
%patch7
%patch8
%patch9
%patch10 -p1
%patch13 -p1
%patch15 -p0
%patch17 -p0
%patch18 -p0
%patch19 -p1
%build
autoreconf -fi
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure --disable-silent-rules \
%if %suse_version > 1110
--disable-static \
%endif
--with-pic \
%if %xcb
--with-xcb \
%else
--without-xcb \
%endif
--datadir=/usr/share
# currently broken since xlcUTF-8 plugin is not built
#--enable-loadable-i18n
make %{?jobs:-j %jobs}
%install
make install DESTDIR=$RPM_BUILD_ROOT
%if %suse_version <= 1010
mkdir -p $RPM_BUILD_ROOT/etc/profile.d
install -m 644 $RPM_SOURCE_DIR/%name.{csh,sh} $RPM_BUILD_ROOT/etc/profile.d
%endif
# Some files are empty/missing for some UTF-8 locales
pushd $RPM_BUILD_ROOT/usr/share/X11/locale
for i in *.UTF-8; do
echo $i
if [ "$i" != "en_US.UTF-8" ]; then
touch $i/Compose $i/XI18N_OBJS
test -s $i/Compose || ln -snf ../en_US.UTF-8/Compose $i
test -s $i/XI18N_OBJS || ln -snf ../en_US.UTF-8/XI18N_OBJS $i
test -s $i/XLC_LOCALE || ln -snf ../en_US.UTF-8/XLC_LOCALE $i
fi
done
popd
%if %suse_version > 1110
%{__rm} -f %{buildroot}%{_libdir}/*.la
%endif
%fdupes -s $RPM_BUILD_ROOT
%clean
rm -rf "$RPM_BUILD_ROOT"
%pre
test -L usr/lib/X11 && rm usr/lib/X11
exit 0
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%pre devel
test -L usr/include/X11 && rm usr/include/X11
exit 0
%files
%defattr(-,root,root)
/usr/share/doc/libX11/
%{_mandir}/man5/*
%if %suse_version <= 1010
/etc/profile.d/%name.csh
/etc/profile.d/%name.sh
%endif
%{_libdir}/*.so.*
/usr/share/X11/
%files devel
%defattr(-,root,root)
/usr/include/X11/*.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man3/*
%if %suse_version <= 1110
%{_libdir}/*.a
%{_libdir}/*.la
%endif
%changelog