# $Id: Portfile 54115 2009-07-21 16:11:32Z kimuraw@macports.org $

PortSystem			1.0
name				enscript
version				1.6.4
revision			3
categories			print
maintainers			nomaintainer
description			Replacement for Adobe's 'enscript' program
long_description \
	GNU enscript is a drop-in replacement for the enscript program.  Enscript \
	converts ASCII files to PostScript and stores generated output to a file \
	or sends it directly to the printer.

platforms			darwin sunos

homepage			http://www.codento.com/people/mtr/genscript/
#master_sites		${homepage}
master_sites		freebsd

checksums			md5 b5174b59e4a050fb462af5dbf28ebba3 \
					sha1 9dd7128a508d4c9671659b9520028d12add50cfa

patchfiles			patch-afm_Makefile.in patch-lib_Makefile.in \
					patch-src_gsint.h patch-src_main.c patch-src_psgen.c \
					patch-src_util.c patch-states_hl_Makefile.in \
					patch-configure patch-CVE-2008-3863-and-4306

# add ruby syntax support from
# http://www.freebsd.org/cgi/cvsweb.cgi/ports/print/enscript-letter/
# and from http://support.rubyforge.org/svn/trunk/support/ruby.st
patchfiles-append	patch-ruby_syntax.diff

configure.args		--mandir=${prefix}/share/man --with-media=Letter \
					--infodir=${prefix}/share/info

post-destroot {
	file delete -force ${destroot}${prefix}/lib/charset.alias \
		${destroot}${prefix}/share/locale/locale.alias
}

test.run			yes
test.target			check

variant mediaA4 description "use A4" {
	configure.args-delete	--with-media=Letter
	configure.args-append	--with-media=A4
}

