# -*- 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
# $Id: Portfile 89810 2012-02-11 08:55:39Z and.damore@macports.org $

PortSystem          1.0
PortGroup           texlive 1.0

name                texlive-pictures
version             22961
revision            1

categories          tex
maintainers         dports
license             Copyleft Permissive
description         TeX Live: Graphics packages and programs
long_description    Graphics packages and programs

checksums           texlive-pictures-22961-run.tar.xz \
                    rmd160  dcb5cd77414f236f7b9a6138099b17b1fdc43528 \
                    sha256  2cd607c7c228d2d8e049d4448f1d94e941516a9321fd9576e02408c6161a862d \
                    texlive-pictures-22961-doc.tar.xz \
                    rmd160  2d2638937c384973401fff6abf976ad142acab59 \
                    sha256  cba9b17eb9a03b50e72806adc6403339ae75accde73483745656779b12bad48c \
                    texlive-pictures-22961-src.tar.xz \
                    rmd160  8fb8739194b2781a86fbd909b95e1e1f648b2940 \
                    sha256  84f8547e25d7e559aadc09961642f0507e2774c916c4b678d190f4fd6dc851e6

depends_lib         port:texlive-basic

texlive.maps      \
    {Map knitfont.map} \
    {MixedMap xypic.map}

texlive.binaries    cachepic epspdf epspdftk fig4latex mathspic

patchfiles          patch-runfiles_texmf-dist_scripts_epspdf_epspdf.rb.diff

post-patch {
    reinplace "s|@@TEXMFDIST@@|${texlive_texmfdist}|g" ${worksrcpath}/runfiles/texmf-dist/scripts/epspdf/epspdf.rb
}

# use pgf port to satisfy pgf dependency (see #25478)
depends_lib-append port:pgf

pre-activate {
    if {![catch {set vers [lindex [registry_active texlive-latex-extra] 0]}]
        && [vercmp [lindex $vers 1] 19538] < 0} {
        set deactivate_proc registry_deactivate_composite
        if {[info commands registry_deactivate_composite] == {}} {
            set deactivate_proc registry_deactivate
        }
        $deactivate_proc texlive-latex-extra "" [list ports_nodepcheck 1]
    }
}

texlive.texmfport
