Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 2/2] package/chawan: new package
@ 2026-09-19  7:53 Waldemar Brodkorb
  2026-10-20 20:39 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Waldemar Brodkorb @ 2026-09-19  7:53 UTC (permalink / raw)
  To: buildroot

Chawan is a text-mode web browser and pager for Unix-like systems, with
a focus on implementing modern web standards while remaining
self-contained, easy to understand and extensible.

It includes functionality such as CSS, inline images inside the
terminal, and JavaScript through a small, independent browser engine.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
v1->v2:
  - add comments from dowan gullient
  - add comments from Thomas Petazzoni
---
 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/chawan/Config.in   | 14 ++++++++++++++
 package/chawan/chawan.hash |  3 +++
 package/chawan/chawan.mk   | 39 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 58 insertions(+)
 create mode 100644 package/chawan/Config.in
 create mode 100644 package/chawan/chawan.hash
 create mode 100644 package/chawan/chawan.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 520e2a836d..bb449ded00 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3468,6 +3468,7 @@ F:	board/stmicroelectronics/stm32f746-disco/
 F:	configs/qemu_riscv32_nommu_virt_defconfig
 F:	configs/stm32f746_disco_sd_defconfig
 F:	package/asterisk/
+F:	package/chawan/
 F:	package/evilwm/
 F:	package/fbv/
 F:	package/libpam-pkcs11/
diff --git a/package/Config.in b/package/Config.in
index 243b390d1c..76ae6f5810 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2441,6 +2441,7 @@ endif
 	source "package/casync/Config.in"
 	source "package/casync-nano/Config.in"
 	source "package/cfm/Config.in"
+	source "package/chawan/Config.in"
 	source "package/chrony/Config.in"
 	source "package/civetweb/Config.in"
 	source "package/cloudflared/Config.in"
diff --git a/package/chawan/Config.in b/package/chawan/Config.in
new file mode 100644
index 0000000000..3dec3723af
--- /dev/null
+++ b/package/chawan/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_CHAWAN
+	bool "chawan"
+	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_11
+	select BR2_PACKAGE_BROTLI
+	select BR2_PACKAGE_LIBSSH2
+	select BR2_PACKAGE_OPENSSL
+	help
+	  A TUI Web-Browser.
+
+	  https://chawan.net/
+
+comment "chawan needs a toolchain w/ gcc >= 11"
+	depends on BR2_USE_MMU && !BR2_TOOLCHAIN_GCC_AT_LEAST_11
diff --git a/package/chawan/chawan.hash b/package/chawan/chawan.hash
new file mode 100644
index 0000000000..95f996d10a
--- /dev/null
+++ b/package/chawan/chawan.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  e0a06e1504e10a51c6009751d79b798c98d8274e559fe195d4b4b7ddadf91bb8  v0.4.4.tar.gz
+sha256  7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c  UNLICENSE
diff --git a/package/chawan/chawan.mk b/package/chawan/chawan.mk
new file mode 100644
index 0000000000..585a1fa0db
--- /dev/null
+++ b/package/chawan/chawan.mk
@@ -0,0 +1,39 @@
+################################################################################
+#
+# chawan
+#
+################################################################################
+
+CHAWAN_VERSION = 0.4.4
+CHAWAN_SITE = https://git.sr.ht/~bptato/chawan/archive
+CHAWAN_SOURCE = v$(CHAWAN_VERSION).tar.gz
+CHAWAN_LICENSE = Unlicense
+CHAWAN_LICENSE_FILES = UNLICENSE
+
+CHAWAN_DEPENDENCIES = brotli host-nim libssh2 openssl
+
+ifeq ($(BR2_aarch64),y)
+CHAWAN_TARGET_ARCH = arm64
+else ifeq ($(BR2_x86_64),y)
+CHAWAN_TARGET_ARCH = amd64
+else
+CHAWAN_TARGET_ARCH = $(BR2_ARCH)
+endif
+
+TARGET_CONFIGURE_OPTS += \
+	FLAGS="--os=linux \
+	--cpu:$(CHAWAN_TARGET_ARCH) \
+	--gcc.exe:$(TARGET_CROSS)gcc \
+	--gcc.linkerexe:$(TARGET_CROSS)gcc" \
+	PREFIX="/usr"
+
+define CHAWAN_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all
+endef
+
+define CHAWAN_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
+	DESTDIR=$(TARGET_DIR) install
+endef
+
+$(eval $(generic-package))
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH v2 2/2] package/chawan: new package
  2026-09-19  7:53 [Buildroot] [PATCH v2 2/2] package/chawan: new package Waldemar Brodkorb
@ 2026-10-20 20:39 ` Thomas Petazzoni via buildroot
  2026-10-20 22:30   ` Waldemar Brodkorb
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-10-20 20:39 UTC (permalink / raw)
  To: Waldemar Brodkorb; +Cc: buildroot

Hello,

On Sat, Sep 19, 2026 at 09:53:57AM +0200, Waldemar Brodkorb wrote:
> Chawan is a text-mode web browser and pager for Unix-like systems, with
> a focus on implementing modern web standards while remaining
> self-contained, easy to understand and extensible.
> 
> It includes functionality such as CSS, inline images inside the
> terminal, and JavaScript through a small, independent browser engine.
> 
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>

I've applied to master, with some changes.


