swaylock-effects-9999.ebuild 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 1999-2023 Gentoo foundation
  2. # Distributed under the terms of the ISC License
  3. EAPI=8
  4. inherit meson shell-completion
  5. DESCRIPTION="Screen locker for Wayland"
  6. HOMEPAGE="https://github.com/jirutka/swaylock-effects"
  7. if [[ ${PV} == 9999 ]]; then
  8. inherit git-r3
  9. EGIT_REPO_URI="https://github.com/jirutka/swaylock-effects.git"
  10. KEYWORDS="-*"
  11. else
  12. SRC_URI="https://github.com/jirutka/swaylock-effects/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
  13. S="${WORKDIR}"/${PN}-${PV}
  14. KEYWORDS="~amd64 ~arm64 ~arm ~x86"
  15. fi
  16. LICENSE="MIT"
  17. SLOT="0"
  18. IUSE="zsh-completion bash-completion fish-completion +gdk-pixbuf pam man cpu_flags_x86_sse"
  19. DEPEND="
  20. dev-libs/wayland
  21. x11-libs/cairo
  22. x11-libs/libxkbcommon
  23. gdk-pixbuf? ( x11-libs/gdk-pixbuf:2 )
  24. pam? ( sys-libs/pam )
  25. "
  26. RDEPEND="${DEPEND}
  27. !gui-apps/swaylock
  28. "
  29. BDEPEND="
  30. man? ( app-text/scdoc )
  31. >=dev-libs/wayland-protocols-1.14
  32. virtual/pkgconfig
  33. "
  34. RESTRICT="mirror"
  35. src_configure() {
  36. local emesonargs=(
  37. $(meson_feature man man-pages)
  38. $(meson_feature pam)
  39. $(meson_feature gdk-pixbuf)
  40. $(meson_use zsh-completion zsh-completions)
  41. $(meson_use bash-completion bash-completions)
  42. $(meson_use fish-completion fish-completions)
  43. $(meson_use cpu_flags_x86_sse sse)
  44. "-Dwerror=false"
  45. )
  46. meson_src_configure
  47. }
  48. src_install() {
  49. meson_src_install
  50. use bash-completion && newbashcomp completions/bash/swaylock swaylock
  51. use zsh-completion && newzshcomp completions/zsh/_swaylock _swaylock
  52. use fish-completion && newfishcomp completions/fish/swaylock.fish swaylock.fish
  53. if ! use pam; then
  54. fowners root:0 ${ED}/bin/swaylock
  55. fperms 4511 ${ED}/bin/swaylock
  56. fi
  57. }