aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando ApesteguĂ­a <fernape@FreeBSD.org>2021-06-02 15:00:35 +0000
committerFernando ApesteguĂ­a <fernape@FreeBSD.org>2021-06-03 05:41:29 +0000
commite2facd354b9631652854e631579a4f1b44c6e59f (patch)
treefa2911073399b06bc12d3babca99476d6f65dc3f
parentc31572f2e8a46b3c85d24b74ca9f6a40f524a4bb (diff)
downloadports-e2facd354b9631652854e631579a4f1b44c6e59f.tar.gz
ports-e2facd354b9631652854e631579a4f1b44c6e59f.zip
sysutils/toybox: update to 0.8.5
ChangeLog: http://landley.net/toybox/#19-15-2021 PR: 256351 Reported by: vidar@karlsen.tech (maintainer)
-rw-r--r--sysutils/toybox/Makefile8
-rw-r--r--sysutils/toybox/distinfo6
-rw-r--r--sysutils/toybox/files/patch-lib_portability.c29
-rw-r--r--sysutils/toybox/files/patch-lib_portability.h11
4 files changed, 33 insertions, 21 deletions
diff --git a/sysutils/toybox/Makefile b/sysutils/toybox/Makefile
index 9387c591b70f..35a3ab7cbbac 100644
--- a/sysutils/toybox/Makefile
+++ b/sysutils/toybox/Makefile
@@ -1,5 +1,5 @@
PORTNAME= toybox
-PORTVERSION= 0.8.4
+PORTVERSION= 0.8.5
CATEGORIES= sysutils
MAINTAINER= vidar@karlsen.tech
@@ -15,6 +15,9 @@ LIB_DEPENDS= libinotify.so:devel/libinotify
USES= gmake shebangfix
+USE_GITHUB= yes
+GH_ACCOUNT= landley
+
SHEBANG_FILES= scripts/bloatcheck scripts/mcm-buildall.sh \
scripts/change.sh scripts/findglobals.sh \
scripts/genconfig.sh scripts/install.sh \
@@ -26,9 +29,6 @@ SHEBANG_FILES= scripts/bloatcheck scripts/mcm-buildall.sh \
PLIST_FILES= bin/toybox
-USE_GITHUB= yes
-GH_ACCOUNT= landley
-
post-patch:
${REINPLACE_CMD} -e 's|<sys/inotify.h>|"${LOCALBASE}/include/sys/inotify.h"|' \
${WRKSRC}/lib/portability.c
diff --git a/sysutils/toybox/distinfo b/sysutils/toybox/distinfo
index 9ff9940ac170..9967e1fc3baa 100644
--- a/sysutils/toybox/distinfo
+++ b/sysutils/toybox/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1606836525
-SHA256 (landley-toybox-0.8.4_GH0.tar.gz) = bea9fe3aae662ef97b7450df8c0333e50c69cd9f626be8f7e245ef322605b1e9
-SIZE (landley-toybox-0.8.4_GH0.tar.gz) = 1141779
+TIMESTAMP = 1621778141
+SHA256 (landley-toybox-0.8.5_GH0.tar.gz) = 27cc073222f3b726ee10d96c4f32ac2c4c936b07ea195227736755971e6d90c9
+SIZE (landley-toybox-0.8.5_GH0.tar.gz) = 2387752
diff --git a/sysutils/toybox/files/patch-lib_portability.c b/sysutils/toybox/files/patch-lib_portability.c
index f0a219644daa..1653734a77b3 100644
--- a/sysutils/toybox/files/patch-lib_portability.c
+++ b/sysutils/toybox/files/patch-lib_portability.c
@@ -1,4 +1,4 @@
---- lib/portability.c.orig 2020-05-11 18:23:26 UTC
+--- lib/portability.c.orig 2021-05-19 08:34:26 UTC
+++ lib/portability.c
@@ -6,6 +6,10 @@
@@ -11,37 +11,37 @@
// We can't fork() on nommu systems, and vfork() requires an exec() or exit()
// before resuming the parent (because they share a heap until then). And no,
// we can't implement our own clone() call that does the equivalent of fork()
-@@ -522,6 +526,8 @@ int dev_minor(int dev)
- return ((dev&0xfff00000)>>12)|(dev&0xff);
- #elif defined(__APPLE__)
+@@ -536,6 +540,8 @@ int dev_minor(int dev)
return dev&0xffffff;
+ #elif defined(__OpenBSD__)
+ return minor(dev);
+#elif defined(__FreeBSD__)
+ return minor(dev);
#else
#error
#endif
-@@ -533,6 +539,8 @@ int dev_major(int dev)
- return (dev&0xfff00)>>8;
- #elif defined(__APPLE__)
+@@ -549,6 +555,8 @@ int dev_major(int dev)
return (dev>>24)&0xff;
+ #elif defined(__OpenBSD__)
+ return major(dev);
+#elif defined(__FreeBSD__)
+ return major(dev);
#else
#error
#endif
-@@ -544,6 +552,8 @@ int dev_makedev(int major, int minor)
- return (minor&0xff)|((major&0xfff)<<8)|((minor&0xfff00)<<12);
- #elif defined(__APPLE__)
+@@ -562,6 +570,8 @@ int dev_makedev(int major, int minor)
return (minor&0xffffff)|((major&0xff)<<24);
+ #elif defined(__OpenBSD__)
+ return makedev(major, minor);
+#elif defined(__FreeBSD__)
+ return makedev(major, minor);
#else
#error
#endif
-@@ -593,5 +603,16 @@ int get_block_device_size(int fd, unsigned long long*
- int get_block_device_size(int fd, unsigned long long* size)
- {
- return (ioctl(fd, BLKGETSIZE64, size) >= 0);
+@@ -621,6 +631,17 @@ int get_block_device_size(int fd, unsigned long long*
+ int status = (ioctl(fd, DIOCGDINFO, &lab) >= 0);
+ *size = lab.d_secsize * lab.d_nsectors;
+ return status;
+}
+#elif defined(__FreeBSD__)
+#include <sys/disk.h>
@@ -55,3 +55,4 @@
+ return 0;
}
#endif
+
diff --git a/sysutils/toybox/files/patch-lib_portability.h b/sysutils/toybox/files/patch-lib_portability.h
new file mode 100644
index 000000000000..44e03cf08496
--- /dev/null
+++ b/sysutils/toybox/files/patch-lib_portability.h
@@ -0,0 +1,11 @@
+--- lib/portability.h.orig 2021-06-01 14:59:57 UTC
++++ lib/portability.h
+@@ -217,7 +217,7 @@ int posix_fallocate(int, off_t, off_t);
+ #include <xlocale.h>
+ #endif
+
+-#if defined(__APPLE__) || defined(__OpenBSD__)
++#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+ static inline long statfs_bsize(struct statfs *sf) { return sf->f_iosize; }
+ static inline long statfs_frsize(struct statfs *sf) { return sf->f_bsize; }
+ #else