> +CHAWAN_VERSION = 0.4.4
> +CHAWAN_SITE = https://git.sr.ht/~bptato/chawan/archive
> +CHAWAN_SOURCE = v$(CHAWAN_VERSION).tar.gz
> +CHAWAN_LICENSE = Unlicense
> +CHAWAN_LICENSE_FILES = UNLICENSE
> +
> +CHAWAN_DEPENDENCIES = brotli host-nim libssh2 openssl
> +
> +ifeq ($(BR2_aarch64),y)
> +CHAWAN_TARGET_ARCH = arm64
> +else ifeq ($(BR2_x86_64),y)
> +CHAWAN_TARGET_ARCH = amd64
> +else
> +CHAWAN_TARGET_ARCH = $(BR2_ARCH)
> +endif
> +
> +TARGET_CONFIGURE_OPTS += \

This was very very wrong, as it means you're changing this variable
for everyone in Buildroot. Variables are global.

"make check-package" actually warned about this:

WARNING: package/chawan/chawan.mk:23: possible typo, variable not properly prefixed: TARGET_CONFIGURE_OPTS -> *CHAWAN_XXXX* (https://nightly.buildroot.org/#_tips_and_tricks)

> +	FLAGS="--os=linux \
> +	--cpu:$(CHAWAN_TARGET_ARCH) \
> +	--gcc.exe:$(TARGET_CROSS)gcc \
> +	--gcc.linkerexe:$(TARGET_CROSS)gcc" \
> +	PREFIX="/usr"

So I've changed this to:

+CHAWAN_MAKE_OPTS = \
+       $(TARGET_CONFIGURE_OPTS) \
+       FLAGS="--os=linux \
+       --cpu:$(CHAWAN_TARGET_ARCH) \
+       --gcc.exe:$(TARGET_CROSS)gcc \
+       --gcc.linkerexe:$(TARGET_CROSS)gcc" \
+       PREFIX="/usr"

and then used CHAWAN_MAKE_OPTS.

> +define CHAWAN_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all
> +endef
> +
> +define CHAWAN_INSTALL_TARGET_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
> +	DESTDIR=$(TARGET_DIR) install

Continuation line should have had one more indentation level (minor
nit).

Applied with those changes. Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH v2 2/2] package/chawan: new package
  2026-10-20 20:39 ` Thomas Petazzoni via buildroot
@ 2026-10-20 22:30   ` Waldemar Brodkorb
  0 siblings, 0 replies; 3+ messages in thread
From: Waldemar Brodkorb @ 2026-10-20 22:30 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

Hi Thomas,
Thomas Petazzoni wrote,

> Hello,
> 
> On Sat, Sep 19, 2026 at 09:53:57AM +0200, Waldemar Brodkorb wrote:
> > Chawan is a text-mode web browser and pager for Unix-like systems, with
> > a focus on implementing modern web standards while remaining
> > self-contained, easy to understand and extensible.
> > 
> > It includes functionality such as CSS, inline images inside the
> > terminal, and JavaScript through a small, independent browser engine.
> > 
> > Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> 
> I've applied to master, with some changes.
> 
> 
> > +CHAWAN_VERSION = 0.4.4
> > +CHAWAN_SITE = https://git.sr.ht/~bptato/chawan/archive
> > +CHAWAN_SOURCE = v$(CHAWAN_VERSION).tar.gz
> > +CHAWAN_LICENSE = Unlicense
> > +CHAWAN_LICENSE_FILES = UNLICENSE
> > +
> > +CHAWAN_DEPENDENCIES = brotli host-nim libssh2 openssl
> > +
> > +ifeq ($(BR2_aarch64),y)
> > +CHAWAN_TARGET_ARCH = arm64
> > +else ifeq ($(BR2_x86_64),y)
> > +CHAWAN_TARGET_ARCH = amd64
> > +else
> > +CHAWAN_TARGET_ARCH = $(BR2_ARCH)
> > +endif
> > +
> > +TARGET_CONFIGURE_OPTS += \
> 
> This was very very wrong, as it means you're changing this variable
> for everyone in Buildroot. Variables are global.
> 
> "make check-package" actually warned about this:
> 
> WARNING: package/chawan/chawan.mk:23: possible typo, variable not properly prefixed: TARGET_CONFIGURE_OPTS -> *CHAWAN_XXXX* (https://nightly.buildroot.org/#_tips_and_tricks)
> 
> > +	FLAGS="--os=linux \
> > +	--cpu:$(CHAWAN_TARGET_ARCH) \
> > +	--gcc.exe:$(TARGET_CROSS)gcc \
> > +	--gcc.linkerexe:$(TARGET_CROSS)gcc" \
> > +	PREFIX="/usr"
> 
> So I've changed this to:
> 
> +CHAWAN_MAKE_OPTS = \
> +       $(TARGET_CONFIGURE_OPTS) \
> +       FLAGS="--os=linux \
> +       --cpu:$(CHAWAN_TARGET_ARCH) \
> +       --gcc.exe:$(TARGET_CROSS)gcc \
> +       --gcc.linkerexe:$(TARGET_CROSS)gcc" \
> +       PREFIX="/usr"
> 
> and then used CHAWAN_MAKE_OPTS.
> 
> > +define CHAWAN_BUILD_CMDS
> > +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all
> > +endef
> > +
> > +define CHAWAN_INSTALL_TARGET_CMDS
> > +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
> > +	DESTDIR=$(TARGET_DIR) install
> 
> Continuation line should have had one more indentation level (minor
> nit).
> 
> Applied with those changes. Thanks!

Thanks for fixing my bugs and applying!

best regards
 Waldemar
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-20 22:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-19  7:53 [Buildroot] [PATCH v2 2/2] package/chawan: new package Waldemar Brodkorb
2026-10-20 20:39 ` Thomas Petazzoni via buildroot
2026-10-20 22:30   ` Waldemar Brodkorb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox