# $Id: Portfile 65843 2010-04-02 01:57:19Z jeremyhu@macports.org $

PortSystem			1.0

name				asciidoc
version				8.5.3
categories			textproc
maintainers			boeyms openmaintainer
description			Formatter/translator for text files to numerous formats
long_description \
	AsciiDoc is a text document format for writing short documents, \
	articles, books and UNIX man pages. AsciiDoc files can be translated to \
	HTML (with or without stylesheets), DocBook and LinuxDoc markup using \
	the asciidoc(1) command.  AsciiDoc is highly configurable: both the \
	AsciiDoc source file syntax and the backend output markups (which can be \
	almost any type of SGML/XML markup) can be customized and extended by \
	the user.

platforms		darwin

homepage		http://www.methods.co.nz/asciidoc/
master_sites	sourceforge

checksums		md5     7377872275c2a575151655b19ac6dd3e \
				sha1    78fd756e17c9b83abfeb43806dff95db10bff8bc \
				rmd160  c34aa2be7bc30f8ac0dbbd162f9feecbb345cf98

depends_run		port:python26 \
				port:docbook-xml-4.5 \
				port:fop

# fop is not universal
universal_variant no

destroot.target	install docs vimdir=${prefix}/share/vim/vimfiles/

pre-destroot {
    file mkdir ${destroot}${prefix}/share/vim/vimfiles/
}

post-destroot {
	reinplace "s:#!/usr/bin/env python:#!${prefix}/bin/python2.6:" \
		${destroot}${prefix}/bin/asciidoc \
		${destroot}${prefix}/bin/a2x
}

platform darwin {
	# Avoid hidden dependency on gsed
	configure.env-append SED=/usr/bin/sed
}
