-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
206 lines (176 loc) · 7.85 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# -*- 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 makefile 1.0
PortGroup compiler_blacklist_versions 1.0
PortGroup perl5 1.0
PortGroup texlive 1.0
name auto-multiple-choice
categories x11 tex education
platforms darwin
license GPL-2+
maintainers nomaintainer
description Auto Multiple Choice - Multiple Choice Papers Management
long_description Utility to manage multiple choice questionnaires, \
with optionally mixed questions and answers. \
AMC provides automatic marking from papers' scans. \
Annotated papers are produced. Marks can be exported \
as an LibreOffice.org sheet file.
homepage http://www.auto-multiple-choice.net/
perl5.branches 5.34
subport auto-multiple-choice-devel {}
if {${subport} eq ${name}} {
# release
set amc.version.main 1.6.0
set amc.version.secondary 20230206142200
set amc.version ${amc.version.main}
version ${amc.version.main}
revision 2
checksums rmd160 00788859b8619b45ee1c19f702ea1295d7d3e445 \
sha256 acd9d266ebb8104543702fae52f383ed6170e7e7e1c90bc9c6abc4e83e3734ba \
size 13419428
conflicts auto-multiple-choice-devel
} else {
# devel
set amc.version.main 1.6.0
set amc.version.secondary 20240317102301
set amc.version ${amc.version.main}+git${amc.version.secondary}
version ${amc.version.main}-git${amc.version.secondary}
checksums rmd160 718b9e95615a49b07aa42a3d7ba5af387ead1b7c \
sha256 143a05d354d5c7a68ae9dc78e7d3344336e48d524251c5130e96bf69cc9314e2 \
size 15155724
conflicts auto-multiple-choice
}
distname ${name}_${amc.version}_dist
worksrcdir ${name}-${amc.version}
set opencv_ver 4
depends_lib-append path:lib/opencv${opencv_ver}/libopencv_core.dylib:opencv${opencv_ver}
build.env-append PKG_CONFIG_PATH=${prefix}/lib/opencv${opencv_ver}/pkgconfig
master_sites https://download.auto-multiple-choice.net/precomp/
use_configure no
compiler.cxx_standard 2011
# In file included from AMC-detect.cc:40:
# In file included from /opt/local/include/opencv4/opencv2/core/core.hpp:48:
# In file included from /opt/local/include/opencv4/opencv2/core.hpp:52:
# /opt/local/include/opencv4/opencv2/core/cvdef.h:738:10: fatal error: 'array' file not found
# #include <array>
# ^
compiler.blacklist-append \
{clang < 900}
depends_build port:gmake
build.cmd ${prefix}/bin/gmake
build.args AMCCONF=macports \
BASEPATH=${prefix} \
GCC="${configure.cxx}" \
GCC_PP="${configure.cxx}"
depends_run \
path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \
port:libnotify \
path:lib/pkgconfig/librsvg-2.0.pc:librsvg \
port:netpbm \
port:p${perl5.major}-archive-zip \
port:p${perl5.major}-clone \
port:p${perl5.major}-dbd-sqlite \
port:p${perl5.major}-digest-md5 \
port:p${perl5.major}-email-mime \
port:p${perl5.major}-email-sender \
port:p${perl5.major}-file-basedir \
port:p${perl5.major}-file-mimeinfo \
port:p${perl5.major}-filesys-dfportable \
port:p${perl5.major}-glib-object-introspection \
port:p${perl5.major}-gtk3 \
port:p${perl5.major}-hash-merge \
port:p${perl5.major}-io-compress \
port:p${perl5.major}-locale-codes \
port:p${perl5.major}-locale-gettext \
port:p${perl5.major}-module-load-conditional \
port:p${perl5.major}-openoffice-oodoc \
port:p${perl5.major}-perlmagick \
port:p${perl5.major}-text-csv \
port:p${perl5.major}-xml-simple \
port:p${perl5.major}-xml-writer \
port:p${perl5.major}-yaml-syck \
path:lib/pkgconfig/poppler.pc:poppler \
port:qpdf \
port:sqlite3 \
port:texlive \
port:texlive-fonts-extra \
port:texlive-lang-japanese \
port:texlive-latex-extra \
port:unzip
pre-build {
build.post_args-append PERLDIR=${perl5.lib}
if {![variant_isset mactex]} {
set amc.texmflocal ${texlive_texmflocal}
}
build.post_args-append TEXDIR="${amc.texmflocal}/tex/latex/AMC"
build.post_args-append TEXDOCDIR="${amc.texmflocal}/doc/latex/AMC"
}
destroot.args AMCCONF=macports \
BASEPATH=${prefix}
pre-destroot {
destroot.args-append PERLDIR=${perl5.lib}
if {![variant_isset mactex]} {
set amc.texmflocal ${texlive_texmflocal}
}
destroot.args-append TEXDIR="${amc.texmflocal}/tex/latex/AMC"
destroot.args-append TEXDOCDIR="${amc.texmflocal}/doc/latex/AMC"
}
# The mactex variant expects MacTeX to be installed
# and installs dblatex's stylefiles to MacTeX's texmf (local)
set amc.texmflocal ""
set amc.mactex_bin ""
variant mactex description {The mactex variant allow Auto Multiple Choice to use a MacTeX installation \
instead of Macports texlive tools. To install the mactex variant \
/Library/TeX/texbin must be added to binpath in macports.conf.} {
# First, check if MacTeX actually seems to be there…
set amc.mactex_candidates { \
"/Library/TeX/texbin" \
"/usr/texbin" \
}
foreach dir ${amc.mactex_candidates} {
if {[file executable "${dir}/kpsewhich"]} {
set amc.mactex_bin ${dir}
break
}
}
if { ${amc.mactex_bin} != "" } {
set amc.texmflocal \
[exec ${amc.mactex_bin}/kpsewhich --expand-var='\$TEXMFLOCAL']
regsub -all {'} ${amc.texmflocal} "" amc.texmflocal
} else {
return -code error "Cannot find MacTeX installation; aborting"
}
depends_run-delete \
port:texlive \
port:texlive-fonts-extra \
port:texlive-lang-japanese \
port:texlive-latex-extra
notes "The mactex variant will install styles to MacTeX's texmf-local
${amc.texmflocal}
(which is outside macport's common directory structure).
For the mactex variant to work,
${amc.mactex_bin} must also be added to binpath in macports.conf"
# AND, since we're installing files outside macports' normal directories
destroot.violate_mtree yes
}
proc amc.mktexlsr {} {
if {![variant_isset mactex]} {
texlive.mktexlsr
} else {
global amc.mactex_bin
system "${amc.mactex_bin}/mktexlsr"
if {[file exists "${amc.mactex_bin}/mtxrun"]} {
system "${amc.mactex_bin}/mtxrun --generate"
}
}
}
post-activate {
amc.mktexlsr
}
post-deactivate {
amc.mktexlsr
}
livecheck.type regex
livecheck.url [lindex ${master_sites} 0]#
livecheck.regex ${name}_(\[0-9.\]+\\+\[0-9.a-z-\]+)_dist.tar.gz
livecheck.version ${amc.version}