PortSystem 1.0

name			xpdf-hebrew
version			2003-feb-16
description		Xpdf character mapping for Hebrew
long_description \
	Xpdf character mapping for Hebrew

maintainers		nomaintainer
categories		graphics print
license			GPL-2
platforms		any
supported_archs	noarch
homepage		http://www.foolabs.com/xpdf/

master_sites \
    ftp://ftp.funet.fi/pub/TeX/CTAN/support/xpdf/ \
    ftp://ctan.unsw.edu.au/tex-archive/support/xpdf/ \
    ftp://ftp.tex.ac.uk/tex-archive/support/xpdf/ \
    ftp://ftp.kddlabs.co.jp/CTAN/support/xpdf/ \
    ftp://ftp.meiji.ac.jp/pub/TeX/CTAN/support/xpdf/ \
    ftp://ctan.tug.org/tex-archive/support/xpdf/ \
    ftp://ftp.dante.de/tex-archive/support/xpdf/ \
    ftp://gd.tuwien.ac.at/publishing/tex/CTAN/support/xpdf/ \
    ftp://ftp.ntnu.no/pub/tex/CTAN/support/xpdf/ \
    ftp://www.dnsbalance.ring.gr.jp/pub/text/CTAN/support/xpdf/ \
    http://www.t.ring.gr.jp/archives/text/CTAN/support/xpdf/ \
    ftp://ftp.chg.ru/pub/TeX/CTAN/support/xpdf/ \
    ftp://ftp.foolabs.com/pub/xpdf/

worksrcdir	${name}

checksums    md5 438dd417517641cbb78a94facf2d938e

depends_lib	 port:xpdf

use_configure	no

build {
    reinplace "s|/usr/local/share/xpdf/|${prefix}/share/xpdf/xpdf-|g" ${worksrcpath}/add-to-xpdfrc
}

destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/xpdf/${name}
	xinstall -m 644                            \
		${worksrcpath}/ISO-8859-8.unicodeMap        \
        ${worksrcpath}/Windows-1255.unicodeMap      \
		${worksrcpath}/README                       \
        ${worksrcpath}/add-to-xpdfrc                \
		${destroot}${prefix}/share/xpdf/${name}/	\
}

variant autoactivate description automatically activate the character mappings {
	## used in post-activate (below)
}


post-activate {
	if {[variant_isset autoactivate]} {
		system "cat ${prefix}/share/xpdf/${name}/add-to-xpdfrc >> ${prefix}/etc/xpdfrc"
		ui_msg "\"Added ${prefix}/share/xpdf/${name}/add-to-xpdfrc\" to \"${prefix}/etc/xpdfrc\". \
			NOTE: uninstall does not attempt to remove these lines"
	} else {
	ui_msg " \
		Activate these character mappings by adding \"${prefix}/share/xpdf/${name}/add-to-xpdfrc\" to ${prefix}/etc/xpdfrc or ~/.xpdfrc \
		The \"autoactivate\" variant does this automatically"
	}
}
