source: trunk/dports/textproc/dblatex/Portfile

Last change on this file was 148230, checked in by cal@…, 15 months ago

dblatex: fix livecheck, use sourceforge defaults

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1# -*- 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
2# $Id: Portfile 148230 2016-04-30 18:22:39Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           texlive 1.0
7
8name                dblatex
9version             0.3.7
10categories          textproc tex
11maintainers         cal openmaintainer
12license             GPL-2+
13platforms           darwin
14supported_archs     noarch
15
16description         DocBook to LaTeX Converter
17long_description    Dblatex transforms a DocBook XML/SGML document to LaTeX. \
18                    Once transformed into LaTeX, standard LaTeX tools are \
19                    used to produce DVI, Postcript or PDF files. \
20                    dblatex tries to hide as much as possible the latex \
21                    compiling stuff by providing a single clean script to \
22                    produce directly DVI, PostScript and PDF output. \
23                    The actual output rendering is done not only by the \
24                    XSL stylesheets transformation, but also by a dedicated \
25                    LaTeX package. The goal is to allow a deep LaTeX \
26                    customisation without changing the XSL stylesheets. \
27                    Post-processing is done by Python, to make publication \
28                    faster, convert the images if needed, and do the whole \
29                    compilation.
30
31homepage            http://dblatex.sourceforge.net
32master_sites        sourceforge:project/dblatex/dblatex/dblatex-${version}
33
34checksums           sha256  59ce3fdfd4d6cf44beb8705d9267b7be7cb32d4f826834c861c5b7016c7e722e \
35                    rmd160  8e1eab8ef98b4a5cd714015a45810f935ea40e36
36
37use_bzip2           yes
38
39depends_lib         port:texlive-latex-extra \
40                    port:texlive-latex-recommended \
41                    port:texlive-math-extra \
42                    port:dejavu-fonts \
43                    port:ImageMagick \
44                    port:docbook-xml \
45                    port:docbook-xsl
46
47patchfiles          patch-setup.py-remove-debian-installer.diff
48
49python.link_binaries no
50python.default_version 27
51
52# this gets assigned before python.bin is set to the version selected by the variant
53#destroot.cmd        ${python.bin} setup.py
54destroot.destdir    --root=${destroot} \
55                    --catalogs=${destroot}${prefix}/etc/xml/catalog
56
57post-destroot {
58    reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${python.prefix}/bin/dblatex
59    reinplace "s|#!/usr/bin/env python|#!${python.bin}|" ${destroot}${python.prefix}/bin/dblatex
60
61    fs-traverse f ${destroot}${python.prefix}/share {
62        if {[file isfile $f]} {
63            set f [string range $f [string length ${destroot}${python.prefix}/share/] end]
64            file mkdir [file dirname ${destroot}${prefix}/share/$f]
65            ln -s ${python.prefix}/share/$f ${destroot}${prefix}/share/$f
66        }
67    }
68    file mkdir ${destroot}${texlive_texmflocal}/tex/latex/dblatex
69    fs-traverse f ${destroot}${python.prefix}/share/dblatex/latex {
70        if {[file isfile $f]} {
71            if {[catch {exec ${prefix}/bin/kpsewhich -a [file tail $f]} result]} {
72                set f [string range $f [string length ${destroot}${python.prefix}/share/dblatex/latex/] end]
73                file mkdir [file dirname ${destroot}${texlive_texmflocal}/tex/latex/dblatex/$f]
74                ln -s ${python.prefix}/share/dblatex/latex/$f ${destroot}${texlive_texmflocal}/tex/latex/dblatex/$f
75            }
76        }
77    }
78    ln -s ${python.prefix}/bin/dblatex ${destroot}${prefix}/bin/
79}
80
81post-activate {
82    texlive.mktexlsr
83}
84
85post-deactivate {
86    texlive.mktexlsr
87}
88
89livecheck.regex     /${name}-(\[0-9.\]+)/
Note: See TracBrowser for help on using the repository browser.