File mingw64-cairo.spec of Package mingw64-cairo

#
# spec file for package mingw64-cairo
#
# Copyright (c) 2014 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/
#


Name:           mingw64-cairo
Version:        1.14.12
Release:        0
Summary:        Vector Graphics Library with Cross-Device Output Support
License:        LGPL-2.1-only and MPL-1.1
Group:          Development/Libraries/C and C++
Url:            http://cairographics.org
Source0:        http://cairographics.org/releases/cairo-%{version}.tar.xz
Patch0:         0001-win32-Add-cairo-API-to-set-up-a-Win32-surface-for-an.patch
#!BuildIgnore: post-build-checks
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-filesystem >= 23
BuildRequires:  mingw64-fontconfig-devel
BuildRequires:  mingw64-freetype-devel
BuildRequires:  mingw64-glib2-devel
BuildRequires:  mingw64-libpng-devel
BuildRequires:  mingw64-libxml2-devel
BuildRequires:  mingw64-pixman-devel
BuildRequires:  xz
%_mingw64_package_header_debug
BuildArch:      noarch

%description
Cairo is a vector graphics library with cross-device output support.
Currently supported output targets include the X Window System,
in-memory image buffers, and PostScript. Cairo is designed to produce
identical output on all output media while taking advantage of display
hardware acceleration when available.

%package -n mingw64-libcairo2
Summary:        Vector Graphics Library with Cross-Device Output Support
Group:          System/Libraries
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}

%description -n mingw64-libcairo2
Cairo is a vector graphics library with cross-device output support.
Currently supported output targets include the X Window System,
in-memory image buffers, and PostScript. Cairo is designed to produce
identical output on all output media while taking advantage of display
hardware acceleration when available.

%package -n mingw64-libcairo-gobject2
Summary:        Vector Graphics Library with Cross-Device Output Support
Group:          System/Libraries

%description -n mingw64-libcairo-gobject2
Cairo is a vector graphics library with cross-device output support.
Currently supported output targets include the X Window System,
in-memory image buffers, and PostScript. Cairo is designed to produce
identical output on all output media while taking advantage of display
hardware acceleration when available.

This library contains GType declarations for Cairo types. It is also
meant to support gobject-introspection binding creation.

%package -n mingw64-libcairo-script-interpreter2
Summary:        Vector Graphics Library with Cross-Device Output Support
Group:          System/Libraries

%description -n mingw64-libcairo-script-interpreter2
Cairo is a vector graphics library with cross-device output support.
Currently supported output targets include the X Window System,
in-memory image buffers, and PostScript. Cairo is designed to produce
identical output on all output media while taking advantage of display
hardware acceleration when available.

%package devel
Summary:        Development environment for cairo
Group:          Development/Libraries/C and C++

%description devel
This package contains all files necessary to build binaries using
cairo.

%_mingw64_debug_package

%prep
%setup -q -n cairo-%{version}
%patch -P 0 -p1

%build
echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw64_cache}
MINGW64_CFLAGS="-Dffs=__builtin_ffs %{_mingw64_cflags}" \
%{_mingw64_configure} \
	--disable-xlib --disable-xcb \
	--enable-win32 --enable-svg --enable-ps --enable-pdf \
	--enable-win32-font --enable-fc --enable-ft \
	--enable-png --enable-gobject --enable-tee \
	--enable-shared --disable-static \
	--disable-lto
%{_mingw64_make} %{?_smp_mflags} || %{_mingw64_make}

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
# The .def file does not get installed
cp -t %{buildroot}%{_mingw64_libdir} src/cairo.def

%files -n mingw64-libcairo2
%defattr(-, root, root)
%{_mingw64_bindir}/libcairo-2.dll

%files -n mingw64-libcairo-gobject2
%defattr(-, root, root)
%{_mingw64_bindir}/libcairo-gobject-2.dll

%files -n mingw64-libcairo-script-interpreter2
%defattr(-, root, root)
%{_mingw64_bindir}/libcairo-script-interpreter-2.dll

%files devel
%defattr(-,root,root)
%{_mingw64_includedir}/cairo/
%{_mingw64_libdir}/cairo.def
%{_mingw64_libdir}/libcairo.dll.a
%{_mingw64_libdir}/libcairo-gobject.dll.a
%{_mingw64_libdir}/libcairo-script-interpreter.dll.a
%{_mingw64_libdir}/pkgconfig/cairo-fc.pc
%{_mingw64_libdir}/pkgconfig/cairo-ft.pc
%{_mingw64_libdir}/pkgconfig/cairo-gobject.pc
%{_mingw64_libdir}/pkgconfig/cairo-pdf.pc
%{_mingw64_libdir}/pkgconfig/cairo-png.pc
%{_mingw64_libdir}/pkgconfig/cairo-ps.pc
%{_mingw64_libdir}/pkgconfig/cairo-script.pc
%{_mingw64_libdir}/pkgconfig/cairo-svg.pc
%{_mingw64_libdir}/pkgconfig/cairo-tee.pc
%{_mingw64_libdir}/pkgconfig/cairo-win32-font.pc
%{_mingw64_libdir}/pkgconfig/cairo-win32.pc
%{_mingw64_libdir}/pkgconfig/cairo.pc
%{_mingw64_datadir}/gtk-doc/html/cairo/

%changelog
openSUSE Build Service is sponsored by