# -*- 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

PortSystem          1.0

name                latex2rtf
version             2.3.18
revision            3
categories          tex
platforms           darwin
license             GPL-2+
maintainers         {nicos @NicosPavlov} openmaintainer

description         Translator program intended to translate a LaTeX document into RTF
long_description    LaTeX2rtf is a translator program which is intended to translate a LaTeX \
                    document (precisely: the text and a limited subset of LaTeX tags) into \
                    the RTF format which can be imported by several textprocessors (including \
                    Microsoft Word for Windows and Word for Macintosh).

homepage            http://latex2rtf.sourceforge.net/
master_sites        sourceforge
checksums           rmd160  016cd9ee50bba1a36cdb9ba7563cdbcbd056776b \
                    sha256  c0b6a9f5877b3b24b1571c5f2c42afd22f0db5448448d4de7379e67d284ca0b1 \
                    size    2484156

patchfiles          patch-Makefile.diff

depends_run         bin:tex:texlive \
                    bin:gs:ghostscript \
                    bin:convert:ImageMagick \
                    bin:pnmtopng:netpbm

use_configure       no
installs_libs       no

destroot.target     install install-info

# append to CFLAGS (instead of replacing value in Makefile)
build.env-append    "CFLAGS=${configure.cflags} [get_canonical_archflags cc]"
destroot.env-append "CFLAGS=${configure.cflags} [get_canonical_archflags cc]"

build.pre_args-append \
                    PREFIX=${prefix} \
                    CC=${configure.cc}

destroot.pre_args-append \
                    DESTDIR=${destroot} \
                    PREFIX=${prefix} \
                    CC=${configure.cc}

test.run            yes

livecheck.type      sourceforge
livecheck.url       https://sourceforge.net/projects/${name}/files/${name}-unix/
