Installing AMC with MacPorts on macOS

Version 4 (Joël Brogniart, 03/23/2024 09:13 am)

1 1
h1. Building AMC for MAC OSX
2 1
3 1
4 1
This is a translation of the original wiki entry by Joël Brogniart. Any spelling or translation errors are either mine or Google translate's.
5 1
6 1
(This installation is running OS X 10.7.5 and OS X 10.8.3 with Xcode 4.6.2 and MacPorts 2.1.3)
7 1
8 1
Auto Multiple Choice (AMC) is a software to manage questionnaires and multiple choice exams. It allows, from the definition of the multiple choice questions to generate sheets of questionnaires. 
9 1
The question types can be one only choice, multiple choices, question, right / wrong answers etc.
10 1
Once the completed questionnaires are digitized, AMC automatically corrects the questionnaires. This software runs in a graphical environment X Window System on Linux and OS X.
11 1
Linux is used as the develop environment, so it probably runs best there. Your mileage may vary.
12 1
13 1
It is possible to install the pre-compiled version 1.1.1 , but you would miss the newest developments happening in this active project. You can also install from the source, directly from the development 
14 1
repository. This will give you the bleeding edge version.
15 1
16 1
For the moment, this installation guide is quite technical and involves only OS X 10.8  (and 10.7.5 with the latest version of XCode).
17 1
18 1
You will need "MacPorts":http://www.macports.org, a little understanding of the dependencies between different tools (Subversion, MacPorts, PERL, X11, port ...) and the OS X-architecture.
19 1
20 1
You should also have administrative rights on the computer. This manual is therefore unfortunately not for everyone. There is a little problem for communication with the printing tools and the installed version can not print directly, so you might miss some comfort compared to the Linux version. (But you will be producing pdf files which can be handled by your mac quite well). Documents generated by AMC will be printed from OS X.
21 1
22 1
23 1
For this installation you will create a local MacPort repository. In this repository you will add macports description files unknown to macports. The procedure will create a port file for AMC and some additional port files for tools needed to run AMC. Once these files are installed by macport, the installation of AMC can de started.
24 1
25 2 Joël Brogniart
26 2 Joël Brogniart
27 2 Joël Brogniart
28 1
h2. Prerequisites
29 1
30 1
The requirements are the same as the installation of version 1.1.1 AMC. To work with the interface, AMC requires the graphical environment X Window System and X11 font Linux Libertine characters and and installation MacPorts system.
31 1
32 1
OS X does not contain the standard X11 graphical environment. It is possible to fill this gap by installing XQuartz, an X Windows System environment running OS X. You can download the application on the XQuartz site. "XQuartz":http://xquartz.macosforge.org.
33 1
34 1
Linux Libertine font
35 1
36 1
Linux Libertine font is a free font that covers code pages for Latin languages​​, Greek, Cyrillic languages​​, Hebrew, the International Phonetic Alphabet (and other). You need to download the package "OTF" on LinuxLibertine.org site. "LinuxLibertine.org":http://www.linuxlibertine.org. 
37 1
38 1
*Attention* : The current version of XQuartz (2.7.4) does not recognize the fonts installed in the user's folder. You must install the fonts by moving in the "/ Library / Fonts" folder.
39 1
40 1
h3. MacPorts
41 1
42 1
MacPorts is a system to build, install and manage open source software. You need to download the installation package Mountain Lion on the site "MacPorts" http://www.macports.org and install MacPorts.
43 1
44 1
h2. MacPorts files installation (port) files
45 1
46 1
The MacPorts port file  contains information that allows a program to be installed into the MacPorts system. It shows what tools are needed for installation and operation of the program and how to install the program. 
47 1
MacPorts contains "many ports"http://www.macports.org/ports.php but it does not contain a port describing the AMC installation from the source code of the program. Some tools required for installation and operation of AMC are absent from MacPorts. So we have to create the files to port these tools and file port for the development version of AMC.
48 2 Joël Brogniart
49 2 Joël Brogniart
To avoid conflicts with ports already described in MacPorts, new ports will be installed in the folders of the user who installs, instead of being installed in folders directly managed by MacPorts.
50 2 Joël Brogniart
51 2 Joël Brogniart
*Note*: MacPorts is a collaborative effort and many developers are involved in its development. The files described here they have been proposed to be added to the files referenced in MacPorts. When and if an addition is accepted, the local port file is no longer needed. One day a MacPorts update may be accepted in the standard hierarchy of MacPorts.
52 2 Joël Brogniart
53 2 Joël Brogniart
h3. Local repository MacPorts
54 2 Joël Brogniart
55 2 Joël Brogniart
For MacPorts to use a local folder, you must create that local folder. 
56 2 Joël Brogniart
57 2 Joël Brogniart
<pre>mkdir -p ~/nix/macports</pre>
58 2 Joël Brogniart
59 2 Joël Brogniart
An archive containing files ports described here is available for download: attachment:macports.zip.
60 2 Joël Brogniart
61 2 Joël Brogniart
Ports are grouped into categories and file organization reflects this port group. Each port is part of a main category and has its own folder. The main category of AMC in MacPorts X11 is also the case for AMC port will be located within a folder @X11@. AMC is developed in PERL and requires many CPAN modules. PERL modules to be added will be in the @file@ perl. The following PERL ports will be added.
62 2 Joël Brogniart
* p5-email-abstract (module CPAN "Email::Abstract":http://search.cpan.org/~rjbs/Email-Abstract)
63 2 Joël Brogniart
* p5-email-sender (module CPAN "Email::Sender":http://search.cpan.org/~rjbs/Email-Sender)
64 2 Joël Brogniart
* p5-moo (module CPAN "Moo":http://search.cpan.org/~mstrout/Moo)
65 2 Joël Brogniart
* p5-moox-types-mooselike (module CPAN "Moox::Types::MooseLike":http://search.cpan.org/~mateu/MooX-Types-MooseLike)
66 2 Joël Brogniart
* p5-role-tiny (module CPAN "Role::Tiny":http://search.cpan.org/~ilmari/Role-Tiny)
67 2 Joël Brogniart
* p5-strictures (module CPAN "strictures":http://search.cpan.org/~ether/strictures)
68 2 Joël Brogniart
* p5-throwable (module CPAN "Throwable":http://search.cpan.org/~rjbs/Throwable)
69 2 Joël Brogniart
70 2 Joël Brogniart
-The following ports will be updated because the version currently available in MacPort is too old. -
71 2 Joël Brogniart
* -p5-class-load (module CPAN "Class::Load":http://search.cpan.org/~drolsky/Class-Load)- (plus nécessaire, mis à jour dans MacPorts)
72 2 Joël Brogniart
* -p5-email-mime (module CPAN "Email::MIME":http://search.cpan.org/~rjbs/Email-MIME)- (plus nécessaire, mis à jour dans MacPorts)
73 2 Joël Brogniart
* -p5-email-simple (module CPAN "Email::Simple":http://search.cpan.org/~rjbs/Email-Simple)- (plus nécessaire, mis à jour dans MacPorts)
74 2 Joël Brogniart
75 2 Joël Brogniart
Here is a command to create the hierarchy.
76 2 Joël Brogniart
<pre>cd ~/nix/macports
77 2 Joël Brogniart
mkdir -p perl/p5-email-abstract perl/p5-email-sender perl/p5-moo \
78 2 Joël Brogniart
    perl/p5-moox-types-mooselike perl/p5-role-tiny perl/p5-strictures \
79 2 Joël Brogniart
    perl/p5-throwable x11/auto-multiple-choice-devel</pre>
80 2 Joël Brogniart
81 3 Joël Brogniart
This should produce: 
82 3 Joël Brogniart
83 3 Joël Brogniart
!port-hierarchy.png!
84 3 Joël Brogniart
85 4 Joël Brogniart
You should then tell MacPorts to take the local folder  into account, before considering the standard hierarchy MacPorts. To do this you must edit the file "@/opt/local/etc/macports/sources.conf@" and add a URL to the local file before the URL of the repository @rsync@ MacPorts. 
86 4 Joël Brogniart
87 4 Joël Brogniart
Each directory must contain a port document named Portfile. This document is a text document containing a description for the MacPorts installation tool. Files carying new PERL modules were created with the utility "@cpan2port@":https://trac.macports.org/wiki/howto/cpan2port, then modified to comply with the rules and practices used by contributors MacPorts. For updated modules, a copy of the available port in MacPorts was adapted for the installation of the new version of the tool.
88 4 Joël Brogniart
89 4 Joël Brogniart
h4. @perl/p5-email-abstract/Portfile@
90 4 Joël Brogniart
<pre title="perl/p5-email-abstract/Portfile">PortSystem          1.0
91 4 Joël Brogniart
PortGroup           perl5 1.0
92 4 Joël Brogniart
93 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
94 4 Joël Brogniart
perl5.setup         Email-Abstract 3.004
95 4 Joël Brogniart
license             {Artistic-1 GPL}
96 4 Joël Brogniart
maintainers         nomaintainer
97 4 Joël Brogniart
description         Email::Abstract - unified interface to mail representations
98 4 Joël Brogniart
long_description    Email::Abstract provides module writers with the ability \
99 4 Joël Brogniart
                    to write simple, representation-independent mail handling \
100 4 Joël Brogniart
                    code. For instance, in the cases of Mail::Thread or \
101 4 Joël Brogniart
                    Mail::ListDetector, a key part of the code involves \
102 4 Joël Brogniart
                    reading the headers from a mail object. Where previously \
103 4 Joël Brogniart
                    one would either have to specify the mail class required, \
104 4 Joël Brogniart
                    or to build a new object from scratch, Email::Abstract can \
105 4 Joël Brogniart
                    be used to perform certain simple operations on an object \
106 4 Joël Brogniart
                    regardless of its underlying representation. \
107 4 Joël Brogniart
                    \
108 4 Joël Brogniart
                    Email::Abstract currently supports Mail::Internet, \
109 4 Joël Brogniart
                    MIME::Entity, Mail::Message, Email::Simple and \
110 4 Joël Brogniart
                    Email::MIME. Other representations are encouraged to \
111 4 Joël Brogniart
                    create their own Email::Abstract::* class by copying \
112 4 Joël Brogniart
                    Email::Abstract::EmailSimple. All modules installed under \
113 4 Joël Brogniart
                    the Email::Abstract hierarchy will be automatically \
114 4 Joël Brogniart
                    picked up and used.
115 4 Joël Brogniart
116 4 Joël Brogniart
platforms           darwin
117 4 Joël Brogniart
supported_archs     noarch
118 4 Joël Brogniart
119 4 Joël Brogniart
checksums           sha256 0d195361c1168b2e890b94aeae6b7b4f2d3eaf6664df18f178c543c1fa532a3a \
120 4 Joël Brogniart
                    rmd160 a6a99eb1c250392c55ee216c79897796c7c8501b
121 4 Joël Brogniart
122 4 Joël Brogniart
if {${perl5.major} != ""} {
123 4 Joël Brogniart
depends_lib-append  port:p${perl5.major}-email-simple \
124 4 Joël Brogniart
                    port:p${perl5.major}-mro-compat
125 4 Joël Brogniart
126 4 Joël Brogniart
}</pre>
127 4 Joël Brogniart
128 4 Joël Brogniart
129 4 Joël Brogniart
130 4 Joël Brogniart
131 4 Joël Brogniart
132 4 Joël Brogniart
h4. @perl/p5-email-sender/Portfile@
133 4 Joël Brogniart
<pre title="perl/p5-email-sender/Portfile">PortSystem          1.0
134 4 Joël Brogniart
PortGroup           perl5 1.0
135 4 Joël Brogniart
136 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
137 4 Joël Brogniart
perl5.setup         Email-Sender 1.300006
138 4 Joël Brogniart
license             {Artistic-1 GPL}
139 4 Joël Brogniart
maintainers         nomaintainer
140 4 Joël Brogniart
description         Email::Sender - a library for sending email
141 4 Joël Brogniart
long_description    Email::Sender replaces the old and sometimes problematic \
142 4 Joël Brogniart
                    Email::Send library, which did a decent job at handling \
143 4 Joël Brogniart
                    very simple email sending tasks, but was not suitable for \
144 4 Joël Brogniart
                    serious use, for a variety of reasons.
145 4 Joël Brogniart
146 4 Joël Brogniart
platforms           darwin
147 4 Joël Brogniart
supported_archs     noarch
148 4 Joël Brogniart
149 4 Joël Brogniart
checksums           sha256 860fd72a906f1de8755d7e9c791a1d2517229a997c4612199d949eb0857cfbff \
150 4 Joël Brogniart
                    rmd160 d37ba19b3bdc961dd9c96a72ab8ed987cb65e7ff
151 4 Joël Brogniart
152 4 Joël Brogniart
if {${perl5.major} != ""} {
153 4 Joël Brogniart
depends_lib-append  port:p${perl5.major}-try-tiny \
154 4 Joël Brogniart
                    port:p${perl5.major}-capture-tiny \
155 4 Joël Brogniart
                    port:p${perl5.major}-moo \
156 4 Joël Brogniart
                    port:p${perl5.major}-sub-exporter \
157 4 Joël Brogniart
                    port:p${perl5.major}-throwable \
158 4 Joël Brogniart
                    port:p${perl5.major}-module-runtime \
159 4 Joël Brogniart
                    port:p${perl5.major}-moox-types-mooselike \
160 4 Joël Brogniart
                    port:p${perl5.major}-email-abstract \
161 4 Joël Brogniart
                    port:p${perl5.major}-email-simple \
162 4 Joël Brogniart
                    port:p${perl5.major}-list-moreutils \
163 4 Joël Brogniart
                    port:p${perl5.major}-email-address
164 4 Joël Brogniart
}</pre>
165 4 Joël Brogniart
166 4 Joël Brogniart
h4. @perl/p5-moo/Portfile@
167 4 Joël Brogniart
<pre title="perl/p5-moo/Portfile"># -*- 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
168 4 Joël Brogniart
# $Id$
169 4 Joël Brogniart
170 4 Joël Brogniart
PortSystem          1.0
171 4 Joël Brogniart
PortGroup           perl5 1.0
172 4 Joël Brogniart
173 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
174 4 Joël Brogniart
perl5.setup         Moo 1.002000 ../by-authors/id/M/MS/MSTROUT
175 4 Joël Brogniart
license             {Artistic-1 GPL}
176 4 Joël Brogniart
maintainers         nomaintainer
177 4 Joël Brogniart
description         Moo - Minimalist Object Orientation (with Moose compatiblity)
178 4 Joël Brogniart
long_description    This module is an extremely light-weight subset of Moose \
179 4 Joël Brogniart
                    optimised for rapid startup and \"pay only for what you \
180 4 Joël Brogniart
                    use\". \
181 4 Joël Brogniart
                    \
182 4 Joël Brogniart
                    It also avoids depending on any XS modules to allow simple \
183 4 Joël Brogniart
                    deployments. The name Moo is based on the idea that it \
184 4 Joël Brogniart
                    provides almost -- but not quite -- two thirds of Moose. \
185 4 Joël Brogniart
                    \
186 4 Joël Brogniart
                    Unlike Mouse this module does not aim at full \
187 4 Joël Brogniart
                    compatibility with Moose's surface syntax, preferring \
188 4 Joël Brogniart
                    instead of provide full interoperability via the metaclass \
189 4 Joël Brogniart
                    inflation capabilities described in \"MOO AND MOOSE\".
190 4 Joël Brogniart
191 4 Joël Brogniart
platforms           darwin
192 4 Joël Brogniart
supported_archs       noarch
193 4 Joël Brogniart
194 4 Joël Brogniart
checksums           sha256 4b8284c183a0a0bae0449c51fe5f22d96510192dd990dc905689db8f662c68a1 \
195 4 Joël Brogniart
                    rmd160 a8a77e43968856048c2c137e0d9fbfe0c4d99132
196 4 Joël Brogniart
197 4 Joël Brogniart
if {${perl5.major} != ""} {
198 4 Joël Brogniart
depends_lib-append  port:p${perl5.major}-devel-globaldestruction \
199 4 Joël Brogniart
                    port:p${perl5.major}-strictures \
200 4 Joël Brogniart
                    port:p${perl5.major}-role-tiny \
201 4 Joël Brogniart
                    port:p${perl5.major}-module-runtime \
202 4 Joël Brogniart
                    port:p${perl5.major}-class-method-modifiers
203 4 Joël Brogniart
depends_build-append port:p${perl5.major}-test-fatal
204 4 Joël Brogniart
}</pre>
205 4 Joël Brogniart
206 4 Joël Brogniart
h4. @perl/p5-moox-types-mooselike/Portfile@
207 4 Joël Brogniart
<pre title="perl/p5-moox-types-mooselike/Portfile">PortSystem          1.0
208 4 Joël Brogniart
PortGroup           perl5 1.0
209 4 Joël Brogniart
210 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
211 4 Joël Brogniart
perl5.setup         MooX-Types-MooseLike 0.23
212 4 Joël Brogniart
license             {Artistic-1 GPL}
213 4 Joël Brogniart
maintainers         nomaintainer
214 4 Joël Brogniart
description         MooX::Types::MooseLike - some Moosish types and a type builder
215 4 Joël Brogniart
long_description    ${description}
216 4 Joël Brogniart
217 4 Joël Brogniart
platforms           darwin
218 4 Joël Brogniart
supported_archs       noarch
219 4 Joël Brogniart
220 4 Joël Brogniart
checksums           sha256 6b4a9b079490cdce9c6ca4f1211ce853da3367801ca35360e0f0c63495dd5f48 \
221 4 Joël Brogniart
                    rmd160 6cb1ba26bf37fc8adc105676735e067500d21e14
222 4 Joël Brogniart
223 4 Joël Brogniart
if {${perl5.major} != ""} {
224 4 Joël Brogniart
depends_lib-append  port:p${perl5.major}-moo \
225 4 Joël Brogniart
                    port:p${perl5.major}-module-runtime
226 4 Joël Brogniart
depends_build-append port:p${perl5.major}-test-fatal
227 4 Joël Brogniart
}</pre>
228 4 Joël Brogniart
229 4 Joël Brogniart
h4. @perl/p5-role-tiny/Portfile@
230 4 Joël Brogniart
<pre title="perl/p5-role-tiny/Portfile">PortSystem          1.0
231 4 Joël Brogniart
PortGroup           perl5 1.0
232 4 Joël Brogniart
233 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
234 4 Joël Brogniart
perl5.setup         Role-Tiny 1.002005 ../by-authors/id/M/MS/MSTROUT
235 4 Joël Brogniart
license             {Artistic-1 GPL}
236 4 Joël Brogniart
maintainers         nomaintainer
237 4 Joël Brogniart
description         Role::Tiny - Roles. Like a nouvelle cuisine portion size slice of Moose.
238 4 Joël Brogniart
long_description    Role::Tiny is a minimalist role composition tool.
239 4 Joël Brogniart
240 4 Joël Brogniart
platforms           darwin
241 4 Joël Brogniart
supported_archs     noarch
242 4 Joël Brogniart
243 4 Joël Brogniart
checksums           sha256 3905f99efd3b604a5de83265914aaa0ead1dcb45c6e38b58c24a2de0309e5bee \
244 4 Joël Brogniart
                    rmd160 aabe3136c2a3877ef6d110b5873c935673985d91
245 4 Joël Brogniart
246 4 Joël Brogniart
if {${perl5.major} != ""} {
247 4 Joël Brogniart
depends_lib-append  port:p${perl5.major}-test-fatal
248 4 Joël Brogniart
}</pre>
249 4 Joël Brogniart
250 4 Joël Brogniart
h4. @perl/p5-strictures/Portfile@
251 4 Joël Brogniart
<pre title="perl/p5-strictures/Portfile">PortSystem          1.0
252 4 Joël Brogniart
PortGroup           perl5 1.0
253 4 Joël Brogniart
254 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
255 4 Joël Brogniart
perl5.setup         strictures 1.004004 ../by-authors/id/E/ET/ETHER
256 4 Joël Brogniart
license             {Artistic-1 GPL}
257 4 Joël Brogniart
platforms           darwin
258 4 Joël Brogniart
maintainers         nomaintainer
259 4 Joël Brogniart
description         strictures - turn on strict and make all warnings fatal.
260 4 Joël Brogniart
long_description    ${description}
261 4 Joël Brogniart
262 4 Joël Brogniart
checksums           sha256 12117dbaaaa85e07cbf01d95927ecb5ba8d5ed896c18d7dbc6b4be47b255ee34 \
263 4 Joël Brogniart
                    rmd160 e9638bdb9621637b457f039913185f1fcf012aa4
264 4 Joël Brogniart
265 4 Joël Brogniart
supported_archs     noarch</pre>
266 4 Joël Brogniart
267 4 Joël Brogniart
h4. @perl/p5-throwable/Portfile@
268 4 Joël Brogniart
<pre title="perl/p5-throwable/Portfile"># -*- 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
269 4 Joël Brogniart
# $Id$
270 4 Joël Brogniart
271 4 Joël Brogniart
PortSystem          1.0
272 4 Joël Brogniart
PortGroup           perl5 1.0
273 4 Joël Brogniart
274 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
275 4 Joël Brogniart
perl5.setup         Throwable 0.200008 ../by-authors/id/R/RJ/RJBS
276 4 Joël Brogniart
license             {Artistic-1 GPL}
277 4 Joël Brogniart
maintainers         nomaintainer
278 4 Joël Brogniart
description         Throwable - a role for classes that can be thrown
279 4 Joël Brogniart
long_description    Throwable is a role for classes that are meant to be \
280 4 Joël Brogniart
                    thrown as exceptions to standard program flow. It is \
281 4 Joël Brogniart
                    very simple and does only two things: saves any previous \
282 4 Joël Brogniart
                    value for \$@ and calls die \$self.
283 4 Joël Brogniart
284 4 Joël Brogniart
platforms           darwin
285 4 Joël Brogniart
supported_archs       noarch
286 4 Joël Brogniart
287 4 Joël Brogniart
checksums           sha256 d08d51862417031d1a47e0645517a9b4d3669b651e93ddbfe27728514118bc79 \
288 4 Joël Brogniart
                    rmd160 a69dc110d8d1d5b28f9dd5992a6ca0d45a85aed3
289 4 Joël Brogniart
290 4 Joël Brogniart
if {${perl5.major} != ""} {
291 4 Joël Brogniart
depends_lib-append  port:p${perl5.major}-moox-types-mooselike \
292 4 Joël Brogniart
                    port:p${perl5.major}-devel-stacktrace \
293 4 Joël Brogniart
                    port:p${perl5.major}-class-load \
294 4 Joël Brogniart
                    port:p${perl5.major}-moo
295 4 Joël Brogniart
}</pre>
296 4 Joël Brogniart
297 4 Joël Brogniart
h4. @x11/auto-multiple-choice-devel/Portfile@
298 4 Joël Brogniart
<pre title="x11/auto-multiple-choice-devel/Portfile"># -*- 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
299 4 Joël Brogniart
# $Id: Portfile 96038 2012-07-30 02:14:11Z dports@macports.org $
300 4 Joël Brogniart
301 4 Joël Brogniart
PortSystem              1.0
302 4 Joël Brogniart
 
303 4 Joël Brogniart
name                    auto-multiple-choice-devel
304 4 Joël Brogniart
svn.revision            1377
305 4 Joël Brogniart
version                 1.2.0.${svn.revision}
306 4 Joël Brogniart
categories              x11 tex education
307 4 Joël Brogniart
platforms               darwin
308 4 Joël Brogniart
license                 GPL-2+
309 4 Joël Brogniart
maintainers             nomaintainer
310 4 Joël Brogniart
311 4 Joël Brogniart
description             Auto Multiple Choice - Multiple Choice Papers Management
312 4 Joël Brogniart
long_description        Utility to manage multiple choice questionnaires, \
313 4 Joël Brogniart
                        with optionally mixed questions and answers. \
314 4 Joël Brogniart
                        AMC provides automatic marking from papers' scans. \
315 4 Joël Brogniart
                        Annotated papers are produced. Marks can be exported \
316 4 Joël Brogniart
                        as an OpenOffice.org sheet file. \
317 4 Joël Brogniart
                        \
318 4 Joël Brogniart
                        This version can't print. Documents should be printed from OS X.
319 4 Joël Brogniart
320 4 Joël Brogniart
homepage                http://home.gna.org/auto-qcm
321 4 Joël Brogniart
conflicts               auto-multiple-choice
322 4 Joël Brogniart
323 4 Joël Brogniart
depends_build-append    port:dblatex \
324 4 Joël Brogniart
                        port:p5.12-xml-libxml
325 4 Joël Brogniart
depends_lib             port:opencv
326 4 Joël Brogniart
depends_run             port:p5.12-gtk2 \
327 4 Joël Brogniart
                        port:p5.12-xml-simple \
328 4 Joël Brogniart
                        port:p5.12-xml-writer \
329 4 Joël Brogniart
                        port:p5.12-archive-zip \
330 4 Joël Brogniart
                        port:p5.12-locale-gettext \
331 4 Joël Brogniart
                        port:p5.12-digest-md5 \
332 4 Joël Brogniart
                        port:p5.12-module-load-conditional \
333 4 Joël Brogniart
                        port:p5.12-perlmagick \
334 4 Joël Brogniart
                        port:p5.12-openoffice-oodoc \
335 4 Joël Brogniart
                        port:p5.12-file-mimeinfo \
336 4 Joël Brogniart
                        port:p5.12-dbd-sqlite \
337 4 Joël Brogniart
                        port:p5.12-text-csv \
338 4 Joël Brogniart
                        port:p5.12-file-basedir \
339 4 Joël Brogniart
                        port:p5.12-email-mime \
340 4 Joël Brogniart
                        port:p5.12-email-sender \
341 4 Joël Brogniart
                        port:sqlite3 \
342 4 Joël Brogniart
                        port:poppler \
343 4 Joël Brogniart
                        port:netpbm \
344 4 Joël Brogniart
                        port:librsvg \
345 4 Joël Brogniart
                        port:gdk-pixbuf2
346 4 Joël Brogniart
347 4 Joël Brogniart
use_configure           no
348 4 Joël Brogniart
349 4 Joël Brogniart
fetch.type              svn
350 4 Joël Brogniart
svn.url                 svn://svn.gna.org/auto-qcm/trunk/
351 4 Joël Brogniart
worksrcdir              trunk
352 4 Joël Brogniart
353 4 Joël Brogniart
build.args              AMCCONF=macports \
354 4 Joël Brogniart
                        BASEPATH=${prefix} \
355 4 Joël Brogniart
                        LATEX_FREE=1 \
356 4 Joël Brogniart
                        GCC_PP="${configure.cc} ${configure.cc_archflags}"
357 4 Joël Brogniart
358 4 Joël Brogniart
# When building from source, some files should be configured before.
359 4 Joël Brogniart
# This pre-configuration use the make tool, not the configure tool.
360 4 Joël Brogniart
pre-build {
361 4 Joël Brogniart
    system -W ${worksrcpath} "${build.cmd} version_files"
362 4 Joël Brogniart
}
363 4 Joël Brogniart
364 4 Joël Brogniart
# When first installed auto-multiple-choice could fail to launch with
365 4 Joël Brogniart
# a "Format d'image non reconnu at /opt/local/lib/AMC/perl/AMC-gui.pl line 101"
366 4 Joël Brogniart
# ("Unknown image format?").
367 4 Joël Brogniart
# The following update cache command makes auto-multiple-choice happy.
368 4 Joël Brogniart
post-activate {
369 4 Joël Brogniart
    system "${prefix}/bin/gdk-pixbuf-query-loaders --update-cache 2>&1"
370 4 Joël Brogniart
}
371 4 Joël Brogniart
372 4 Joël Brogniart
destroot.args           AMCCONF=macports \
373 4 Joël Brogniart
                        BASEPATH=${prefix}
374 4 Joël Brogniart
375 4 Joël Brogniart
variant latex description "Add LaTeX support" {
376 4 Joël Brogniart
    depends_run-append  port:texlive-latex-extra \
377 4 Joël Brogniart
                        port:texlive-latex-recommended \
378 4 Joël Brogniart
                        port:texlive-fonts-recommended \
379 4 Joël Brogniart
                        port:texlive-xetex
380 4 Joël Brogniart
381 4 Joël Brogniart
    build.args-delete   LATEX_FREE=1
382 4 Joël Brogniart
383 4 Joël Brogniart
    post-activate {
384 4 Joël Brogniart
        system "${prefix}/bin/mktexlsr 2>&1"
385 4 Joël Brogniart
    }
386 4 Joël Brogniart
387 4 Joël Brogniart
    post-deactivate {
388 4 Joël Brogniart
        system "${prefix}/bin/mktexlsr 2>&1"
389 4 Joël Brogniart
    }
390 4 Joël Brogniart
}
391 4 Joël Brogniart
392 4 Joël Brogniart
default_variants        +latex
393 4 Joël Brogniart
394 4 Joël Brogniart
livecheck.type          regex
395 4 Joël Brogniart
livecheck.url           http://svn.gna.org/viewcvs/auto-qcm/trunk/
396 4 Joël Brogniart
livecheck.version       ${svn.revision}
397 4 Joël Brogniart
livecheck.regex         {Revision (\d+)}</pre>
398 4 Joël Brogniart
399 4 Joël Brogniart
h2. Installing AMC
400 4 Joël Brogniart
401 4 Joël Brogniart
Once the files port set up, generate the index of new ports.
402 4 Joël Brogniart
<pre>cd ~/nix/macports
403 4 Joël Brogniart
portindex</pre>
404 4 Joël Brogniart
405 4 Joël Brogniart
Finally, install the development version of AMC can be launched.