emulators/vmsbackup: Unbreak on F9+

This port really does require infozip, the base unzip fails to
extract with the message, "Invalid central directory signature".
/usr/bin/tar also fails with a similar message.

This source file only needed a couple of minor fixes to build again.
Passes Redports 8x
This commit is contained in:
John Marino 2014-06-05 19:02:33 +00:00
parent 573befa14f
commit 754d0da771
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=356682
2 changed files with 35 additions and 20 deletions

View file

@ -13,30 +13,16 @@ EXTRACT_SUFX= .ZIP
MAINTAINER= ports@FreeBSD.org
COMMENT= Reads VMS BACKUP tapes
EXTRACT_DEPENDS=${UNZIP_CMD}:${PORTSDIR}/archivers/unzip
USES= zip:infozip
ALL_TARGET= vmsbackup
PLIST_FILES= bin/vmsbackup
MAN1= vmsbackup.1
MANCOMPRESSED= no
NO_STAGE= yes
do-extract:
${MKDIR} ${WRKSRC}
${UNZIP_CMD} ${DISTDIR}/${DISTNAME} -d ${WRKSRC}
NO_WRKSUBDIR= yes
PLIST_FILES= bin/vmsbackup man/man1/vmsbackup.1.gz
post-patch:
@${REINPLACE_CMD} -e 's#gets(ans);#fgets(ans, 80, stdin);#' ${WRKSRC}/vmsbackup.c
@${REINPLACE_CMD} -e 's#"getopt.h"#<unistd.h>#' ${WRKSRC}/getoptmain.c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/vmsbackup ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/${MAN1} ${PREFIX}/man/man1
${INSTALL_PROGRAM} ${WRKSRC}/vmsbackup ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/vmsbackup.1 ${STAGEDIR}${PREFIX}/man/man1
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 900000
BROKEN= does not build
.endif
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View file

@ -0,0 +1,29 @@
--- vmsbackup.c.orig 1997-08-13 21:48:43.000000000 +0000
+++ vmsbackup.c
@@ -55,8 +55,8 @@
#endif
#ifdef REMOTE
#include <local/rmt.h>
-#include <sys/stat.h>
#endif
+#include <sys/stat.h>
#include <sys/file.h>
#if 0
@@ -300,7 +300,7 @@ char *fn;
if(procf && wflag) {
printf("extract %s [ny]",filename);
fflush(stdout);
- gets(ans);
+ fgets(ans, 80, stdin);
if(*ans != 'y') procf = 0;
}
if(procf)
@@ -757,6 +757,7 @@ size_t rsize;
* process a virtual block record (file record)
*
*/
+void
process_vbn(buffer, rsize)
char *buffer;
unsigned short rsize;