-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
119 lines (99 loc) · 4.15 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
# -*- 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 cmake 1.0
name mathgl
version 8.0.1
revision 5
categories math
license GPL-3
maintainers {mps @Schamschula} openmaintainer
description MathGL is a library for making high-quality scientific graphics.
long_description {*}${description} MathGL is also a library for the fast data \
plotting and data processing of large data arrays a library for \
working in window and console modes and for easy embedding into \
other programs and a library with large and growing set of graphics.
platforms darwin
homepage http://mathgl.sourceforge.net/
master_sites sourceforge
checksums rmd160 f00e3b8ac0973eeef89a5509110845692094824d \
sha256 ca84bf9480c39ed3112e920c16ce3d8f2898698f62896f3a57714128622a55aa \
size 23979834
depends_build-append \
port:gettext
depends_lib-append path:lib/libfltk.dylib:fltk \
port:gettext-runtime \
port:giflib \
port:libpng \
path:include/turbojpeg.h:libjpeg-turbo \
port:zlib \
port:gsl \
port:hdf5
# find correct site-package location
#patchfiles-append patch-python.diff
configure.args-append \
-Denable-arma=OFF \
-Denable-fltk=ON \
-Denable-gif=ON \
-Denable-png=ON \
-Denable-jpeg=ON \
-Denable-gsl=ON \
-Denable-hdf5=ON \
-Denable-openmp=OFF \
-Denable-zlib=ON \
-Denable-glut=OFF \
-Denable-wx=OFF \
-Denable-pdf=OFF \
-Denable-qt4=OFF \
-Denable-qt5=OFF \
-Denable-python=OFF \
-Denable-lua=OFF \
-Denable-octave=OFF
# install cmake files in the correct location
configure.args-append \
-DMGL_LIB_INSTALL_DIR=${prefix}/lib
configure.cflags-append \
-DH5_USE_18_API
# currently broken
# see https://sourceforge.net/p/mathgl/discussion/508393/thread/fb61ebd073/
# variant arma description {Enable armadillo support} {
# compiler.cxx_standard 2011
# compiler.thread_local_storage yes
#
# depends_lib-append port:armadillo
# configure.args-replace -Denable-arma=OFF -Denable-arma=ON
# }
variant qt5 description {Enable Qt5 widget} {
PortGroup qt5 1.0
qt5.depends_component \
qtwebkit
configure.args-replace \
-Denable-qt5=OFF -Denable-qt5=ON
# avoid dependency on qt5-qtwebkit
#configure.args-append -Denable-json-sample=OFF
}
variant python38 conflicts python39 python310 description {Use Python 3.8} {}
variant python39 conflicts python38 python310 description {Use Python 3.9} {}
variant python310 conflicts python38 python39 description {Use Python 3.10} {}
foreach pv {310 39 38} {
if {[variant_isset python${pv}]} {
set python_branch "[string index ${pv} 0].[string range ${pv} 1 end]"
depends_build-append port:swig-python
depends_lib-append \
port:python${pv} \
port:py${pv}-numpy
configure.args-replace -Denable-python=OFF -Denable-python=ON
configure.args-append -DPYTHON_EXECUTABLE=${prefix}/bin/python${python_branch}
pre-destroot {
reinplace "s|-38.pyc|-${pv}.pyc|" ${worksrcpath}/lang/cmake_install.cmake
}
break
}
}
#currently broken
#variant pdf description {Enable pdf support} {
# depends_lib-append port:libharu
# configure.args-replace -Denable-pdf=OFF -Denable-pdf=ON
#}
livecheck.type regex
livecheck.url ${homepage}/doc_en/Download.html
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"