#
# spec file for package libXft
#
# Copyright (c) 2019 SUSE LINUX 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/
#


Name:           libXft
%define lname	libXft2
Version:        2.3.3
Release:        1.10
Summary:        X FreeType library
License:        MIT
Group:          Development/Libraries/C and C++
Url:            http://xorg.freedesktop.org/

#Git-Clone:	git://anongit.freedesktop.org/xorg/lib/libXft
#Git-Web:	http://cgit.freedesktop.org/xorg/lib/libXft/
Source:         http://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.bz2
# ft2build include. Positive sideeffect is that this patch makes it build with both freetype2 2.5.1, and older versions
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Source1:        baselibs.conf
BuildRequires:  autoconf >= 2.60
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(fontconfig) >= 2.5.92
BuildRequires:  pkgconfig(freetype2) >= 2.1.6
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xorg-macros) >= 1.8
BuildRequires:  pkgconfig(xrender) >= 0.8.2

%description
Xft is a library that connects X applications with the FreeType font
rasterization library. Xft uses fontconfig to locate fonts so it has
no configuration files.

%package -n %lname
Summary:        X FreeType library
Group:          System/Libraries

%description -n %lname
Xft is a library that connects X applications with the FreeType font
rasterization library. Xft uses fontconfig to locate fonts so it has
no configuration files.

%package devel
Summary:        Development files for the X FreeType library
Group:          Development/Libraries/C and C++
Requires:       %lname = %version

%description devel
Xft is a library that connects X applications with the FreeType font
rasterization library. Xft uses fontconfig to locate fonts so it has
no configuration files.

This package contains the development headers for the library found
in %lname.

%prep
%setup -q

%build
autoreconf -fi
%configure --disable-static
%make_build

%install
make install DESTDIR="%buildroot"
rm -f "%buildroot/%_libdir"/*.la

%post -n %lname -p /sbin/ldconfig

%postun -n %lname -p /sbin/ldconfig

%files -n %lname
%defattr(-,root,root)
%_libdir/libXft.so.2*

%files devel
%defattr(-,root,root)
%_includedir/X11/Xft
%_libdir/libXft.so
%_libdir/pkgconfig/xft.pc
%_mandir/man3/*

%changelog
* Thu Mar 21 2019 Stefan Dirsch <sndirsch@suse.com>
- Update to version 2.3.3
  * This release updates XftDrawSrcPicture to use XRenderCreateSolidFill
    when available (Render version 0.10 or later).
* Tue Jan 22 2019 Martin Liška <mliska@suse.cz>
- Use make_build macro in order to get verbose output of make.
* Tue May 12 2015 sndirsch@suse.com
- added baselibs.conf as source to specfile
* Fri Jun  6 2014 sndirsch@suse.com
- Update to version 2.3.2
  * This release fixes a build issue with FreeType 2.5.1 & later,
    and fixes the prototypes in the man page for XftDrawString8 &
    XftDrawRect.
  * supersedes U_use-recommended-freetype-include.patch
* Wed Dec 11 2013 hrvoje.senjan@gmail.com
- Added U_use-recommended-freetype-include.patch -- Freetype upstream
  recommends using their macros together with ft2build include.
  Positive sideeffect is that this patch makes it build with both
  freetype2 2.5.1, and older version
* Sun Feb 17 2013 jengelh@inai.de
- Use more robust make install call
* Wed Jun  6 2012 tobias.johannes.klausmann@mni.thm.de
- Update to version 2.3.1
- Remove the libXft-fix-bold-fonts.patch (fixed in this release)
* Thu Apr 12 2012 vuntz@opensuse.org
- Update to version 2.3.0:
  + Subpixel LCD text rendering improvements
  + Fix two crasher bugs
  + Fix compiler warnings
  + Code cleanups
  + Build system improvements
- Add pkgconfig(x11) BuildRequires: new explicit dependency
  upstream.
- Add libXft-fix-bold-fonts.patch: fix regression that broke bold
  fonts, taken from git.
- Drop libXft-2.1.7-lcd-filter-2.patch: integrated upstream.
* Tue Feb  7 2012 jengelh@medozas.de
- Split xorg-x11-libs into separate packages