#
# spec file for package libcroco
#
# 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 https://bugs.opensuse.org/
#


Name:           libcroco
Version:        0.6.13
Release:        1.1
Summary:        CSS2 Parser Library
License:        LGPL-2.1-only
Group:          Development/Libraries/C and C++
URL:            https://gitlab.gnome.org/GNOME/libcroco
Source:         https://download.gnome.org/sources/libcroco/0.6/%{name}-%{version}.tar.xz
Source99:       baselibs.conf

BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(glib-2.0) >= 2.0
BuildRequires:  pkgconfig(libxml-2.0) >= 2.4.23

%description
Libcroco is a stand-alone CSS2 parsing library. It provides a low-level
event-driven SAC-like API and a CSS object model-like API.

%package 0_6-3
Summary:        CSS2 Parser Library
# bug437293
Group:          System/Libraries
%ifarch ppc64
Obsoletes:      libcroco-64bit
%endif

%description 0_6-3
Libcroco is a stand-alone CSS2 parsing library. It provides a low-level
event-driven SAC-like API and a CSS object model-like API.

%package devel
Summary:        CSS2 Parser Library Development Files
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description devel
Libcroco is a stand-alone CSS2 parsing library. It provides a low-level
event-driven SAC-like API and a CSS object model like API.

%prep
%autosetup -p1

%build
%configure \
	--disable-static \
	%{nil}
%make_build

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print

%post 0_6-3 -p /sbin/ldconfig
%postun 0_6-3 -p /sbin/ldconfig

%files
%license COPYING
%doc AUTHORS ChangeLog HACKING NEWS README TODO
%{_bindir}/csslint-0.6

