diff options
author | Alex Kozlov <ak@FreeBSD.org> | 2020-05-21 04:22:51 +0000 |
---|---|---|
committer | Alex Kozlov <ak@FreeBSD.org> | 2020-05-21 04:22:51 +0000 |
commit | 8d2ed79a6abac9adf17f6f2af7e3ac55f11ddc49 (patch) | |
tree | be41e70ca9d08fa0e8ab16998674cd33dcf0ee1d /emulators/ods2reader | |
parent | a7a8045f418eea1659c1eb8440b5f21ff1dcee68 (diff) | |
download | ports-8d2ed79a6abac9adf17f6f2af7e3ac55f11ddc49.tar.gz ports-8d2ed79a6abac9adf17f6f2af7e3ac55f11ddc49.zip |
- Fix build on big-endian platforms
Reported by: linimon
Notes
Notes:
svn path=/head/; revision=536043
Diffstat (limited to 'emulators/ods2reader')
-rw-r--r-- | emulators/ods2reader/Makefile | 3 | ||||
-rw-r--r-- | emulators/ods2reader/files/vmsvlr2unix.sh | 9 |
2 files changed, 6 insertions, 6 deletions
diff --git a/emulators/ods2reader/Makefile b/emulators/ods2reader/Makefile index c7434aebfbd0..bd04479646b1 100644 --- a/emulators/ods2reader/Makefile +++ b/emulators/ods2reader/Makefile @@ -13,9 +13,6 @@ EXTRACT_SUFX= .ZIP MAINTAINER= ak@FreeBSD.org COMMENT= Copies files from VMS Files-11 (ODS2) file systems -BROKEN_FreeBSD_12_powerpc64= fails to build: ods-2-reader.new.c:60:1: error: unterminated #ifdef -BROKEN_FreeBSD_13_powerpc64= fails to build: ods-2-reader.new.c:3:687: error: expected identifier or '(' - USES= zip NO_WRKSUBDIR= yes PLIST_FILES= bin/ods2reader diff --git a/emulators/ods2reader/files/vmsvlr2unix.sh b/emulators/ods2reader/files/vmsvlr2unix.sh index 0fed415eabac..9055aeec3e89 100644 --- a/emulators/ods2reader/files/vmsvlr2unix.sh +++ b/emulators/ods2reader/files/vmsvlr2unix.sh @@ -17,13 +17,16 @@ fi while true; do off=$((${off} + ${strlen})) - strlen=$(hexdump -s ${off} -n 2 -e '"%u"' ${file}) + # read in 1-byte units + set -- $(od -An -tu1 -j${off} -N2 ${file}) # EoF - [ -z ${strlen} ] && break + [ -z "${1}" -o -z "${2}" ] && break + # assume little-endian, it's OpenVMS format + strlen=$(($2 * 256 + $1)) # 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} + hexdump -s ${off} -n ${strlen} -e '"'%.${strlen}s'"''"\n"' ${file} # align 2 [ $((${strlen} % 2)) -ne 0 ] && off=$((${off} + 1)) done |