diff --git a/bootstrap.d/dev-libs.yml b/bootstrap.d/dev-libs.yml index b5b9a209f..672286bc6 100644 --- a/bootstrap.d/dev-libs.yml +++ b/bootstrap.d/dev-libs.yml @@ -794,7 +794,34 @@ packages: - args: ['make', 'install'] environ: DESTDIR: '@THIS_COLLECT_DIR@' - + - name: libretls + source: + subdir: 'ports' + git: 'https://git.causal.agency/libretls' + tag: '3.5.2' + version: '3.5.2' + tools_required: + - host-autoconf-v2.69 + - host-automake-v1.15 + - host-libtool + regenerate: + - args: ['autoreconf', '-fi'] + tools_required: + - system-gcc + pkgs_required: + - mlibc + - openssl + configure: + - args: + - '@THIS_SOURCE_DIR@/configure' + - '--host=@OPTION:arch-triple@' + - '--prefix=/usr' + - '--disable-static' + build: + - args: ['make', '-j@PARALLELISM@'] + - args: ['make', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' - name: libtasn labels: [aarch64] architecture: '@OPTION:arch@' diff --git a/bootstrap.d/www-client.yml b/bootstrap.d/www-client.yml index 98bf12e32..09e593efa 100644 --- a/bootstrap.d/www-client.yml +++ b/bootstrap.d/www-client.yml @@ -53,3 +53,40 @@ packages: - args: ['make', 'DESTDIR=@THIS_COLLECT_DIR@', 'install'] environ: DESTDIR: '@THIS_COLLECT_DIR@' + - name: telescope + architecture: '@OPTION:arch@' + metadata: + summary: CLI Gemini Client + description: This package contains a CLI Geminispace browser + website: 'https://telescope.omarpolo.com/' + maintainer: "Alexander Richards " + categories: ['www-client'] + source: + subdir: 'ports' + git: 'https://github.com/omar-polo/telescope' + tag: '0.8.1' + version: '0.8.1' + tools_required: + - host-autoconf-v2.69 + - host-automake-v1.15 + - host-autoconf-archive + - host-pkg-config + - host-libtool + regenerate: + - args: ['./autogen.sh'] + tools_required: + - system-gcc + pkgs_required: + - mlibc + - libretls + - openssl + - ncurses + configure: + - args: + - '@THIS_SOURCE_DIR@/configure' + - '--host=x86_64-managarm' + - '--prefix=/usr' + - '--mandir=/usr/share/man' + build: + - args: ['make', 'all-am', '-j@PARALLELISM@', 'HOSTCC=gcc'] + - args: ['make', 'install-am', 'DESTDIR=@THIS_COLLECT_DIR@'] diff --git a/patches/telescope/0001-Managarm-Patches.patch b/patches/telescope/0001-Managarm-Patches.patch new file mode 100644 index 000000000..dbabaa03d --- /dev/null +++ b/patches/telescope/0001-Managarm-Patches.patch @@ -0,0 +1,73 @@ +From 084d8d40a24a601c463955ac569183cfb085f96a Mon Sep 17 00:00:00 2001 +From: Alexander +Date: Thu, 16 Jun 2022 00:31:32 +0200 +Subject: [PATCH] Managarm Patches + +--- + control.c | 14 ++++++++------ + telescope.c | 9 +++++---- + 2 files changed, 13 insertions(+), 10 deletions(-) + +diff --git a/control.c b/control.c +index b2cba81..dc2cdcd 100644 +--- a/control.c ++++ b/control.c +@@ -91,12 +91,14 @@ control_init(char *path) + } + umask(old_umask); + +- if (chmod(path, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) == -1) { +- warn("%s: chmod", __func__); +- close(fd); +- (void)unlink(path); +- return (-1); +- } ++ ++ // patched because chmod == nop ++ //if (chmod(path, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) == -1) { ++ // warn("%s: chmod", __func__); ++ // close(fd); ++ // (void)unlink(path); ++ // return (-1); ++ //} + + return (fd); + } +diff --git a/telescope.c b/telescope.c +index 0a65f41..1991d1b 100644 +--- a/telescope.c ++++ b/telescope.c +@@ -64,7 +64,7 @@ int operating; + * "Safe" (or "sandobox") mode. If enabled, Telescope shouldn't write + * anything to the filesystem or execute external programs. + */ +-int safe_mode; ++int safe_mode = 0; + + static struct imsgev *iev_net; + +@@ -1047,8 +1047,8 @@ main(int argc, char * const *argv) + + if (getenv("NO_COLOR") != NULL) + enable_colors = 0; +- +- while ((ch = getopt_long(argc, argv, opts, longopts, NULL)) != -1) { ++ optind = 0; ++ while ((ch = getopt(argc, argv, opts)) != -1) { + switch (ch) { + case 'C': + exit(ui_print_colors()); +@@ -1128,8 +1128,9 @@ main(int argc, char * const *argv) + "telescope already running?"); + } + ++ + /* Start children. */ +- if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe2net) == -1) ++ if (socketpair(AF_UNIX, SOCK_STREAM, 0, pipe2net) == -1) + err(1, "socketpair"); + start_child(PROC_NET, argv0, pipe2net[1]); + imsg_init(&net_ibuf.ibuf, pipe2net[0]); +-- +2.36.1 +