1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

sysutils/toybox: update to 0.8.5

ChangeLog: http://landley.net/toybox/#19-15-2021

PR:	256351
Reported by:	vidar@karlsen.tech (maintainer)
This commit is contained in:
Fernando Apesteguía 2021-06-02 17:00:35 +02:00
parent c31572f2e8
commit e2facd354b
4 changed files with 33 additions and 21 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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