rsvg2 3.2.3-x64-mingw32 → 3.2.4-x64-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +5 -2
- data/vendor/local/bin/csslint-0.6.exe +0 -0
- data/vendor/local/bin/libcroco-0.6-3.dll +0 -0
- data/vendor/local/bin/librsvg-2-2.dll +0 -0
- data/vendor/local/bin/rsvg-convert.exe +0 -0
- data/vendor/local/include/librsvg-2.0/librsvg/librsvg-enum-types.h +1 -1
- data/vendor/local/include/librsvg-2.0/librsvg/librsvg-features.h +3 -3
- data/vendor/local/include/librsvg-2.0/librsvg/rsvg-cairo.h +2 -2
- data/vendor/local/include/librsvg-2.0/librsvg/rsvg.h +13 -9
- data/vendor/local/lib/girepository-1.0/Rsvg-2.0.typelib +0 -0
- data/vendor/local/lib/libcroco-0.6.dll.a +0 -0
- data/vendor/local/lib/librsvg-2.a +0 -0
- data/vendor/local/lib/librsvg-2.dll.a +0 -0
- data/vendor/local/lib/librsvg-2.la +5 -5
- data/vendor/local/lib/pkgconfig/librsvg-2.0.pc +1 -1
- data/vendor/local/share/doc/librsvg/COMPILING.md +266 -0
- data/vendor/local/share/doc/librsvg/CONTRIBUTING.md +152 -0
- data/vendor/local/share/doc/librsvg/README.md +162 -0
- data/vendor/local/share/doc/librsvg/code-of-conduct.md +74 -0
- data/vendor/local/share/gir-1.0/Rsvg-2.0.gir +49 -32
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/annotation-glossary.html +6 -6
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-full.html +65 -108
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/ch01.html +54 -0
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/index.html +35 -19
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/licence.html +14 -10
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/object-tree.html +10 -14
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-2.0.devhelp2 +46 -55
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/{RsvgHandle.html → rsvg-RsvgHandle.html} +252 -338
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Using-RSVG-with-GIO.html +35 -42
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Using-RSVG-with-GdkPixbuf.html +38 -34
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Using-RSVG-with-cairo.html +13 -13
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg-Version-check-and-feature-tests.html +13 -13
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/rsvg.html +61 -15
- data/vendor/local/share/man/man1/rsvg-convert.1 +33 -16
- metadata +14 -17
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-14.html +0 -54
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-22.html +0 -42
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-32.html +0 -46
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-36.html +0 -45
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-4.html +0 -38
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-8.html +0 -53
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-2-9.html +0 -52
- data/vendor/local/share/gtk-doc/html/rsvg-2.0/api-index-deprecated.html +0 -99
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f016f543eee7d7a0c2257e48f9261d011b3f6cfafcdbe6deac4c1bee37660756
|
4
|
+
data.tar.gz: 59c29cca1983c05e17a7d888e85d9608b78d48009ada7ef79ab1653d5a78c9ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80e8f5c43f6845a33cd45bf06badb4f9afe6183f9973b5ddff52952b2aac53189315a9d1bd6bebf538ae80590c743cab2837e0097b029c6c3707ff543326618a
|
7
|
+
data.tar.gz: ed575f7a3003e8e531420189b79f95224c485e4b364e53c39eff4c4c108b0bee473ad1ca53ef6e652789ed326c4ec0fab256d65eee38e839e0cfb9331496c8ab
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- ruby -*-
|
2
2
|
#
|
3
|
-
# Copyright (C) 2010-
|
3
|
+
# Copyright (C) 2010-2018 Ruby-GNOME2 Project Team
|
4
4
|
#
|
5
5
|
# This library is free software; you can redistribute it and/or
|
6
6
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -64,14 +64,17 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
|
|
64
64
|
:name => "librsvg",
|
65
65
|
:download_site => :gnome,
|
66
66
|
:label => "librsvg",
|
67
|
-
:version => "2.
|
67
|
+
:version => "2.42.3",
|
68
68
|
:compression_method => "xz",
|
69
69
|
:windows => {
|
70
70
|
:configure_args => [
|
71
71
|
"--enable-introspection",
|
72
72
|
],
|
73
73
|
:patches => [
|
74
|
+
"librsvg-2.42-cross-compile.diff"
|
74
75
|
],
|
76
|
+
:need_autoreconf => true,
|
77
|
+
:force_to_disable_deplibs_check => true,
|
75
78
|
:built_file => "bin/librsvg-2-2.dll",
|
76
79
|
},
|
77
80
|
},
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -6,9 +6,9 @@
|
|
6
6
|
#define LIBRSVG_FEATURES_H
|
7
7
|
|
8
8
|
#define LIBRSVG_MAJOR_VERSION (2)
|
9
|
-
#define LIBRSVG_MINOR_VERSION (
|
10
|
-
#define LIBRSVG_MICRO_VERSION (
|
11
|
-
#define LIBRSVG_VERSION "2.
|
9
|
+
#define LIBRSVG_MINOR_VERSION (42)
|
10
|
+
#define LIBRSVG_MICRO_VERSION (3)
|
11
|
+
#define LIBRSVG_VERSION "2.42.3"
|
12
12
|
|
13
13
|
#define LIBRSVG_CHECK_VERSION(major,minor,micro) \
|
14
14
|
(LIBRSVG_MAJOR_VERSION > (major) || \
|
@@ -1,5 +1,5 @@
|
|
1
|
-
/* -*- Mode: C;
|
2
|
-
/* vim: set sw=4 sts=4
|
1
|
+
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2
|
+
/* vim: set sw=4 sts=4 expandtab: */
|
3
3
|
/*
|
4
4
|
rsvg-cairo.h: SAX-based renderer for SVG files using cairo
|
5
5
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
/* -*- Mode: C;
|
2
|
-
/* vim: set sw=4 sts=4
|
1
|
+
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2
|
+
/* vim: set sw=4 sts=4 expandtab: */
|
3
3
|
/*
|
4
4
|
rsvg.h: SAX-based renderer for SVG files into a GdkPixbuf.
|
5
5
|
|
@@ -65,11 +65,6 @@ typedef enum {
|
|
65
65
|
#define RSVG_ERROR (rsvg_error_quark ())
|
66
66
|
GQuark rsvg_error_quark (void) G_GNUC_CONST;
|
67
67
|
|
68
|
-
/**
|
69
|
-
* RsvgHandle:
|
70
|
-
*
|
71
|
-
* The #RsvgHandle is an object representing the parsed form of a SVG
|
72
|
-
*/
|
73
68
|
typedef struct _RsvgHandle RsvgHandle;
|
74
69
|
typedef struct RsvgHandlePrivate RsvgHandlePrivate;
|
75
70
|
typedef struct _RsvgHandleClass RsvgHandleClass;
|
@@ -80,7 +75,7 @@ typedef struct _RsvgPositionData RsvgPositionData;
|
|
80
75
|
* RsvgHandleClass:
|
81
76
|
* @parent: parent class
|
82
77
|
*
|
83
|
-
* Class structure for #RsvgHandle
|
78
|
+
* Class structure for #RsvgHandle.
|
84
79
|
*/
|
85
80
|
struct _RsvgHandleClass {
|
86
81
|
GObjectClass parent;
|
@@ -89,6 +84,12 @@ struct _RsvgHandleClass {
|
|
89
84
|
gpointer _abi_padding[15];
|
90
85
|
};
|
91
86
|
|
87
|
+
/**
|
88
|
+
* RsvgHandle:
|
89
|
+
* @parent: parent instance
|
90
|
+
*
|
91
|
+
* Lets you load SVG data and render it.
|
92
|
+
*/
|
92
93
|
struct _RsvgHandle {
|
93
94
|
GObject parent;
|
94
95
|
|
@@ -127,7 +128,10 @@ struct _RsvgPositionData {
|
|
127
128
|
|
128
129
|
void rsvg_cleanup (void);
|
129
130
|
|
131
|
+
RSVG_DEPRECATED
|
130
132
|
void rsvg_set_default_dpi (double dpi);
|
133
|
+
|
134
|
+
RSVG_DEPRECATED
|
131
135
|
void rsvg_set_default_dpi_x_y (double dpi_x, double dpi_y);
|
132
136
|
|
133
137
|
void rsvg_handle_set_dpi (RsvgHandle * handle, double dpi);
|
@@ -219,7 +223,7 @@ void rsvg_handle_free (RsvgHandle * handle);
|
|
219
223
|
* Deprecated: Set up a cairo matrix and use rsvg_handle_render_cairo() instead.
|
220
224
|
* See the documentation for rsvg_handle_set_size_callback() for an example.
|
221
225
|
*/
|
222
|
-
|
226
|
+
/* RSVG_DEPRECATED */ typedef void (*RsvgSizeFunc) (gint * width, gint * height, gpointer user_data);
|
223
227
|
|
224
228
|
RSVG_DEPRECATED
|
225
229
|
void rsvg_handle_set_size_callback (RsvgHandle * handle,
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# librsvg-2.la - a libtool library file
|
2
|
-
# Generated by libtool (GNU libtool) 2.4.6
|
2
|
+
# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
|
3
3
|
#
|
4
4
|
# Please DO NOT delete this file!
|
5
5
|
# It is necessary for linking the library.
|
@@ -17,15 +17,15 @@ old_library='librsvg-2.a'
|
|
17
17
|
inherited_linker_flags=' -pthread'
|
18
18
|
|
19
19
|
# Libraries that this one depends upon.
|
20
|
-
dependency_libs=' -R/home/vagrant/ruby-gnome2/glib2/vendor/local/lib -L/home/vagrant/ruby-gnome2/glib2/vendor/local/lib -L/home/vagrant/rcairo/vendor/local/lib -L/home/vagrant/ruby-gnome2/rsvg2/vendor/local/lib -L/home/vagrant/ruby-gnome2/pango/vendor/local/lib -L/home/vagrant/ruby-gnome2/gdk_pixbuf2/vendor/local/lib /home/vagrant/ruby-gnome2/gdk_pixbuf2/vendor/local/lib/libgdk_pixbuf-2.0.la /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libgio-2.0.la /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libgmodule-2.0.la -ldnsapi -liphlpapi /home/vagrant/ruby-gnome2/pango/vendor/local/lib/libpangocairo-1.0.la /home/vagrant/ruby-gnome2/pango/vendor/local/lib/libpangowin32-1.0.la -lusp10 /home/vagrant/
|
20
|
+
dependency_libs=' -R/home/vagrant/ruby-gnome2/glib2/vendor/local/lib -L/home/vagrant/ruby-gnome2/glib2/vendor/local/lib -L/home/vagrant/rcairo/vendor/local/lib -L/home/vagrant/ruby-gnome2/rsvg2/vendor/local/lib -L/home/vagrant/ruby-gnome2/pango/vendor/local/lib -L/home/vagrant/ruby-gnome2/gdk_pixbuf2/vendor/local/lib /home/vagrant/ruby-gnome2/gdk_pixbuf2/vendor/local/lib/libgdk_pixbuf-2.0.la /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libgio-2.0.la /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libgmodule-2.0.la -ldnsapi -liphlpapi /home/vagrant/ruby-gnome2/pango/vendor/local/lib/libpangocairo-1.0.la /home/vagrant/ruby-gnome2/pango/vendor/local/lib/libpangowin32-1.0.la -lusp10 /home/vagrant/rcairo/vendor/local/lib/libcairo.la -lpthread /home/vagrant/rcairo/vendor/local/lib/libpixman-1.la -lgdi32 -lmsimg32 /home/vagrant/ruby-gnome2/pango/vendor/local/lib/libpangoft2-1.0.la /home/vagrant/ruby-gnome2/pango/vendor/local/lib/libharfbuzz.la /home/vagrant/ruby-gnome2/pango/vendor/local/lib/libpango-1.0.la /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libgthread-2.0.la /home/vagrant/ruby-gnome2/pango/vendor/local/lib/libfribidi.la /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libgobject-2.0.la /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libffi.la /home/vagrant/rcairo/vendor/local/lib/libfontconfig.la /home/vagrant/rcairo/vendor/local/lib/libfreetype.la /home/vagrant/rcairo/vendor/local/lib/libpng16.la /home/vagrant/ruby-gnome2/rsvg2/vendor/local/lib/libcroco-0.6.la /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libglib-2.0.la -lole32 -lwinmm -lshlwapi /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libpcre.la /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libintl.la /home/vagrant/ruby-gnome2/glib2/vendor/local/lib/libiconv.la /home/vagrant/rcairo/vendor/local/lib/libxml2.la -lz -lws2_32'
|
21
21
|
|
22
22
|
# Names of additional weak libraries provided by this library
|
23
23
|
weak_library_names=''
|
24
24
|
|
25
25
|
# Version information for librsvg-2.
|
26
|
-
current=
|
27
|
-
age=
|
28
|
-
revision=
|
26
|
+
current=44
|
27
|
+
age=42
|
28
|
+
revision=3
|
29
29
|
|
30
30
|
# Is this an already installed library?
|
31
31
|
installed=yes
|
@@ -0,0 +1,266 @@
|
|
1
|
+
Compiling librsvg
|
2
|
+
=================
|
3
|
+
|
4
|
+
Librsvg uses a mostly normal [autotools] setup, but it has some
|
5
|
+
peculiarities due to librsvg's use of a Rust sub-library. The details
|
6
|
+
of how librsvg integrates Cargo and Rust into its autotools setup are
|
7
|
+
described in [this blog post][blog], although hopefully you will not
|
8
|
+
need to refer to it.
|
9
|
+
|
10
|
+
It is perfectly fine to [ask the maintainer][maintainer] if you have
|
11
|
+
questions about the Autotools setup; it's a tricky bit of machinery,
|
12
|
+
and we are glad to help.
|
13
|
+
|
14
|
+
There are generic compilation/installation instructions in the
|
15
|
+
[`INSTALL`][install] file, which comes from Autotools. The following
|
16
|
+
explains librsvg's peculiarities.
|
17
|
+
|
18
|
+
* [Installing dependencies for building](#installing-dependencies-for-building)
|
19
|
+
* [Basic compilation instructions](#basic-compilation-instructions)
|
20
|
+
* [Verbosity](#verbosity)
|
21
|
+
* [Debug or release builds](#debug-or-release-builds)
|
22
|
+
* [Cross-compilation](#cross-compilation)
|
23
|
+
* [Building with no network access](#building-with-no-network-access)
|
24
|
+
|
25
|
+
# Installing dependencies for building
|
26
|
+
|
27
|
+
To compile librsvg, you need the following packages installed. The
|
28
|
+
minimum version is listed here; you may use a newer version instead.
|
29
|
+
|
30
|
+
**Compilers:**
|
31
|
+
|
32
|
+
* a C compiler and `make` tool; we recommend GNU `make`.
|
33
|
+
* rust 1.21
|
34
|
+
* cargo
|
35
|
+
|
36
|
+
**Mandatory dependencies:**
|
37
|
+
|
38
|
+
* Cairo 1.15.4 with PNG support
|
39
|
+
* Freetype2 2.8.0
|
40
|
+
* Libcroco 0.6.1
|
41
|
+
* Gdk-pixbuf 2.20.0
|
42
|
+
* GIO 2.24.0
|
43
|
+
* GObject-Introspection 0.10.8
|
44
|
+
* Libxml2 2.9.0
|
45
|
+
* Pango 1.38.0
|
46
|
+
|
47
|
+
**Optional dependencies:**
|
48
|
+
|
49
|
+
* GTK+ 3.10.0 if you want the `rsvg-view-3` program
|
50
|
+
|
51
|
+
The following sections describe how to install these dependencies on
|
52
|
+
several systems.
|
53
|
+
|
54
|
+
### Debian based systems
|
55
|
+
|
56
|
+
As of 2018/Feb/22, librsvg cannot be built in `debian stable` and
|
57
|
+
`ubuntu 16.04`, as they have packages that are too old.
|
58
|
+
|
59
|
+
**Build dependencies on Debian Testing:**
|
60
|
+
|
61
|
+
```sh
|
62
|
+
apt-get install -y gcc make rustc cargo \
|
63
|
+
automake autoconf libtool gettext itstool \
|
64
|
+
libgdk-pixbuf2.0-dev libgirepository1.0-dev \
|
65
|
+
gtk-doc-tools git libgtk-3-dev \
|
66
|
+
libxml2-dev libcroco3-dev libcairo2-dev libpango1.0-dev
|
67
|
+
```
|
68
|
+
|
69
|
+
**Build dependencies on Ubuntu 18.04 or newer:**
|
70
|
+
|
71
|
+
As of 2018/Feb/22 you will need to install `rustc` and `cargo` with
|
72
|
+
[rustup.rs](https://rustup.rs), as the `rustc` package from Ubuntu is
|
73
|
+
too old. Please follow the instructions there to install Rust and Cargo.
|
74
|
+
|
75
|
+
```sh
|
76
|
+
apt-get install -y gcc make \
|
77
|
+
automake autoconf libtool gettext itstool \
|
78
|
+
libgdk-pixbuf2.0-dev libgirepository1.0-dev \
|
79
|
+
gtk-doc-tools git libgtk-3-dev \
|
80
|
+
libxml2-dev libcroco3-dev libcairo2-dev libpango1.0-dev
|
81
|
+
```
|
82
|
+
|
83
|
+
### Fedora based systems
|
84
|
+
|
85
|
+
```sh
|
86
|
+
dnf install -y gcc rust rust-std-static cargo make \
|
87
|
+
automake autoconf libtool gettext itstool \
|
88
|
+
gdk-pixbuf2-devel gobject-introspection-devel \
|
89
|
+
gtk-doc git redhat-rpm-config gtk3-devel \
|
90
|
+
libxml2-devel libcroco-devel cairo-devel pango-devel
|
91
|
+
```
|
92
|
+
|
93
|
+
### openSUSE based systems
|
94
|
+
|
95
|
+
```sh
|
96
|
+
zypper install -y gcc rust rust-std cargo make \
|
97
|
+
automake autoconf libtool gettext itstool git \
|
98
|
+
gtk-doc gobject-introspection-devel gtk3-devel \
|
99
|
+
libxml2-devel libcroco-devel cairo-devel \
|
100
|
+
pango-devel gdk-pixbuf-devel
|
101
|
+
```
|
102
|
+
|
103
|
+
### MacOS systems
|
104
|
+
|
105
|
+
Dependencies may be installed using [Homebrew](https://brew.sh) or another
|
106
|
+
package manager.
|
107
|
+
|
108
|
+
```sh
|
109
|
+
brew install cairo gdk-pixbuf glib libcroco pango \
|
110
|
+
gobject-introspection rust
|
111
|
+
|
112
|
+
export PKG_CONFIG_PATH="`brew --prefix`/lib/pkgconfig:\
|
113
|
+
`brew --prefix libffi`/lib/pkgconfig:\
|
114
|
+
/usr/lib/pkgconfig"
|
115
|
+
export ARCHFLAGS="-arch x86_64"
|
116
|
+
```
|
117
|
+
|
118
|
+
Note that `PKG_CONFIG_PATH` must be manually set to include Homebrew's libffi,
|
119
|
+
as the system libffi is too old but Homebrew does not install it in a public
|
120
|
+
location by default.
|
121
|
+
|
122
|
+
Currently, cairo 1.15.4 or later must also be installed manually, as the
|
123
|
+
Homebrew package is for the older stable release. This may require adding
|
124
|
+
it to `PKG_CONFIG_PATH` as well if you do not install it in `/usr/local`.
|
125
|
+
|
126
|
+
Setting `ARCHFLAGS` is required if gobject-introspection is using the system
|
127
|
+
Python provided by Apple, as on Homebrew.
|
128
|
+
|
129
|
+
|
130
|
+
# Basic compilation instructions
|
131
|
+
|
132
|
+
If you are compiling a tarball:
|
133
|
+
|
134
|
+
```sh
|
135
|
+
./configure
|
136
|
+
make
|
137
|
+
make install
|
138
|
+
```
|
139
|
+
|
140
|
+
See the [`INSTALL`][install] file for details on options you can pass
|
141
|
+
to the `configure` script to select where to install the compiled
|
142
|
+
library.
|
143
|
+
|
144
|
+
If you are compiling from a git checkout:
|
145
|
+
|
146
|
+
```sh
|
147
|
+
./autogen.sh
|
148
|
+
make
|
149
|
+
make install
|
150
|
+
```
|
151
|
+
|
152
|
+
# Verbosity
|
153
|
+
|
154
|
+
By default the compilation process is quiet, and it just tells you
|
155
|
+
which files it is compiling.
|
156
|
+
|
157
|
+
If you wish to see the full compilation command lines, use "`make V=1`"
|
158
|
+
instead of plain "`make`".
|
159
|
+
|
160
|
+
# Debug or release builds
|
161
|
+
|
162
|
+
Librsvg has code both in C and Rust, and each language has a different
|
163
|
+
way of specifying compilation options to select compiler
|
164
|
+
optimizations, or whether debug information should be included.
|
165
|
+
|
166
|
+
You should set the `CFLAGS` environment variable with compiler flags
|
167
|
+
that you want to pass to the C compiler.
|
168
|
+
|
169
|
+
## Controlling debug or release mode for Rust
|
170
|
+
|
171
|
+
* With a `configure` option: `--enable-debug` or `--disable-debug`
|
172
|
+
* With an environment variable: `LIBRSVG_DEBUG=yes` or `LIBRSVG_DEBUG=no`
|
173
|
+
|
174
|
+
For the Rust part of librsvg, we have a flag that
|
175
|
+
you can pass at `configure` time. When enabled, the Rust
|
176
|
+
sub-library will have debugging information and no compiler
|
177
|
+
optimizations. *This flag is off by default:* if the flag is not
|
178
|
+
specified, the Rust sub-library will be built in release mode (no
|
179
|
+
debug information, full compiler optimizations).
|
180
|
+
|
181
|
+
The rationale is that people who already had scripts in place to build
|
182
|
+
binary packages for librsvg, generally from release tarballs, are
|
183
|
+
already using conventional machinery to specify C compiler options,
|
184
|
+
such as that in RPM specfiles or Debian source packages. However,
|
185
|
+
they may not contemplate Rust sub-libraries and they will certainly
|
186
|
+
not want to modify their existing packaging scripts too much.
|
187
|
+
|
188
|
+
So, by default, the Rust library builds in **release mode**, to make
|
189
|
+
life easier to binary distributions. Librsvg's build scripts will add
|
190
|
+
`--release` to the Cargo command line by default.
|
191
|
+
|
192
|
+
Developers can request a debug build of the Rust sub-library by
|
193
|
+
passing `--enable-debug` to the `configure` script, or by setting the
|
194
|
+
`LIBRSVG_DEBUG=yes` environment variable before calling `configure`.
|
195
|
+
This will omit the `--release` option from Cargo, so that it will
|
196
|
+
build the Rust sub-library in debug mode.
|
197
|
+
|
198
|
+
In case both the environment variable and the command-line option are
|
199
|
+
specified, the command-line option overrides the env var.
|
200
|
+
|
201
|
+
# Cross-compilation
|
202
|
+
|
203
|
+
If you need to cross-compile librsvg, specify the `--host=TRIPLE` to
|
204
|
+
the `configure` script as usual with Autotools. This will cause
|
205
|
+
librsvg's build scripts to automatically pass `--target=TRIPLE` to
|
206
|
+
`cargo`.
|
207
|
+
|
208
|
+
Note, however, that Rust may support different targets than the C
|
209
|
+
compiler on your system. Rust's supported targets can be found in the
|
210
|
+
[`rust/src/librustc_back/target`][rust-target-dir] in the Rust
|
211
|
+
compiler's source code.
|
212
|
+
|
213
|
+
You can check Jorge Aparicio's [guide on cross-compilation for
|
214
|
+
Rust][rust-cross] for more details.
|
215
|
+
|
216
|
+
## Cross-compiling to a target not supported by Rust out of the box
|
217
|
+
|
218
|
+
When building with a target that is not supported out of the box by
|
219
|
+
Rust, you have to do this:
|
220
|
+
|
221
|
+
1. Create a [target JSON definition file][target-json].
|
222
|
+
|
223
|
+
2. Set the environment variable `RUST_TARGET_PATH` to its directory
|
224
|
+
for the `make` command.
|
225
|
+
|
226
|
+
Example:
|
227
|
+
|
228
|
+
```sh
|
229
|
+
cd /my/target/definition
|
230
|
+
echo "JSON goes here" > MYMACHINE-VENDOR-OS.json
|
231
|
+
cd /source/tree/for/librsvg
|
232
|
+
./configure --host=MYMACHINE-VENDOR-OS
|
233
|
+
make RUST_TARGET_PATH=/my/target/definition
|
234
|
+
```
|
235
|
+
|
236
|
+
# Building with no network access
|
237
|
+
|
238
|
+
Automated build systems generally avoid network access so that they
|
239
|
+
can compile from known-good sources, instead of pulling random updates
|
240
|
+
from the net every time. However, normally Cargo likes to download
|
241
|
+
dependencies when it first compiles a Rust project.
|
242
|
+
|
243
|
+
We use [`cargo vendor`][cargo-vendor] to ship librsvg release tarballs
|
244
|
+
with the source code for Rust dependencies **embedded within the
|
245
|
+
tarball**. If you unpack a librsvg tarball, these sources will appear
|
246
|
+
in the `rust/vendor` subdirectory. If you build librsvg from a
|
247
|
+
tarball, instead of git, it should not need to access the network to
|
248
|
+
download extra sources at all.
|
249
|
+
|
250
|
+
Build systems can use [Cargo's source replacement
|
251
|
+
mechanism][cargo-source-replacement] to override the location of the
|
252
|
+
source code for the Rust dependencies, for example, in order to patch
|
253
|
+
one of the Rust crates that librsvg uses internally.
|
254
|
+
|
255
|
+
The source replacement information is in `rust/.cargo/config` in the
|
256
|
+
unpacked tarball. Your build system can patch this file as needed.
|
257
|
+
|
258
|
+
[autotools]: https://autotools.io/index.html
|
259
|
+
[blog]: https://people.gnome.org/~federico/blog/librsvg-build-infrastructure.html
|
260
|
+
[maintainer]: README.md#maintainers
|
261
|
+
[install]: INSTALL
|
262
|
+
[rust-target-dir]: https://github.com/rust-lang/rust/tree/master/src/librustc_back/target
|
263
|
+
[cargo-vendor]: https://crates.io/crates/cargo-vendor
|
264
|
+
[cargo-source-replacement]: http://doc.crates.io/source-replacement.html
|
265
|
+
[rust-cross]: https://github.com/japaric/rust-cross
|
266
|
+
[target-json]: https://github.com/japaric/rust-cross#target-specification-files
|
@@ -0,0 +1,152 @@
|
|
1
|
+
Contributing to librsvg
|
2
|
+
=======================
|
3
|
+
|
4
|
+
Thank you for looking in this file! There are different ways of
|
5
|
+
contributing to librsvg, and we appreciate all of them.
|
6
|
+
|
7
|
+
* [Source repository](#source-code)
|
8
|
+
* [Reporting bugs](#reporting-bugs)
|
9
|
+
* [Feature requests](#feature-requests)
|
10
|
+
* [Merge requests](#merge-requests)
|
11
|
+
|
12
|
+
There is a **code of conduct** for contributors to librsvg; please see the
|
13
|
+
file [`code-of-conduct.md`][coc].
|
14
|
+
|
15
|
+
## Source repository
|
16
|
+
|
17
|
+
Librsvg's main source repository is at gitlab.gnome.org. You can view
|
18
|
+
the web interface here:
|
19
|
+
|
20
|
+
https://gitlab.gnome.org/GNOME/librsvg
|
21
|
+
|
22
|
+
Development happens in the master branch. There are also branches for
|
23
|
+
stable releases.
|
24
|
+
|
25
|
+
Alternatively, you can use the mirror at Github:
|
26
|
+
|
27
|
+
https://github.com/GNOME/librsvg
|
28
|
+
|
29
|
+
Note that we don't do bug tracking in the Github mirror; see the next
|
30
|
+
section.
|
31
|
+
|
32
|
+
If you need to publish a branch, feel free to do it at any
|
33
|
+
publically-accessible Git hosting service, although gitlab.gnome.org
|
34
|
+
makes things easier for the maintainers of librsvg.
|
35
|
+
|
36
|
+
## Reporting bugs
|
37
|
+
|
38
|
+
Please report bugs at https://gitlab.gnome.org/GNOME/librsvg/issues
|
39
|
+
|
40
|
+
If you want to report a rendering bug, or a missing SVG feature,
|
41
|
+
please provide an example SVG file as an attachment to your bug
|
42
|
+
report. It really helps if you can minimize the SVG to only the
|
43
|
+
elements required to reproduce the bug or see the missing feature, but
|
44
|
+
it is not absolutely required. **Please be careful** of publishing
|
45
|
+
SVG images that you don't want other people to see, or images whose
|
46
|
+
copyright does not allow redistribution; the bug tracker is a public
|
47
|
+
resource and attachments are visible to everyone.
|
48
|
+
|
49
|
+
You can also [browse the existing bugs][bugs-browse].
|
50
|
+
|
51
|
+
## Feature requests
|
52
|
+
|
53
|
+
Librsvg aims to be a small and relatively simple SVG rendering
|
54
|
+
library. Currently we do not plan to support scripting, animation, or
|
55
|
+
interactive features like mouse events on SVG elements.
|
56
|
+
|
57
|
+
However, we *do* aim go provide good support for SVG's graphical
|
58
|
+
features. Please see the "[reporting bugs](#reporting-bugs)" section for
|
59
|
+
information about our bug tracking system; feature requests should be
|
60
|
+
directed there.
|
61
|
+
|
62
|
+
It is especially helpful if you file bug for a feature request along
|
63
|
+
with a sample SVG file.
|
64
|
+
|
65
|
+
## Merge requests
|
66
|
+
|
67
|
+
### Creating a merge request
|
68
|
+
|
69
|
+
You may create a forked version of librsvg in [GNOME's Gitlab
|
70
|
+
instance][gitlab], or any other publically-accesible Git hosting
|
71
|
+
service. You can register an account there, or log in with your
|
72
|
+
account from other OAuth services.
|
73
|
+
|
74
|
+
Note that the maintainers of librsvg only get notified about merge
|
75
|
+
requests (or pull requests) if your fork is in
|
76
|
+
[gitlab.gnome.org][gitlab].
|
77
|
+
|
78
|
+
For technical reasons, the maintainers of librsvg do not get
|
79
|
+
automatically notified if you submit a pull request through the GNOME
|
80
|
+
mirror in Github. [Please contact the maintainer][maintainer] directly if you
|
81
|
+
have a pull request there or a branch that you would like to
|
82
|
+
contribute.
|
83
|
+
|
84
|
+
### Test suite
|
85
|
+
|
86
|
+
Please make sure that the test suite passes with the changes in your
|
87
|
+
branch. The easiest way to run all the tests is to go to librsvg's
|
88
|
+
toplevel directory and run `make check`. This will run both the small
|
89
|
+
unit tests and the black box tests in the `librsvg/tests` directory.
|
90
|
+
|
91
|
+
If you need to add new tests (you should, for new features, or for
|
92
|
+
things that we weren't testing!), or for additional information on how
|
93
|
+
the test suite works, please see the file
|
94
|
+
[`tests/README.md`][tests-readme].
|
95
|
+
|
96
|
+
### Working on the source
|
97
|
+
|
98
|
+
Librvg uses an autotools setup, which is described in detail [in this
|
99
|
+
blog post][blog].
|
100
|
+
|
101
|
+
If you need to **add a new source file**, you need to do it in the
|
102
|
+
toplevel [`Makefile.am`][toplevel-makefile]. *Note that this is for
|
103
|
+
both C and Rust sources*, since `make(1)` needs to know when a Rust
|
104
|
+
file changed so it can call `cargo` as appropriate.
|
105
|
+
|
106
|
+
It is perfectly fine to [ask the maintainer][maintainer] if you have
|
107
|
+
questions about the Autotools setup; it's a tricky bit of machinery,
|
108
|
+
and we are glad to help.
|
109
|
+
|
110
|
+
### Testing changes
|
111
|
+
|
112
|
+
The most direct way to test a change is to have an example SVG file
|
113
|
+
that exercises the code you want to test. Then you can rebuild
|
114
|
+
librsvg, and run this:
|
115
|
+
|
116
|
+
```
|
117
|
+
cd /src/librsvg
|
118
|
+
libtool --mode=execute ./rsvg-convert -o foo.png foo.svg
|
119
|
+
```
|
120
|
+
|
121
|
+
Then you can view the resulting `foo.png` image. Alternatively, you
|
122
|
+
can use `./rsvg-view-3` for a quick-and-dirty SVG viewer.
|
123
|
+
|
124
|
+
**Please update the test suite** with a suitable example file once you
|
125
|
+
have things working (or before even writing code, if you like
|
126
|
+
test-driven development), so we can avoid regressions later. The test
|
127
|
+
suite is documented in [`tests/README.md`][tests-readme].
|
128
|
+
|
129
|
+
### Testing performance-related changes
|
130
|
+
|
131
|
+
You can use the [rsvg-bench] tool to benchmark librsvg. It lets you
|
132
|
+
run a benchmarking program **on an already-installed librsvg
|
133
|
+
library**. For example, you can ask rsvg-bench to render one or more
|
134
|
+
SVGs hundreds of times in a row, so you can take accurate timings or
|
135
|
+
run a sampling profiler and get enough samples.
|
136
|
+
|
137
|
+
**Why is rsvg-bench not integrated in librsvg's sources?** Because
|
138
|
+
rsvg-bench depends on the [rsvg-rs] Rust bindings, and these are
|
139
|
+
shipped outside of librsvg. This requires you to first install
|
140
|
+
librsvg, and then compile rsvg-bench. We aim to make this easier in
|
141
|
+
the future. Of course all help is appreciated!
|
142
|
+
|
143
|
+
[coc]: code-of-conduct.md
|
144
|
+
[gitlab]: https://gitlab.gnome.org/GNOME/librsvg
|
145
|
+
[bugs-browse]: https://gitlab.gnome.org/GNOME/librsvg/issues
|
146
|
+
[maintainer]: README.md#maintainers
|
147
|
+
[tests-readme]: tests/README.md
|
148
|
+
[blog]: https://people.gnome.org/~federico/blog/librsvg-build-infrastructure.html
|
149
|
+
[toplevel-makefile]: Makefile.am
|
150
|
+
[tests-readme]: tests/README.md
|
151
|
+
[rsvg-bench]: https://gitlab.gnome.org/federico/rsvg-bench
|
152
|
+
[rsvg-rs]: https://github.com/selaux/rsvg-rs
|