logo

overlay

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

gtk+-3.98.5.ebuild (4309B)


  1. # Copyright 1999-2020 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. GNOME_ORG_MODULE="gtk"
  5. inherit meson gnome2 multilib virtualx multilib-minimal
  6. DESCRIPTION="Gimp ToolKit +"
  7. HOMEPAGE="https://www.gtk.org/"
  8. LICENSE="LGPL-2+"
  9. SLOT="4"
  10. IUSE="broadway colord cups cloudprint cloudproviders examples ffmpeg +gstreamer gtk-doc +introspection test vim-syntax wayland +X xinerama tracker3 vulkan profiler"
  11. REQUIRED_USE="
  12. || ( wayland X )
  13. xinerama? ( X )
  14. "
  15. KEYWORDS="~amd64"
  16. # Upstream wants us to do their job:
  17. # https://bugzilla.gnome.org/show_bug.cgi?id=768662#c1
  18. RESTRICT="test"
  19. BDEPEND="
  20. >=dev-util/meson-0.54.2
  21. dev-lang/sassc
  22. dev-util/gdbus-codegen
  23. sys-apps/diffutils
  24. dev-libs/libxslt
  25. "
  26. # gstreamer-player-1.0.pc => media-libs/gst-plugins-bad
  27. DEPEND="
  28. >=dev-libs/glib-2.63.1:2[${MULTILIB_USEDEP}]
  29. >=x11-libs/pango-1.45.0[introspection?,${MULTILIB_USEDEP}]
  30. >=dev-libs/fribidi-0.19.7[${MULTILIB_USEDEP}]
  31. >=dev-libs/atk-2.15.1[introspection?,${MULTILIB_USEDEP}]
  32. >=x11-libs/cairo-1.14[glib,svg,X?,${MULTILIB_USEDEP}]
  33. >=x11-libs/gdk-pixbuf-2.30:2[introspection?,${MULTILIB_USEDEP}]
  34. >=media-libs/graphene-1.9.1[${MULTILIB_USEDEP}]
  35. >=media-libs/libepoxy-1.4[X(+)?,${MULTILIB_USEDEP}]
  36. introspection? ( >=dev-libs/gobject-introspection-1.39:= )
  37. wayland? (
  38. >=dev-libs/wayland-protocols-1.20
  39. >=dev-libs/wayland-1.14.91[${MULTILIB_USEDEP}]
  40. >=x11-libs/libxkbcommon-0.2[${MULTILIB_USEDEP}]
  41. )
  42. >=media-libs/harfbuzz-0.9:=
  43. app-text/iso-codes
  44. tracker3? ( >=app-misc/tracker-3.0 )
  45. X? (
  46. >=x11-libs/libXrandr-1.5[${MULTILIB_USEDEP}]
  47. x11-libs/libX11[${MULTILIB_USEDEP}]
  48. x11-libs/libXrender[${MULTILIB_USEDEP}]
  49. x11-libs/libXi[${MULTILIB_USEDEP}]
  50. x11-libs/libXext[${MULTILIB_USEDEP}]
  51. x11-libs/libXcursor[${MULTILIB_USEDEP}]
  52. x11-libs/libXdamage[${MULTILIB_USEDEP}]
  53. x11-libs/libXfixes[${MULTILIB_USEDEP}]
  54. x11-libs/libXcomposite[${MULTILIB_USEDEP}]
  55. media-libs/fontconfig[${MULTILIB_USEDEP}]
  56. xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
  57. )
  58. vulkan? (
  59. media-libs/vulkan-loader
  60. media-libs/shaderc
  61. )
  62. cloudproviders? ( dev-libs/libcloudproviders )
  63. profiler? ( dev-util/sysprof-capture )
  64. ffmpeg? ( media-video/ffmpeg:= )
  65. gstreamer? ( >=media-libs/gst-plugins-bad-1.12.3 )
  66. cups? ( net-print/cups )
  67. cloudprint? (
  68. net-libs/rest:0.7
  69. dev-libs/json-glib
  70. )
  71. colord? ( >=x11-misc/colord-0.1.9 )
  72. "
  73. src_prepare() {
  74. gnome2_src_prepare
  75. }
  76. multilib_src_configure() {
  77. local emesonargs=(
  78. $(meson_use X x11-backend)
  79. $(meson_use wayland wayland-backend)
  80. $(meson_use broadway broadway-backend)
  81. -Dvulkan=$(usex vulkan)
  82. -Dxinerama=$(usex xinerama)
  83. $(meson_use cloudproviders)
  84. $(meson_use profiler)
  85. $(meson_use tracker3)
  86. -Dprint-backends=file,lpr$(usex cups ,cups '')$(usex cloudprint ,cloudprint '')
  87. -Dcolord=$(usex colord)
  88. )
  89. if use ffmpeg && use gstreamer; then
  90. emesonargs+=( -Dmedia=ffmpeg,gstreamer )
  91. elif use ffmpeg; then
  92. emesonargs+=( -Dmedia=ffmpeg )
  93. elif use gstreamer; then
  94. emesonargs+=( -Dmedia=gstreamer )
  95. else
  96. emesonargs+=( -Dmedia=none )
  97. fi
  98. meson_src_configure
  99. }
  100. multilib_src_test() {
  101. meson_src_test
  102. }
  103. multilib_src_install() {
  104. meson_src_install
  105. }
  106. multilib_src_install_all() {
  107. DOCS=( NEWS CONTRIBUTING.md README.md )
  108. einstalldocs
  109. }
  110. pkg_preinst() {
  111. gnome2_pkg_preinst
  112. multilib_pkg_preinst() {
  113. # Make immodules.cache belongs to gtk+ alone
  114. local cache="usr/$(get_libdir)/gtk-4.0/4.0.0/immodules.cache"
  115. if [[ -e ${EROOT}${cache} ]]; then
  116. cp "${EROOT}"${cache} "${ED}"/${cache} || die
  117. else
  118. touch "${ED}"/${cache} || die
  119. fi
  120. }
  121. multilib_parallel_foreach_abi multilib_pkg_preinst
  122. }
  123. pkg_postinst() {
  124. gnome2_pkg_postinst
  125. multilib_pkg_postinst() {
  126. gnome2_query_immodules_gtk3 \
  127. || die "Update immodules cache failed (for ${ABI})"
  128. }
  129. multilib_parallel_foreach_abi multilib_pkg_postinst
  130. if ! has_version "app-text/evince"; then
  131. elog "Please install app-text/evince for print preview functionality."
  132. elog "Alternatively, check \"gtk-print-preview-command\" documentation and"
  133. elog "add it to your settings.ini file."
  134. fi
  135. }
  136. pkg_postrm() {
  137. gnome2_pkg_postrm
  138. if [[ -z ${REPLACED_BY_VERSION} ]]; then
  139. multilib_pkg_postrm() {
  140. rm -f "${EROOT}"usr/$(get_libdir)/gtk-4.0/4.0.0/immodules.cache
  141. }
  142. multilib_foreach_abi multilib_pkg_postrm
  143. fi
  144. }