update to moreutils-0.56

This commit is contained in:
sthen 2015-06-08 09:02:49 +00:00
parent 0e6ebbc2b9
commit fdfe99fdd2
3 changed files with 46 additions and 21 deletions

View File

@ -1,9 +1,11 @@
# $OpenBSD: Makefile,v 1.10 2014/11/15 22:52:11 sthen Exp $
# $OpenBSD: Makefile,v 1.11 2015/06/08 09:02:49 sthen Exp $
COMMENT = miscellaneous unix tools
DISTNAME = moreutils_0.53
DISTNAME = moreutils_0.56
PKGNAME = ${DISTNAME:S/_/-/}
T = 7be6572532be02c03653f33dbf87c03b01e2bb26
DISTFILES= ${DISTNAME}{$T}.tar.gz
WRKDIST = ${WRKDIR}/moreutils
CATEGORIES = sysutils
@ -17,7 +19,8 @@ PERMIT_PACKAGE_CDROM = Yes
WANTLIB += c
MASTER_SITES = ${MASTER_SITE_DEBIAN:=main/m/moreutils/}
#MASTER_SITES = ${MASTER_SITE_DEBIAN:=main/m/moreutils/}
MASTER_SITES = http://repo.or.cz/w/moreutils.git/snapshot/
BUILD_DEPENDS = textproc/docbook-xsl
RUN_DEPENDS = devel/p5-IPC-Run \
@ -29,6 +32,7 @@ USE_GMAKE = Yes
NO_TEST = Yes
pre-patch:
mv ${WRKDIR}/moreutils-* ${WRKDIST}
perl -pi -e 's,/usr/share/xml/docbook/stylesheet/docbook-xsl/manpages,${LOCALBASE}/share/xsl/docbook/manpages,' ${WRKSRC}/Makefile
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (moreutils_0.53.tar.gz) = TxhCRndZtnR/KKYkwxejFfC1SkREDSyOLuxNEBRGlvw=
SIZE (moreutils_0.53.tar.gz) = 47613
SHA256 (moreutils_0.56.tar.gz) = oBJTqqL+lq6XKOjeVgKoskV+wEdnIbp8Oa8zWiu4FtY=
SIZE (moreutils_0.56.tar.gz) = 46986

View File

@ -1,19 +1,31 @@
$OpenBSD: patch-ifdata_c,v 1.2 2014/03/09 22:19:35 sthen Exp $
--- ifdata.c.orig Tue Dec 31 17:35:43 2013
+++ ifdata.c Sun Mar 9 22:14:22 2014
@@ -29,6 +29,11 @@
#include <sys/sockio.h>
$OpenBSD: patch-ifdata_c,v 1.3 2015/06/08 09:02:49 sthen Exp $
--- ifdata.c.orig Wed Jun 3 17:04:42 2015
+++ ifdata.c Mon Jun 8 09:59:45 2015
@@ -1,4 +1,4 @@
-#include <error.h>
+#include <err.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -19,7 +19,7 @@
#include <net/if.h>
#endif
+#if defined(__OpenBSD__)
+ #define s6_addr16 __u6_addr.__u6_addr16
+ #include <net/if.h>
+#endif
+
#include <netinet/in.h>
#include <errno.h>
#include <fcntl.h>
@@ -235,7 +240,7 @@ struct sockaddr *if_network(const char *iface) {
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__OpenBSD__)
#define s6_addr16 __u6_addr.__u6_addr16
#include <net/if.h>
#endif
@@ -130,7 +130,7 @@ static int do_socket_ioctl(const char *ifname, const u
*ioctl_errno = errno;
if (print_error == PRINT_ERROR) {
if (errno == ENODEV)
- error(EXIT_FAILURE, 0,
+ errx(EXIT_FAILURE,
"No such network interface: %s", ifname);
else
fprintf(stderr, "ioctl on %s: %s\n", ifname,
@@ -242,7 +242,7 @@ struct sockaddr *if_network(const char *iface) {
return saddr;
}
@ -22,7 +34,16 @@ $OpenBSD: patch-ifdata_c,v 1.2 2014/03/09 22:19:35 sthen Exp $
static struct ifreq req;
if (do_socket_ioctl(iface, SIOCGIFMTU, &req, NULL, PRINT_ERROR))
@@ -403,7 +408,7 @@ void please_do(int ndo, int *todo, const char *ifname)
@@ -392,7 +392,7 @@ void please_do(int ndo, int *todo, const char *ifname)
for (i=0; i<ndo; i++) {
if (!exists &&
(todo[i] != DO_EXISTS) && (todo[i] != DO_PEXISTS))
- error(EXIT_FAILURE, 0, "No such network interface: %s",
+ errx(EXIT_FAILURE, "No such network interface: %s",
ifname);
switch (todo[i]) {
@@ -419,7 +419,7 @@ void please_do(int ndo, int *todo, const char *ifname)
print_addr(if_bcast(ifname, &req));
break;
case DO_PMTU:
@ -31,7 +52,7 @@ $OpenBSD: patch-ifdata_c,v 1.2 2014/03/09 22:19:35 sthen Exp $
break;
case DO_PNETWORK:
print_addr(if_network(ifname));
@@ -415,7 +420,7 @@ void please_do(int ndo, int *todo, const char *ifname)
@@ -431,7 +431,7 @@ void please_do(int ndo, int *todo, const char *ifname)
printf(" ");
print_addr(if_bcast(ifname, &req));
printf(" ");