summaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorrodent <rodent@pkgsrc.org>2014-05-25 15:52:31 +0000
committerrodent <rodent@pkgsrc.org>2014-05-25 15:52:31 +0000
commit9c6d261ce6faacd5b3467cd8fc6887e209faf32f (patch)
treeee42821c3675fffb5cc5657e2d7fec40f57d3d3c /archivers
parent7a7aeba1259c693a9014d5c8bfe7a35ed09858ed (diff)
downloadpkgsrc-9c6d261ce6faacd5b3467cd8fc6887e209faf32f.tar.gz
Fix build for OpenBSD.
Diffstat (limited to 'archivers')
-rw-r--r--archivers/xbin/Makefile4
-rw-r--r--archivers/xbin/distinfo4
-rw-r--r--archivers/xbin/patches/patch-aa57
3 files changed, 56 insertions, 9 deletions
diff --git a/archivers/xbin/Makefile b/archivers/xbin/Makefile
index 5ceb7c5d5d7..a138a37637a 100644
--- a/archivers/xbin/Makefile
+++ b/archivers/xbin/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2013/12/23 11:57:02 wiz Exp $
+# $NetBSD: Makefile,v 1.31 2014/05/25 15:52:31 rodent Exp $
DISTNAME= ${PRGNAME}unix
PKGNAME= ${PRGNAME}-2.3
@@ -26,8 +26,10 @@ EXTRACT_ONLY= # empty
.if !empty(OPSYS:M*BSD) || ${OPSYS} == "DragonFly"
CFLAGS+= -DBSD
+.if ${OPSYS} != "OpenBSD"
LDFLAGS+= -lcompat
.endif
+.endif
CFLAGS.Interix+= -DBSD
CFLAGS.Darwin+= -DBSD
diff --git a/archivers/xbin/distinfo b/archivers/xbin/distinfo
index 778db8788d1..fde5d01f891 100644
--- a/archivers/xbin/distinfo
+++ b/archivers/xbin/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2012/02/29 20:17:31 hans Exp $
+$NetBSD: distinfo,v 1.6 2014/05/25 15:52:31 rodent Exp $
SHA1 (xbinunix.c) = 20db911814c29c5f236d5dc2a27fe25c7a5f61fb
RMD160 (xbinunix.c) = 92a2daccb405c95e7a1b00f4162009f3c4245631
@@ -6,4 +6,4 @@ Size (xbinunix.c) = 18563 bytes
SHA1 (xbin.man) = 2e223e6a02a2436f29c586fa711ee5ad3bbf591d
RMD160 (xbin.man) = d01696da1c79f1693161417c6a8ced87b5b11c12
Size (xbin.man) = 3277 bytes
-SHA1 (patch-aa) = a2a772abc6200936e25cfd63edbd9b3f30fb7e02
+SHA1 (patch-aa) = 4f751ea7e77e84c0b9feb114cc00166e544de8b5
diff --git a/archivers/xbin/patches/patch-aa b/archivers/xbin/patches/patch-aa
index b183466b42c..1c1e03a3c83 100644
--- a/archivers/xbin/patches/patch-aa
+++ b/archivers/xbin/patches/patch-aa
@@ -1,22 +1,67 @@
-$NetBSD: patch-aa,v 1.2 2012/02/29 20:17:32 hans Exp $
+$NetBSD: patch-aa,v 1.3 2014/05/25 15:52:32 rodent Exp $
---- xbinunix.c.orig 2005-08-17 18:43:47.000000000 +0000
+Add missing includes. Fix build for OpenBSD 5.5.
+
+--- xbinunix.c.orig Sun May 25 13:15:05 2014
+++ xbinunix.c
-@@ -2,12 +2,15 @@
+@@ -2,12 +2,17 @@
static char version[] = "xbin.c Version 2.3 09/30/85";
#endif lint
-+#include <limits.h>
++#include <stdlib.h>
++#include <limits.h>
#include <stdio.h>
++#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/dir.h>
+#include <dirent.h>
-#ifdef MAXNAMLEN /* 4.2 BSD */
-+#if defined(NAME_MAX)
-+#define FNAMELEN NAME_MAX
++#if defined(NAME_MAX)
++#define FNAMELEN NAME_MAX
+#elif defined(MAXNAMLEN) /* 4.2 BSD */
#define FNAMELEN MAXNAMLEN
#else
#define FNAMELEN DIRSIZ
+@@ -15,7 +20,12 @@ static char version[] = "xbin.c Version 2.3 09/30/85";
+
+ #ifdef BSD
+ #include <sys/time.h>
++#if defined(__OpenBSD__)
++#include <sys/param.h>
++#endif
++#if (defined(__OpenBSD__) && (OpenBSD < 201405)) || !defined(__OpenBSD__)
+ #include <sys/timeb.h>
++#endif
+ #define search_last rindex
+ extern char *rindex();
+ #else
+@@ -287,7 +297,7 @@ forge_info()
+ int n;
+ long tdiff;
+ struct tm *tp;
+-#ifdef BSD
++#if (defined(BSD) && !defined(__OpenBSD__)) || (defined(__OpenBSD__) && (OpenBSD < 201405))
+ struct timeb tbuf;
+ #else
+ long bs;
+@@ -310,7 +320,7 @@ forge_info()
+ put4(buf + H_RLENOFF, mh.m_rsrclen);
+
+ /* convert unix file time to mac time format */
+-#ifdef BSD
++#if (defined(BSD) && !defined(__OpenBSD__)) || (defined(__OpenBSD__) && (OpenBSD < 201405))
+ ftime(&tbuf);
+ tp = localtime(&tbuf.time);
+ tdiff = TIMEDIFF - tbuf.timezone * 60;
+@@ -320,7 +330,8 @@ forge_info()
+ /* I hope this is right! -andy */
+ time(&bs);
+ tp = localtime(&bs);
+- tdiff = TIMEDIFF - timezone;
++ struct timezone tzone;
++ tdiff = TIMEDIFF - tzone.tz_minuteswest;
+ if (tp->tm_isdst)
+ tdiff += 60 * 60;
+ #endif