PortSystem			1.0

name				macutil
version				2.0b3
revision			1
checksums			rmd160  5cf3b22d8bdd3a8fa61211e7a0d598ebac9bbfe4 \
					sha256  e31e4c11a711d8fa5bfadd3ceacb11dfa48c45758325d9302f271941d8a74d28 \
					size    167565

categories			sysutils
# Distributing original source is OK, but it's very unclear when it comes to derivative works
license				Restrictive
maintainers			nomaintainer
description			Several *nix-based utilities for working with classic Mac \
					files
long_description \
	macutil contains the following utilities: \
	macunpack - unpacks PackIt, StuffIt, Diamond, Compactor/Compact Pro, \
	most StuffItClassic/StuffItDeluxe, and all Zoom and LHarc/MacLHa \
	archives, and archives created by later versions of DiskDoubler.  Also \
	it will decode files created by BinHex5.0, MacBinary, UMCP, Compress \
	It, ShrinkToFit, MacCompress, DiskDoubler and AutoDoubler. \
	\
	hexbin - de-hexify files created in BinHex 4.0 compatible format (hqx) \
	but also the older format (dl, hex and hcx).  Moreover it will uudecode \
	files uuencoded by UUTool (the only program I know that does UU \
	hexification of all Mac file information). \
	\
	macsave - reads a MacBinary stream from standard input and writes the \
	files according to the options.  Optionally self-extracting archives are \
	modified to normal archives. \
	\
	macstream - reads files from the Unix host and will output a MacBinary \
	stream containing all those files together with information about the \
	directory structure. \
	\
	binhex - reads a MacBinary stream, or will read files/directories as \
	indicated on the command line, and will output all files in binhexed \
	(.hqx) format.  Information about the directory structure is lost. \
	\
	tomac - transmits a MacBinary stream, or named files to the Mac using \
	the XMODEM protocol. \
	\
	frommac - receives one or more files from the Mac using the XMODEM \
	protocol.

platforms			darwin

homepage			http://web.archive.org/web/20091231011057/http://homepages.cwi.nl/~dik/english/ftp.html
master_sites		http://web.archive.org/web/20060720044428/http://ftp.cwi.nl/dik/
distname			${name}${version}.shar

worksrcdir			${name}

platform darwin {
	configure.cflags-append -DBSD -DTYPES_H -DDIRENT_H -DTERMIOS_H
}

patchfiles			patch-crc-makefile.diff \
					patch-fix-prototypes.diff

extract.suffix		.Z
extract.cmd			uncompress
extract.pre_args	-c
extract.post_args	"| sh"

use_configure		no
configure.cflags-append -std=c89

variant universal {}

build.args-append	CC="${configure.cc}" \
					CF="${configure.cflags} [get_canonical_archflags cc]"

destroot.destdir	BINDIR=${destroot}${prefix}/bin

post-destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/man/man1 \
		${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath} {*}[glob ${worksrcpath}/man/*.1] \
		${destroot}${prefix}/share/man/man1
	xinstall -m 644 -W ${worksrcpath} {*}[glob ${worksrcpath}/doc/*] \
		README ${destroot}${prefix}/share/doc/${name}
}
