swaybg-9999.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit meson toolchain-funcs
  5. DESCRIPTION="A wallpaper utility for Wayland"
  6. HOMEPAGE="https://github.com/swaywm/swaybg"
  7. if [[ ${PV} == 9999 ]]; then
  8. inherit git-r3
  9. EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
  10. else
  11. SRC_URI="https://github.com/swaywm/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  12. KEYWORDS="~amd64 ~arm64 ~arm ~loong ~ppc64 ~riscv ~x86"
  13. fi
  14. LICENSE="MIT"
  15. SLOT="0"
  16. IUSE="gdk-pixbuf man"
  17. DEPEND="
  18. dev-libs/wayland
  19. >=dev-libs/wayland-protocols-1.14
  20. x11-libs/cairo
  21. gdk-pixbuf? ( x11-libs/gdk-pixbuf )
  22. "
  23. RDEPEND="
  24. ${DEPEND}
  25. !<gui-wm/sway-1.1_alpha1
  26. "
  27. BDEPEND="
  28. dev-util/wayland-scanner
  29. virtual/pkgconfig
  30. man? ( app-text/scdoc )
  31. "
  32. src_prepare() {
  33. default
  34. tc-is-cross-compiler && ( sed "/find_program(wayland_scanner/s@native\: true@native\: false@" -i meson.build || die "Sed failed..." )
  35. }
  36. src_configure() {
  37. local emesonargs=(
  38. -Dman-pages=$(usex man enabled disabled)
  39. -Dgdk-pixbuf=$(usex gdk-pixbuf enabled disabled)
  40. )
  41. meson_src_configure
  42. }