yambar-9999.ebuild 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. # Copyright 1999-2024 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit meson
  5. if [[ ${PV} == *9999* ]]; then
  6. inherit git-r3
  7. EGIT_REPO_URI="https://codeberg.org/dnkl/${PN}.git"
  8. EGIT_SUBMODULES=()
  9. else
  10. SRC_URI="https://codeberg.org/dnkl/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
  11. S="${WORKDIR}/${PN}"
  12. KEYWORDS="~amd64 ~arm64 ~arm ~x86"
  13. fi
  14. DESCRIPTION="Simplistic and highly configurable status panel for X and Wayland"
  15. HOMEPAGE="https://codeberg.org/dnkl/yambar"
  16. LICENSE="MIT"
  17. SLOT="0"
  18. IUSE="alsa backlight battery +clock +cpu debug +disk-io dwl +foreign-toplevel man +memory mpd i3 +label +network pipewire pulseaudio removables river +script +shared-plugins sway-xkb wayland X xkb xwindow"
  19. REQUIRED_USE="
  20. || ( wayland X )
  21. sway-xkb? ( wayland )
  22. xkb? ( X )
  23. xwindow? ( X )
  24. "
  25. RDEPEND="
  26. >=media-libs/fcft-2.4.0
  27. dev-libs/libyaml
  28. alsa? ( media-libs/alsa-lib )
  29. backlight? ( virtual/libudev:= )
  30. battery? ( virtual/libudev:= )
  31. mpd? ( media-libs/libmpdclient )
  32. pipewire? (
  33. dev-libs/json-c
  34. media-video/pipewire
  35. )
  36. pulseaudio? ( media-libs/libpulse )
  37. removables? ( virtual/libudev:= )
  38. sway-xkb? ( dev-libs/json-c )
  39. x11-libs/pixman
  40. X? (
  41. x11-libs/libxcb:0=[xkb]
  42. x11-libs/xcb-util
  43. x11-libs/xcb-util-cursor
  44. x11-libs/xcb-util-wm
  45. )
  46. wayland? ( dev-libs/wayland )
  47. "
  48. DEPEND="${RDEPEND}"
  49. BDEPEND="
  50. man? ( app-text/scdoc )
  51. >=dev-libs/tllist-1.0.1
  52. >=dev-build/meson-1.1.0
  53. virtual/pkgconfig
  54. wayland? (
  55. dev-libs/wayland-protocols
  56. dev-util/wayland-scanner
  57. )
  58. "
  59. RESTRICT="mirror test"
  60. src_prepare() {
  61. default
  62. tc-is-cross-compiler && ( sed "/find_program(wayland_scanner/s@native\: true@native\: false@" -i meson.build || die "Sed failed..." )
  63. use man || $( sed -i "/subdir('doc')/d" meson.build || die "Sed failed..." )
  64. }
  65. src_configure() {
  66. use debug && EMESON_BUILDTYPE=debug
  67. local emesonargs=(
  68. $(meson_feature wayland backend-wayland)
  69. $(meson_feature X backend-x11)
  70. $(meson_use shared-plugins core-plugins-as-shared-libraries)
  71. $(meson_feature alsa plugin-alsa)
  72. $(meson_feature backlight plugin-backlight)
  73. $(meson_feature battery plugin-battery)
  74. $(meson_feature clock plugin-clock)
  75. $(meson_feature cpu plugin-cpu)
  76. $(meson_feature disk-io plugin-disk-io)
  77. $(meson_feature dwl plugin-dwl)
  78. $(meson_feature foreign-toplevel plugin-foreign-toplevel)
  79. $(meson_feature memory plugin-mem)
  80. $(meson_feature mpd plugin-mpd)
  81. $(meson_feature i3 plugin-i3)
  82. $(meson_feature label plugin-label)
  83. $(meson_feature network plugin-network)
  84. $(meson_feature pipewire plugin-pipewire)
  85. $(meson_feature pulseaudio plugin-pulse)
  86. $(meson_feature removables plugin-removables)
  87. $(meson_feature river plugin-river)
  88. $(meson_feature script plugin-script)
  89. $(meson_feature sway-xkb plugin-sway-xkb)
  90. $(meson_feature xkb plugin-xkb)
  91. $(meson_feature xwindow plugin-xwindow)
  92. -Dwerror=false
  93. -Db_ndebug=$(usex debug false true)
  94. )
  95. meson_src_configure
  96. }
  97. src_install() {
  98. meson_src_install
  99. if use shared-plugins; then
  100. echo "LDPATH=${EPREFIX}/usr/$(get_libdir)/${PN}/" > 99yambar || die
  101. doenvd 99yambar
  102. fi
  103. rm -rf "${D}/usr/share/doc/${PN}" || die
  104. }
  105. pkg_postinst() {
  106. ewarn "Warning: if you are upgrading from 1.8.0, please note that there are breaking changes that might affect your config.yml file."
  107. ewarn "See the changelog for more information"
  108. ewarn "https://codeberg.org/dnkl/yambar/releases/tag/1.9.0"
  109. }