logo

overlay

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

drawterm-9999.ebuild (2088B)


  1. # Copyright 1999-2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit toolchain-funcs
  5. if [ "${PV}" == "9999" ]; then
  6. inherit git-r3
  7. EGIT_REPO_URI="git://git.9front.org/plan9front/drawterm"
  8. else
  9. EGIT_COMMIT="65e8a26e1dac4a0f589f615126ad87a92c9c11ab"
  10. SRC_URI="http://git.9front.org/git/plan9front/drawterm/${EGIT_COMMIT}/snap.tar.gz -> drawterm-${EGIT_COMMIT}.tar.gz"
  11. KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~riscv ~sparc ~x86"
  12. S="${WORKDIR}/drawterm"
  13. fi
  14. DESCRIPTION="Connect to Plan 9 CPU servers from other operating systems"
  15. HOMEPAGE="https://drawterm.9front.org/"
  16. LICENSE="MIT"
  17. SLOT="0"
  18. USE_AUDIO="alsa pipewire sndio"
  19. USE_GUI="fbdev wayland X"
  20. IUSE="${USE_AUDIO} ${USE_GUI}"
  21. REQUIRED_USE="?? ( ${USE_AUDIO} ) ^^ ( ${USE_GUI} )"
  22. RDEPEND="
  23. alsa? ( media-libs/alsa-lib )
  24. pipewire? ( media-video/pipewire:= )
  25. sndio? ( media-sound/sndio:= )
  26. wayland? (
  27. dev-libs/wayland
  28. dev-libs/wayland-protocols
  29. x11-libs/libxkbcommon[wayland]
  30. )
  31. X? ( x11-libs/libX11 )
  32. "
  33. DEPEND="${RDEPEND}"
  34. BDEPEND="
  35. virtual/pkgconfig
  36. wayland? ( dev-util/wayland-scanner )
  37. "
  38. src_configure() {
  39. export CONF=linux
  40. export CFLAGS="${CFLAGS} -I\$(ROOT) -I\$(ROOT)/include -I\$(ROOT)/kern -c -D_THREAD_SAFE \$(PTHREAD)"
  41. export LDFLAGS="${LDFLAGS} -pthread"
  42. export LDADD="-ggdb -lm"
  43. if use alsa; then
  44. export AUDIO="alsa"
  45. deps="alsa"
  46. elif use pipewire; then
  47. export AUDIO="pipewire"
  48. deps="libpipewire-0.3"
  49. elif use sndio; then
  50. export AUDIO="sndio"
  51. deps="sndio"
  52. else
  53. export AUDIO="none"
  54. fi
  55. if use fbdev; then
  56. export GUI="fbdev"
  57. elif use wayland; then
  58. export GUI="wl"
  59. deps="${deps} wayland-client xkbcommon"
  60. elif use X; then
  61. export GUI="x11"
  62. deps="${deps} x11"
  63. fi
  64. export CFLAGS="${CFLAGS} $(pkg-config --cflags "${deps}")"
  65. export LDADD="${LDADD} $(pkg-config --libs "${deps}")"
  66. }
  67. src_compile() {
  68. emake \
  69. AS="$(tc-getAS)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
  70. CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
  71. LDADD="${LDADD}" GUI="${GUI}" AUDIO="${AUDIO}"
  72. }
  73. src_install() {
  74. dobin drawterm
  75. doman drawterm.1
  76. }