d71cf7
# skip tests known to be problematic in a specific version
d71cf7
%global skip_checks_version 0.1.10
d71cf7
# concurrency-stress-test: https://bugzilla.gnome.org/show_bug.cgi?id=673419
d71cf7
%global skip_checks concurrency-stress-test
d71cf7
d71cf7
Summary:	A dynamic, any to any, pixel format conversion library
d71cf7
Name:		babl
d71cf7
Version:	0.1.10
d71cf7
Release:	10%{?dist}
d71cf7
d71cf7
# Compute some version related macros
d71cf7
# Ugly hack, you need to get your quoting backslashes/percent signs straight
d71cf7
%global major %(ver=%version; echo ${ver%%%%.*})
d71cf7
%global minor %(ver=%version; ver=${ver#%major.}; echo ${ver%%%%.*})
d71cf7
%global micro %(ver=%version; ver=${ver#%major.%minor.}; echo ${ver%%%%.*})
d71cf7
%global apiver %major.%minor
d71cf7
d71cf7
# The gggl codes contained in this package are under the GPL, with exceptions allowing their use under libraries covered under the LGPL
d71cf7
License:	LGPLv3+ and GPLv3+
d71cf7
Group:		System Environment/Libraries
d71cf7
URL:		http://www.gegl.org/babl/
d71cf7
Source0:	ftp://ftp.gimp.org/pub/babl/%{apiver}/%{name}-%{version}.tar.bz2
d71cf7
Patch1:         babl-0.1.10-memory.patch
d71cf7
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
d71cf7
BuildRequires:	librsvg2
d71cf7
d71cf7
%global develdocdir %{_docdir}/%{name}-devel-%{version}/html
d71cf7
d71cf7
%description
d71cf7
Babl is a dynamic, any to any, pixel format conversion library. It
d71cf7
provides conversions between the myriad of buffer types images can be
d71cf7
stored in. Babl doesn't only help with existing pixel formats, but also
d71cf7
facilitates creation of new and uncommon ones.
d71cf7
d71cf7
%package devel
d71cf7
Summary:	Headers for developing programs that will use %{name}
d71cf7
Group:		Development/Libraries
d71cf7
Requires:	%{name}%{?_isa} = %{version}-%{release}
d71cf7
Requires:	pkgconfig
d71cf7
# Split off devel docs from 0.1.2-2 on
d71cf7
Obsoletes:	%{name}-devel < 0.1.2-2%{?dist}
d71cf7
Conflicts:	%{name}-devel < 0.1.2-2%{?dist}
d71cf7
d71cf7
%description devel
d71cf7
This package contains the libraries and header files needed for
d71cf7
developing with %{name}.
d71cf7
d71cf7
%package devel-docs
d71cf7
Summary:	Documentation for developing programs that will use %{name}
d71cf7
Group:		Documentation
d71cf7
BuildArch:	noarch
d71cf7
Requires:	%{name}-devel = %{version}-%{release}
d71cf7
# Split off devel docs from 0.1.2-2 on
d71cf7
Obsoletes:	%{name}-devel < 0.1.2-2%{?dist}
d71cf7
Conflicts:	%{name}-devel < 0.1.2-2%{?dist}
d71cf7
d71cf7
%description devel-docs
d71cf7
This package contains documentation needed for developing with %{name}.
d71cf7
d71cf7
%prep
d71cf7
%setup -q
d71cf7
%patch1 -p1 -b .memory
d71cf7
d71cf7
%build
d71cf7
# use PIC/PIE because babl is likely to deal with data coming from untrusted
d71cf7
# sources
d71cf7
CFLAGS="-fPIC %optflags -fno-strict-aliasing"
d71cf7
LDFLAGS="-pie"
d71cf7
%configure --disable-static
d71cf7
d71cf7
make V=1 %{?_smp_mflags}
d71cf7
d71cf7
%install
d71cf7
rm -rf %{buildroot}
d71cf7
make DESTDIR=%{buildroot} install INSTALL='install -p'
d71cf7
d71cf7
mkdir -p "%{buildroot}/%{develdocdir}"
d71cf7
cp -pr docs/graphics docs/*.html docs/babl.css "%{buildroot}/%{develdocdir}"
d71cf7
rm -rf "%{buildroot}/%{develdocdir}"/graphics/Makefile*
d71cf7
d71cf7
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
d71cf7
d71cf7
%check
d71cf7
# skip tests known to be problematic in a specific version
d71cf7
%if "%version" == "%skip_checks_version"
d71cf7
pushd tests
d71cf7
for problematic in %skip_checks; do
d71cf7
    rm -f "$problematic"
d71cf7
    cat << EOF > "$problematic"
d71cf7
#!/bin/sh
d71cf7
echo Skipping test "$problematic"
d71cf7
EOF
d71cf7
    chmod +x "$problematic"
d71cf7
done
d71cf7
popd
d71cf7
%endif
d71cf7
make check
d71cf7
d71cf7
%clean
d71cf7
rm -rf %{buildroot}
d71cf7
d71cf7
%post -p /sbin/ldconfig
d71cf7
d71cf7
%postun -p /sbin/ldconfig
d71cf7
d71cf7
%files
d71cf7
%defattr(-, root, root, -)
d71cf7
%doc AUTHORS ChangeLog COPYING README NEWS
d71cf7
%{_libdir}/*.so.*
d71cf7
%{_libdir}/babl-%{apiver}/
d71cf7
d71cf7
%files devel
d71cf7
%defattr(-, root, root, -)
d71cf7
%{_includedir}/babl-%{apiver}/
d71cf7
%{_libdir}/*.so
d71cf7
%{_libdir}/pkgconfig/%{name}.pc
d71cf7
d71cf7
%files devel-docs
d71cf7
%defattr(-, root, root, -)
d71cf7
%doc %{develdocdir}
d71cf7
d71cf7
%changelog
d71cf7
* Fri Oct 06 2017 Josef Ridky <jridky@redhat.com> - 0.1.10-10
d71cf7
- Resolves: #1399878 - fix recursive loop
d71cf7
d71cf7
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.1.10-9
d71cf7
- Mass rebuild 2014-01-24
d71cf7
d71cf7
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.1.10-8
d71cf7
- Mass rebuild 2013-12-27
d71cf7
d71cf7
* Tue Jul 30 2013 Nils Philippsen <nils@redhat.com> - 0.1.10-7
d71cf7
- don't require w3m for building
d71cf7
d71cf7
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.10-6
d71cf7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d71cf7
d71cf7
* Sat Oct 20 2012 Nils Philippsen <nils@redhat.com> - 0.1.10-5
d71cf7
- report problematic checks being skipped
d71cf7
d71cf7
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.10-4
d71cf7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d71cf7
d71cf7
* Tue Apr 03 2012 Nils Philippsen <nils@redhat.com> - 0.1.10-3
d71cf7
- prevent problematic check from being rebuilt
d71cf7
d71cf7
* Tue Apr 03 2012 Nils Philippsen <nils@redhat.com> - 0.1.10-2
d71cf7
- fix typo which caused problematic check not to be skipped
d71cf7
d71cf7
* Tue Apr 03 2012 Nils Philippsen <nils@redhat.com> - 0.1.10-1
d71cf7
- version 0.1.10
d71cf7
- skip check known to be problematic: concurrency-stress-test
d71cf7
d71cf7
* Tue Jan 10 2012 Nils Philippsen <nils@redhat.com> - 0.1.6-2
d71cf7
- rebuild for gcc 4.7
d71cf7
d71cf7
* Tue Dec 13 2011 Nils Philippsen <nils@redhat.com> - 0.1.6-1
d71cf7
- version 0.1.6
d71cf7
d71cf7
* Tue Feb 22 2011 Nils Philippsen <nils@redhat.com> - 0.1.4-1
d71cf7
- version 0.1.4
d71cf7
- correct source URL
d71cf7
d71cf7
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.2-5
d71cf7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d71cf7
d71cf7
* Wed Jun 23 2010 Nils Philippsen <nils@redhat.com> - 0.1.2-4
d71cf7
- use PIC/PIE because babl is likely to deal with data coming from untrusted
d71cf7
  sources
d71cf7
d71cf7
* Wed Jun 23 2010 Nils Philippsen <nils@redhat.com> - 0.1.2-3
d71cf7
- build with -fno-strict-aliasing
d71cf7
d71cf7
* Mon Jun 14 2010 Nils Philippsen <nils@redhat.com> - 0.1.2-2
d71cf7
- split off devel-docs subpackage to make package multi-lib compliant (#477807)
d71cf7
- let devel package require correct arch of base package
d71cf7
d71cf7
* Thu Jan 21 2010 Deji Akingunola <dakingun@gmail.com> - 0.1.2-1
d71cf7
- Update to 0.1.2
d71cf7
d71cf7
* Fri Dec 18 2009 Deji Akingunola <dakingun@gmail.com> - 0.1.0-5
d71cf7
- Remove the *.la files
d71cf7
d71cf7
* Thu Aug 13 2009 Nils Philippsen <nils@redhat.com>
d71cf7
- explain patch status
d71cf7
d71cf7
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-4
d71cf7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
d71cf7
d71cf7
* Mon Jul 06 2009 Nils Philippsen <nils@redhat.com> - 0.1.0-3
d71cf7
- revert using "--disable-gtk-doc" as this doesn't work with babl (#477807)
d71cf7
d71cf7
* Thu Jul 02 2009 Nils Philippsen <nils@redhat.com>
d71cf7
- use "--disable-gtk-doc" to avoid rebuilding documentation (#477807)
d71cf7
- fix source URL
d71cf7
d71cf7
* Thu Jun 25 2009 Nils Philippsen <nils@redhat.com> - 0.1.0-2
d71cf7
- fix timestamps of built documentation for multilib (#477807)
d71cf7
d71cf7
* Fri May 22 2009 Deji Akingunola <dakingun@gmail.com> - 0.1.0-1
d71cf7
- Update to latest release (0.1.0)
d71cf7
d71cf7
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.22-3
d71cf7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
d71cf7
d71cf7
* Tue Sep  2 2008 Michael Schwendt <mschwendt@fedoraproject.org> - 0.0.22-2
d71cf7
- Include /usr/include/babl-0.0 directory
d71cf7
d71cf7
* Thu Jul 10 2008 Deji Akingunola <dakingun@gmail.com> - 0.0.22-1
d71cf7
- Update to latest release
d71cf7
d71cf7
* Thu Feb 28 2008 Deji Akingunola <dakingun@gmail.com> - 0.0.20-1
d71cf7
- New release
d71cf7
d71cf7
* Thu Jan 17 2008 Deji Akingunola <dakingun@gmail.com> - 0.0.18-2
d71cf7
- Apply patch to fix extensions loading on 64bit systems
d71cf7
d71cf7
* Thu Jan 10 2008 Deji Akingunola <dakingun@gmail.com> - 0.0.18-1
d71cf7
- Update to 0.0.18
d71cf7
d71cf7
* Mon Nov 26 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.16-1
d71cf7
- Update to 0.0.16 release 
d71cf7
- License change from GPLv2+ to GPLv3+
d71cf7
d71cf7
* Mon Oct 22 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.15-0.5.20071011svn
d71cf7
- Update the License field 
d71cf7
d71cf7
* Fri Oct 12 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.15-0.4.20071011svn
d71cf7
- Package the extension libraries in the main package
d71cf7
- Run 'make check' 
d71cf7
d71cf7
* Fri Oct 12 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.15-0.3.20071011svn
d71cf7
- Ensure timestamps are kept during install
d71cf7
d71cf7
* Fri Oct 12 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.15-0.2.20071011svn
d71cf7
- Remove the use of inexistent source url (Package reviews)
d71cf7
- Package the html docs
d71cf7
d71cf7
* Thu Oct 11 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.15-0.1.20071011svn
d71cf7
- Initial packaging for Fedora