# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
description xml command line utilities
long_description XMLStarlet is a set of command line utilities (tools) to \
transform, query, validate, and edit XML documents and \
files using simple set of shell commands in similar way it \
is done for text files with UNIX grep, sed, awk, diff, \
patch, join, etc utilities.
homepage http://xmlstar.sourceforge.net
master_sites sourceforge:project/xmlstar/xmlstarlet/${version}
checksums rmd160 16ca33aa94cd9cb45ef0635526ed07243c4819db \
sha256 15d838c4f3375332fd95554619179b69e4ec91418a3a5296e7c631b7ed19e7ca
depends_lib port:libxml2 port:libxslt port:libiconv
configure.args --disable-silent-rules \
--with-libxml-prefix=${prefix} \
--with-libxslt-prefix=${prefix} \
--with-libiconv-prefix=${prefix} \
--mandir=${prefix}/share/man \
--program-transform-name=s/xml$/${name}/
build.target clean-doc all
# Avoid the error below by setting environment variables
# sed: RE error: illegal byte sequence
# http://stackoverflow.com/questions/19242275/re-error-illegal-byte-sequence-on-mac-os-x
build.env-append LC_CTYPE=C LANG=C
set docdir ${destroot}${prefix}/share/doc/${name}
xinstall -m 644 -W ${worksrcpath} \
xinstall -d ${destroot}${prefix}/share/${name}
file copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}
variant docs description {Enable documentation} {
depends_build-append port:docbook-xsl-ns \
configure.args-delete --disable-build_docs
configure.args-append --enable-build_docs