Installing AMC with MacPorts on macOS

Version 6 (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 6 Joël Brogniart
The pictures where shamelessly stolen from Joël's page. I hope he won't mind untill I replace them with screen shots of my MAC.
6 1
7 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)
8 1
9 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. 
10 1
The question types can be one only choice, multiple choices, question, right / wrong answers etc.
11 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.
12 1
Linux is used as the develop environment, so it probably runs best there. Your mileage may vary.
13 1
14 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 
15 1
repository. This will give you the bleeding edge version.
16 1
17 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).
18 1
19 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.
20 1
21 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.
22 1
23 1
24 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.
25 1
26 2 Joël Brogniart
27 2 Joël Brogniart
28 2 Joël Brogniart
29 1
h2. Prerequisites
30 1
31 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.
32 1
33 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.
34 1
35 1
Linux Libertine font
36 1
37 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. 
38 1
39 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.
40 1
41 1
h3. MacPorts
42 1
43 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.
44 1
45 1
h2. MacPorts files installation (port) files
46 1
47 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. 
48 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.
49 2 Joël Brogniart
50 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.
51 2 Joël Brogniart
52 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.
53 2 Joël Brogniart
54 2 Joël Brogniart
h3. Local repository MacPorts
55 2 Joël Brogniart
56 2 Joël Brogniart
For MacPorts to use a local folder, you must create that local folder. 
57 2 Joël Brogniart
58 2 Joël Brogniart
<pre>mkdir -p ~/nix/macports</pre>
59 2 Joël Brogniart
60 2 Joël Brogniart
An archive containing files ports described here is available for download: attachment:macports.zip.
61 2 Joël Brogniart
62 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.
63 2 Joël Brogniart
* p5-email-abstract (module CPAN "Email::Abstract":http://search.cpan.org/~rjbs/Email-Abstract)
64 2 Joël Brogniart
* p5-email-sender (module CPAN "Email::Sender":http://search.cpan.org/~rjbs/Email-Sender)
65 2 Joël Brogniart
* p5-moo (module CPAN "Moo":http://search.cpan.org/~mstrout/Moo)
66 2 Joël Brogniart
* p5-moox-types-mooselike (module CPAN "Moox::Types::MooseLike":http://search.cpan.org/~mateu/MooX-Types-MooseLike)
67 2 Joël Brogniart
* p5-role-tiny (module CPAN "Role::Tiny":http://search.cpan.org/~ilmari/Role-Tiny)
68 2 Joël Brogniart
* p5-strictures (module CPAN "strictures":http://search.cpan.org/~ether/strictures)
69 2 Joël Brogniart
* p5-throwable (module CPAN "Throwable":http://search.cpan.org/~rjbs/Throwable)
70 2 Joël Brogniart
71 2 Joël Brogniart
-The following ports will be updated because the version currently available in MacPort is too old. -
72 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)
73 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)
74 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)
75 2 Joël Brogniart
76 2 Joël Brogniart
Here is a command to create the hierarchy.
77 2 Joël Brogniart
<pre>cd ~/nix/macports
78 2 Joël Brogniart
mkdir -p perl/p5-email-abstract perl/p5-email-sender perl/p5-moo \
79 2 Joël Brogniart
    perl/p5-moox-types-mooselike perl/p5-role-tiny perl/p5-strictures \
80 2 Joël Brogniart
    perl/p5-throwable x11/auto-multiple-choice-devel</pre>
81 2 Joël Brogniart
82 3 Joël Brogniart
This should produce: 
83 3 Joël Brogniart
84 3 Joël Brogniart
!port-hierarchy.png!
85 3 Joël Brogniart
86 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. 
87 4 Joël Brogniart
88 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.
89 4 Joël Brogniart
90 4 Joël Brogniart
h4. @perl/p5-email-abstract/Portfile@
91 4 Joël Brogniart
<pre title="perl/p5-email-abstract/Portfile">PortSystem          1.0
92 4 Joël Brogniart
PortGroup           perl5 1.0
93 4 Joël Brogniart
94 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
95 4 Joël Brogniart
perl5.setup         Email-Abstract 3.004
96 4 Joël Brogniart
license             {Artistic-1 GPL}
97 4 Joël Brogniart
maintainers         nomaintainer
98 4 Joël Brogniart
description         Email::Abstract - unified interface to mail representations
99 4 Joël Brogniart
long_description    Email::Abstract provides module writers with the ability \
100 4 Joël Brogniart
                    to write simple, representation-independent mail handling \
101 4 Joël Brogniart
                    code. For instance, in the cases of Mail::Thread or \
102 4 Joël Brogniart
                    Mail::ListDetector, a key part of the code involves \
103 4 Joël Brogniart
                    reading the headers from a mail object. Where previously \
104 4 Joël Brogniart
                    one would either have to specify the mail class required, \
105 4 Joël Brogniart
                    or to build a new object from scratch, Email::Abstract can \
106 4 Joël Brogniart
                    be used to perform certain simple operations on an object \
107 4 Joël Brogniart
                    regardless of its underlying representation. \
108 4 Joël Brogniart
                    \
109 4 Joël Brogniart
                    Email::Abstract currently supports Mail::Internet, \
110 4 Joël Brogniart
                    MIME::Entity, Mail::Message, Email::Simple and \
111 4 Joël Brogniart
                    Email::MIME. Other representations are encouraged to \
112 4 Joël Brogniart
                    create their own Email::Abstract::* class by copying \
113 4 Joël Brogniart
                    Email::Abstract::EmailSimple. All modules installed under \
114 4 Joël Brogniart
                    the Email::Abstract hierarchy will be automatically \
115 4 Joël Brogniart
                    picked up and used.
116 4 Joël Brogniart
117 4 Joël Brogniart
platforms           darwin
118 4 Joël Brogniart
supported_archs     noarch
119 4 Joël Brogniart
120 4 Joël Brogniart
checksums           sha256 0d195361c1168b2e890b94aeae6b7b4f2d3eaf6664df18f178c543c1fa532a3a \
121 4 Joël Brogniart
                    rmd160 a6a99eb1c250392c55ee216c79897796c7c8501b
122 4 Joël Brogniart
123 4 Joël Brogniart
if {${perl5.major} != ""} {
124 4 Joël Brogniart
depends_lib-append  port:p${perl5.major}-email-simple \
125 4 Joël Brogniart
                    port:p${perl5.major}-mro-compat
126 4 Joël Brogniart
127 4 Joël Brogniart
}</pre>
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
133 4 Joël Brogniart
h4. @perl/p5-email-sender/Portfile@
134 4 Joël Brogniart
<pre title="perl/p5-email-sender/Portfile">PortSystem          1.0
135 4 Joël Brogniart
PortGroup           perl5 1.0
136 4 Joël Brogniart
137 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
138 4 Joël Brogniart
perl5.setup         Email-Sender 1.300006
139 4 Joël Brogniart
license             {Artistic-1 GPL}
140 4 Joël Brogniart
maintainers         nomaintainer
141 4 Joël Brogniart
description         Email::Sender - a library for sending email
142 4 Joël Brogniart
long_description    Email::Sender replaces the old and sometimes problematic \
143 4 Joël Brogniart
                    Email::Send library, which did a decent job at handling \
144 4 Joël Brogniart
                    very simple email sending tasks, but was not suitable for \
145 4 Joël Brogniart
                    serious use, for a variety of reasons.
146 4 Joël Brogniart
147 4 Joël Brogniart
platforms           darwin
148 4 Joël Brogniart
supported_archs     noarch
149 4 Joël Brogniart
150 4 Joël Brogniart
checksums           sha256 860fd72a906f1de8755d7e9c791a1d2517229a997c4612199d949eb0857cfbff \
151 4 Joël Brogniart
                    rmd160 d37ba19b3bdc961dd9c96a72ab8ed987cb65e7ff
152 4 Joël Brogniart
153 4 Joël Brogniart
if {${perl5.major} != ""} {
154 4 Joël Brogniart
depends_lib-append  port:p${perl5.major}-try-tiny \
155 4 Joël Brogniart
                    port:p${perl5.major}-capture-tiny \
156 4 Joël Brogniart
                    port:p${perl5.major}-moo \
157 4 Joël Brogniart
                    port:p${perl5.major}-sub-exporter \
158 4 Joël Brogniart
                    port:p${perl5.major}-throwable \
159 4 Joël Brogniart
                    port:p${perl5.major}-module-runtime \
160 4 Joël Brogniart
                    port:p${perl5.major}-moox-types-mooselike \
161 4 Joël Brogniart
                    port:p${perl5.major}-email-abstract \
162 4 Joël Brogniart
                    port:p${perl5.major}-email-simple \
163 4 Joël Brogniart
                    port:p${perl5.major}-list-moreutils \
164 4 Joël Brogniart
                    port:p${perl5.major}-email-address
165 4 Joël Brogniart
}</pre>
166 4 Joël Brogniart
167 4 Joël Brogniart
h4. @perl/p5-moo/Portfile@
168 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
169 4 Joël Brogniart
# $Id$
170 4 Joël Brogniart
171 4 Joël Brogniart
PortSystem          1.0
172 4 Joël Brogniart
PortGroup           perl5 1.0
173 4 Joël Brogniart
174 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
175 4 Joël Brogniart
perl5.setup         Moo 1.002000 ../by-authors/id/M/MS/MSTROUT
176 4 Joël Brogniart
license             {Artistic-1 GPL}
177 4 Joël Brogniart
maintainers         nomaintainer
178 4 Joël Brogniart
description         Moo - Minimalist Object Orientation (with Moose compatiblity)
179 4 Joël Brogniart
long_description    This module is an extremely light-weight subset of Moose \
180 4 Joël Brogniart
                    optimised for rapid startup and \"pay only for what you \
181 4 Joël Brogniart
                    use\". \
182 4 Joël Brogniart
                    \
183 4 Joël Brogniart
                    It also avoids depending on any XS modules to allow simple \
184 4 Joël Brogniart
                    deployments. The name Moo is based on the idea that it \
185 4 Joël Brogniart
                    provides almost -- but not quite -- two thirds of Moose. \
186 4 Joël Brogniart
                    \
187 4 Joël Brogniart
                    Unlike Mouse this module does not aim at full \
188 4 Joël Brogniart
                    compatibility with Moose's surface syntax, preferring \
189 4 Joël Brogniart
                    instead of provide full interoperability via the metaclass \
190 4 Joël Brogniart
                    inflation capabilities described in \"MOO AND MOOSE\".
191 4 Joël Brogniart
192 4 Joël Brogniart
platforms           darwin
193 4 Joël Brogniart
supported_archs       noarch
194 4 Joël Brogniart
195 4 Joël Brogniart
checksums           sha256 4b8284c183a0a0bae0449c51fe5f22d96510192dd990dc905689db8f662c68a1 \
196 4 Joël Brogniart
                    rmd160 a8a77e43968856048c2c137e0d9fbfe0c4d99132
197 4 Joël Brogniart
198 4 Joël Brogniart
if {${perl5.major} != ""} {
199 4 Joël Brogniart
depends_lib-append  port:p${perl5.major}-devel-globaldestruction \
200 4 Joël Brogniart
                    port:p${perl5.major}-strictures \
201 4 Joël Brogniart
                    port:p${perl5.major}-role-tiny \
202 4 Joël Brogniart
                    port:p${perl5.major}-module-runtime \
203 4 Joël Brogniart
                    port:p${perl5.major}-class-method-modifiers
204 4 Joël Brogniart
depends_build-append port:p${perl5.major}-test-fatal
205 4 Joël Brogniart
}</pre>
206 4 Joël Brogniart
207 4 Joël Brogniart
h4. @perl/p5-moox-types-mooselike/Portfile@
208 4 Joël Brogniart
<pre title="perl/p5-moox-types-mooselike/Portfile">PortSystem          1.0
209 4 Joël Brogniart
PortGroup           perl5 1.0
210 4 Joël Brogniart
211 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
212 4 Joël Brogniart
perl5.setup         MooX-Types-MooseLike 0.23
213 4 Joël Brogniart
license             {Artistic-1 GPL}
214 4 Joël Brogniart
maintainers         nomaintainer
215 4 Joël Brogniart
description         MooX::Types::MooseLike - some Moosish types and a type builder
216 4 Joël Brogniart
long_description    ${description}
217 4 Joël Brogniart
218 4 Joël Brogniart
platforms           darwin
219 4 Joël Brogniart
supported_archs       noarch
220 4 Joël Brogniart
221 4 Joël Brogniart
checksums           sha256 6b4a9b079490cdce9c6ca4f1211ce853da3367801ca35360e0f0c63495dd5f48 \
222 4 Joël Brogniart
                    rmd160 6cb1ba26bf37fc8adc105676735e067500d21e14
223 4 Joël Brogniart
224 4 Joël Brogniart
if {${perl5.major} != ""} {
225 4 Joël Brogniart
depends_lib-append  port:p${perl5.major}-moo \
226 4 Joël Brogniart
                    port:p${perl5.major}-module-runtime
227 4 Joël Brogniart
depends_build-append port:p${perl5.major}-test-fatal
228 4 Joël Brogniart
}</pre>
229 4 Joël Brogniart
230 4 Joël Brogniart
h4. @perl/p5-role-tiny/Portfile@
231 4 Joël Brogniart
<pre title="perl/p5-role-tiny/Portfile">PortSystem          1.0
232 4 Joël Brogniart
PortGroup           perl5 1.0
233 4 Joël Brogniart
234 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
235 4 Joël Brogniart
perl5.setup         Role-Tiny 1.002005 ../by-authors/id/M/MS/MSTROUT
236 4 Joël Brogniart
license             {Artistic-1 GPL}
237 4 Joël Brogniart
maintainers         nomaintainer
238 4 Joël Brogniart
description         Role::Tiny - Roles. Like a nouvelle cuisine portion size slice of Moose.
239 4 Joël Brogniart
long_description    Role::Tiny is a minimalist role composition tool.
240 4 Joël Brogniart
241 4 Joël Brogniart
platforms           darwin
242 4 Joël Brogniart
supported_archs     noarch
243 4 Joël Brogniart
244 4 Joël Brogniart
checksums           sha256 3905f99efd3b604a5de83265914aaa0ead1dcb45c6e38b58c24a2de0309e5bee \
245 4 Joël Brogniart
                    rmd160 aabe3136c2a3877ef6d110b5873c935673985d91
246 4 Joël Brogniart
247 4 Joël Brogniart
if {${perl5.major} != ""} {
248 4 Joël Brogniart
depends_lib-append  port:p${perl5.major}-test-fatal
249 4 Joël Brogniart
}</pre>
250 4 Joël Brogniart
251 4 Joël Brogniart
h4. @perl/p5-strictures/Portfile@
252 4 Joël Brogniart
<pre title="perl/p5-strictures/Portfile">PortSystem          1.0
253 4 Joël Brogniart
PortGroup           perl5 1.0
254 4 Joël Brogniart
255 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
256 4 Joël Brogniart
perl5.setup         strictures 1.004004 ../by-authors/id/E/ET/ETHER
257 4 Joël Brogniart
license             {Artistic-1 GPL}
258 4 Joël Brogniart
platforms           darwin
259 4 Joël Brogniart
maintainers         nomaintainer
260 4 Joël Brogniart
description         strictures - turn on strict and make all warnings fatal.
261 4 Joël Brogniart
long_description    ${description}
262 4 Joël Brogniart
263 4 Joël Brogniart
checksums           sha256 12117dbaaaa85e07cbf01d95927ecb5ba8d5ed896c18d7dbc6b4be47b255ee34 \
264 4 Joël Brogniart
                    rmd160 e9638bdb9621637b457f039913185f1fcf012aa4
265 4 Joël Brogniart
266 4 Joël Brogniart
supported_archs     noarch</pre>
267 4 Joël Brogniart
268 4 Joël Brogniart
h4. @perl/p5-throwable/Portfile@
269 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
270 4 Joël Brogniart
# $Id$
271 4 Joël Brogniart
272 4 Joël Brogniart
PortSystem          1.0
273 4 Joël Brogniart
PortGroup           perl5 1.0
274 4 Joël Brogniart
275 4 Joël Brogniart
perl5.branches      5.8 5.10 5.12 5.14 5.16
276 4 Joël Brogniart
perl5.setup         Throwable 0.200008 ../by-authors/id/R/RJ/RJBS
277 4 Joël Brogniart
license             {Artistic-1 GPL}
278 4 Joël Brogniart
maintainers         nomaintainer
279 4 Joël Brogniart
description         Throwable - a role for classes that can be thrown
280 4 Joël Brogniart
long_description    Throwable is a role for classes that are meant to be \
281 4 Joël Brogniart
                    thrown as exceptions to standard program flow. It is \
282 4 Joël Brogniart
                    very simple and does only two things: saves any previous \
283 4 Joël Brogniart
                    value for \$@ and calls die \$self.
284 4 Joël Brogniart
285 4 Joël Brogniart
platforms           darwin
286 4 Joël Brogniart
supported_archs       noarch
287 4 Joël Brogniart
288 4 Joël Brogniart
checksums           sha256 d08d51862417031d1a47e0645517a9b4d3669b651e93ddbfe27728514118bc79 \
289 4 Joël Brogniart
                    rmd160 a69dc110d8d1d5b28f9dd5992a6ca0d45a85aed3
290 4 Joël Brogniart
291 4 Joël Brogniart
if {${perl5.major} != ""} {
292 4 Joël Brogniart
depends_lib-append  port:p${perl5.major}-moox-types-mooselike \
293 4 Joël Brogniart
                    port:p${perl5.major}-devel-stacktrace \
294 4 Joël Brogniart
                    port:p${perl5.major}-class-load \
295 4 Joël Brogniart
                    port:p${perl5.major}-moo
296 4 Joël Brogniart
}</pre>
297 4 Joël Brogniart
298 4 Joël Brogniart
h4. @x11/auto-multiple-choice-devel/Portfile@
299 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
300 4 Joël Brogniart
# $Id: Portfile 96038 2012-07-30 02:14:11Z dports@macports.org $
301 4 Joël Brogniart
302 4 Joël Brogniart
PortSystem              1.0
303 4 Joël Brogniart
 
304 4 Joël Brogniart
name                    auto-multiple-choice-devel
305 4 Joël Brogniart
svn.revision            1377
306 4 Joël Brogniart
version                 1.2.0.${svn.revision}
307 4 Joël Brogniart
categories              x11 tex education
308 4 Joël Brogniart
platforms               darwin
309 4 Joël Brogniart
license                 GPL-2+
310 4 Joël Brogniart
maintainers             nomaintainer
311 4 Joël Brogniart
312 4 Joël Brogniart
description             Auto Multiple Choice - Multiple Choice Papers Management
313 4 Joël Brogniart
long_description        Utility to manage multiple choice questionnaires, \
314 4 Joël Brogniart
                        with optionally mixed questions and answers. \
315 4 Joël Brogniart
                        AMC provides automatic marking from papers' scans. \
316 4 Joël Brogniart
                        Annotated papers are produced. Marks can be exported \
317 4 Joël Brogniart
                        as an OpenOffice.org sheet file. \
318 4 Joël Brogniart
                        \
319 4 Joël Brogniart
                        This version can't print. Documents should be printed from OS X.
320 4 Joël Brogniart
321 4 Joël Brogniart
homepage                http://home.gna.org/auto-qcm
322 4 Joël Brogniart
conflicts               auto-multiple-choice
323 4 Joël Brogniart
324 4 Joël Brogniart
depends_build-append    port:dblatex \
325 4 Joël Brogniart
                        port:p5.12-xml-libxml
326 4 Joël Brogniart
depends_lib             port:opencv
327 4 Joël Brogniart
depends_run             port:p5.12-gtk2 \
328 4 Joël Brogniart
                        port:p5.12-xml-simple \
329 4 Joël Brogniart
                        port:p5.12-xml-writer \
330 4 Joël Brogniart
                        port:p5.12-archive-zip \
331 4 Joël Brogniart
                        port:p5.12-locale-gettext \
332 4 Joël Brogniart
                        port:p5.12-digest-md5 \
333 4 Joël Brogniart
                        port:p5.12-module-load-conditional \
334 4 Joël Brogniart
                        port:p5.12-perlmagick \
335 4 Joël Brogniart
                        port:p5.12-openoffice-oodoc \
336 4 Joël Brogniart
                        port:p5.12-file-mimeinfo \
337 4 Joël Brogniart
                        port:p5.12-dbd-sqlite \
338 4 Joël Brogniart
                        port:p5.12-text-csv \
339 4 Joël Brogniart
                        port:p5.12-file-basedir \
340 4 Joël Brogniart
                        port:p5.12-email-mime \
341 4 Joël Brogniart
                        port:p5.12-email-sender \
342 4 Joël Brogniart
                        port:sqlite3 \
343 4 Joël Brogniart
                        port:poppler \
344 4 Joël Brogniart
                        port:netpbm \
345 4 Joël Brogniart
                        port:librsvg \
346 4 Joël Brogniart
                        port:gdk-pixbuf2
347 4 Joël Brogniart
348 4 Joël Brogniart
use_configure           no
349 4 Joël Brogniart
350 4 Joël Brogniart
fetch.type              svn
351 4 Joël Brogniart
svn.url                 svn://svn.gna.org/auto-qcm/trunk/
352 4 Joël Brogniart
worksrcdir              trunk
353 4 Joël Brogniart
354 4 Joël Brogniart
build.args              AMCCONF=macports \
355 4 Joël Brogniart
                        BASEPATH=${prefix} \
356 4 Joël Brogniart
                        LATEX_FREE=1 \
357 4 Joël Brogniart
                        GCC_PP="${configure.cc} ${configure.cc_archflags}"
358 4 Joël Brogniart
359 4 Joël Brogniart
# When building from source, some files should be configured before.
360 4 Joël Brogniart
# This pre-configuration use the make tool, not the configure tool.
361 4 Joël Brogniart
pre-build {
362 4 Joël Brogniart
    system -W ${worksrcpath} "${build.cmd} version_files"
363 4 Joël Brogniart
}
364 4 Joël Brogniart
365 4 Joël Brogniart
# When first installed auto-multiple-choice could fail to launch with
366 4 Joël Brogniart
# a "Format d'image non reconnu at /opt/local/lib/AMC/perl/AMC-gui.pl line 101"
367 4 Joël Brogniart
# ("Unknown image format?").
368 4 Joël Brogniart
# The following update cache command makes auto-multiple-choice happy.
369 4 Joël Brogniart
post-activate {
370 4 Joël Brogniart
    system "${prefix}/bin/gdk-pixbuf-query-loaders --update-cache 2>&1"
371 4 Joël Brogniart
}
372 4 Joël Brogniart
373 4 Joël Brogniart
destroot.args           AMCCONF=macports \
374 4 Joël Brogniart
                        BASEPATH=${prefix}
375 4 Joël Brogniart
376 4 Joël Brogniart
variant latex description "Add LaTeX support" {
377 4 Joël Brogniart
    depends_run-append  port:texlive-latex-extra \
378 4 Joël Brogniart
                        port:texlive-latex-recommended \
379 4 Joël Brogniart
                        port:texlive-fonts-recommended \
380 4 Joël Brogniart
                        port:texlive-xetex
381 4 Joël Brogniart
382 4 Joël Brogniart
    build.args-delete   LATEX_FREE=1
383 4 Joël Brogniart
384 4 Joël Brogniart
    post-activate {
385 4 Joël Brogniart
        system "${prefix}/bin/mktexlsr 2>&1"
386 4 Joël Brogniart
    }
387 4 Joël Brogniart
388 4 Joël Brogniart
    post-deactivate {
389 4 Joël Brogniart
        system "${prefix}/bin/mktexlsr 2>&1"
390 4 Joël Brogniart
    }
391 4 Joël Brogniart
}
392 4 Joël Brogniart
393 4 Joël Brogniart
default_variants        +latex
394 4 Joël Brogniart
395 4 Joël Brogniart
livecheck.type          regex
396 4 Joël Brogniart
livecheck.url           http://svn.gna.org/viewcvs/auto-qcm/trunk/
397 4 Joël Brogniart
livecheck.version       ${svn.revision}
398 4 Joël Brogniart
livecheck.regex         {Revision (\d+)}</pre>
399 4 Joël Brogniart
400 4 Joël Brogniart
h2. Installing AMC
401 4 Joël Brogniart
402 4 Joël Brogniart
Once the files port set up, generate the index of new ports.
403 4 Joël Brogniart
<pre>cd ~/nix/macports
404 4 Joël Brogniart
portindex</pre>
405 4 Joël Brogniart
406 4 Joël Brogniart
Finally, install the development version of AMC can be launched.
407 5 Joël Brogniart
408 5 Joël Brogniart
<pre>sudo port install auto-multiple-choice-devel</pre>
409 5 Joël Brogniart
410 5 Joël Brogniart
AMC is ready to be used.
411 5 Joël Brogniart
412 5 Joël Brogniart
*Warning*: standard and development of AMC versions can be installed simultaneously. If a standard version was previously installed, you must uninstall it before installing the development version.
413 5 Joël Brogniart
414 5 Joël Brogniart
<pre>sudo port uninstall auto-multiple-choice</pre>
415 5 Joël Brogniart
416 5 Joël Brogniart
h2. Using AMC
417 5 Joël Brogniart
418 5 Joël Brogniart
You can start from the terminal or from XQuartz.
419 5 Joël Brogniart
420 5 Joël Brogniart
h3. In the  Terminal
421 5 Joël Brogniart
422 5 Joël Brogniart
<pre>auto-multiple-choice-devel</pre>
423 5 Joël Brogniart
424 5 Joël Brogniart
This command will launch XQuartz and AMC application.
425 5 Joël Brogniart
426 5 Joël Brogniart
h3. in XQuartz
427 5 Joël Brogniart
428 5 Joël Brogniart
Start XQuartz application.
429 5 Joël Brogniart
430 5 Joël Brogniart
!xquartz.png!
431 5 Joël Brogniart
432 5 Joël Brogniart
We can immediately set XQuartz to facilitate the launch of AMC. Open the @Applications menu>Customize...@.
433 5 Joël Brogniart
434 5 Joël Brogniart
!xquartz-menu-applications-personnaliser.png!
435 5 Joël Brogniart
436 5 Joël Brogniart
In the Personalization window, click the button@Add an entry@.
437 5 Joël Brogniart
!xquartz-fenetre-personnaliser-menu-applications.png!
438 5 Joël Brogniart
439 5 Joël Brogniart
Set "Auto Multiple Choice @ @" in the column and @ name @ "@ auto-multiple-choice @" in the @ @ Command column of the new menu item.
440 5 Joël Brogniart
441 5 Joël Brogniart
! XQuartz-window-customize-menu-applications-2.png!
442 5 Joël Brogniart
443 5 Joël Brogniart
Close the Customize window then select the Applications menu @> @ Auto Multiple Choice.
444 5 Joël Brogniart
445 5 Joël Brogniart
! XQuartz-menu-applications-amc.png!
446 5 Joël Brogniart
447 5 Joël Brogniart
AMC window should appear.
448 5 Joël Brogniart
449 5 Joël Brogniart
community auto-multiple-choice-window.png!
450 5 Joël Brogniart
451 5 Joël Brogniart
Except for printing, everything should work.
452 5 Joël Brogniart
453 5 Joël Brogniart
h2. Links
454 5 Joël Brogniart
455 5 Joël Brogniart
      
456 5 Joël Brogniart
* Auto Multiple Choice, "http://home.gna.org/auto-qcm/":http://home.gna.org/auto-qcm/.
457 5 Joël Brogniart
* Auto Multiple Choice "(version 1.1.1) - installation sous OS X Mountain Lion (10.8)":http://project.auto-multiple-choice.net/projects/auto-multiple-choice/wiki/Installation_d'AMC_sous_OS_X_Mountain_Lion.
458 5 Joël Brogniart
* MacPorts, "http://www.macports.org":http://www.macports.org.
459 5 Joël Brogniart
* MacPorts, "Local Portfile Repositories":http://guide.macports.org/#development.local-repositories.
460 5 Joël Brogniart
* MacPorts, "How to create portfiles for CPAN Perl modules":https://trac.macports.org/wiki/howto/cpan2port.
461 5 Joël Brogniart
* Famille de polices Linux Libertine, "LinuxLibertine.org":http://www.linuxlibertine.org.
462 5 Joël Brogniart
* XQuartz, http://xquartz.macosforge.org</a>.
463 5 Joël Brogniart
464 5 Joël Brogniart
No I have studied it by translating, and see if it will work on my MAC with OSX 10.7 something.
465 5 Joël Brogniart
Thanks to Joël Brogniart