# -*- 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$ PortSystem 1.0 PortGroup github 1.0 PortGroup texlive 1.0 github.setup vectorgraphics asymptote 2.38 categories graphics maintainers mojca openmaintainer description A vector graphics language long_description Asymptote is a powerful descriptive \ vector graphics language that provides a natural \ coordinate-based framework for technical drawing. \ Labels and equations are typeset with LaTeX, for \ high-quality PostScript output. homepage http://asymptote.sourceforge.net license LGPL-3+ platforms darwin checksums rmd160 9e49b18656ad94f50a7677fd96b11e2c8adb4ae7 \ sha256 a2be6a13f726f81e7904ddf8376e9c8383367c5677b8472a52b05376e78908a7 post-extract { reinplace "s|\\\[${version}git\\\]|\\\[${version}\\\]|" ${worksrcpath}/configure.ac } use_autoconf yes autoconf.cmd ./autogen.sh configure.args --with-latex=${texlive_texmfports}/tex/latex \ --with-context=${texlive_texmfports}/tex/context/third \ --mandir=${prefix}/share/man \ --disable-offscreen build.target all # texlive-latex-recommended and texinfo are only used for building the docs # other relevant packages are: # - texlive-common # - texlive-bin # - texlive-basic # - texlive-latex # but they are already a dependency of latex-recommended # # one day we could split that into a separate +docs variant # or fetch the PDF from somewhere depends_build port:autoconf \ port:gawk \ port:ghostscript \ port:texinfo \ port:texlive-latex-recommended \ port:texlive-fonts-recommended depends_lib port:readline \ port:fftw-3 \ port:gsl \ port:libsigsegv \ port:ncurses \ path:lib/libgc.dylib:boehmgc # Runtime dependencies really depend on user preferences. # Asy can draw graphics without any TeX or without LaTeX, # so one might just as well remove all deps (or add more) # # The hierarchy of dependencies goes as: # - texlive-latex-recommended [common, bin, basic, latex] # - texlive-latex [common, bin, basic] # - texlive-basic [common, bin] # # But then asy also supports luatex, context, etc. depends_run port:ghostscript \ port:texlive-basic depends_skip_archcheck-append \ port:ghostscript \ port:texinfo \ port:texlive-basic \ port:texlive-bin \ port:texlive-latex-recommended post-destroot { set python.branch "" if {[variant_isset python27]} { set python.branch 2.7 } elseif {[variant_isset python34]} { set python.branch 3.4 } elseif {[variant_isset python35]} { set python.branch 3.5 } if {${python.branch} != ""} { set python.bin ${prefix}/bin/python${python.branch} eval reinplace {"s|#!/usr/bin/env python|#!${python.bin}|"} \ [glob -directory ${destroot}${prefix}/share/${name}/GUI *.py] } else { delete ${destroot}${prefix}/bin/xasy } } post-activate { # run `mktexlsr` to make sure the asymptote files are found: system "mktexlsr" } post-deactivate { system "mktexlsr" } # asymptote's GUI needs either pyXY-pil or pyXY-Pillow # https://trac.macports.org/ticket/44284 variant python27 conflicts python34 python35 description {Enable xasy GUI using Python 2.7} { set python.version 27 set python.branch "[string range ${python.version} 0 end-1].[string index ${python.version} end]" depends_lib-append port:py${python.version}-tkinter \ path:${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/PIL:py${python.version}-Pillow } variant python34 conflicts python27 python35 description {Enable xasy GUI using Python 3.4} { set python.version 34 set python.branch "[string range ${python.version} 0 end-1].[string index ${python.version} end]" depends_lib-append port:py${python.version}-tkinter \ path:${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/PIL:py${python.version}-Pillow } variant python35 conflicts python27 python34 description {Enable xasy GUI using Python 3.5} { set python.version 35 set python.branch "[string range ${python.version} 0 end-1].[string index ${python.version} end]" depends_lib-append port:py${python.version}-tkinter \ path:${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/PIL:py${python.version}-Pillow } if {![variant_isset python27] && ![variant_isset python34]} { default_variants +python35 } livecheck.regex {archive/([0-9.]+).tar.gz}