# $Id: Portfile 90827 2012-03-15 05:27:34Z ryandesign@macports.org $

PortSystem			1.0
name				saxon
version				9.4.0.3
set branch			[join [lrange [split ${version} .] 0 1] .]
set dashed_version	[strsed ${version} {g/\\./-/}]
set dashed_branch	[strsed ${branch} {g/\\./-/}]
categories			textproc java
maintainers			nomaintainer
supported_archs		noarch

description			saxon "home edition" - collection of tools to process XML documents

long_description \
	Saxon-HE provides implementations of XSLT 2.0, XQuery 1.0, \
	and XPath 2.0 at the basic level of conformance defined by W3C.

platforms			darwin

homepage			http://saxon.sourceforge.net/
master_sites		sourceforge:project/saxon/Saxon-HE/${branch}
use_zip				yes
distname			[string toupper ${name} 0 0]HE${dashed_version}J
set jardistfile		[suffix ${distname}]
set docdistfile		[suffix ${name}-resources${dashed_branch}]
distfiles			${jardistfile} ${docdistfile}

checksums			${jardistfile} \
						rmd160  bdbc24b4cd0c4641668b9567b070817a73456aee \
						sha256  6486b48efd4f09c0c9c4c8afdedc7770dd3427ee4d411eeaa17ca9f2779b1685 \
					${docdistfile} \
						rmd160  49174115cdc8c75d61887b4521423a2d9224e0aa \
						sha256  835f7dbdc81c636691745715e74e6936a2ae3df3f0f6306ee3b5e5a7f8526fd4

depends_lib			bin:java:kaffe

extract.mkdir		yes

use_configure		no

build				{}

destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} \
		${destroot}${prefix}/share/java ${destroot}${prefix}/share/${name}
	eval xinstall -m 644 [glob ${worksrcpath}/*.jar] \
		${destroot}${prefix}/share/java
	eval copy [glob ${worksrcpath}/doc/*] \
		${destroot}${prefix}/share/doc/${name}
	copy ${worksrcpath}/samples ${worksrcpath}/source-userdoc.zip \
		${worksrcpath}/use-cases ${destroot}${prefix}/share/${name}
}

