From f3a881e4cb31d574a107320b2f04e2d1f0ddf551 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 26 May 2023 15:09:32 +0100 Subject: gentoo auto-resync : 26:05:2023 - 15:09:32 --- gnome-base/librsvg/Manifest | 2 + .../files/librsvg-2.56.0-gc-sections-shrink.patch | 53 +++ gnome-base/librsvg/librsvg-2.56.0-r1.ebuild | 420 +++++++++++++++++++++ 3 files changed, 475 insertions(+) create mode 100644 gnome-base/librsvg/files/librsvg-2.56.0-gc-sections-shrink.patch create mode 100644 gnome-base/librsvg/librsvg-2.56.0-r1.ebuild (limited to 'gnome-base/librsvg') diff --git a/gnome-base/librsvg/Manifest b/gnome-base/librsvg/Manifest index c4f60ee1eefb..b7231b3ff953 100644 --- a/gnome-base/librsvg/Manifest +++ b/gnome-base/librsvg/Manifest @@ -1,4 +1,5 @@ AUX librsvg-2.40.12-gtk-optional.patch 2193 BLAKE2B fcde3effa4cf68e89387ff64638f05006094106a17fdb61b1bf2e6210f42fe91716e7fd21cf40ad5adecfee45b9e1d488249d1befdb48399c5952829c3d01e07 SHA512 bea056ac4d3d19719129dd7379d783a8eb34efbf57186f6ab7113ff97fdd809b0802d60add646ea50c776eb7bc07f5a0f4c0911569a2b1b24dbb1683f111d7c0 +AUX librsvg-2.56.0-gc-sections-shrink.patch 1795 BLAKE2B bb161dba7fdcc212d33550c6f13c774dbefa71f2bbd2282a2590357401b87affd55797f6d7f8c3fc25f2e1ec0e5f8cb55600ab1870f4b35e23202f0b87a32468 SHA512 17d2f1288169d9faee97c014fe4981f57a1b5d8a155ab205a22c4c31a0f04ac8263a60212596f1924329ef4a5ddc0f726ee100b74e4083702b4e1337acb63348 DIST adler-1.0.2.crate 12778 BLAKE2B a1dc17786adae945ac09d3525e609ed944e6465690787bbb831a1b9d53793cba1989793d0a5606d5d23ee20d36457923d451b1b3530c9ec7072a487aa3e55bbd SHA512 7ab190d31890fc05b0b55d8e2c6527a505e06793d5496be0b3831e0513412f9ba97f8148f6f68ed0770fa9cd980a5092d885e058becf1d5506b7c74b82674aa1 DIST aho-corasick-0.7.20.crate 111440 BLAKE2B 3f5d54fea2793ce1c2c4d5b3049b910f45a5721e7538cb2557df63dc3069ab3f6b66aceb5e9a48f21c43ae29778fd045428ea103b2a6de81659e605e30e64ca6 SHA512 ad31f3d1b3fe41e593d4ca7e721bbad62936f2e6a17fd1e0997353edb6fc906d1bef2b79f0ac7c7676abe637bbabb23ff22059947be379a2441011f8178983c5 DIST android_system_properties-0.1.5.crate 5243 BLAKE2B 86f68ec3bdabf8c6ec47881d794970f08a9eefc7417fc8a2bf4fe9faf9bdd2a2024a94adb0cbf96673409f5fbbd4d0111a1ac371339e7a90a277b6cd5003524e SHA512 b09f51339f9772c0e2e4241b36cf51573c6b96b19ffc1fbbc94b1c1d1d2fdfe8eac3134af54174a675ab05d18ef4f6bcb2c7fcc20114bbeef6e17e3692202191 @@ -302,5 +303,6 @@ DIST winnow-0.3.6.crate 176641 BLAKE2B 833b3c1b0a19f14e3dcdaba2f5a92bec219c995e1 DIST xml5ever-0.17.0.crate 41208 BLAKE2B 42be2b72566bf44d3cf70b365aee45a6c8034c20e4e18c5f71ed51be3a02dc63ccd2545bd41cdb9c019ea34e8419dbb93888ee41bd9b38f2a41c7bf63e27c323 SHA512 0c67244411811a3e82fe58d341b371b938ce6e45ec1af2bd8615c0f0a9628fa662ec0eb130de2ae199d32c7778f0c2d2b80221812dc33831b93333dcde5a682e DIST yeslogic-fontconfig-sys-4.0.1.crate 6694 BLAKE2B a78e56725245af764e31dbfc7e337dae5ab50e0af8d23a6f2ab5f5744b15208567bbaa742876d76fede07f7313fcce8e9c0c06aa9936cee16b902d8e7a641395 SHA512 b1626e259d8535c0189535eb240b92c798330c01866f33231ca9baba07b3da792cc5390221c826c67df9c6e6c0ae64568f1dbd70b9841750e233dab2bd27f506 EBUILD librsvg-2.40.21.ebuild 2543 BLAKE2B 803585ad5b9615e4b03ec8ed47bf9eeedb4f604c2171027756fcb94a650b207d85989503d3846c064afa073cf7484698340d77e67a589ee37c10c4e7d90bf1e7 SHA512 f07842ef1757cb8827d7b1655291d2d16d2b31d5ddd7051580086fa880bfbef5f97827772bf3d4980165bf9f5cfca33e052f3c55a5c6798e16b526855f96a5bc +EBUILD librsvg-2.56.0-r1.ebuild 8831 BLAKE2B 190b3b58a8c515bca288d6f35229adf5fd2a67521a7e4c041db2b2754897858ba888f24f1bdcbfefe3293cb366d9d0fca2baa6848a6e183956a8a64bf4ed1988 SHA512 796349698a132fa353bd8f58e120a96b775583f0515c74877545806358e7dee3463868d96f635c8e0679d4182906d1f31bb69c51c3098da63cc8e16fab3d87a5 EBUILD librsvg-2.56.0.ebuild 8653 BLAKE2B e17ff53a3ea1512a09deee0aa7e61db6b957c937bb4819b3e5304e5f1aac9168a4cf25c4f1f7e56daa48d25250240e8e1941bdfe743e1073de0add3676dc40a1 SHA512 60bae1da5bd8be48630c2147e0096ffcf7a32afd3386eefbce0b680d9c15418e46c53e259bc1a370805c19dfeb1d4499f74e7a2253384ca808c226352bc4ca77 MISC metadata.xml 417 BLAKE2B 00dfd8b977411ede7a975386836fe9290ea89265528038d4204d800ae04bb1aed6ba6b7427e0eeef05136f2f24b0c9e14dd0690c7db37c75ca2d7f41d997486c SHA512 937c31f4a264f7095d25fbf6e9d3f78e5f2558bc69d5e3308529db301108c8b47078967e85a4fc5163fbf840a34e4e15bf6621c6b3fefe5e858cc90ce82a61c2 diff --git a/gnome-base/librsvg/files/librsvg-2.56.0-gc-sections-shrink.patch b/gnome-base/librsvg/files/librsvg-2.56.0-gc-sections-shrink.patch new file mode 100644 index 000000000000..d20909f4eaa5 --- /dev/null +++ b/gnome-base/librsvg/files/librsvg-2.56.0-gc-sections-shrink.patch @@ -0,0 +1,53 @@ +https://gitlab.gnome.org/GNOME/librsvg/-/issues/965 +https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/832 +https://github.com/rust-lang/rust/issues/111593 + +From 61bba147f65019eab2a42148065798bc568169ab Mon Sep 17 00:00:00 2001 +From: Federico Mena Quintero +Date: Thu, 18 May 2023 17:57:01 -0600 +Subject: [PATCH] (#965): Shrink the shared library by telling the linker to + omit unused code +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Thanks to Sebastian Dröge for spotting this. + +Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/965 + +Part-of: +--- a/Makefile.am ++++ b/Makefile.am +@@ -217,12 +217,24 @@ 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_.*" \ ++# This is not strictly needed, but since we are telling Cargo to build a staticlib, it puts in ++# all of Rust's standard library and code from dependencies even when it is not needed. ++# With the following, we shrink the final .so size; see issue #965. ++# ++# This will no longer be needed when we switch to cargo-cbuild, which does this automatically. ++if OS_DARWIN ++gc_linked_library_args="-Wl,-dead_strip" ++else ++gc_linked_library_args="-Wl,--gc-sections" ++endif ++ ++librsvg_@RSVG_API_MAJOR_VERSION@_la_LDFLAGS = \ ++ $(BSYMBOLIC_LDFLAG) \ ++ -version-info @RSVG_LT_VERSION_INFO@ \ ++ -export-dynamic \ ++ -no-undefined \ ++ -export-symbols-regex "^rsvg_.*" \ ++ $(gc_linked_library_args) \ + $(AM_LDFLAGS) + + if OS_DARWIN +-- +GitLab diff --git a/gnome-base/librsvg/librsvg-2.56.0-r1.ebuild b/gnome-base/librsvg/librsvg-2.56.0-r1.ebuild new file mode 100644 index 000000000000..97ec78965d8c --- /dev/null +++ b/gnome-base/librsvg/librsvg-2.56.0-r1.ebuild @@ -0,0 +1,420 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..11} ) +# Drop eautoreconf after 2.56.0-r1 (once -Wl,--gc-sections patch is in a release) +GNOME2_EAUTORECONF=yes +CRATES=" + adler-1.0.2 + aho-corasick-0.7.20 + android_system_properties-0.1.5 + anes-0.1.6 + anstyle-0.3.4 + anyhow-1.0.69 + approx-0.5.1 + assert_cmd-2.0.10 + atty-0.2.14 + autocfg-1.1.0 + base-x-0.2.11 + bit-set-0.5.3 + bit-vec-0.6.3 + bitflags-1.3.2 + block-0.1.6 + bstr-1.3.0 + bumpalo-3.12.0 + bytemuck-1.13.1 + byteorder-1.4.3 + cc-1.0.79 + cairo-rs-0.17.0 + cairo-sys-rs-0.17.0 + cast-0.3.0 + cfg-expr-0.11.0 + cfg-if-1.0.0 + chrono-0.4.23 + chrono-0.4.24 + ciborium-0.2.0 + ciborium-io-0.2.0 + ciborium-ll-0.2.0 + clap-2.34.0 + clap-3.2.23 + clap-4.1.9 + clap_complete-4.1.5 + clap_derive-4.1.9 + clap_lex-0.2.4 + clap_lex-0.3.3 + codespan-reporting-0.11.1 + const-cstr-0.3.0 + const_fn-0.4.9 + convert_case-0.4.0 + core-foundation-sys-0.8.3 + crc32fast-1.3.2 + criterion-0.4.0 + criterion-plot-0.5.0 + crossbeam-channel-0.5.7 + crossbeam-deque-0.8.3 + crossbeam-epoch-0.9.14 + crossbeam-utils-0.8.15 + cssparser-0.29.6 + cssparser-macros-0.6.0 + cxx-1.0.92 + cxx-build-1.0.92 + cxxbridge-flags-1.0.92 + cxxbridge-macro-1.0.92 + data-url-0.2.0 + derive_more-0.99.17 + difflib-0.4.0 + discard-1.0.4 + dlib-0.5.0 + doc-comment-0.3.3 + dtoa-0.4.8 + dtoa-short-0.3.3 + either-1.8.1 + encoding-0.2.33 + encoding-index-japanese-1.20141219.5 + encoding-index-korean-1.20141219.5 + encoding-index-simpchinese-1.20141219.5 + encoding-index-singlebyte-1.20141219.5 + encoding-index-tradchinese-1.20141219.5 + encoding_index_tests-0.1.4 + errno-0.2.8 + errno-dragonfly-0.1.2 + fastrand-1.9.0 + flate2-1.0.25 + float-cmp-0.9.0 + fnv-1.0.7 + form_urlencoded-1.1.0 + futf-0.1.5 + futures-channel-0.3.27 + futures-core-0.3.27 + futures-executor-0.3.27 + futures-io-0.3.27 + futures-macro-0.3.27 + futures-task-0.3.27 + futures-util-0.3.27 + fxhash-0.2.1 + gdk-pixbuf-0.17.0 + gdk-pixbuf-sys-0.17.0 + getrandom-0.1.16 + getrandom-0.2.8 + gio-0.17.4 + gio-sys-0.17.4 + glib-0.17.5 + glib-macros-0.17.5 + glib-sys-0.17.4 + gobject-sys-0.17.4 + half-1.8.2 + hashbrown-0.12.3 + heck-0.4.1 + hermit-abi-0.1.19 + hermit-abi-0.2.6 + hermit-abi-0.3.1 + iana-time-zone-0.1.53 + iana-time-zone-haiku-0.1.1 + idna-0.3.0 + indexmap-1.9.2 + instant-0.1.12 + io-lifetimes-1.0.7 + is-terminal-0.4.4 + itertools-0.10.5 + itoa-1.0.6 + js-sys-0.3.61 + language-tags-0.3.2 + lazy_static-1.4.0 + libc-0.2.140 + libloading-0.7.4 + libm-0.2.6 + link-cplusplus-1.0.8 + linked-hash-map-0.5.6 + linux-raw-sys-0.1.4 + locale_config-0.3.0 + lock_api-0.4.9 + log-0.4.17 + lopdf-0.29.0 + mac-0.1.1 + malloc_buf-0.0.6 + markup5ever-0.10.1 + markup5ever-0.11.0 + matches-0.1.10 + matrixmultiply-0.3.2 + memchr-2.5.0 + memoffset-0.8.0 + miniz_oxide-0.6.2 + nalgebra-0.32.2 + nalgebra-macros-0.2.0 + new_debug_unreachable-1.0.4 + nodrop-0.1.14 + normalize-line-endings-0.3.0 + num-complex-0.4.3 + num-integer-0.1.45 + num-rational-0.4.1 + num-traits-0.2.15 + num_cpus-1.15.0 + objc-0.2.7 + objc-foundation-0.1.1 + objc_id-0.1.1 + once_cell-1.17.1 + oorandom-11.1.3 + os_str_bytes-6.4.1 + pango-0.17.4 + pango-sys-0.17.0 + pangocairo-0.17.0 + pangocairo-sys-0.17.3 + parking_lot-0.12.1 + parking_lot_core-0.9.7 + paste-1.0.12 + percent-encoding-2.2.0 + phf-0.8.0 + phf-0.10.1 + phf_codegen-0.8.0 + phf_codegen-0.10.0 + phf_generator-0.8.0 + phf_generator-0.10.0 + phf_macros-0.10.0 + phf_shared-0.8.0 + phf_shared-0.10.0 + pin-project-lite-0.2.9 + pin-utils-0.1.0 + pkg-config-0.3.26 + plotters-0.3.4 + plotters-backend-0.3.4 + plotters-svg-0.3.3 + png-0.17.7 + pom-3.2.0 + ppv-lite86-0.2.17 + precomputed-hash-0.1.1 + predicates-2.1.5 + predicates-3.0.1 + predicates-core-1.0.6 + predicates-tree-1.0.9 + proc-macro-crate-1.3.1 + proc-macro-error-1.0.4 + proc-macro-error-attr-1.0.4 + proc-macro-hack-0.5.20+deprecated + proc-macro2-0.4.30 + proc-macro2-1.0.52 + proptest-1.1.0 + quick-error-1.2.3 + quick-error-2.0.1 + quote-1.0.26 + rand-0.7.3 + rand-0.8.5 + rand_chacha-0.2.2 + rand_chacha-0.3.1 + rand_core-0.5.1 + rand_core-0.6.4 + rand_hc-0.2.0 + rand_pcg-0.2.1 + rand_xorshift-0.3.0 + rawpointer-0.2.1 + rayon-1.7.0 + rayon-core-1.11.0 + rctree-0.5.0 + redox_syscall-0.2.16 + regex-1.7.1 + regex-automata-0.1.10 + regex-syntax-0.6.28 + remove_dir_all-0.5.3 + rgb-0.8.36 + rustc_version-0.2.3 + rustc_version-0.4.0 + rusty-fork-0.3.0 + rustix-0.36.9 + ryu-1.0.13 + safe_arch-0.6.0 + same-file-1.0.6 + scratch-1.0.5 + scopeguard-1.1.0 + selectors-0.24.0 + semver-0.9.0 + semver-1.0.17 + semver-parser-0.7.0 + serde-1.0.156 + serde_derive-1.0.156 + serde_json-1.0.94 + servo_arc-0.2.0 + sha1-0.6.1 + sha1_smol-1.0.0 + simba-0.8.0 + siphasher-0.3.10 + slab-0.4.8 + smallvec-1.10.0 + stable_deref_trait-1.2.0 + standback-0.2.17 + stdweb-0.4.20 + stdweb-derive-0.5.3 + stdweb-internal-macros-0.2.9 + stdweb-internal-runtime-0.1.5 + string_cache-0.8.7 + string_cache_codegen-0.5.2 + strsim-0.10.0 + syn-1.0.109 + system-deps-6.0.3 + tempfile-3.4.0 + tendril-0.4.3 + termcolor-1.2.0 + termtree-0.4.1 + textwrap-0.16.0 + thiserror-1.0.39 + thiserror-impl-1.0.39 + time-0.1.44 + time-0.2.27 + time-macros-0.1.1 + time-macros-impl-0.1.2 + tinytemplate-1.2.1 + tinyvec-1.6.0 + tinyvec_macros-0.1.1 + toml-0.5.11 + toml_edit-0.19.7 + toml_datetime-0.6.1 + typenum-1.16.0 + unarray-0.1.4 + unicode-bidi-0.3.11 + unicode-ident-1.0.8 + unicode-normalization-0.1.22 + unicode-width-0.1.10 + url-2.3.1 + utf-8-0.7.6 + version-compare-0.1.1 + version_check-0.9.4 + wait-timeout-0.2.0 + walkdir-2.3.3 + wasi-0.9.0+wasi-snapshot-preview1 + wasi-0.11.0+wasi-snapshot-preview1 + wasm-bindgen-0.2.84 + wasm-bindgen-backend-0.2.84 + wasm-bindgen-macro-0.2.84 + wasm-bindgen-macro-support-0.2.84 + wasm-bindgen-shared-0.2.84 + web-sys-0.3.61 + weezl-0.1.7 + wide-0.7.8 + winapi-0.3.9 + winapi-i686-pc-windows-gnu-0.4.0 + winapi-util-0.1.5 + winapi-x86_64-pc-windows-gnu-0.4.0 + windows-sys-0.42.0 + windows-sys-0.45.0 + windows-targets-0.42.2 + windows_aarch64_gnullvm-0.42.2 + windows_aarch64_msvc-0.42.2 + windows_i686_gnu-0.42.2 + windows_i686_msvc-0.42.2 + windows_x86_64_gnu-0.42.2 + windows_x86_64_gnullvm-0.42.2 + windows_x86_64_msvc-0.42.2 + winnow-0.3.6 + xml5ever-0.17.0 + yeslogic-fontconfig-sys-4.0.1 +" + +inherit cargo gnome2 multilib-minimal python-any-r1 rust-toolchain vala + +DESCRIPTION="Scalable Vector Graphics (SVG) rendering library" +HOMEPAGE="https://wiki.gnome.org/Projects/LibRsvg https://gitlab.gnome.org/GNOME/librsvg" +SRC_URI+=" $(cargo_crate_uris ${CRATES})" + +LICENSE="Apache-2.0 BSD CC0-1.0 LGPL-2.1+ MIT MPL-2.0 Unicode-DFS-2016" + +SLOT="2" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86" + +IUSE="gtk-doc +introspection +vala" +REQUIRED_USE=" + gtk-doc? ( introspection ) + vala? ( introspection ) +" +RESTRICT="test" # Lots of issues on 32bit builds, 64bit build seems to get into an infinite compilation sometimes, etc. + +RDEPEND=" + >=x11-libs/cairo-1.16.0[glib,svg(+),${MULTILIB_USEDEP}] + >=media-libs/freetype-2.9:2[${MULTILIB_USEDEP}] + >=x11-libs/gdk-pixbuf-2.20:2[introspection?,${MULTILIB_USEDEP}] + >=dev-libs/glib-2.50.0:2[${MULTILIB_USEDEP}] + >=media-libs/harfbuzz-2.0.0:=[${MULTILIB_USEDEP}] + >=dev-libs/libxml2-2.9.1-r4:2[${MULTILIB_USEDEP}] + >=x11-libs/pango-1.48.11[${MULTILIB_USEDEP}] + + introspection? ( >=dev-libs/gobject-introspection-0.10.8:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + >=virtual/rust-1.64.0[${MULTILIB_USEDEP}] + x11-libs/gdk-pixbuf + ${PYTHON_DEPS} + $(python_gen_any_dep 'dev-python/docutils[${PYTHON_USEDEP}]') + gtk-doc? ( dev-util/gi-docgen ) + virtual/pkgconfig + vala? ( $(vala_depend) ) + + dev-libs/gobject-introspection-common + dev-libs/vala-common +" +# dev-libs/gobject-introspection-common, dev-libs/vala-common needed by eautoreconf + +QA_FLAGS_IGNORED=" + usr/bin/rsvg-convert + usr/lib.*/librsvg.* +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.56.0-gc-sections-shrink.patch +) + +src_prepare() { + use vala && vala_setup + gnome2_src_prepare +} + +multilib_src_configure() { + local myconf=( + --disable-static + --disable-debug + $(multilib_native_use_enable gtk-doc) + $(multilib_native_use_enable introspection) + $(multilib_native_use_enable vala) + --enable-pixbuf-loader + ) + + if ! multilib_is_native_abi; then + myconf+=( + # Set the rust target, which can differ from CHOST + RUST_TARGET="$(rust_abi)" + # RUST_TARGET is only honored if cross_compiling, but non-native ABIs aren't cross as + # far as C parts and configure auto-detection are concerned as CHOST equals CBUILD + cross_compiling=yes + ) + fi + + ECONF_SOURCE=${S} \ + gnome2_src_configure "${myconf[@]}" + + if multilib_is_native_abi; then + ln -s "${S}"/doc/html doc/html || die + fi +} + +multilib_src_compile() { + gnome2_src_compile +} + +multilib_src_install() { + gnome2_src_install +} + +multilib_src_install_all() { + find "${ED}" -name '*.la' -delete || die + + if use gtk-doc; then + mkdir -p "${ED}"/usr/share/gtk-doc/html/ || die + mv "${ED}"/usr/share/doc/Rsvg-2.0 "${ED}"/usr/share/gtk-doc/html/ || die + fi +} + +pkg_postinst() { + multilib_foreach_abi gnome2_pkg_postinst +} + +pkg_postrm() { + multilib_foreach_abi gnome2_pkg_postrm +} -- cgit v1.2.3