svn commit: r537869 - in head/sysutils/toybox: . files
Fernando Apesteguía
fernape at FreeBSD.org
Thu Jun 4 05:50:35 UTC 2020
Author: fernape
Date: Thu Jun 4 05:50:34 2020
New Revision: 537869
URL: https://svnweb.freebsd.org/changeset/ports/537869
Log:
sysutils/toybox: update to 0.8.3
ChangeLog: http://landley.net/toybox/#11-05-2020
PR: 246946
Submitted by: vidar at karlsen.tech (maintainer)
Added:
head/sysutils/toybox/files/
head/sysutils/toybox/files/patch-lib_portability.c (contents, props changed)
Modified:
head/sysutils/toybox/Makefile
head/sysutils/toybox/distinfo
Modified: head/sysutils/toybox/Makefile
==============================================================================
--- head/sysutils/toybox/Makefile Thu Jun 4 05:48:34 2020 (r537868)
+++ head/sysutils/toybox/Makefile Thu Jun 4 05:50:34 2020 (r537869)
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= toybox
-PORTVERSION= 0.8.2
+PORTVERSION= 0.8.3
CATEGORIES= sysutils
MAINTAINER= vidar at 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
Modified: head/sysutils/toybox/distinfo
==============================================================================
--- head/sysutils/toybox/distinfo Thu Jun 4 05:48:34 2020 (r537868)
+++ head/sysutils/toybox/distinfo Thu Jun 4 05:50:34 2020 (r537869)
@@ -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
Added: head/sysutils/toybox/files/patch-lib_portability.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/toybox/files/patch-lib_portability.c Thu Jun 4 05:50:34 2020 (r537869)
@@ -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
More information about the svn-ports-all
mailing list