www-client/chawan: add 9999

Signed-off-by: ingenarel (NeoJesus) <ingenarel_neojesus@disroot.org>
This commit is contained in:
ingenarel (NeoJesus)
2026-02-18 15:37:10 +06:00
parent 247a63f7cd
commit adef43ea1d
2 changed files with 77 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="TUI web browser; supports CSS, images, JavaScript, and multiple web protocols"
HOMEPAGE="https://chawan.net"
if [[ "${PV}" == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.sr.ht/~bptato/${PN}"
else
SRC_URI="https://git.sr.ht/~bptato/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-v${PV}"
KEYWORDS="~amd64"
fi
LICENSE="Unlicense"
SLOT="0"
IUSE="lto"
DEPEND="
app-arch/brotli
dev-libs/openssl
net-libs/libssh2
"
BDEPEND="
${DEPEND}
dev-lang/nim
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}/makefile-f51be415.patch"
)
src_prepare(){
default
if use lto; then
sed -i -E 's|^FLAGS\s+\+=.+|& -d:lto|' Makefile ||
die "Trying to sed the Makefile for lto failed!"
fi
}

View File

@@ -0,0 +1,32 @@
diff --git a/Makefile b/Makefile
index 78d5fe8a..1a86c257 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ NIMC ?= $(NIM) c
OBJDIR ?= .obj
OUTDIR ?= target
# These paths are quoted in recipes.
-PREFIX ?= /usr/local
+PREFIX ?= /usr
MANPREFIX ?= $(PREFIX)/share/man
MANPREFIX1 ?= $(MANPREFIX)/man1
MANPREFIX5 ?= $(MANPREFIX)/man5
@@ -52,17 +52,7 @@ FORCE_POLL_MODE ?= 0
chac_flags =
-# Nim compiler flags
-ifeq ($(TARGET),debug)
-FLAGS += -d:debug --debugger:native
-else ifeq ($(TARGET),release)
-chac_flags = -s
-FLAGS += -d:release -d:strip -d:lto
-else ifeq ($(TARGET),release0)
-FLAGS += -d:release --stacktrace:on
-else ifeq ($(TARGET),release1)
-FLAGS += -d:release --debugger:native
-endif
+FLAGS += -d:release
ssl_link = http gemini sftp
tohtml_link = gopher2html md2html ansi2html gmi2html dirlist2html img2html