-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
123 lines (105 loc) · 4.44 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# -*- 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
PortGroup compiler_blacklist_versions 1.0
PortGroup legacysupport 1.1
PortGroup texlive 1.0
name asymptote
version 2.89
revision 1
categories graphics
maintainers {mojca @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+
# libpaper is a dependency of ghostscript that's only used at runtime
license_noconflict libpaper
set python.branch 3.11
set python.version [join [split ${python.branch} "."] ""]
set python.bin ${prefix}/bin/python${python.branch}
master_sites sourceforge:project/${name}/${version}/
extract.suffix .src.tgz
checksums rmd160 e955dd36b53da3eac8054e695757ff109a719904 \
sha256 f64e62b4ee4f85f1a78640c4f1e8a6f98e91f54edacab19727c7cabe94a57f5b \
size 15133552
# On Lion the default clang fails with
# ../base/graph_splinetype.asy: 13.10: arrays have different lengths: 24 != 25
# gcc-4.2 fails on 10.6 with multiple errors.
compiler.blacklist {clang < 500} *gcc-4.*
compiler.cxx_standard 2014
configure.args-append \
--enable-gc=system \
--with-latex=${texlive_texmfports}/tex/latex \
--with-context=${texlive_texmfports}/tex/context/third \
--mandir=${prefix}/share/man \
--disable-offscreen \
--disable-lsp
configure.cxxflags-append \
-std=c++14
build.env-append PYTHON=${python.bin}
#build.env-append PYRCC5=${prefix}/bin/pyrcc5-${python.branch} \
# PYUIC5=${prefix}/bin/pyuic5-${python.branch}
#destroot.env-append PYRCC5=${prefix}/bin/pyrcc5-${python.branch} \
# PYUIC5=${prefix}/bin/pyuic5-${python.branch}
# 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-append \
port:ghostscript \
port:pkgconfig \
port:texinfo \
port:texlive-fonts-recommended \
port:texlive-latex-recommended \
port:texlive-latex-extra
# port:py${python.version}-pyqt5
depends_lib-append port:boehmgc \
port:fftw-3 \
port:glm \
port:gsl \
port:libsigsegv \
port:ncurses \
port:readline
# 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 \
port:py${python.version}-pycson
# port:py${python.version}-pyqt5
# TODO: python dependencies for xasy should be optional
depends_skip_archcheck-append \
port:ghostscript \
port:texinfo \
port:texlive-basic \
port:texlive-bin \
port:texlive-latex-recommended
post-destroot {
reinplace "s|#!/usr/bin/env python.*|#!${python.bin}|" \
{*}[glob -directory ${destroot}${prefix}/share/${name}/GUI *.py]
}
post-activate {
# run `mktexlsr` to make sure the asymptote files are found:
system "mktexlsr"
}
post-deactivate {
system "mktexlsr"
}
notes "If you want to use xasy, install py${python.version}-pyqt5."