pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net/telescope
Module Name: pkgsrc
Committed By: vins
Date: Sat Jul 26 21:41:39 UTC 2025
Modified Files:
pkgsrc/net/telescope: Makefile distinfo
Added Files:
pkgsrc/net/telescope/patches: patch-certs.c patch-control.c patch-fs.c
patch-telescope.c
Log Message:
net/telescope: fix build on SunOS
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/net/telescope/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/telescope/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/telescope/patches/patch-certs.c \
pkgsrc/net/telescope/patches/patch-control.c \
pkgsrc/net/telescope/patches/patch-fs.c \
pkgsrc/net/telescope/patches/patch-telescope.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/net/telescope/Makefile
diff -u pkgsrc/net/telescope/Makefile:1.2 pkgsrc/net/telescope/Makefile:1.3
--- pkgsrc/net/telescope/Makefile:1.2 Sat Jul 26 19:45:58 2025
+++ pkgsrc/net/telescope/Makefile Sat Jul 26 21:41:39 2025
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2025/07/26 19:45:58 vins Exp $
+# $NetBSD: Makefile,v 1.3 2025/07/26 21:41:39 vins Exp $
DISTNAME= telescope-0.11
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= https://ftp.telescope-browser.org/
@@ -15,7 +16,9 @@ USE_TOOLS+= autoconf automake autoreconf
USE_CURSES= wide
FAKE_NCURSES= yes
-CFLAGS.NetBSD+= -D_OPENBSD_SOURCE # strtonum()
+CFLAGS.NetBSD+= -D_OPENBSD_SOURCE # strtonum()
+CFLAGS.SunOS+= -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 # CMSG_ functions
+LDFLAGS.SunOS+= -lxnet
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= YACC=${YACC:Q}
Index: pkgsrc/net/telescope/distinfo
diff -u pkgsrc/net/telescope/distinfo:1.1 pkgsrc/net/telescope/distinfo:1.2
--- pkgsrc/net/telescope/distinfo:1.1 Sat Jul 26 13:37:32 2025
+++ pkgsrc/net/telescope/distinfo Sat Jul 26 21:41:39 2025
@@ -1,5 +1,9 @@
-$NetBSD: distinfo,v 1.1 2025/07/26 13:37:32 vins Exp $
+$NetBSD: distinfo,v 1.2 2025/07/26 21:41:39 vins Exp $
BLAKE2s (telescope-0.11.tar.gz) = a94ae8dae9f95ba47d17d6a5a081cb55dce9167ada16cba46b110cfd00bbae95
SHA512 (telescope-0.11.tar.gz) = d00b94b3f31e05d0ad2223e79c1259786fc722adab38978ce4dbd0c4e99d3a3e5ef605037a0104cebb438779c0accaebfcc52c5e27c77b87a8095e26486d5d93
Size (telescope-0.11.tar.gz) = 1159443 bytes
+SHA1 (patch-certs.c) = 23e400841e53d4b42f4b4825d101aac099f1f3b2
+SHA1 (patch-control.c) = d90efd407d5e5b72726ace34510df23cbc806db7
+SHA1 (patch-fs.c) = 80ed55e5632839bfd4ccd06f6b3503ee47b20459
+SHA1 (patch-telescope.c) = 9a3f75c9414eab042cb41dc4ad6537d867551d34
Added files:
Index: pkgsrc/net/telescope/patches/patch-certs.c
diff -u /dev/null pkgsrc/net/telescope/patches/patch-certs.c:1.1
--- /dev/null Sat Jul 26 21:41:39 2025
+++ pkgsrc/net/telescope/patches/patch-certs.c Sat Jul 26 21:41:39 2025
@@ -0,0 +1,22 @@
+$NetBSD: patch-certs.c,v 1.1 2025/07/26 21:41:39 vins Exp $
+
+struct dirent misses a d_type member on SunOS.
+
+--- certs.c.orig 2024-12-30 09:09:39.000000000 +0000
++++ certs.c
+@@ -207,8 +207,15 @@ certs_init(const char *certfile)
+ return (-1);
+
+ while ((dp = readdir(certdir)) != NULL) {
++#ifndef DT_REG
++ struct stat s;
++ stat(dp->d_name, &s);
++ if (S_ISREG(s.st_mode))
++ continue;
++#else
+ if (dp->d_type != DT_REG)
+ continue;
++#endif
+ if (push_identity(dp->d_name) == -1) {
+ closedir(certdir);
+ return (-1);
Index: pkgsrc/net/telescope/patches/patch-control.c
diff -u /dev/null pkgsrc/net/telescope/patches/patch-control.c:1.1
--- /dev/null Sat Jul 26 21:41:39 2025
+++ pkgsrc/net/telescope/patches/patch-control.c Sat Jul 26 21:41:39 2025
@@ -0,0 +1,56 @@
+$NetBSD: patch-control.c,v 1.1 2025/07/26 21:41:39 vins Exp $
+
+Rename local variables to avoid name clash on SunOS.
+
+--- control.c.orig 2025-07-26 20:42:09.132038342 +0000
++++ control.c
+@@ -59,7 +59,7 @@ TAILQ_HEAD(ctl_conns, ctl_conn) ctl_conn
+ int
+ control_init(char *path)
+ {
+- struct sockaddr_un sun;
++ struct sockaddr_un lsun;
+ int fd;
+ mode_t old_umask;
+
+@@ -73,9 +73,9 @@ control_init(char *path)
+ return (-1);
+ }
+
+- memset(&sun, 0, sizeof(sun));
+- sun.sun_family = AF_UNIX;
+- strlcpy(sun.sun_path, path, sizeof(sun.sun_path));
++ memset(&lsun, 0, sizeof(lsun));
++ lsun.sun_family = AF_UNIX;
++ strlcpy(lsun.sun_path, path, sizeof(lsun.sun_path));
+
+ if (unlink(path) == -1)
+ if (errno != ENOENT) {
+@@ -85,7 +85,7 @@ control_init(char *path)
+ }
+
+ old_umask = umask(S_IXUSR|S_IXGRP|S_IWOTH|S_IROTH|S_IXOTH);
+- if (bind(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) {
++ if (bind(fd, (struct sockaddr *)&lsun, sizeof(lsun)) == -1) {
+ warn("%s: bind: %s", __func__, path);
+ close(fd);
+ umask(old_umask);
+@@ -121,15 +121,15 @@ control_accept(int listenfd, int event,
+ {
+ int connfd;
+ socklen_t len;
+- struct sockaddr_un sun;
++ struct sockaddr_un lsun;
+ struct ctl_conn *c;
+
+ ev_add(control_state.fd, EV_READ, control_accept, NULL);
+ if ((event & EV_TIMEOUT))
+ return;
+
+- len = sizeof(sun);
+- if ((connfd = accept(listenfd, (struct sockaddr *)&sun, &len)) == -1) {
++ len = sizeof(lsun);
++ if ((connfd = accept(listenfd, (struct sockaddr *)&lsun, &len)) == -1) {
+ /*
+ * Pause accept if we are out of file descriptors, or
+ * ev will haunt us here too.
Index: pkgsrc/net/telescope/patches/patch-fs.c
diff -u /dev/null pkgsrc/net/telescope/patches/patch-fs.c:1.1
--- /dev/null Sat Jul 26 21:41:39 2025
+++ pkgsrc/net/telescope/patches/patch-fs.c Sat Jul 26 21:41:39 2025
@@ -0,0 +1,24 @@
+$NetBSD: patch-fs.c,v 1.1 2025/07/26 21:41:39 vins Exp $
+
+struct dirent misses a d_type member on SunOS.
+
+--- fs.c.orig 2025-07-26 20:51:03.413194456 +0000
++++ fs.c
+@@ -118,10 +118,15 @@ send_dir(struct tab *tab, const char *pa
+
+ for (i = 0; i < len; ++i) {
+ const char *sufx = "";
+-
++#ifndef DT_DIR
++ struct stat s;
++ stat(names[i]->d_name, &s);
++ if (S_ISDIR(s.st_mode))
++ sufx = "/";
++#else
+ if (names[i]->d_type == DT_DIR)
+ sufx = "/";
+-
++#endif
+ parser_parsef(buffer, "=> %s%s\n", names[i]->d_name, sufx);
+ }
+
Index: pkgsrc/net/telescope/patches/patch-telescope.c
diff -u /dev/null pkgsrc/net/telescope/patches/patch-telescope.c:1.1
--- /dev/null Sat Jul 26 21:41:39 2025
+++ pkgsrc/net/telescope/patches/patch-telescope.c Sat Jul 26 21:41:39 2025
@@ -0,0 +1,30 @@
+$NetBSD: patch-telescope.c,v 1.1 2025/07/26 21:41:39 vins Exp $
+
+Rename local variables to avoid name clash on SunOS.
+
+--- telescope.c.orig 2025-07-26 21:02:31.302028423 +0000
++++ telescope.c
+@@ -1034,18 +1034,18 @@ start_child(enum telescope_process p, co
+ static void
+ send_url(const char *url)
+ {
+- struct sockaddr_un sun;
++ struct sockaddr_un lsun;
+ struct imsgbuf ibuf;
+ int ctl_sock;
+
+ if ((ctl_sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
+ err(1, "socket");
+
+- memset(&sun, 0, sizeof(sun));
+- sun.sun_family = AF_UNIX;
+- strlcpy(sun.sun_path, ctlsock_path, sizeof(sun.sun_path));
++ memset(&lsun, 0, sizeof(lsun));
++ lsun.sun_family = AF_UNIX;
++ strlcpy(lsun.sun_path, ctlsock_path, sizeof(lsun.sun_path));
+
+- if (connect(ctl_sock, (struct sockaddr *)&sun, sizeof(sun)) == -1)
++ if (connect(ctl_sock, (struct sockaddr *)&lsun, sizeof(lsun)) == -1)
+ err(1, "connect: %s", ctlsock_path);
+
+ if (imsgbuf_init(&ibuf, ctl_sock) == -1)
Home |
Main Index |
Thread Index |
Old Index