logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: f89cdf69c2226b0d42f9ad49d81fde4cc61e096c
parent 2b0d6133ebdca7a76805dd750cc172f3d6472b83
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 14 Nov 2022 17:20:08 +0100

net-misc/drawterm: Add support for different gui & audio environments

Diffstat:

Anet-misc/drawterm/Manifest1+
Anet-misc/drawterm/drawterm-0_p20221013.ebuild86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mnet-misc/drawterm/drawterm-9999.ebuild85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------
3 files changed, 160 insertions(+), 12 deletions(-)

diff --git a/net-misc/drawterm/Manifest b/net-misc/drawterm/Manifest @@ -0,0 +1 @@ +DIST drawterm-65e8a26e1dac4a0f589f615126ad87a92c9c11ab.tar.gz 614945 BLAKE2B 01c34da5a8ff17e7838f142e7e7143bad8da2856f455700b9e47fc5f1d21e69fd649161e4655b3fd4aef8bfb99d475b15eef18ea7a5102938ed89afcf57366b4 SHA512 dd750e625f8b8ecb3f3e2a95d62c86c38fa6c84e37d38467947e43d8c83cd1295823241c7baf5f51a0551386377fd2a5c9ced754beee5b9b027d18edb0ffcea8 diff --git a/net-misc/drawterm/drawterm-0_p20221013.ebuild b/net-misc/drawterm/drawterm-0_p20221013.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +if [ "${PV}" == "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="git://git.9front.org/plan9front/drawterm" +else + EGIT_COMMIT="65e8a26e1dac4a0f589f615126ad87a92c9c11ab" + SRC_URI="http://git.9front.org/git/plan9front/drawterm/${EGIT_COMMIT}/snap.tar.gz -> drawterm-${EGIT_COMMIT}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~riscv ~sparc ~x86" + S="${WORKDIR}/drawterm" +fi + +DESCRIPTION="Connect to Plan 9 CPU servers from other operating systems" +HOMEPAGE="https://drawterm.9front.org/" +LICENSE="MIT" +SLOT="0" +USE_AUDIO="alsa pipewire sndio" +USE_GUI="fbdev wayland X" +IUSE="${USE_AUDIO} ${USE_GUI}" +REQUIRED_USE="?? ( ${USE_AUDIO} ) ^^ ( ${USE_GUI} )" + +RDEPEND=" + alsa? ( media-libs/alsa-lib ) + pipewire? ( media-video/pipewire:= ) + sndio? ( media-sound/sndio:= ) + wayland? ( + dev-libs/wayland + dev-libs/wayland-protocols + x11-libs/libxkbcommon[wayland] + ) + X? ( x11-libs/libX11 ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + wayland? ( dev-util/wayland-scanner ) +" + +src_configure() { + export CONF=linux + + export CFLAGS="${CFLAGS} -I\$(ROOT) -I\$(ROOT)/include -I\$(ROOT)/kern -c -D_THREAD_SAFE \$(PTHREAD)" + export LDFLAGS="${LDFLAGS} -pthread" + export LDADD="-ggdb -lm" + + if use alsa; then + export AUDIO="alsa" + deps="alsa" + elif use pipewire; then + export AUDIO="pipewire" + deps="libpipewire-0.3" + elif use sndio; then + export AUDIO="sndio" + deps="sndio" + else + export AUDIO="none" + fi + + if use fbdev; then + export GUI="fbdev" + elif use wayland; then + export GUI="wl" + deps="${deps} wayland-client xkbcommon" + elif use X; then + export GUI="x11" + deps="${deps} x11" + fi + + export CFLAGS="${CFLAGS} $(pkg-config --cflags "${deps}")" + export LDADD="${LDADD} $(pkg-config --libs "${deps}")" +} + +src_compile() { + emake \ + AS="${AS}" AR="${AR}" RANLIB="${RANLIB}" \ + CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \ + LDADD="${LDADD}" GUI="${GUI}" AUDIO="${AUDIO}" +} + +src_install() { + dobin drawterm + doman drawterm.1 +} diff --git a/net-misc/drawterm/drawterm-9999.ebuild b/net-misc/drawterm/drawterm-9999.ebuild @@ -1,22 +1,83 @@ -# Copyright 1999-2021 Gentoo Foundation +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit eutils mercurial +if [ "${PV}" == "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="git://git.9front.org/plan9front/drawterm" +else + EGIT_COMMIT="65e8a26e1dac4a0f589f615126ad87a92c9c11ab" + SRC_URI="http://git.9front.org/git/plan9front/drawterm/${EGIT_COMMIT}/snap.tar.gz -> drawterm-${EGIT_COMMIT}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~riscv ~sparc ~x86" + S="${WORKDIR}/drawterm" +fi -DESCRIPTION="connect to Plan 9 CPU servers from other operating systems" -HOMEPAGE="http://drawterm.9front.org/" -LICENSE="9base MIT" -SLOT="9front" -EHG_REPO_URI="https://code.9front.org/hg/drawterm" -IUSE="" +DESCRIPTION="Connect to Plan 9 CPU servers from other operating systems" +HOMEPAGE="https://drawterm.9front.org/" +LICENSE="MIT" +SLOT="0" +USE_AUDIO="alsa pipewire sndio" +USE_GUI="fbdev wayland X" +IUSE="${USE_AUDIO} ${USE_GUI}" +REQUIRED_USE="?? ( ${USE_AUDIO} ) ^^ ( ${USE_GUI} )" -DEPEND="x11-base/xorg-server" +RDEPEND=" + alsa? ( media-libs/alsa-lib ) + pipewire? ( media-video/pipewire:= ) + sndio? ( media-sound/sndio:= ) + wayland? ( + dev-libs/wayland + dev-libs/wayland-protocols + x11-libs/libxkbcommon[wayland] + ) + X? ( x11-libs/libX11 ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + wayland? ( dev-util/wayland-scanner ) +" + +src_configure() { + export CONF=linux + + export CFLAGS="${CFLAGS} -I\$(ROOT) -I\$(ROOT)/include -I\$(ROOT)/kern -c -D_THREAD_SAFE \$(PTHREAD)" + export LDFLAGS="${LDFLAGS} -pthread" + export LDADD="-ggdb -lm" + + if use alsa; then + export AUDIO="alsa" + deps="alsa" + elif use pipewire; then + export AUDIO="pipewire" + deps="libpipewire-0.3" + elif use sndio; then + export AUDIO="sndio" + deps="sndio" + else + export AUDIO="none" + fi + + if use fbdev; then + export GUI="fbdev" + elif use wayland; then + export GUI="wl" + deps="${deps} wayland-client xkbcommon" + elif use X; then + export GUI="x11" + deps="${deps} x11" + fi + + export CFLAGS="${CFLAGS} $(pkg-config --cflags "${deps}")" + export LDADD="${LDADD} $(pkg-config --libs "${deps}")" +} src_compile() { - export CONF=unix - default + emake \ + AS="${AS}" AR="${AR}" RANLIB="${RANLIB}" \ + CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \ + LDADD="${LDADD}" GUI="${GUI}" AUDIO="${AUDIO}" } src_install() {