diff options
Diffstat (limited to 'repo/librsvg')
-rw-r--r-- | repo/librsvg/librsvg.xibuild | 40 | ||||
-rw-r--r-- | repo/librsvg/rsvg-h-dont-use-comments-in-comments.patch | 31 | ||||
-rw-r--r-- | repo/librsvg/target.patch | 26 |
3 files changed, 97 insertions, 0 deletions
diff --git a/repo/librsvg/librsvg.xibuild b/repo/librsvg/librsvg.xibuild new file mode 100644 index 0000000..7e29f04 --- /dev/null +++ b/repo/librsvg/librsvg.xibuild @@ -0,0 +1,40 @@ +#!/bin/sh + +NAME="librsvg" +DESC="SAX-based renderer for SVG files into a GdkPixbuf" + +MAKEDEPS="make rust cargo vala" +DEPS="cairo gdk-pixbuf glib libxml2 musl pango " + +PKG_VER=2.54.1 +SOURCE="https://download.gnome.org/sources/librsvg/${PKG_VER%.*}/librsvg-$PKG_VER.tar.xz" +ADDITIONAL="target.patch" + +prepare () { + apply_patches + export RUSTFLAGS="$RUSTFLAGS -C debuginfo=2" + export CARGO_PROFILE_RELEASE_LTO=true + export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 +} + + +build () { + export CFLAGS="-fPIC" CXXFLAGS="-fPIC" + + ./configure --prefix=/usr \ + --libexecdir=/usr/lib/librsvg \ + --disable-static \ + --enable-vala + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool + + make -j1 + +} + +package () { + make DESTDIR=$PKG_DEST install +} + +postinstall () { + gdk-pixbuf-query-loaders --update-cache +} diff --git a/repo/librsvg/rsvg-h-dont-use-comments-in-comments.patch b/repo/librsvg/rsvg-h-dont-use-comments-in-comments.patch new file mode 100644 index 0000000..d7bb1ec --- /dev/null +++ b/repo/librsvg/rsvg-h-dont-use-comments-in-comments.patch @@ -0,0 +1,31 @@ +From d158d111f4b4d539a1f586bf42825c4759386fd4 Mon Sep 17 00:00:00 2001 +From: Federico Mena Quintero <federico@gnome.org> +Date: Wed, 6 Apr 2022 13:30:40 -0500 +Subject: [PATCH] (#856): Don't use /* as part of the text in C documentation + comments + +Compilers don't like it! + +Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/856 + +Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/688> +--- + include/librsvg/rsvg.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/librsvg/rsvg.h b/include/librsvg/rsvg.h +index 5a5c97c81..964002354 100644 +--- a/include/librsvg/rsvg.h ++++ b/include/librsvg/rsvg.h +@@ -122,7 +122,7 @@ GType rsvg_error_get_type (void); + * if the base file is `/foo/bar/baz.svg`, then librsvg will + * only try to load referenced files (from SVG's + * `<image>` element, for example, or from content +- * included through XML entities) if those files are in `/foo/bar/*` or in `/foo/bar/*\/.../*`. ++ * included through XML entities) if those files are in `/foo/bar/<anything>` or in `/foo/bar/<anything>\/.../<anything>`. + * This is so that malicious SVG files cannot include files that are in a directory above. + * + * The full set of rules for deciding which URLs may be loaded is as follows; +-- +GitLab + diff --git a/repo/librsvg/target.patch b/repo/librsvg/target.patch new file mode 100644 index 0000000..569bc89 --- /dev/null +++ b/repo/librsvg/target.patch @@ -0,0 +1,26 @@ +Patch-Source: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/23495#note_202355 + +--- a/vendor/system-deps/.cargo-checksum.json.orig ++++ b/vendor/system-deps/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{"Cargo.toml":"927df7476ebf5f5983169cfd973f4c95b84da17caeb20d33cccf50e326af5316","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae","src/lib.rs":"c38fd96ca3233ebee3bb7e37ca8f8a7a2685cdd7fcccf0210eaa879aa91dc684","src/metadata.rs":"657bc1b77e949e4800f9dd808790ffa535820e1658d412121a1da548e0cdd02c","src/test.rs":"9d5f8c1fb7a821352d6ba75cb005ead3e36b4f359e61feb605ab8a36d4fd31f8","src/tests/lib/libteststatic.a":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/teststaticlib.pc":"77df23f6c7c1d47aff18453b47c87e53ec8a96017546e0a55c8c4d1e13b70134","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"a1a45a1c4c9015217e12347f2a411b57ce2c4fc543913b14b6fe40483328e709"} +\ No newline at end of file ++{"files":{"Cargo.toml":"927df7476ebf5f5983169cfd973f4c95b84da17caeb20d33cccf50e326af5316","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae","src/lib.rs":"8813a7d146e91e7d3946c27f0ca1b2c2bb8800208190beecd3773cda283d3ea4","src/metadata.rs":"657bc1b77e949e4800f9dd808790ffa535820e1658d412121a1da548e0cdd02c","src/test.rs":"9d5f8c1fb7a821352d6ba75cb005ead3e36b4f359e61feb605ab8a36d4fd31f8","src/tests/lib/libteststatic.a":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/teststaticlib.pc":"77df23f6c7c1d47aff18453b47c87e53ec8a96017546e0a55c8c4d1e13b70134","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"a1a45a1c4c9015217e12347f2a411b57ce2c4fc543913b14b6fe40483328e709"} +\ No newline at end of file + +--- a/vendor/system-deps/src/lib.rs.orig ++++ b/vendor/system-deps/src/lib.rs +@@ -668,13 +668,6 @@ + let mut libraries = Dependencies::default(); + + for dep in metadata.deps.iter() { +- if let Some(cfg) = &dep.cfg { +- // Check if `cfg()` expression matches the target settings +- if !self.check_cfg(cfg)? { +- continue; +- } +- } +- + let mut enabled_feature_overrides = Vec::new(); + + for o in dep.version_overrides.iter() { |