Index: head/emulators/ods2reader/Makefile =================================================================== --- head/emulators/ods2reader/Makefile (revision 501976) +++ head/emulators/ods2reader/Makefile (revision 501977) @@ -1,27 +1,31 @@ # Created by: Jeffrey H. Johnson # $FreeBSD$ PORTNAME= ods2reader PORTVERSION= 19930601 +PORTREVISION= 1 CATEGORIES= emulators sysutils MASTER_SITES= http://www.vsm.com.au/ftp/KITS/ \ - http://vms.process.com/ftp/vms-freeware/fileserv/ \ - http://web.infoave.net/~anonymous/VMS/ + http://vms.process.com/ftp/vms-freeware/fileserv/ DISTNAME= ODS-2-READER EXTRACT_SUFX= .ZIP -MAINTAINER= ports@FreeBSD.org +MAINTAINER= ak@FreeBSD.org COMMENT= Copies files from VMS Files-11 (ODS2) file systems -USES= zip:infozip -EXTRACT_BEFORE_ARGS= -qoa +USES= zip NO_WRKSUBDIR= yes PLIST_FILES= bin/ods2reader +post-extract: +# The source is in OpenVMS' variable-length record format + @${SH} ${FILESDIR}/vmsvlr2unix.sh \ + ${WRKSRC}/ods-2-reader.c > ${WRKSRC}/ods-2-reader.new.c + do-build: - ${CC} ${CFLAGS} -o ${WRKSRC}/ods2reader ${WRKSRC}/ods-2-reader.c + ${CC} ${CFLAGS} -o ${WRKSRC}/ods2reader ${WRKSRC}/ods-2-reader.new.c do-install: ${INSTALL_PROGRAM} ${WRKSRC}/ods2reader ${STAGEDIR}${PREFIX}/bin .include Index: head/emulators/ods2reader/files/vmsvlr2unix.sh =================================================================== --- head/emulators/ods2reader/files/vmsvlr2unix.sh (nonexistent) +++ head/emulators/ods2reader/files/vmsvlr2unix.sh (revision 501977) @@ -0,0 +1,29 @@ +#!/bin/sh - + +PATH=/usr/bin + +off=0 +strlen=0 + +if [ $# -eq 0 -a ! -t 0 ]; then + file=/dev/stdin +elif [ $# -eq 1 ]; then + file=$1 +else + echo Usage: ${0##*/} [file] + echo converts OpenVMS variable-length record format to unix text format + exit 0 +fi + +while true; do + off=$((${off} + ${strlen})) + strlen=$(hexdump -s ${off} -n 2 -e '"%u"' ${file}) + # EoF + [ -z ${strlen} ] && break + # print newline for zero-size records, as info-zip does + [ ${strlen} -eq 0 ] && echo + off=$((${off} + 2)) + hexdump -s ${off} -n ${strlen} -e '1000/1 "%c""\n"' ${file} + # align 2 + [ $((${strlen} % 2)) -ne 0 ] && off=$((${off} + 1)) +done Property changes on: head/emulators/ods2reader/files/vmsvlr2unix.sh ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property