Installing AMC with MacPorts on macOS
Version 4 (Pieter Van den Hombergh, 03/23/2024 09:13 am) → Version 5/46 (Pieter Van den Hombergh, 03/23/2024 09:13 am)
h1. Building AMC for MAC OSX
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.
(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)
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.
The question types can be one only choice, multiple choices, question, right / wrong answers etc.
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.
Linux is used as the develop environment, so it probably runs best there. Your mileage may vary.
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
repository. This will give you the bleeding edge version.
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).
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.
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.
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.
h2. Prerequisites
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.
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.
Linux Libertine font
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.
*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.
h3. MacPorts
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.
h2. MacPorts files installation (port) files
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.
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.
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.
*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.
h3. Local repository MacPorts
For MacPorts to use a local folder, you must create that local folder.
<pre>mkdir -p ~/nix/macports</pre>
An archive containing files ports described here is available for download: attachment:macports.zip.
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.
* p5-email-abstract (module CPAN "Email::Abstract":http://search.cpan.org/~rjbs/Email-Abstract)
* p5-email-sender (module CPAN "Email::Sender":http://search.cpan.org/~rjbs/Email-Sender)
* p5-moo (module CPAN "Moo":http://search.cpan.org/~mstrout/Moo)
* p5-moox-types-mooselike (module CPAN "Moox::Types::MooseLike":http://search.cpan.org/~mateu/MooX-Types-MooseLike)
* p5-role-tiny (module CPAN "Role::Tiny":http://search.cpan.org/~ilmari/Role-Tiny)
* p5-strictures (module CPAN "strictures":http://search.cpan.org/~ether/strictures)
* p5-throwable (module CPAN "Throwable":http://search.cpan.org/~rjbs/Throwable)
-The following ports will be updated because the version currently available in MacPort is too old. -
* -p5-class-load (module CPAN "Class::Load":http://search.cpan.org/~drolsky/Class-Load)- (plus nécessaire, mis à jour dans MacPorts)
* -p5-email-mime (module CPAN "Email::MIME":http://search.cpan.org/~rjbs/Email-MIME)- (plus nécessaire, mis à jour dans MacPorts)
* -p5-email-simple (module CPAN "Email::Simple":http://search.cpan.org/~rjbs/Email-Simple)- (plus nécessaire, mis à jour dans MacPorts)
Here is a command to create the hierarchy.
<pre>cd ~/nix/macports
mkdir -p perl/p5-email-abstract perl/p5-email-sender perl/p5-moo \
perl/p5-moox-types-mooselike perl/p5-role-tiny perl/p5-strictures \
perl/p5-throwable x11/auto-multiple-choice-devel</pre>
This should produce:
!port-hierarchy.png!
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.
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.
h4. @perl/p5-email-abstract/Portfile@
<pre title="perl/p5-email-abstract/Portfile">PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup Email-Abstract 3.004
license {Artistic-1 GPL}
maintainers nomaintainer
description Email::Abstract - unified interface to mail representations
long_description Email::Abstract provides module writers with the ability \
to write simple, representation-independent mail handling \
code. For instance, in the cases of Mail::Thread or \
Mail::ListDetector, a key part of the code involves \
reading the headers from a mail object. Where previously \
one would either have to specify the mail class required, \
or to build a new object from scratch, Email::Abstract can \
be used to perform certain simple operations on an object \
regardless of its underlying representation. \
\
Email::Abstract currently supports Mail::Internet, \
MIME::Entity, Mail::Message, Email::Simple and \
Email::MIME. Other representations are encouraged to \
create their own Email::Abstract::* class by copying \
Email::Abstract::EmailSimple. All modules installed under \
the Email::Abstract hierarchy will be automatically \
picked up and used.
platforms darwin
supported_archs noarch
checksums sha256 0d195361c1168b2e890b94aeae6b7b4f2d3eaf6664df18f178c543c1fa532a3a \
rmd160 a6a99eb1c250392c55ee216c79897796c7c8501b
if {${perl5.major} != ""} {
depends_lib-append port:p${perl5.major}-email-simple \
port:p${perl5.major}-mro-compat
}</pre>
h4. @perl/p5-email-sender/Portfile@
<pre title="perl/p5-email-sender/Portfile">PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup Email-Sender 1.300006
license {Artistic-1 GPL}
maintainers nomaintainer
description Email::Sender - a library for sending email
long_description Email::Sender replaces the old and sometimes problematic \
Email::Send library, which did a decent job at handling \
very simple email sending tasks, but was not suitable for \
serious use, for a variety of reasons.
platforms darwin
supported_archs noarch
checksums sha256 860fd72a906f1de8755d7e9c791a1d2517229a997c4612199d949eb0857cfbff \
rmd160 d37ba19b3bdc961dd9c96a72ab8ed987cb65e7ff
if {${perl5.major} != ""} {
depends_lib-append port:p${perl5.major}-try-tiny \
port:p${perl5.major}-capture-tiny \
port:p${perl5.major}-moo \
port:p${perl5.major}-sub-exporter \
port:p${perl5.major}-throwable \
port:p${perl5.major}-module-runtime \
port:p${perl5.major}-moox-types-mooselike \
port:p${perl5.major}-email-abstract \
port:p${perl5.major}-email-simple \
port:p${perl5.major}-list-moreutils \
port:p${perl5.major}-email-address
}</pre>
h4. @perl/p5-moo/Portfile@
<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
# $Id$
PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup Moo 1.002000 ../by-authors/id/M/MS/MSTROUT
license {Artistic-1 GPL}
maintainers nomaintainer
description Moo - Minimalist Object Orientation (with Moose compatiblity)
long_description This module is an extremely light-weight subset of Moose \
optimised for rapid startup and \"pay only for what you \
use\". \
\
It also avoids depending on any XS modules to allow simple \
deployments. The name Moo is based on the idea that it \
provides almost -- but not quite -- two thirds of Moose. \
\
Unlike Mouse this module does not aim at full \
compatibility with Moose's surface syntax, preferring \
instead of provide full interoperability via the metaclass \
inflation capabilities described in \"MOO AND MOOSE\".
platforms darwin
supported_archs noarch
checksums sha256 4b8284c183a0a0bae0449c51fe5f22d96510192dd990dc905689db8f662c68a1 \
rmd160 a8a77e43968856048c2c137e0d9fbfe0c4d99132
if {${perl5.major} != ""} {
depends_lib-append port:p${perl5.major}-devel-globaldestruction \
port:p${perl5.major}-strictures \
port:p${perl5.major}-role-tiny \
port:p${perl5.major}-module-runtime \
port:p${perl5.major}-class-method-modifiers
depends_build-append port:p${perl5.major}-test-fatal
}</pre>
h4. @perl/p5-moox-types-mooselike/Portfile@
<pre title="perl/p5-moox-types-mooselike/Portfile">PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup MooX-Types-MooseLike 0.23
license {Artistic-1 GPL}
maintainers nomaintainer
description MooX::Types::MooseLike - some Moosish types and a type builder
long_description ${description}
platforms darwin
supported_archs noarch
checksums sha256 6b4a9b079490cdce9c6ca4f1211ce853da3367801ca35360e0f0c63495dd5f48 \
rmd160 6cb1ba26bf37fc8adc105676735e067500d21e14
if {${perl5.major} != ""} {
depends_lib-append port:p${perl5.major}-moo \
port:p${perl5.major}-module-runtime
depends_build-append port:p${perl5.major}-test-fatal
}</pre>
h4. @perl/p5-role-tiny/Portfile@
<pre title="perl/p5-role-tiny/Portfile">PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup Role-Tiny 1.002005 ../by-authors/id/M/MS/MSTROUT
license {Artistic-1 GPL}
maintainers nomaintainer
description Role::Tiny - Roles. Like a nouvelle cuisine portion size slice of Moose.
long_description Role::Tiny is a minimalist role composition tool.
platforms darwin
supported_archs noarch
checksums sha256 3905f99efd3b604a5de83265914aaa0ead1dcb45c6e38b58c24a2de0309e5bee \
rmd160 aabe3136c2a3877ef6d110b5873c935673985d91
if {${perl5.major} != ""} {
depends_lib-append port:p${perl5.major}-test-fatal
}</pre>
h4. @perl/p5-strictures/Portfile@
<pre title="perl/p5-strictures/Portfile">PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup strictures 1.004004 ../by-authors/id/E/ET/ETHER
license {Artistic-1 GPL}
platforms darwin
maintainers nomaintainer
description strictures - turn on strict and make all warnings fatal.
long_description ${description}
checksums sha256 12117dbaaaa85e07cbf01d95927ecb5ba8d5ed896c18d7dbc6b4be47b255ee34 \
rmd160 e9638bdb9621637b457f039913185f1fcf012aa4
supported_archs noarch</pre>
h4. @perl/p5-throwable/Portfile@
<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
# $Id$
PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup Throwable 0.200008 ../by-authors/id/R/RJ/RJBS
license {Artistic-1 GPL}
maintainers nomaintainer
description Throwable - a role for classes that can be thrown
long_description Throwable is a role for classes that are meant to be \
thrown as exceptions to standard program flow. It is \
very simple and does only two things: saves any previous \
value for \$@ and calls die \$self.
platforms darwin
supported_archs noarch
checksums sha256 d08d51862417031d1a47e0645517a9b4d3669b651e93ddbfe27728514118bc79 \
rmd160 a69dc110d8d1d5b28f9dd5992a6ca0d45a85aed3
if {${perl5.major} != ""} {
depends_lib-append port:p${perl5.major}-moox-types-mooselike \
port:p${perl5.major}-devel-stacktrace \
port:p${perl5.major}-class-load \
port:p${perl5.major}-moo
}</pre>
h4. @x11/auto-multiple-choice-devel/Portfile@
<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
# $Id: Portfile 96038 2012-07-30 02:14:11Z dports@macports.org $
PortSystem 1.0
name auto-multiple-choice-devel
svn.revision 1377
version 1.2.0.${svn.revision}
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 OpenOffice.org sheet file. \
\
This version can't print. Documents should be printed from OS X.
homepage http://home.gna.org/auto-qcm
conflicts auto-multiple-choice
depends_build-append port:dblatex \
port:p5.12-xml-libxml
depends_lib port:opencv
depends_run port:p5.12-gtk2 \
port:p5.12-xml-simple \
port:p5.12-xml-writer \
port:p5.12-archive-zip \
port:p5.12-locale-gettext \
port:p5.12-digest-md5 \
port:p5.12-module-load-conditional \
port:p5.12-perlmagick \
port:p5.12-openoffice-oodoc \
port:p5.12-file-mimeinfo \
port:p5.12-dbd-sqlite \
port:p5.12-text-csv \
port:p5.12-file-basedir \
port:p5.12-email-mime \
port:p5.12-email-sender \
port:sqlite3 \
port:poppler \
port:netpbm \
port:librsvg \
port:gdk-pixbuf2
use_configure no
fetch.type svn
svn.url svn://svn.gna.org/auto-qcm/trunk/
worksrcdir trunk
build.args AMCCONF=macports \
BASEPATH=${prefix} \
LATEX_FREE=1 \
GCC_PP="${configure.cc} ${configure.cc_archflags}"
# When building from source, some files should be configured before.
# This pre-configuration use the make tool, not the configure tool.
pre-build {
system -W ${worksrcpath} "${build.cmd} version_files"
}
# When first installed auto-multiple-choice could fail to launch with
# a "Format d'image non reconnu at /opt/local/lib/AMC/perl/AMC-gui.pl line 101"
# ("Unknown image format?").
# The following update cache command makes auto-multiple-choice happy.
post-activate {
system "${prefix}/bin/gdk-pixbuf-query-loaders --update-cache 2>&1"
}
destroot.args AMCCONF=macports \
BASEPATH=${prefix}
variant latex description "Add LaTeX support" {
depends_run-append port:texlive-latex-extra \
port:texlive-latex-recommended \
port:texlive-fonts-recommended \
port:texlive-xetex
build.args-delete LATEX_FREE=1
post-activate {
system "${prefix}/bin/mktexlsr 2>&1"
}
post-deactivate {
system "${prefix}/bin/mktexlsr 2>&1"
}
}
default_variants +latex
livecheck.type regex
livecheck.url http://svn.gna.org/viewcvs/auto-qcm/trunk/
livecheck.version ${svn.revision}
livecheck.regex {Revision (\d+)}</pre>
h2. Installing AMC
Once the files port set up, generate the index of new ports.
<pre>cd ~/nix/macports
portindex</pre>
Finally, install the development version of AMC can be launched.
<pre>sudo port install auto-multiple-choice-devel</pre>
AMC is ready to be used.
*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.
<pre>sudo port uninstall auto-multiple-choice</pre>
h2. Using AMC
You can start from the terminal or from XQuartz.
h3. In the Terminal
<pre>auto-multiple-choice-devel</pre>
This command will launch XQuartz and AMC application.
h3. in XQuartz
Start XQuartz application.
!xquartz.png!
We can immediately set XQuartz to facilitate the launch of AMC. Open the @Applications menu>Customize...@.
!xquartz-menu-applications-personnaliser.png!
In the Personalization window, click the button@Add an entry@.
!xquartz-fenetre-personnaliser-menu-applications.png!
Set "Auto Multiple Choice @ @" in the column and @ name @ "@ auto-multiple-choice @" in the @ @ Command column of the new menu item.
! XQuartz-window-customize-menu-applications-2.png!
Close the Customize window then select the Applications menu @> @ Auto Multiple Choice.
! XQuartz-menu-applications-amc.png!
AMC window should appear.
community auto-multiple-choice-window.png!
Except for printing, everything should work.
h2. Links
* Auto Multiple Choice, "http://home.gna.org/auto-qcm/":http://home.gna.org/auto-qcm/.
* 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.
* MacPorts, "http://www.macports.org":http://www.macports.org.
* MacPorts, "Local Portfile Repositories":http://guide.macports.org/#development.local-repositories.
* MacPorts, "How to create portfiles for CPAN Perl modules":https://trac.macports.org/wiki/howto/cpan2port.
* Famille de polices Linux Libertine, "LinuxLibertine.org":http://www.linuxlibertine.org.
* XQuartz, http://xquartz.macosforge.org</a>.
No I have studied it by translating, and see if it will work on my MAC with OSX 10.7 something.
Thanks to Joël Brogniart
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.
(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)
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.
The question types can be one only choice, multiple choices, question, right / wrong answers etc.
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.
Linux is used as the develop environment, so it probably runs best there. Your mileage may vary.
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
repository. This will give you the bleeding edge version.
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).
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.
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.
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.
h2. Prerequisites
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.
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.
Linux Libertine font
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.
*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.
h3. MacPorts
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.
h2. MacPorts files installation (port) files
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.
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.
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.
*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.
h3. Local repository MacPorts
For MacPorts to use a local folder, you must create that local folder.
<pre>mkdir -p ~/nix/macports</pre>
An archive containing files ports described here is available for download: attachment:macports.zip.
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.
* p5-email-abstract (module CPAN "Email::Abstract":http://search.cpan.org/~rjbs/Email-Abstract)
* p5-email-sender (module CPAN "Email::Sender":http://search.cpan.org/~rjbs/Email-Sender)
* p5-moo (module CPAN "Moo":http://search.cpan.org/~mstrout/Moo)
* p5-moox-types-mooselike (module CPAN "Moox::Types::MooseLike":http://search.cpan.org/~mateu/MooX-Types-MooseLike)
* p5-role-tiny (module CPAN "Role::Tiny":http://search.cpan.org/~ilmari/Role-Tiny)
* p5-strictures (module CPAN "strictures":http://search.cpan.org/~ether/strictures)
* p5-throwable (module CPAN "Throwable":http://search.cpan.org/~rjbs/Throwable)
-The following ports will be updated because the version currently available in MacPort is too old. -
* -p5-class-load (module CPAN "Class::Load":http://search.cpan.org/~drolsky/Class-Load)- (plus nécessaire, mis à jour dans MacPorts)
* -p5-email-mime (module CPAN "Email::MIME":http://search.cpan.org/~rjbs/Email-MIME)- (plus nécessaire, mis à jour dans MacPorts)
* -p5-email-simple (module CPAN "Email::Simple":http://search.cpan.org/~rjbs/Email-Simple)- (plus nécessaire, mis à jour dans MacPorts)
Here is a command to create the hierarchy.
<pre>cd ~/nix/macports
mkdir -p perl/p5-email-abstract perl/p5-email-sender perl/p5-moo \
perl/p5-moox-types-mooselike perl/p5-role-tiny perl/p5-strictures \
perl/p5-throwable x11/auto-multiple-choice-devel</pre>
This should produce:
!port-hierarchy.png!
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.
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.
h4. @perl/p5-email-abstract/Portfile@
<pre title="perl/p5-email-abstract/Portfile">PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup Email-Abstract 3.004
license {Artistic-1 GPL}
maintainers nomaintainer
description Email::Abstract - unified interface to mail representations
long_description Email::Abstract provides module writers with the ability \
to write simple, representation-independent mail handling \
code. For instance, in the cases of Mail::Thread or \
Mail::ListDetector, a key part of the code involves \
reading the headers from a mail object. Where previously \
one would either have to specify the mail class required, \
or to build a new object from scratch, Email::Abstract can \
be used to perform certain simple operations on an object \
regardless of its underlying representation. \
\
Email::Abstract currently supports Mail::Internet, \
MIME::Entity, Mail::Message, Email::Simple and \
Email::MIME. Other representations are encouraged to \
create their own Email::Abstract::* class by copying \
Email::Abstract::EmailSimple. All modules installed under \
the Email::Abstract hierarchy will be automatically \
picked up and used.
platforms darwin
supported_archs noarch
checksums sha256 0d195361c1168b2e890b94aeae6b7b4f2d3eaf6664df18f178c543c1fa532a3a \
rmd160 a6a99eb1c250392c55ee216c79897796c7c8501b
if {${perl5.major} != ""} {
depends_lib-append port:p${perl5.major}-email-simple \
port:p${perl5.major}-mro-compat
}</pre>
h4. @perl/p5-email-sender/Portfile@
<pre title="perl/p5-email-sender/Portfile">PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup Email-Sender 1.300006
license {Artistic-1 GPL}
maintainers nomaintainer
description Email::Sender - a library for sending email
long_description Email::Sender replaces the old and sometimes problematic \
Email::Send library, which did a decent job at handling \
very simple email sending tasks, but was not suitable for \
serious use, for a variety of reasons.
platforms darwin
supported_archs noarch
checksums sha256 860fd72a906f1de8755d7e9c791a1d2517229a997c4612199d949eb0857cfbff \
rmd160 d37ba19b3bdc961dd9c96a72ab8ed987cb65e7ff
if {${perl5.major} != ""} {
depends_lib-append port:p${perl5.major}-try-tiny \
port:p${perl5.major}-capture-tiny \
port:p${perl5.major}-moo \
port:p${perl5.major}-sub-exporter \
port:p${perl5.major}-throwable \
port:p${perl5.major}-module-runtime \
port:p${perl5.major}-moox-types-mooselike \
port:p${perl5.major}-email-abstract \
port:p${perl5.major}-email-simple \
port:p${perl5.major}-list-moreutils \
port:p${perl5.major}-email-address
}</pre>
h4. @perl/p5-moo/Portfile@
<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
# $Id$
PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup Moo 1.002000 ../by-authors/id/M/MS/MSTROUT
license {Artistic-1 GPL}
maintainers nomaintainer
description Moo - Minimalist Object Orientation (with Moose compatiblity)
long_description This module is an extremely light-weight subset of Moose \
optimised for rapid startup and \"pay only for what you \
use\". \
\
It also avoids depending on any XS modules to allow simple \
deployments. The name Moo is based on the idea that it \
provides almost -- but not quite -- two thirds of Moose. \
\
Unlike Mouse this module does not aim at full \
compatibility with Moose's surface syntax, preferring \
instead of provide full interoperability via the metaclass \
inflation capabilities described in \"MOO AND MOOSE\".
platforms darwin
supported_archs noarch
checksums sha256 4b8284c183a0a0bae0449c51fe5f22d96510192dd990dc905689db8f662c68a1 \
rmd160 a8a77e43968856048c2c137e0d9fbfe0c4d99132
if {${perl5.major} != ""} {
depends_lib-append port:p${perl5.major}-devel-globaldestruction \
port:p${perl5.major}-strictures \
port:p${perl5.major}-role-tiny \
port:p${perl5.major}-module-runtime \
port:p${perl5.major}-class-method-modifiers
depends_build-append port:p${perl5.major}-test-fatal
}</pre>
h4. @perl/p5-moox-types-mooselike/Portfile@
<pre title="perl/p5-moox-types-mooselike/Portfile">PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup MooX-Types-MooseLike 0.23
license {Artistic-1 GPL}
maintainers nomaintainer
description MooX::Types::MooseLike - some Moosish types and a type builder
long_description ${description}
platforms darwin
supported_archs noarch
checksums sha256 6b4a9b079490cdce9c6ca4f1211ce853da3367801ca35360e0f0c63495dd5f48 \
rmd160 6cb1ba26bf37fc8adc105676735e067500d21e14
if {${perl5.major} != ""} {
depends_lib-append port:p${perl5.major}-moo \
port:p${perl5.major}-module-runtime
depends_build-append port:p${perl5.major}-test-fatal
}</pre>
h4. @perl/p5-role-tiny/Portfile@
<pre title="perl/p5-role-tiny/Portfile">PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup Role-Tiny 1.002005 ../by-authors/id/M/MS/MSTROUT
license {Artistic-1 GPL}
maintainers nomaintainer
description Role::Tiny - Roles. Like a nouvelle cuisine portion size slice of Moose.
long_description Role::Tiny is a minimalist role composition tool.
platforms darwin
supported_archs noarch
checksums sha256 3905f99efd3b604a5de83265914aaa0ead1dcb45c6e38b58c24a2de0309e5bee \
rmd160 aabe3136c2a3877ef6d110b5873c935673985d91
if {${perl5.major} != ""} {
depends_lib-append port:p${perl5.major}-test-fatal
}</pre>
h4. @perl/p5-strictures/Portfile@
<pre title="perl/p5-strictures/Portfile">PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup strictures 1.004004 ../by-authors/id/E/ET/ETHER
license {Artistic-1 GPL}
platforms darwin
maintainers nomaintainer
description strictures - turn on strict and make all warnings fatal.
long_description ${description}
checksums sha256 12117dbaaaa85e07cbf01d95927ecb5ba8d5ed896c18d7dbc6b4be47b255ee34 \
rmd160 e9638bdb9621637b457f039913185f1fcf012aa4
supported_archs noarch</pre>
h4. @perl/p5-throwable/Portfile@
<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
# $Id$
PortSystem 1.0
PortGroup perl5 1.0
perl5.branches 5.8 5.10 5.12 5.14 5.16
perl5.setup Throwable 0.200008 ../by-authors/id/R/RJ/RJBS
license {Artistic-1 GPL}
maintainers nomaintainer
description Throwable - a role for classes that can be thrown
long_description Throwable is a role for classes that are meant to be \
thrown as exceptions to standard program flow. It is \
very simple and does only two things: saves any previous \
value for \$@ and calls die \$self.
platforms darwin
supported_archs noarch
checksums sha256 d08d51862417031d1a47e0645517a9b4d3669b651e93ddbfe27728514118bc79 \
rmd160 a69dc110d8d1d5b28f9dd5992a6ca0d45a85aed3
if {${perl5.major} != ""} {
depends_lib-append port:p${perl5.major}-moox-types-mooselike \
port:p${perl5.major}-devel-stacktrace \
port:p${perl5.major}-class-load \
port:p${perl5.major}-moo
}</pre>
h4. @x11/auto-multiple-choice-devel/Portfile@
<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
# $Id: Portfile 96038 2012-07-30 02:14:11Z dports@macports.org $
PortSystem 1.0
name auto-multiple-choice-devel
svn.revision 1377
version 1.2.0.${svn.revision}
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 OpenOffice.org sheet file. \
\
This version can't print. Documents should be printed from OS X.
homepage http://home.gna.org/auto-qcm
conflicts auto-multiple-choice
depends_build-append port:dblatex \
port:p5.12-xml-libxml
depends_lib port:opencv
depends_run port:p5.12-gtk2 \
port:p5.12-xml-simple \
port:p5.12-xml-writer \
port:p5.12-archive-zip \
port:p5.12-locale-gettext \
port:p5.12-digest-md5 \
port:p5.12-module-load-conditional \
port:p5.12-perlmagick \
port:p5.12-openoffice-oodoc \
port:p5.12-file-mimeinfo \
port:p5.12-dbd-sqlite \
port:p5.12-text-csv \
port:p5.12-file-basedir \
port:p5.12-email-mime \
port:p5.12-email-sender \
port:sqlite3 \
port:poppler \
port:netpbm \
port:librsvg \
port:gdk-pixbuf2
use_configure no
fetch.type svn
svn.url svn://svn.gna.org/auto-qcm/trunk/
worksrcdir trunk
build.args AMCCONF=macports \
BASEPATH=${prefix} \
LATEX_FREE=1 \
GCC_PP="${configure.cc} ${configure.cc_archflags}"
# When building from source, some files should be configured before.
# This pre-configuration use the make tool, not the configure tool.
pre-build {
system -W ${worksrcpath} "${build.cmd} version_files"
}
# When first installed auto-multiple-choice could fail to launch with
# a "Format d'image non reconnu at /opt/local/lib/AMC/perl/AMC-gui.pl line 101"
# ("Unknown image format?").
# The following update cache command makes auto-multiple-choice happy.
post-activate {
system "${prefix}/bin/gdk-pixbuf-query-loaders --update-cache 2>&1"
}
destroot.args AMCCONF=macports \
BASEPATH=${prefix}
variant latex description "Add LaTeX support" {
depends_run-append port:texlive-latex-extra \
port:texlive-latex-recommended \
port:texlive-fonts-recommended \
port:texlive-xetex
build.args-delete LATEX_FREE=1
post-activate {
system "${prefix}/bin/mktexlsr 2>&1"
}
post-deactivate {
system "${prefix}/bin/mktexlsr 2>&1"
}
}
default_variants +latex
livecheck.type regex
livecheck.url http://svn.gna.org/viewcvs/auto-qcm/trunk/
livecheck.version ${svn.revision}
livecheck.regex {Revision (\d+)}</pre>
h2. Installing AMC
Once the files port set up, generate the index of new ports.
<pre>cd ~/nix/macports
portindex</pre>
Finally, install the development version of AMC can be launched.
<pre>sudo port install auto-multiple-choice-devel</pre>
AMC is ready to be used.
*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.
<pre>sudo port uninstall auto-multiple-choice</pre>
h2. Using AMC
You can start from the terminal or from XQuartz.
h3. In the Terminal
<pre>auto-multiple-choice-devel</pre>
This command will launch XQuartz and AMC application.
h3. in XQuartz
Start XQuartz application.
!xquartz.png!
We can immediately set XQuartz to facilitate the launch of AMC. Open the @Applications menu>Customize...@.
!xquartz-menu-applications-personnaliser.png!
In the Personalization window, click the button@Add an entry@.
!xquartz-fenetre-personnaliser-menu-applications.png!
Set "Auto Multiple Choice @ @" in the column and @ name @ "@ auto-multiple-choice @" in the @ @ Command column of the new menu item.
! XQuartz-window-customize-menu-applications-2.png!
Close the Customize window then select the Applications menu @> @ Auto Multiple Choice.
! XQuartz-menu-applications-amc.png!
AMC window should appear.
community auto-multiple-choice-window.png!
Except for printing, everything should work.
h2. Links
* Auto Multiple Choice, "http://home.gna.org/auto-qcm/":http://home.gna.org/auto-qcm/.
* 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.
* MacPorts, "http://www.macports.org":http://www.macports.org.
* MacPorts, "Local Portfile Repositories":http://guide.macports.org/#development.local-repositories.
* MacPorts, "How to create portfiles for CPAN Perl modules":https://trac.macports.org/wiki/howto/cpan2port.
* Famille de polices Linux Libertine, "LinuxLibertine.org":http://www.linuxlibertine.org.
* XQuartz, http://xquartz.macosforge.org</a>.
No I have studied it by translating, and see if it will work on my MAC with OSX 10.7 something.
Thanks to Joël Brogniart