sysutils/toybox: update to 0.8.3
ChangeLog: http://landley.net/toybox/#11-05-2020 PR: 246946 Submitted by: vidar@karlsen.tech (maintainer)
This commit is contained in:
parent
9f5a4d0b89
commit
0bdf886f64
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=537869
3 changed files with 71 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= toybox
|
||||
PORTVERSION= 0.8.2
|
||||
PORTVERSION= 0.8.3
|
||||
CATEGORIES= sysutils
|
||||
|
||||
MAINTAINER= vidar@karlsen.tech
|
||||
|
@ -17,11 +17,14 @@ LIB_DEPENDS= libinotify.so:devel/libinotify
|
|||
|
||||
USES= gmake shebangfix
|
||||
|
||||
SHEBANG_FILES= scripts/change.sh scripts/findglobals.sh \
|
||||
SHEBANG_FILES= scripts/bloatcheck scripts/mcm-buildall.sh \
|
||||
scripts/change.sh scripts/findglobals.sh \
|
||||
scripts/genconfig.sh scripts/install.sh \
|
||||
scripts/make.sh scripts/minicom.sh \
|
||||
scripts/portability.sh scripts/runtest.sh \
|
||||
scripts/single.sh scripts/test.sh configure
|
||||
scripts/make.sh scripts/mkroot.sh \
|
||||
scripts/portability.sh scripts/record-commands \
|
||||
scripts/runtest.sh scripts/single.sh \
|
||||
scripts/test.sh configure \
|
||||
tests/*
|
||||
|
||||
PLIST_FILES= bin/toybox
|
||||
|
||||
|
@ -29,11 +32,12 @@ USE_GITHUB= yes
|
|||
GH_ACCOUNT= landley
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|<sys/inotify.h>|"${LOCALBASE}/include/sys/inotify.h"|' \
|
||||
${REINPLACE_CMD} -e 's|<sys/inotify.h>|"${LOCALBASE}/include/sys/inotify.h"|' \
|
||||
${WRKSRC}/lib/portability.c
|
||||
${REINPLACE_CMD} -e 's|sed|gsed|' ${WRKSRC}/scripts/single.sh
|
||||
|
||||
do-configure:
|
||||
cd ${WRKSRC} && ${GMAKE} bsd_defconfig
|
||||
cd ${WRKSRC} && HOSTCC=${CC} ${GMAKE} bsd_defconfig
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/toybox ${STAGEDIR}${PREFIX}/bin
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1574378247
|
||||
SHA256 (landley-toybox-0.8.2_GH0.tar.gz) = 9d8a9b00a6c93da5b472d8a4c7d9549339ed050d1578c557a20add100172b0f5
|
||||
SIZE (landley-toybox-0.8.2_GH0.tar.gz) = 1057417
|
||||
TIMESTAMP = 1589273785
|
||||
SHA256 (landley-toybox-0.8.3_GH0.tar.gz) = 5e5a89888aa04b536a848b701f3abb92eb11ad108f39a41c588247a45412f929
|
||||
SIZE (landley-toybox-0.8.3_GH0.tar.gz) = 1106455
|
||||
|
|
57
sysutils/toybox/files/patch-lib_portability.c
Normal file
57
sysutils/toybox/files/patch-lib_portability.c
Normal file
|
@ -0,0 +1,57 @@
|
|||
--- lib/portability.c.orig 2020-05-11 18:23:26 UTC
|
||||
+++ lib/portability.c
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
#include "toys.h"
|
||||
|
||||
+#if defined(__FreeBSD__)
|
||||
+#include <sys/types.h>
|
||||
+#endif
|
||||
+
|
||||
// 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__)
|
||||
return dev&0xffffff;
|
||||
+#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__)
|
||||
return (dev>>24)&0xff;
|
||||
+#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__)
|
||||
return (minor&0xffffff)|((major&0xff)<<24);
|
||||
+#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);
|
||||
+}
|
||||
+#elif defined(__FreeBSD__)
|
||||
+#include <sys/disk.h>
|
||||
+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
|
Loading…
Reference in a new issue