logo

overlay

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

glib-networking-2.76.0.ebuild (2035B)


  1. # Copyright 1999-2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit gnome.org gnome2-utils meson-multilib xdg
  5. DESCRIPTION="Network-related giomodules for glib"
  6. HOMEPAGE="https://gitlab.gnome.org/GNOME/glib-networking"
  7. LICENSE="LGPL-2.1+"
  8. SLOT="0"
  9. IUSE="gnome +gnutls +libproxy openssl test +ssl"
  10. RESTRICT="!test? ( test )"
  11. KEYWORDS="~amd64"
  12. REQUIRED_USE="ssl? ( || ( gnutls openssl ) )"
  13. RDEPEND="
  14. >=dev-libs/glib-2.73.3:2[${MULTILIB_USEDEP}]
  15. libproxy? ( >=net-libs/libproxy-0.4.16[${MULTILIB_USEDEP}] )
  16. gnutls? ( >=net-libs/gnutls-3.7.4:=[${MULTILIB_USEDEP}] )
  17. ssl? ( app-misc/ca-certificates )
  18. openssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
  19. gnome? ( gnome-base/gsettings-desktop-schemas )
  20. "
  21. DEPEND="${RDEPEND}
  22. test? ( net-libs/gnutls[pkcs11] )
  23. "
  24. BDEPEND="
  25. >=sys-devel/gettext-0.19.8
  26. virtual/pkgconfig
  27. test? ( sys-apps/dbus )
  28. "
  29. src_prepare() {
  30. default
  31. xdg_environment_reset
  32. if ! use test ; then
  33. # Don't build tests unconditionally
  34. # This is a hack to avoid needing gnutls[pkcs11] when USE=-test
  35. # It may become a real runtime dependency in future
  36. # Please check!
  37. # bug #777462
  38. sed -i "/^subdir('tests')/d" tls/meson.build || die
  39. fi
  40. }
  41. multilib_src_configure() {
  42. local emesonargs=(
  43. # Avoid automagic, built-in feature of meson
  44. -Dauto_features=disabled
  45. $(meson_feature gnutls)
  46. $(meson_feature openssl)
  47. $(meson_feature libproxy)
  48. $(meson_feature gnome gnome_proxy)
  49. -Dinstalled_tests=false
  50. -Ddebug_logs=false
  51. )
  52. meson_src_configure
  53. }
  54. multilib_src_test() {
  55. dbus-run-session meson test -C "${BUILD_DIR}" || die 'tests failed'
  56. }
  57. pkg_postinst() {
  58. xdg_pkg_postinst
  59. multilib_pkg_postinst() {
  60. gnome2_giomodule_cache_update \
  61. || die "Update GIO modules cache failed (for ${ABI})"
  62. }
  63. multilib_foreach_abi multilib_pkg_postinst
  64. }
  65. pkg_postrm() {
  66. xdg_pkg_postrm
  67. multilib_pkg_postrm() {
  68. gnome2_giomodule_cache_update \
  69. || die "Update GIO modules cache failed (for ${ABI})"
  70. }
  71. multilib_foreach_abi multilib_pkg_postrm
  72. }