%files 0_6-3
%{_libdir}/*.so.*

%files devel
%doc %{_datadir}/gtk-doc/html/libcroco/
%{_bindir}/*-config
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%changelog
* Sat Apr  6 2019 Bjørn Lie <bjorn.lie@gmail.com>
- Update to version
  + Visual Studio builds: Enhance security of x64 binaries.
  + win32/replace.py: Fix replacing items in files with UTF-8
    content.
  + tknzr: support only max long rgb values.
  + input: check end of input before reading a byte.
- Drop upstream fixed patches:
  + libcroco-fix-CVE-2017-7960.patch.
  + libcroco-fix-CVE-2017-7961.patch.
- Stop exporting -fno-strict-aliasing" to configure, no longer
  needed.
- Update URL to new gitlab home.
* Wed Feb 28 2018 dimstar@opensuse.org
- Modernize spec-file by calling spec-cleaner
* Sun Oct  8 2017 jengelh@inai.de
- Remove --with-pic which is useless with --disable-static.
- Rectify RPM groups. Remove redundant %%clean section.
* Sat Oct  7 2017 dimstar@opensuse.org
- Drop gtk-doc BuildRequires: Do not build documentation (helps
  eliminate a build cycle). This is no loss for the package, as we
  simply install the pre-built doc from the tarball.
* Mon Jun 12 2017 zaitor@opensuse.org
- Add libcroco-fix-CVE-2017-7960.patch: Fix boo#1034481,
  CVE-2017-7960.
- Add libcroco-fix-CVE-2017-7961.patch: Fix boo#1034482,
  CVE-2017-7961.
* Thu Apr 20 2017 zaitor@opensuse.org
- Update to version 0.6.12:
  + Add support for Visual Studio 2017.
  + Misc bug fixes.
* Fri Apr 15 2016 mgorse@suse.com
- Update to GNOME 3.20  Fate#318572
* Thu Dec 17 2015 zaitor@opensuse.org
- Update to version 0.6.11:
  + Fix regression in cr_tknzr_consume_chars.
  + Misc bug fixes.
* Sun Dec 13 2015 zaitor@opensuse.org
- Update to version 0.6.10:
  + Misc bug fixes.
* Sat Oct 31 2015 zaitor@opensuse.org
- Update to version 0.6.9:
  + Added Visual Studio projects.
  + Lots of warnings fixed.
  + Improve build system.
  + Misc bug fixes.
* Wed May 15 2013 cfarrell@suse.com
- license update: LGPL-2.1
  No indication of GPL-2.0 licensed files in the package
* Fri Oct 26 2012 dimstar@opensuse.org
- Update to version 0.6.8:
  + Handle signed units (bgo#686239).
* Tue Oct 16 2012 dimstar@opensuse.org
- Update to version 0.6.7:
  + Fix 'green' colour (bgo#685679).
  + Build fixes.
* Sun Sep 16 2012 dimstar@opensuse.org
- Update to version 0.6.6:
  + Mem leak fixes (bgo#678736).
* Mon Mar 26 2012 vuntz@opensuse.org
- Update to version 0.6.5:
  + Fix mapping of 'green' colour (bgo#672332)
* Tue Feb  7 2012 vuntz@opensuse.org
- Update to version 0.6.4:
  + Use -Bsymbolic-functions when available
  + Modernise and simplify configure
  + bgo#640897: fix format string warning in testcase
  + bgo#666248: vc++ compilation support
* Wed Dec 21 2011 vuntz@opensuse.org
- Remove explicit Requires for glib2-devel, libxml2-devel,
  zlib-devel in devel subpackage: they will automatically be added
  the pkgconfig() way if needed.
* Mon Nov 14 2011 dimstar@opensuse.org
- Update to version 0.6.3:
  + Add gtk-doc build infrastructure.
  + bgo#342370: ensure the library and compiler flags are not
    hardcoded into the pc file.
- Remove explicit %%{name}-0_6-3 Requires: it will automatically be
  added.
- Change glib2-devel and libxml2-devel BuildRequires to
  pkgconfig(glib-2.0) and pkgconfig(libxml-2.0).
- Clean spec-file using spec-cleaner.
* Thu Dec 17 2009 jengelh@medozas.de
- Add baselibs.conf as a source
* Thu Feb  5 2009 vuntz@novell.com
- Update to version 0.6.2:
  + bgo#306823: improve precision of non-integer numbers
  + bgo#148790, bgo#333834: Cygwin fixes
  + bgo#340298: Documentation fixes
  + bgo#375194: fix to builtin color processing
  + bgo#380438: Leak and trace message in cr_token_clear
  + bgo#381040: floating numbers always output to exactly 3 digits
    after decimal points
  + bgo#336621: cr_tknzr_get_next_token wasn't handling "<!--"
    correctly
  + bgo#372011: comments not parsed correctly
  + bgo#394680: problem parsing function name starting with 'u'
    or 'r'
  + bgo#139878: keep end of ruleset parsing location, and give it
    to the end_selector sac-handler.
  + bgo#394294: Escape are wrongly computed
  + bgo#314831: Escapes not recognized
  + bgo#395099: overly agressive rule matching
  + bgo#553937: CRDocHandler instances created with reference count
    of 0
  + Various fixes to the font handling
  + Add ‘const’ to various function prototypes
- Remove autoreconf call.
* Mon Jan 26 2009 crrodriguez@suse.de
- remove "la" files [BNC#357465]
* Wed Jan  7 2009 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Sun May 11 2008 coolo@suse.de
- fix rename of xxbit packages
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Sat Nov 17 2007 dmueller@suse.de
- break dependency loop by removing unneeded requires
* Mon Oct  8 2007 maw@suse.de
- Split out a 0_6-3 subpackage.
- s#%%run_ldconfig#/sbin/ldconfig# in %%post and %%postun.
* Tue Feb 13 2007 sbrabec@suse.cz
- Do not build unusable static libraries (#238552#c17).
* Sat Dec 16 2006 sbrabec@suse.cz
- Prefix changed to /usr.
- Spec file cleanup.
* Fri Oct 13 2006 danw@suse.de
- Remove dead patches
* Thu Sep 21 2006 jhargadon@suse.de
- update to version 0.6.1
- parse fractional parts of numbers properly
- win32 port
- gtk-doc compliance
- test infrastructure enhancements
- nasty memory management bug fix
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Jul 29 2005 sbrabec@suse.cz
- Fixed devel dependencies.
* Wed Apr 27 2005 meissner@suse.de
- fixed overflow.
* Thu Feb 17 2005 sbrabec@suse.cz
- Fixed library linking (#50796).
* Fri Feb 11 2005 gekker@suse.de
- Update to version 0.6.0
* Tue May  4 2004 sbrabec@suse.cz
- New SuSE package, version 0.5.1.