From 9649e758fbbac97df7f302f95b32390ffc7ad1fb Mon Sep 17 00:00:00 2001 From: Vidar Karlsen Date: Tue, 17 Jan 2023 16:43:24 +0100 Subject: [PATCH] sysutils/toybox: update to 0.8.9 Changelog: http://landley.net/toybox/#10-01-2023 Changes to the port: - Removed patches that are no longer necessary due to upstream having improved the FreeBSD support - Removed LIB_DEPEND on devel/libinotify (no longer necessary) - Removed s|sed|gsed| replacement (no longer necessary) PR: 269009 --- sysutils/toybox/Makefile | 8 +--- sysutils/toybox/distinfo | 6 +-- sysutils/toybox/files/patch-lib_portability.c | 20 -------- .../toybox/files/patch-toys_other_openvt.c | 48 ------------------- 4 files changed, 4 insertions(+), 78 deletions(-) delete mode 100644 sysutils/toybox/files/patch-lib_portability.c delete mode 100644 sysutils/toybox/files/patch-toys_other_openvt.c diff --git a/sysutils/toybox/Makefile b/sysutils/toybox/Makefile index 6daa38eca0cc2..81bc8a72a35c9 100644 --- a/sysutils/toybox/Makefile +++ b/sysutils/toybox/Makefile @@ -1,5 +1,5 @@ PORTNAME= toybox -PORTVERSION= 0.8.8 +PORTVERSION= 0.8.9 CATEGORIES= sysutils MASTER_SITES= http://landley.net/toybox/downloads/ @@ -13,7 +13,6 @@ LICENSE_FILE= ${WRKSRC}/LICENSE LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept BUILD_DEPENDS= bash:shells/bash gsed:textproc/gsed -LIB_DEPENDS= libinotify.so:devel/libinotify USES= gmake shebangfix @@ -41,11 +40,6 @@ USRBIN_LINKS= acpi ascii base64 basename bunzip2 bzcat cal chrt chvt \ uuidgen w watch wc which who whoami xargs xxd yes USRSBIN_LINKS= chroot -post-patch: - ${REINPLACE_CMD} -e 's||"${LOCALBASE}/include/sys/inotify.h"|' \ - ${WRKSRC}/lib/portability.c - ${REINPLACE_CMD} -e 's|sed|gsed|' ${WRKSRC}/scripts/single.sh - do-configure: cd ${WRKSRC} && HOSTCC=${CC} ${GMAKE} bsd_defconfig diff --git a/sysutils/toybox/distinfo b/sysutils/toybox/distinfo index 6e4e4d4712053..3f9053359cfd2 100644 --- a/sysutils/toybox/distinfo +++ b/sysutils/toybox/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1660384956 -SHA256 (toybox-0.8.8.tar.gz) = dafd41978d40f02a61cf1be99a2b4a25812bbfb9c3157e679ee7611202d6ac58 -SIZE (toybox-0.8.8.tar.gz) = 3492750 +TIMESTAMP = 1673953133 +SHA256 (toybox-0.8.9.tar.gz) = 06913dde3de7139b40f947bd7f23869dfc8796e9c6ff39de02719f8b7b2d47ad +SIZE (toybox-0.8.9.tar.gz) = 3517516 diff --git a/sysutils/toybox/files/patch-lib_portability.c b/sysutils/toybox/files/patch-lib_portability.c deleted file mode 100644 index 226e8fe0212a6..0000000000000 --- a/sysutils/toybox/files/patch-lib_portability.c +++ /dev/null @@ -1,20 +0,0 @@ ---- lib/portability.c.orig 2022-08-13 14:55:14 UTC -+++ lib/portability.c -@@ -625,6 +625,17 @@ int get_block_device_size(int fd, unsigned long long* - *size = lab.d_secsize * lab.d_nsectors; - return status; - } -+#elif defined(__FreeBSD__) -+#include -+int get_block_device_size(int fd, unsigned long long* size) -+{ -+ off_t sz = 0; -+ if (ioctl(fd, DIOCGMEDIASIZE, &sz) >= 0) { -+ *size = sz; -+ return 1; -+ } -+ return 0; -+} - #endif - - // Return bytes copied from in to out. If bytes <0 copy all of in to out. diff --git a/sysutils/toybox/files/patch-toys_other_openvt.c b/sysutils/toybox/files/patch-toys_other_openvt.c deleted file mode 100644 index 01fe211eeb790..0000000000000 --- a/sysutils/toybox/files/patch-toys_other_openvt.c +++ /dev/null @@ -1,48 +0,0 @@ ---- toys/other/openvt.c.orig 2022-08-12 07:58:03 UTC -+++ toys/other/openvt.c -@@ -44,8 +44,8 @@ config DEALLOCVT - - #define FOR_openvt - #include "toys.h" --#include --#include -+#include -+#include - - GLOBALS( - long c; -@@ -72,12 +72,17 @@ static int activate(int fd, int cc) - - void openvt_main(void) - { -+ struct vt_stat { -+ unsigned short v_active; -+ unsigned short v_signal; -+ unsigned short v_state; -+ }; - struct vt_stat vstate; - int fd, cc = (int)TT.c; - pid_t pid; - - // find current console -- if (-1 == (ioctl(fd = open_console(), VT_GETSTATE, &vstate)) || -+ if (-1 == (ioctl(fd = open_console(), VT_GETACTIVE, &vstate)) || - (!cc && 0>=(cc = xioctl(fd, VT_OPENQRY, &fd)))) - perror_exit("can't find open VT"); - -@@ -95,7 +100,7 @@ void openvt_main(void) - while (-1 == waitpid(pid, NULL, 0) && errno == EINTR) errno = 0; - if (FLAG(s)) { - activate(fd, vstate.v_active); -- dprintf(2, "%d\n", ioctl(fd, VT_DISALLOCATE, cc)); -+ dprintf(2, "%d\n", ioctl(fd, VT_ACTIVATE, cc)); - } - } - } -@@ -111,5 +116,5 @@ void deallocvt_main(void) - int fd = open_console(), vt_num = 0; // 0 = all - - if (*toys.optargs) vt_num = atolx_range(*toys.optargs, 1, 63); -- if (-1 == ioctl(fd, VT_DISALLOCATE, vt_num)) perror_exit("%d", vt_num); -+ if (-1 == ioctl(fd, VT_ACTIVATE, vt_num)) perror_exit("%d", vt_num); - }