logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

librsvg-2.40.21-r1.ebuild (2546B)


  1. # Copyright 1999-2024 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. GNOME2_EAUTORECONF="yes"
  5. inherit gnome2 multilib-minimal vala
  6. DESCRIPTION="Scalable Vector Graphics (SVG) rendering library"
  7. HOMEPAGE="https://wiki.gnome.org/Projects/LibRsvg"
  8. LICENSE="LGPL-2+"
  9. SLOT="2"
  10. KEYWORDS="~alpha ~arm ~hppa ~ia64 ~loong ~mips ~ppc ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
  11. IUSE="+introspection tools +vala"
  12. REQUIRED_USE="vala? ( introspection )"
  13. RDEPEND="
  14. >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
  15. >=dev-libs/libcroco-0.6.8-r1[${MULTILIB_USEDEP}]
  16. >=dev-libs/libxml2-2.9.1-r4:2[${MULTILIB_USEDEP}]
  17. >=x11-libs/cairo-1.12.14-r4[${MULTILIB_USEDEP}]
  18. >=x11-libs/gdk-pixbuf-2.30.7:2[introspection?,${MULTILIB_USEDEP}]
  19. >=x11-libs/pango-1.38.0[${MULTILIB_USEDEP}]
  20. introspection? ( >=dev-libs/gobject-introspection-0.10.8:= )
  21. tools? ( >=x11-libs/gtk+-3.10.0:3 )
  22. "
  23. DEPEND="${RDEPEND}"
  24. BDEPEND="
  25. dev-libs/gobject-introspection-common
  26. dev-libs/vala-common
  27. dev-util/glib-utils
  28. >=dev-build/gtk-doc-am-1.13
  29. virtual/pkgconfig
  30. x11-libs/gdk-pixbuf
  31. vala? ( $(vala_depend) )
  32. "
  33. # >=gtk-doc-am-1.13, gobject-introspection-common, vala-common needed by eautoreconf
  34. RESTRICT="test" # Lots of issues due to freetype changes and more; ever since newer tests got backported into 2.40.19
  35. PATCHES=(
  36. # https://bugzilla.gnome.org/show_bug.cgi?id=653323
  37. "${FILESDIR}/${PN}-2.40.12-gtk-optional.patch"
  38. "${FILESDIR}/librsvg-2.40.21-xmlError-function-pointer-type.patch"
  39. )
  40. src_prepare() {
  41. use vala && vala_setup
  42. gnome2_src_prepare
  43. }
  44. multilib_src_configure() {
  45. local myconf=(
  46. --disable-static
  47. --disable-tools # only useful for librsvg developers
  48. $(multilib_native_use_enable introspection)
  49. $(multilib_native_use_with tools gtk3)
  50. $(multilib_native_use_enable vala)
  51. --enable-pixbuf-loader
  52. )
  53. # -Bsymbolic is not supported by the Darwin toolchain
  54. [[ ${CHOST} == *-darwin* ]] && myconf+=( --disable-Bsymbolic )
  55. ECONF_SOURCE=${S} gnome2_src_configure "${myconf[@]}"
  56. if multilib_is_native_abi; then
  57. ln -s "${S}"/doc/html doc/html || die
  58. fi
  59. }
  60. multilib_src_compile() {
  61. # causes segfault if set, see bug #411765
  62. unset __GL_NO_DSO_FINALIZER
  63. gnome2_src_compile
  64. }
  65. multilib_src_install() {
  66. gnome2_src_install
  67. }
  68. pkg_postinst() {
  69. # causes segfault if set, see bug 375615
  70. unset __GL_NO_DSO_FINALIZER
  71. multilib_foreach_abi gnome2_pkg_postinst
  72. }
  73. pkg_postrm() {
  74. # causes segfault if set, see bug 375615
  75. unset __GL_NO_DSO_FINALIZER
  76. multilib_foreach_abi gnome2_pkg_postrm
  77. }