d707a1
%if 0%{?rhel}
d707a1
%bcond_with workshop
d707a1
%else
d707a1
%bcond_without workshop
d707a1
%endif
d707a1
d707a1
# skip all tests
d707a1
%global skip_all_checks 1
d707a1
# skip tests known to be problematic in a specific version
d707a1
%global skip_checks_version 0.2.0
d707a1
# for some reason or other comparing generated to reference images segfaults in
d707a1
# two test cases
d707a1
# Well, now it is all of them, not just two. :/
d707a1
%global skip_checks compositions/run-*.xml.sh
d707a1
d707a1
Summary:    A graph based image processing framework
d707a1
Name:       gegl
d707a1
Version:    0.2.0
d707a1
Release:    11%{?dist}
d707a1
d707a1
# Compute some version related macros
d707a1
# Ugly hack, you need to get your quoting backslashes/percent signs straight
d707a1
%global major %(ver=%version; echo ${ver%%%%.*})
d707a1
%global minor %(ver=%version; ver=${ver#%major.}; echo ${ver%%%%.*})
d707a1
%global micro %(ver=%version; ver=${ver#%major.%minor.}; echo ${ver%%%%.*})
d707a1
%global apiver %major.%minor
d707a1
d707a1
# The binary is under the GPL, while the libs are under LGPL
d707a1
License:    LGPLv3+ and GPLv3+
d707a1
Group:      System Environment/Libraries
d707a1
URL:        http://www.gegl.org/
d707a1
Source0:    ftp://ftp.gimp.org/pub/gegl/%{apiver}/%{name}-%{version}.tar.bz2
d707a1
Patch0:     gegl-0.2.0-lua-5.2.patch
d707a1
Patch1:     gegl-0.2.0-CVE-2012-4433.patch
d707a1
Patch2:     gegl-0.2.0-remove-src-over-op.patch
d707a1
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
d707a1
BuildRequires:  asciidoc
d707a1
BuildRequires:  babl-devel >= 0.1.10
d707a1
BuildRequires:  cairo-devel
d707a1
BuildRequires:  enscript
d707a1
BuildRequires:  exiv2-devel
d707a1
BuildRequires:  gdk-pixbuf2-devel >= 2.18.0
d707a1
BuildRequires:  glib2-devel >= 2.28.0
d707a1
BuildRequires:  graphviz
d707a1
BuildRequires:  gtk2-devel >= 2.18.0
d707a1
BuildRequires:  intltool >= 0.40.1
d707a1
BuildRequires:  jasper-devel >= 1.900.1
d707a1
%if %{with workshop}
d707a1
BuildRequires:  lensfun-devel >= 0.2.5
d707a1
%endif
d707a1
BuildRequires:  libjpeg-devel
d707a1
BuildRequires:  libopenraw-devel >= 0.0.5
d707a1
BuildRequires:  libpng-devel
d707a1
BuildRequires:  librsvg2-devel >= 2.14.0
d707a1
BuildRequires:  libspiro-devel
d707a1
BuildRequires:  libv4l-devel
d707a1
BuildRequires:  lua-devel >= 5.1.0
d707a1
BuildRequires:  OpenEXR-devel
d707a1
BuildRequires:  pango-devel
d707a1
BuildRequires:  perl-devel
d707a1
BuildRequires:  pkgconfig
d707a1
BuildRequires:  ruby
d707a1
BuildRequires:  SDL-devel
d707a1
BuildRequires:  suitesparse-devel
d707a1
BuildRequires:  w3m
d707a1
Requires:       babl%{?_isa} >= 0.1.10
d707a1
d707a1
%description
d707a1
GEGL (Generic Graphics Library) is a graph based image processing framework. 
d707a1
GEGLs original design was made to scratch GIMPs itches for a new
d707a1
compositing and processing core. This core is being designed to have
d707a1
minimal dependencies. and a simple well defined API.
d707a1
d707a1
%if %{with workshop}
d707a1
%package operations-workshop
d707a1
Summary:    Experimental operations for GEGL
d707a1
Group:      System Environment/Libraries
d707a1
Requires:   %{name}%{_isa} = %{version}-%{release}
d707a1
d707a1
%description operations-workshop
d707a1
This package contains experimental operations for GEGL. If used they may yield
d707a1
unwanted results, or even crash. You're warned!
d707a1
%endif
d707a1
d707a1
%package devel
d707a1
Summary:    Headers for developing programs that will use %{name}
d707a1
Group:      Development/Libraries
d707a1
Requires:   %{name}%{_isa} = %{version}-%{release}
d707a1
Requires:   pkgconfig
d707a1
Requires:   babl-devel%{_isa}
d707a1
Requires:   glib2-devel%{_isa}
d707a1
d707a1
%description devel
d707a1
This package contains the libraries and header files needed for
d707a1
developing with %{name}.
d707a1
d707a1
%prep
d707a1
%setup -q
d707a1
%patch0 -p1 -b .lua-5.2
d707a1
%patch1 -p1 -b .CVE-2012-4433
d707a1
%patch2 -p1 -b .remove-src-over-op
d707a1
d707a1
%build
d707a1
# use hardening compiler/linker flags because gegl is likely to deal with
d707a1
# untrusted input
d707a1
%define _hardened_build 1
d707a1
d707a1
# Needed by Ruby 1.9.3.
d707a1
export LANG=en_US.utf8
d707a1
d707a1
%configure \
d707a1
%if %{with workshop}
d707a1
    --enable-workshop \
d707a1
%else
d707a1
    --disable-workshop \
d707a1
%endif
d707a1
    --with-pic \
d707a1
    --with-gio \
d707a1
    --with-gtk \
d707a1
    --with-cairo \
d707a1
    --with-pango \
d707a1
    --with-pangocairo \
d707a1
    --with-gdk-pixbuf \
d707a1
    --with-lensfun \
d707a1
    --with-libjpeg \
d707a1
    --with-libpng \
d707a1
    --with-librsvg \
d707a1
    --with-openexr \
d707a1
    --with-sdl \
d707a1
    --with-libopenraw \
d707a1
    --with-jasper \
d707a1
    --with-graphviz \
d707a1
    --with-lua \
d707a1
    --without-libavformat \
d707a1
    --with-libv4l \
d707a1
    --with-libspiro \
d707a1
    --with-exiv2 \
d707a1
    --with-umfpack \
d707a1
    --disable-static \
d707a1
    --disable-gtk-doc
d707a1
d707a1
make %{?_smp_mflags}
d707a1
d707a1
%install
d707a1
rm -rf %{buildroot}
d707a1
make DESTDIR=%{buildroot} install INSTALL='install -p'
d707a1
pushd operations
d707a1
# favor non-workshop binaries
d707a1
make SUBDIRS= install INSTALL='install -p'
d707a1
for d in */; do
d707a1
    d="${d%/}"
d707a1
    if [ "$d" != "workshop" ]; then
d707a1
        pushd "$d"
d707a1
        make DESTDIR=%{buildroot} install INSTALL='install -p'
d707a1
        popd
d707a1
    fi
d707a1
done
d707a1
popd
d707a1
d707a1
rm -f %{buildroot}%{_libdir}/*.la
d707a1
rm -f %{buildroot}%{_libdir}/gegl-%{apiver}/*.la
d707a1
d707a1
# keep track of workshop/non-workshop operations
d707a1
opsdir="$PWD/operations"
d707a1
d707a1
files_ws="$PWD/operations_files_workshop"
d707a1
files_non_ws="$PWD/operations_files"
d707a1
non_ws_filenames_file="$PWD/non_ws_filenames"
d707a1
d707a1
find "$opsdir" -path "$opsdir/workshop" -prune -o -regex '.*/\.libs/.*\.so' -printf '%f\n' > "$non_ws_filenames_file"
d707a1
d707a1
echo '%%defattr(-, root, root, -)' > "$files_non_ws"
d707a1
echo '%%defattr(-, root, root, -)' > "$files_ws"
d707a1
d707a1
pushd %{buildroot}%{_libdir}/gegl-%{apiver}
d707a1
for opfile in *.so; do
d707a1
    if fgrep -q -x "$opfile" "$non_ws_filenames_file"; then
d707a1
        echo "%{_libdir}/gegl-%{apiver}/$opfile" >> "$files_non_ws"
d707a1
    else
d707a1
        echo "%{_libdir}/gegl-%{apiver}/$opfile" >> "$files_ws"
d707a1
    fi
d707a1
done
d707a1
popd
d707a1
d707a1
%find_lang %{name}-%{apiver}
d707a1
d707a1
%check
d707a1
%if 0%{skip_all_checks} < 1
d707a1
# skip tests known to be problematic in a specific version
d707a1
%if "%version" == "%skip_checks_version"
d707a1
pushd tests
d707a1
for problematic in %skip_checks; do
d707a1
    rm -f "$problematic"
d707a1
    cat << EOF > "$problematic"
d707a1
#!/bin/sh
d707a1
echo Skipping test "$problematic"
d707a1
EOF
d707a1
    chmod +x "$problematic"
d707a1
done
d707a1
popd
d707a1
%endif
d707a1
make check
d707a1
%endif
d707a1
d707a1
%clean
d707a1
rm -rf %{buildroot}
d707a1
d707a1
%post -p /sbin/ldconfig
d707a1
d707a1
%postun -p /sbin/ldconfig
d707a1
d707a1
%files -f operations_files -f %{name}-%{apiver}.lang
d707a1
%defattr(-, root, root, -)
d707a1
%doc AUTHORS ChangeLog COPYING COPYING.LESSER NEWS README
d707a1
%{_bindir}/gegl
d707a1
%{_libdir}/*.so.*
d707a1
%dir %{_libdir}/gegl-%{apiver}/
d707a1
d707a1
%if %{with workshop}
d707a1
%files operations-workshop -f operations_files_workshop
d707a1
%endif
d707a1
d707a1
%files devel
d707a1
%defattr(-, root, root, -)
d707a1
%doc %{_datadir}/gtk-doc/
d707a1
%{_includedir}/gegl-%{apiver}/
d707a1
%{_libdir}/*.so
d707a1
%{_libdir}/pkgconfig/%{name}-%{apiver}.pc
d707a1
d707a1
%changelog
d707a1
* Mon Jul 01 2013 Nils Philippsen <nils@redhat.com> - 0.2.0-11
d707a1
- replace lua-5.2 patch by upstream commit
d707a1
- fix buffer overflow in and add plausibility checks to ppm-load op
d707a1
  (CVE-2012-4433)
d707a1
- fix multi-lib issue in generated documentation
d707a1
d707a1
* Wed May 15 2013 Tom Callaway <spot@fedoraproject.org> - 0.2.0-10
d707a1
- rebuild for lua 5.2
d707a1
- disable check suite (so broken)
d707a1
d707a1
* Sun Mar 10 2013 Rex Dieter <rdieter@fedoraproject.org> - 0.2.0-9
d707a1
- rebuild (OpenEXR)
d707a1
d707a1
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-8
d707a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d707a1
d707a1
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 0.2.0-7
d707a1
- rebuild due to "jpeg8-ABI" feature drop
d707a1
d707a1
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 0.2.0-6
d707a1
- rebuild against new libjpeg
d707a1
d707a1
* Fri Oct 19 2012 Nils Philippsen <nils@redhat.com> - 0.2.0-5
d707a1
- don't catch "make check" errors but skip known problematic tests
d707a1
d707a1
* Fri Oct 19 2012 Nils Philippsen <nils@redhat.com> - 0.2.0-4
d707a1
- don't require lensfun-devel for building without workshop ops
d707a1
d707a1
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-3
d707a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d707a1
d707a1
* Wed May 02 2012 Rex Dieter <rdieter@fedoraproject.org> - 0.2.0-2
d707a1
- rebuild (exiv2)
d707a1
d707a1
* Tue Apr 03 2012 Nils Philippsen <nils@redhat.com> - 0.2.0-1
d707a1
- version 0.2.0
d707a1
- split off workshop (i.e. experimental) operations
d707a1
- don't build/package workshop operations on EL
d707a1
d707a1
* Mon Feb 06 2012 Vít Ondruch <vondruch@redhat.com> - 0.1.8-3
d707a1
- Rebuilt for Ruby 1.9.3.
d707a1
d707a1
* Tue Jan 10 2012 Nils Philippsen <nils@redhat.com> - 0.1.8-2
d707a1
- rebuild for gcc 4.7
d707a1
d707a1
* Tue Dec 13 2011 Nils Philippsen <nils@redhat.com> - 0.1.8-1
d707a1
- version 0.1.8
d707a1
- drop all patches
d707a1
- add BRs: gdk-pixbuf2-devel, lensfun-devel
d707a1
- update BR version: glib2-devel
d707a1
- use %%_hardened_build macro instead of supplying our own hardening flags
d707a1
d707a1
* Thu Nov 17 2011 Nils Philippsen <nils@redhat.com> - 0.1.6-5
d707a1
- don't require gtk-doc (#707554)
d707a1
d707a1
* Mon Nov 07 2011 Nils Philippsen <nils@redhat.com> - 0.1.6-4
d707a1
- rebuild (libpng)
d707a1
d707a1
* Fri Oct 14 2011 Rex Dieter <rdieter@fedoraproject.org> - 0.1.6-3
d707a1
- rebuild (exiv2)
d707a1
d707a1
* Wed Apr 06 2011 Nils Philippsen <nils@redhat.com> - 0.1.6-2
d707a1
- fix crash when using hstack operation (#661533)
d707a1
d707a1
* Tue Feb 22 2011 Nils Philippsen <nils@redhat.com> - 0.1.6-1
d707a1
- version 0.1.6
d707a1
- remove obsolete patches
d707a1
- fix erroneous use of destdir
d707a1
- correct source URL
d707a1
- add BR: exiv2-devel, jasper-devel, suitesparse-devel
d707a1
- update BR versions
d707a1
- update --with-*/--without-* configure flags
d707a1
- replace tabs with spaces for consistency
d707a1
d707a1
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.2-5
d707a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d707a1
d707a1
* Tue Oct 19 2010 Nils Philippsen <nils@redhat.com> - 0.1.2-4
d707a1
- don't leak "root" symbol which clashes with (equally broken) xvnkb input
d707a1
  method (#642992)
d707a1
d707a1
* Wed Jun 23 2010 Nils Philippsen <nils@redhat.com> - 0.1.2-3
d707a1
- build with -fno-strict-aliasing
d707a1
- use PIC/PIE because gegl is likely to deal with data coming from untrusted
d707a1
  sources
d707a1
d707a1
* Fri Feb 26 2010 Nils Philippsen <nils@redhat.com>
d707a1
- use tabs consistently
d707a1
- let devel depend on gtk-doc
d707a1
d707a1
* Fri Feb 19 2010 Nils Philippsen <nils@redhat.com> - 0.1.2-2
d707a1
- ignore make check failures for now
d707a1
d707a1
* Wed Feb 17 2010 Nils Philippsen <nils@redhat.com>
d707a1
- avoid buffer overflow in gegl_buffer_header_init()
d707a1
- correct gegl library version, use macro for it
d707a1
d707a1
* Tue Feb 16 2010 Nils Philippsen <nils@redhat.com> - 0.1.2-1
d707a1
- version 0.1.2
d707a1
- remove obsolete cflags, babl-instrumentation, autoreconf patches
d707a1
- backported: don't leak each node set on a GeglProcessor
d707a1
d707a1
* Sat Jan 23 2010 Deji Akingunola <dakingun@gmail.com> - 0.1.0-3
d707a1
- Rebuild for babl-0.1.2
d707a1
- Backport upstream patch that removed babl processing time instrumentation
d707a1
d707a1
* Wed Jan 20 2010 Nils Philippsen <nils@redhat.com>
d707a1
- use tabs consistently to appease rpmdiff
d707a1
d707a1
* Tue Aug 18 2009 Nils Philippsen <nils@redhat.com>
d707a1
- explain patches
d707a1
d707a1
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-2
d707a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
d707a1
d707a1
* Thu Jul 02 2009 Nils Philippsen - 0.1.0-1
d707a1
- fix cflags for building
d707a1
d707a1
* Thu Jul 02 2009 Nils Philippsen
d707a1
- version 0.1.0
d707a1
- use "--disable-gtk-doc" to avoid rebuilding documentation (#481404)
d707a1
- remove *.la files in %%{_libdir}/gegl-*/ (#509292)
d707a1
d707a1
* Thu Jun 04 2009 Deji Akingunola <dakingun@gmail.com> - 0.0.22-5
d707a1
- Apply patch to build with babl-0.1.0 API changes
d707a1
d707a1
* Thu Jun 04 2009 Nils Philippsen - 0.0.22-4
d707a1
- rebuild against babl-0.1.0
d707a1
d707a1
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.22-3
d707a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
d707a1
d707a1
* Thu Jan 29 2009 Nils Philippsen - 0.0.22-2
d707a1
- use the same timestamps for certain documentation files on all architectures
d707a1
  to avoid multi-lib conflicts (#481404)
d707a1
- consolidate spec files between OS releases
d707a1
- reenable building documentation on ppc64
d707a1
- explicitly list more build requirements and/or versions to catch eventual
d707a1
  problems during future builds
d707a1
d707a1
* Tue Jan 13 2009 Deji Akingunola <dakingun@gmail.com> - 0.0.22-1
d707a1
- Update to version 0.0.22
d707a1
d707a1
* Tue Oct 07 2008 Deji Akingunola <dakingun@gmail.com> - 0.0.20-1
d707a1
- Update to latest release
d707a1
d707a1
* Thu Jul 10 2008 Deji Akingunola <dakingun@gmail.com> - 0.0.18-1
d707a1
- Update to latest release
d707a1
d707a1
* Thu Feb 28 2008 Deji Akingunola <dakingun@gmail.com> - 0.0.16-1
d707a1
- New release
d707a1
d707a1
* Thu Jan 17 2008 Deji Akingunola <dakingun@gmail.com> - 0.0.15-1.svn20080117
d707a1
- Update to a svn snapshot for gnome-scan
d707a1
- Apply patch to fix extensions loading on 64bit systems
d707a1
- Building the docs on ppc64 segfaults, avoid it for now.
d707a1
d707a1
* Sat Dec 08 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.14-1
d707a1
- Update to 0.0.14 release
d707a1
- License change from GPLv2+ to GPLv3+
d707a1
d707a1
* Thu Oct 25 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.13-0.7.20071011svn
d707a1
- Include missing requires for the devel subpackage
d707a1
d707a1
* Thu Oct 25 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.13-0.6.20071011svn
d707a1
- BR graphiz instead of graphiz-devel
d707a1
- Remove the spurious exec flag from a couple of source codes
d707a1
d707a1
* Tue Oct 23 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.13-0.5.20071011svn
d707a1
- Fix missing directory ownership
d707a1
d707a1
* Mon Oct 22 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.13-0.4.20071011svn
d707a1
- Update the License field 
d707a1
d707a1
* Fri Oct 12 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.13-0.3.20071011svn
d707a1
- Package the extension libraries in the main package
d707a1
- Run 'make check'
d707a1
d707a1
* Fri Oct 12 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.13-0.2.20071011svn
d707a1
- Remove the use of inexistent source
d707a1
d707a1
* Thu Oct 11 2007 Deji Akingunola <dakingun@gmail.com> - 0.0.13-0.1.20071011svn
d707a1
- Initial packaging for Fedora