Ticket #40979: asymptote-2.29.Portfile

File asymptote-2.29.Portfile, 3.4 KB (added by mojca (Mojca Miklavec), 10 years ago)

Update asymptote to 2.29 (might fix problem on 10.9?), remove dep on texlive (#43691)

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 120065 2014-05-14 22:12:51Z mojca@macports.org $
3
4PortSystem          1.0
5PortGroup           texlive 1.0
6
7name                asymptote
8version             2.29
9categories          graphics
10maintainers         gmail.com:loshea
11description         a vector graphics language
12long_description    Asymptote is a powerful descriptive \
13                    vector graphics language that provides a natural \
14                    coordinate-based framework for technical drawing. \
15                    Labels and equations are typeset with LaTeX, for \
16                    high-quality PostScript output.
17homepage            http://asymptote.sourceforge.net
18license             LGPL-3+
19platforms           darwin
20configure.args      --with-latex=${texlive_texmfports}/tex/latex \
21                    --with-context=${texlive_texmfports}/tex/context/third \
22                    --mandir=${prefix}/share/man \
23                    --disable-offscreen
24master_sites        sourceforge
25extract.suffix      .src.tgz
26checksums           rmd160  e1a46654e0a3f1c65b63afc69a46a476d40fd911 \
27                    sha256  6c5cf29beefad40414f47223b12d438493bee64db24b4c30ac785e8db801c9c3
28
29# texlive-latex-recommended and texinfo are only used for building the docs
30# other relevant packages are:
31# - texlive-common
32# - texlive-bin
33# - texlive-basic
34# - texlive-latex
35# but they are already a dependency of latex-recommended
36#
37# one day we could split that into a separate +docs variant
38# or fetch the PDF from somewhere
39depends_build       port:ghostscript \
40                    port:texinfo \
41                    port:texlive-latex-recommended
42
43depends_lib         port:readline \
44                    port:fftw-3 \
45                    port:gsl \
46                    port:libsigsegv \
47                    port:ncurses \
48                    path:lib/libgc.dylib:boehmgc
49
50# Runtime dependencies really depend on user preferences.
51# Asy can draw graphics without any TeX or without LaTeX,
52# so one might just as well remove all deps (or add more)
53#
54# The hierarchy of dependencies goes as:
55# - texlive-latex-recommended [common, bin, basic, latex]
56# - texlive-latex             [common, bin, basic]
57# - texlive-basic             [common, bin]
58#
59# But then asy also supports luatex, context, etc.
60depends_run         port:ghostscript \
61                    port:texlive-basic
62
63post-destroot {
64    set python.bin ""
65    if {[variant_isset python27]} {
66        set python.bin ${prefix}/bin/python2.7
67    } elseif {[variant_isset python26]} {
68        set python.bin ${prefix}/bin/python2.6
69    }
70    if {${python.bin} != ""} {
71        eval reinplace {"s|#!/usr/bin/env python|#!${python.bin}|"} \
72            [glob -directory ${destroot}${prefix}/share/${name}/GUI *.py]
73    } else {
74        delete ${destroot}${prefix}/bin/xasy
75    }
76}
77
78post-activate {
79  # run `mktexlsr` to make sure the asymptote files are found:
80  system "mktexlsr"
81}
82post-deactivate {
83  system "mktexlsr"
84}
85
86variant python26 conflicts python27 description {Enable xasy GUI using Python 2.6} {
87    depends_lib-append port:py26-tkinter port:py26-pil
88}
89variant python27 conflicts python26 description {Enable xasy GUI using Python 2.7} {
90    depends_lib-append port:py27-tkinter port:py27-pil
91}
92if {![variant_isset python26]} {
93    default_variants +python27
94}