summaryrefslogtreecommitdiff
path: root/packaging/cairo.spec
blob: 7a976c2bf26560ecb049978c80ddbfd20e70c97d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
%bcond_without cairo_xcb_backend 
%bcond_without cairo_gl_backend
%bcond_with wayland
%bcond_without x


Name:           cairo
Version:        1.12.16
Release:        0
License:        LGPL-2.1+ or MPL-1.1
Summary:        Vector Graphics Library with Cross-Device Output Support
Url:            http://cairographics.org/
Group:          Graphics/Libraries
Source:         http://cairographics.org/releases/%{name}-%{version}.tar.xz
Source99:       baselibs.conf
Source1001: 	cairo.manifest
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  xz
BuildRequires:  pkgconfig(fontconfig)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(pixman-1)
BuildRequires:  which
%if %{with cairo_gl_backend}
%if !%{without x}
BuildRequires:  pkgconfig(gl)
%endif
BuildRequires:  pkgconfig(glesv2)
%if %{with wayland}
BuildRequires:	pkgconfig(wayland-egl)
%endif
%endif
%if !%{without x}
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xrender)
%if %{with cairo_xcb_backend}
BuildRequires:  pkgconfig(xcb)
BuildRequires:  pkgconfig(xcb-shm)
%endif
%endif


%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 libcairo
License:        LGPL-2.1+ or MPL-1.1
Summary:        Vector Graphics Library with Cross-Device Output Support
Group:          Graphics/Libraries
Provides:       cairo = %{version}
Obsoletes:      cairo < %{version}

%description -n libcairo
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 libcairo-gobject
License:        LGPL-2.1+ or MPL-1.1
Summary:        Vector Graphics Library with Cross-Device Output Support
Group:          Graphics/Libraries

%description -n libcairo-gobject
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 libcairo-script-interpreter
License:        LGPL-2.1+ or MPL-1.1
Summary:        Vector Graphics Library with Cross-Device Output Support
Group:          Graphics/Libraries

%description -n libcairo-script-interpreter
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 tools
License:        GPL-3.0+
Summary:        Vector Graphics Library with Cross-Device Output Support -- Utilities
Group:          Development/Libraries
# We need an explicit requires since nothing links to the cairo library
Requires:       libcairo = %{version}

%description tools
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 package contains various cairo utilities.

%package devel
License:        LGPL-2.1+ or MPL-1.1
Summary:        Development environment for cairo
Group:          Development/Libraries
Requires:       libcairo = %{version}
Requires:       libcairo-gobject = %{version}
Requires:       libcairo-script-interpreter = %{version}

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

%prep
%setup -q
cp %{SOURCE1001} .

%build
# Disable Atom optimizations in order to make binaries executable in buildroot
export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed s'/atom/i686/g'`
export CFLAGS=`echo $CFLAGS | sed s'/atom/i686/g'`
export CXXFLAGS=`echo $CXXFLAGS | sed s'/atom/i686/g'`

# Needed by patch0
NOCONFIGURE=1 ./autogen.sh
%configure \
    --with-pic \
    --enable-fc \
    --enable-ft \
%if %{with cairo_gl_backend}
    --enable-egl \
    --enable-glesv2=yes \
%endif
    --enable-ps \
    --enable-pdf \
    --enable-script \
    --enable-svg \
    --enable-tee \
%if %{without x}
   --disable-xlib \
   --disable-xcb  \
%else
    --enable-xlib \
%if %{with cairo_xcb_backend}
    --enable-xcb \
%endif
%endif
    --disable-gtk-doc \
    --disable-static
make %{?_smp_mflags} V=1

%install
%make_install

%post -n libcairo -p /sbin/ldconfig

%postun -n libcairo -p /sbin/ldconfig

%post -n libcairo-gobject -p /sbin/ldconfig

%postun -n libcairo-gobject -p /sbin/ldconfig

%post -n libcairo-script-interpreter -p /sbin/ldconfig

%postun -n libcairo-script-interpreter -p /sbin/ldconfig

%files -n libcairo
%manifest %{name}.manifest
%defattr(-, root, root)
%license COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
%{_libdir}/libcairo.so.*

%files -n libcairo-gobject
%manifest %{name}.manifest
%defattr(-, root, root)
%{_libdir}/libcairo-gobject.so.2*

%files -n libcairo-script-interpreter
%manifest %{name}.manifest
%defattr(-, root, root)
%license util/cairo-script/COPYING
%{_libdir}/libcairo-script-interpreter.so.*

%files tools
%manifest %{name}.manifest
%defattr(-, root, root)
%license util/cairo-trace/COPYING util/cairo-trace/COPYING-GPL-3
%{_bindir}/cairo-sphinx
%{_bindir}/cairo-trace
%dir %{_libdir}/cairo
%{_libdir}/cairo/cairo-fdr.so
%{_libdir}/cairo/cairo-sphinx.so
%{_libdir}/cairo/libcairo-trace.so

%files devel
%manifest %{name}.manifest
%defattr(-, root, root)
%doc PORTING_GUIDE
%{_includedir}/cairo/
%doc %{_datadir}/gtk-doc/html/cairo
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%changelog