blob: 1c88241e15b40194f2632beeb032ab80ac3d4735 (
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|
if ENABLE_GTK_DOC
RSVG_DOC = doc
endif
SUBDIRS = . gdk-pixbuf-loader tests $(RSVG_DOC) win32
NULL =
lib_LTLIBRARIES = librsvg-@RSVG_API_MAJOR_VERSION@.la
noinst_LTLIBRARIES = librsvg_c_api.la
# Some systems, reportedly OpenBSD and Mac OS X, refuse
# to create libraries without any object files. Compiling
# this file, and adding its object file to the library,
# will prevent the library from being empty.
BUILT_SOURCES = _rsvg_dummy.c
_rsvg_dummy.c:
echo "static int __attribute__((unused)) __rsvg_dummy;" > _rsvg_dummy.c
# Automake wants to have a C sources list for LTLIBRARIES.
# See LIBRSVG_SRC below for the real list of Rust sources.
librsvg_c_api_la_SOURCES = _rsvg_dummy.c
CLEANFILES = $(BUILT_SOURCES)
include rsvg-c-srcs.mk
librsvg_@RSVG_API_MAJOR_VERSION@_la_SOURCES = \
$(librsvg_public_headers) \
$(NULL)
LIBRSVG_SRC = \
Cargo.toml \
build.rs \
src/accept_language.rs \
src/angle.rs \
src/api.rs \
src/aspect_ratio.rs \
src/bbox.rs \
src/c_api/dpi.rs \
src/c_api/handle.rs \
src/c_api/messages.rs \
src/c_api/mod.rs \
src/c_api/pixbuf_utils.rs \
src/c_api/sizing.rs \
src/color.rs \
src/cond.rs \
src/coord_units.rs \
src/css.rs \
src/dasharray.rs \
src/document.rs \
src/dpi.rs \
src/drawing_ctx.rs \
src/element.rs \
src/error.rs \
src/filter_func.rs \
src/filter.rs \
src/filters/blend.rs \
src/filters/bounds.rs \
src/filters/color_matrix.rs \
src/filters/component_transfer.rs \
src/filters/composite.rs \
src/filters/context.rs \
src/filters/convolve_matrix.rs \
src/filters/displacement_map.rs \
src/filters/drop_shadow.rs \
src/filters/error.rs \
src/filters/flood.rs \
src/filters/gaussian_blur.rs \
src/filters/image.rs \
src/filters/lighting.rs \
src/filters/merge.rs \
src/filters/mod.rs \
src/filters/morphology.rs \
src/filters/offset.rs \
src/filters/tile.rs \
src/filters/turbulence.rs \
src/float_eq_cairo.rs \
src/font_props.rs \
src/gradient.rs \
src/handle.rs \
src/href.rs \
src/image.rs \
src/io.rs \
src/iri.rs \
src/layout.rs \
src/length.rs \
src/lib.rs \
src/limits.rs \
src/log.rs \
src/marker.rs \
src/node.rs \
src/paint_server.rs \
src/parsers.rs \
src/path_builder.rs \
src/path_parser.rs \
src/pattern.rs \
src/properties.rs \
src/property_defs.rs \
src/property_macros.rs \
src/rect.rs \
src/session.rs \
src/shapes.rs \
src/space.rs \
src/structure.rs \
src/style.rs \
src/surface_utils/iterators.rs \
src/surface_utils/mod.rs \
src/surface_utils/shared_surface.rs \
src/surface_utils/srgb.rs \
src/text.rs \
src/transform.rs \
src/ua.css \
src/unit_interval.rs \
src/url_resolver.rs \
src/util.rs \
src/viewbox.rs \
src/ua.css \
src/xml/attributes.rs \
src/xml/mod.rs \
src/xml/xml2_load.rs \
src/xml/xml2.rs \
$(NULL)
RUST_EXTRA = \
Cargo.lock \
example.svg \
benches/box_blur.rs \
benches/composite.rs \
benches/lighting.rs \
benches/path_parser.rs \
benches/pixbuf_from_surface.rs \
benches/pixel_iterators.rs \
benches/pixel_ops.rs \
benches/srgb.rs \
benches/surface_from_pixbuf.rs \
$(NULL)
if DEBUG_RELEASE
CARGO_RELEASE_ARGS=
else
CARGO_RELEASE_ARGS=--release
endif
if CROSS_COMPILING
CARGO_TARGET_ARGS=--target=$(RUST_TARGET)
endif
CARGO_VERBOSE = $(cargo_verbose_$(V))
cargo_verbose_ = $(cargo_verbose_$(AM_DEFAULT_VERBOSITY))
cargo_verbose_0 =
cargo_verbose_1 = --verbose
LIBRSVG_BUILD_DIR=@abs_top_builddir@
CARGO_TARGET_DIR=$(LIBRSVG_BUILD_DIR)/target
RUST_LIB=$(CARGO_TARGET_DIR)/$(RUST_TARGET_SUBDIR)/librsvg.a
check-local:
cd $(srcdir) && \
CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
LIBRSVG_BUILD_DIR=$(LIBRSVG_BUILD_DIR) \
OUT_DIR=$(LIBRSVG_BUILD_DIR)/tests/output \
$(CARGO) --locked test $(CARGO_VERBOSE) $(CARGO_TARGET_ARGS) $(CARGO_RELEASE_ARGS) -- --include-ignored -Z unstable-options
clean-local:
cd $(top_srcdir) && \
CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
$(CARGO) clean
distcheck-hook:
if test -z "${DESTDIR}"; \
then \
echo "Please specify DESTDIR=/tmp/foo so distcheck will work"; \
exit 1; \
fi
librsvg_c_api.la: $(librsvg_c_api_la_OBJECTS) $(LIBRSVG_SRC)
+cd $(top_srcdir) && \
PKG_CONFIG_ALLOW_CROSS=1 \
PKG_CONFIG='$(PKG_CONFIG)' \
CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
$(CARGO) --locked build $(CARGO_VERBOSE) $(CARGO_TARGET_ARGS) $(CARGO_RELEASE_ARGS) --lib \
&& cd $(LIBRSVG_BUILD_DIR) && $(LINK) $< && mv $(RUST_LIB) .libs/librsvg_c_api.a
librsvg_@RSVG_API_MAJOR_VERSION@_la_CPPFLAGS = $(AM_CPPFLAGS)
librsvg_@RSVG_API_MAJOR_VERSION@_la_CFLAGS = $(AM_CFLAGS)
librsvg_@RSVG_API_MAJOR_VERSION@_la_LDFLAGS = \
$(BSYMBOLIC_LDFLAG) \
-version-info @RSVG_LT_VERSION_INFO@ \
-export-dynamic \
-no-undefined \
-export-symbols-regex "^rsvg_.*" \
$(AM_LDFLAGS)
if OS_DARWIN
librsvg_@RSVG_API_MAJOR_VERSION@_la_LDFLAGS += -framework Foundation
endif
librsvg_@RSVG_API_MAJOR_VERSION@_la_LIBADD = \
librsvg_c_api.la \
$(LIBRSVG_LIBS) \
$(LIBM) \
$(DLOPEN_LIBS)
librsvgincdir = $(includedir)/librsvg-$(RSVG_API_VERSION)/librsvg
librsvginc_HEADERS = $(librsvg_public_headers)
# Use SCRIPTS instead of PROGRAMS since we build it on our own
bin_SCRIPTS = rsvg-convert$(EXEEXT)
CLEANFILES += $(bin_SCRIPTS)
RSVG_CONVERT_BIN=$(CARGO_TARGET_DIR)/$(RUST_TARGET_SUBDIR)/rsvg-convert$(EXEEXT)
RSVG_CONVERT_SRC = src/bin/rsvg-convert.rs
$(RSVG_CONVERT_BIN): $(RSVG_CONVERT_SRC) | librsvg_c_api.la
+cd $(top_srcdir) && \
PKG_CONFIG_ALLOW_CROSS=1 \
PKG_CONFIG='$(PKG_CONFIG)' \
CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
$(CARGO) --locked build $(CARGO_VERBOSE) $(CARGO_TARGET_ARGS) $(CARGO_RELEASE_ARGS) --bin rsvg-convert
rsvg-convert$(EXEEXT): $(RSVG_CONVERT_BIN)
cd $(LIBRSVG_BUILD_DIR) && mv $(RSVG_CONVERT_BIN) rsvg-convert$(EXEEXT)
rsvg-convert.1: rsvg-convert.rst
if HAVE_RST2MAN
$(RST2MAN) $(top_srcdir)/rsvg-convert.rst rsvg-convert.1
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
if HAVE_RST2MAN
man1_MANS = rsvg-convert.1
CLEANFILES += rsvg-convert.1
endif
dist_doc_DATA = \
README.md \
code-of-conduct.md
EXTRA_DIST = \
$(LIBRSVG_SRC) \
$(RUST_EXTRA) \
$(RSVG_CONVERT_SRC) \
AUTHORS \
COPYING.LIB \
NEWS \
Rsvg-2.0-custom.vala \
Rsvg-2.0.metadata \
glib-tap.mk \
librsvg-zip.in \
librsvg.doap \
rsvg-convert.rst \
tap-driver.sh \
tap-test \
$(NULL)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = librsvg-$(RSVG_API_VERSION).pc
if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS = Rsvg-@RSVG_API_VERSION@.gir
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --symbol-prefix=rsvg --symbol-prefix=librsvg --warn-all
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
Rsvg-@RSVG_API_VERSION@.gir: librsvg-@RSVG_API_MAJOR_VERSION@.la
Rsvg_@RSVG_API_VERSION_U@_gir_NAMESPACE = Rsvg
Rsvg_@RSVG_API_VERSION_U@_gir_EXPORT_PACKAGES = librsvg-$(RSVG_API_VERSION)
Rsvg_@RSVG_API_VERSION_U@_gir_FILES = $(librsvginc_HEADERS)
Rsvg_@RSVG_API_VERSION_U@_gir_INCLUDES = \
GLib-2.0 \
GObject-2.0 \
Gio-2.0 \
cairo-1.0 \
GdkPixbuf-2.0 \
$(NULL)
Rsvg_@RSVG_API_VERSION_U@_gir_PACKAGES = \
pango \
libxml-2.0 \
$(NULL)
Rsvg_@RSVG_API_VERSION_U@_gir_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir) -I$(top_builddir)/include -DRSVG_COMPILATION
Rsvg_@RSVG_API_VERSION_U@_gir_LIBS = librsvg-@RSVG_API_MAJOR_VERSION@.la
Rsvg_@RSVG_API_VERSION_U@_gir_SCANNERFLAGS = --c-include="librsvg/rsvg.h"
girdir = $(datadir)/gir-1.0
nodist_gir_DATA = $(INTROSPECTION_GIRS)
typelibsdir = $(libdir)/girepository-1.0
nodist_typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(nodist_gir_DATA) $(nodist_typelibs_DATA)
if ENABLE_VAPIGEN
include $(VAPIGEN_MAKEFILE)
librsvg-$(RSVG_API_VERSION).vapi: Rsvg-$(RSVG_API_VERSION).gir
VAPIGEN_VAPIS = librsvg-$(RSVG_API_VERSION).vapi
librsvg_@RSVG_API_VERSION_U@_vapi_DEPS = gio-2.0 cairo gdk-pixbuf-2.0
librsvg_@RSVG_API_VERSION_U@_vapi_METADATADIRS = $(srcdir)
librsvg_@RSVG_API_VERSION_U@_vapi_FILES = Rsvg-$(RSVG_API_VERSION).gir $(srcdir)/Rsvg-$(RSVG_API_VERSION)-custom.vala
vapidir = $(datadir)/vala/vapi
vapi_DATA = $(VAPIGEN_VAPIS)
CLEANFILES += $(VAPIGEN_VAPIS)
endif # ENABLE_VAPIGEN
endif # HAVE_INTROSPECTION
|