* [Buildroot] [PATCH] package/ttyd: new package
@ 2020-06-15 18:31 Bartosz Bilas
2020-06-16 3:54 ` Baruch Siach
0 siblings, 1 reply; 3+ messages in thread
From: Bartosz Bilas @ 2020-06-15 18:31 UTC (permalink / raw)
To: buildroot
ttyd is a simple command-line tool for sharing
terminal over the web.
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
.../ttyd/0001-cmake-fix-build-without-C.patch | 41 +++++++++++++++++++
package/ttyd/Config.in | 20 +++++++++
package/ttyd/ttyd.hash | 3 ++
package/ttyd/ttyd.mk | 13 ++++++
6 files changed, 79 insertions(+)
create mode 100644 package/ttyd/0001-cmake-fix-build-without-C.patch
create mode 100644 package/ttyd/Config.in
create mode 100644 package/ttyd/ttyd.hash
create mode 100644 package/ttyd/ttyd.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 76a153d695..cbe6bc1856 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -294,6 +294,7 @@ F: board/stmicroelectronics/stm32mp157a-dk1/
F: configs/stm32mp157a_dk1_defconfig
F: package/python-esptool/
F: package/python-pyaes/
+F: package/ttyd/
F: package/qt5/qt5scxml/
F: package/qt5/qt5webview/
diff --git a/package/Config.in b/package/Config.in
index d32eadab88..1f44fe7ca9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2310,6 +2310,7 @@ comment "Utilities"
source "package/time/Config.in"
source "package/tini/Config.in"
source "package/tmux/Config.in"
+ source "package/ttyd/Config.in"
source "package/which/Config.in"
source "package/xmlstarlet/Config.in"
source "package/xxhash/Config.in"
diff --git a/package/ttyd/0001-cmake-fix-build-without-C.patch b/package/ttyd/0001-cmake-fix-build-without-C.patch
new file mode 100644
index 0000000000..8d5d35ca19
--- /dev/null
+++ b/package/ttyd/0001-cmake-fix-build-without-C.patch
@@ -0,0 +1,41 @@
+From cec921a680576865847d98552ded2a67efd8eb50 Mon Sep 17 00:00:00 2001
+From: Bartosz Bilas <b.bilas@grinn-global.com>
+Date: Mon, 15 Jun 2020 17:32:26 +0200
+Subject: [PATCH] cmake: fix build without C++
+
+Specify that ttyd is a C project to avoid the
+following build failure if a C++ compiler isn't found.
+
+CMake Error at CMakeLists.txt:3 (project):
+ The CMAKE_CXX_COMPILER:
+
+ /home/bartekk/Projects/buildroots/buildroot-dev/buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-g++
+
+ is not a full path to an existing compiler tool.
+
+ Tell CMake where to find the compiler by setting either the environment
+ variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
+ to the compiler, or to the compiler name if it is in the PATH.
+
+Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
+---
+ Upstream status: https://github.com/tsl0922/ttyd/pull/382
+
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8061f47..efd76d2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ cmake_minimum_required(VERSION 2.8)
+
+-project(ttyd)
++project(ttyd C)
+ set(PROJECT_VERSION "1.6.0")
+
+ find_package(Git)
+--
+2.27.0
+
diff --git a/package/ttyd/Config.in b/package/ttyd/Config.in
new file mode 100644
index 0000000000..83f27d9282
--- /dev/null
+++ b/package/ttyd/Config.in
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_TTYD
+ bool "ttyd"
+ depends on !BR2_STATIC_LIBS # libuv
+ depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
+ depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv
+ depends on BR2_USE_MMU # libuv
+ select BR2_PACKAGE_JSON_C
+ select BR2_PACKAGE_LIBUV
+ select BR2_PACKAGE_LIBWEBSOCKETS
+ select BR2_PACKAGE_OPENSSL
+ select BR2_PACKAGE_ZLIB
+ help
+ ttyd is a simple command-line tool for sharing terminal
+ over the web.
+
+ https://github.com/tsl0922/ttyd
+
+comment "ttyd needs a toolchain w/ NPTL, dynamic library"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS \
+ || BR2_USE_MMU || BR2_TOOLCHAIN_HAS_SYNC_4
diff --git a/package/ttyd/ttyd.hash b/package/ttyd/ttyd.hash
new file mode 100644
index 0000000000..c73af44af3
--- /dev/null
+++ b/package/ttyd/ttyd.hash
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256 d14740bc82be0d0760dd0a3c97acbcbde490412a4edc61edabe46d311b068f83 ttyd-1.6.0.tar.gz
+sha256 711762f081c180ade3d09d7b0b7537eaf35eca8d1671e47bc66eaa39376edb12 LICENSE
diff --git a/package/ttyd/ttyd.mk b/package/ttyd/ttyd.mk
new file mode 100644
index 0000000000..a7e2ee9bb5
--- /dev/null
+++ b/package/ttyd/ttyd.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# ttyd
+#
+################################################################################
+
+TTYD_VERSION = 1.6.0
+TTYD_SITE = $(call github,tsl0922,ttyd,$(TTYD_VERSION))
+TTYD_LICENSE = MIT
+TTYD_LICENSE_FILES = LICENSE
+TTYD_DEPENDENCIES = json-c libuv libwebsockets openssl zlib
+
+$(eval $(cmake-package))
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/ttyd: new package
2020-06-15 18:31 [Buildroot] [PATCH] package/ttyd: new package Bartosz Bilas
@ 2020-06-16 3:54 ` Baruch Siach
2020-06-16 17:17 ` Bartosz Bilas
0 siblings, 1 reply; 3+ messages in thread
From: Baruch Siach @ 2020-06-16 3:54 UTC (permalink / raw)
To: buildroot
Hi Bartosz,
On Mon, Jun 15 2020, Bartosz Bilas wrote:
> ttyd is a simple command-line tool for sharing
> terminal over the web.
>
> Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
> ---
[snip]
> diff --git a/package/ttyd/Config.in b/package/ttyd/Config.in
> new file mode 100644
> index 0000000000..83f27d9282
> --- /dev/null
> +++ b/package/ttyd/Config.in
> @@ -0,0 +1,20 @@
> +config BR2_PACKAGE_TTYD
> + bool "ttyd"
> + depends on !BR2_STATIC_LIBS # libuv
> + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
> + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv
> + depends on BR2_USE_MMU # libuv
> + select BR2_PACKAGE_JSON_C
> + select BR2_PACKAGE_LIBUV
> + select BR2_PACKAGE_LIBWEBSOCKETS
> + select BR2_PACKAGE_OPENSSL
> + select BR2_PACKAGE_ZLIB
> + help
> + ttyd is a simple command-line tool for sharing terminal
> + over the web.
> +
> + https://github.com/tsl0922/ttyd
> +
> +comment "ttyd needs a toolchain w/ NPTL, dynamic library"
> + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS \
> + || BR2_USE_MMU || BR2_TOOLCHAIN_HAS_SYNC_4
This makes the comment always appear when BR2_USE_MMU is enabled, even
when ttyd is selectable. There should be a separate 'depends on
BR2_USE_MMU' to hide the comment when BR2_USE_MMU is not enabled.
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/ttyd: new package
2020-06-16 3:54 ` Baruch Siach
@ 2020-06-16 17:17 ` Bartosz Bilas
0 siblings, 0 replies; 3+ messages in thread
From: Bartosz Bilas @ 2020-06-16 17:17 UTC (permalink / raw)
To: buildroot
Hi Baruch,
On 16.06.2020 05:54, Baruch Siach wrote:
> Hi Bartosz,
>
> On Mon, Jun 15 2020, Bartosz Bilas wrote:
>> ttyd is a simple command-line tool for sharing
>> terminal over the web.
>>
>> Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
>> ---
> [snip]
>
>> diff --git a/package/ttyd/Config.in b/package/ttyd/Config.in
>> new file mode 100644
>> index 0000000000..83f27d9282
>> --- /dev/null
>> +++ b/package/ttyd/Config.in
>> @@ -0,0 +1,20 @@
>> +config BR2_PACKAGE_TTYD
>> + bool "ttyd"
>> + depends on !BR2_STATIC_LIBS # libuv
>> + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
>> + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv
>> + depends on BR2_USE_MMU # libuv
>> + select BR2_PACKAGE_JSON_C
>> + select BR2_PACKAGE_LIBUV
>> + select BR2_PACKAGE_LIBWEBSOCKETS
>> + select BR2_PACKAGE_OPENSSL
>> + select BR2_PACKAGE_ZLIB
>> + help
>> + ttyd is a simple command-line tool for sharing terminal
>> + over the web.
>> +
>> + https://github.com/tsl0922/ttyd
>> +
>> +comment "ttyd needs a toolchain w/ NPTL, dynamic library"
>> + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS \
>> + || BR2_USE_MMU || BR2_TOOLCHAIN_HAS_SYNC_4
> This makes the comment always appear when BR2_USE_MMU is enabled, even
> when ttyd is selectable. There should be a separate 'depends on
> BR2_USE_MMU' to hide the comment when BR2_USE_MMU is not enabled.
Thanks for the review, I'm gonna send the v2.
> baruch
Best
Bartek
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-16 17:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-15 18:31 [Buildroot] [PATCH] package/ttyd: new package Bartosz Bilas
2020-06-16 3:54 ` Baruch Siach
2020-06-16 17:17 ` Bartosz Bilas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox