[76416] trunk/dports/lang
Ryan Schmidt
ryandesign at macports.org
Tue Feb 22 13:46:07 PST 2011
On Feb 22, 2011, at 15:15, mk at macports.org wrote:
> Revision: 76416
> http://trac.macports.org/changeset/76416
> Author: mk at macports.org
> Date: 2011-02-22 13:15:04 -0800 (Tue, 22 Feb 2011)
> Log Message:
> -----------
> QiII: new port according to ticket #28231
>
> Added Paths:
> -----------
> trunk/dports/lang/QiII/
> trunk/dports/lang/QiII/Portfile
>
> Added: trunk/dports/lang/QiII/Portfile
> ===================================================================
> --- trunk/dports/lang/QiII/Portfile (rev 0)
> +++ trunk/dports/lang/QiII/Portfile 2011-02-22 21:15:04 UTC (rev 76416)
> @@ -0,0 +1,54 @@
The standard modeline should be here.
> +# $Id$
> +
> +PortSystem 1.0
> +
> +name QiII
> +version 1.07
> +categories lang
> +maintainers mac.com:quest
> +platforms universal
This platforms line you've already fixed in a subsequent revision.
> +description Qi is a functional programming language developed \
> + by Dr Mark Tarver
> +
> +long_description Qi is a functional programming language developed \
> + by Dr Mark Tarver and introduced in April 2005. A \
> + new version was reimplemented and issued as Qi II \
> + in November 2008. The first version was free \
> + software, licensed under GPL. But, as GPL was \
> + perceived as unfriendly to commercial use, Qi II \
> + is available via two proprietary licenses: one for \
> + personal and educational use, and another for \
> + producing closed source software. \
> + Qi is written in Lisp. It includes most of the \
> + features common to modern functional programming \
> + languages such as pattern-matching, currying, partial \
> + applications, guards and (optional) static type checking.
> +
> +homepage http://http://www.lambdassociates.org/
This homepage line you've already fixed in a subsequent revision.
> +master_sites http://www.lambdassociates.org/Download/
> +distname ${name}${version}
> +use_zip yes
> +use_configure no
Because of "use_configure no", if this port installs architecture-specific files, it needs code to handle non-default-build_arch builds (and ideally also universal builds) correctly; if it doesn't, it needs "supported_archs noarch".
> +checksums md5 3a0b5c56d0f107f80f5bca11b82a4d59
Use multiple checksum types, preferably sha1 and rmd160.
> +depends_build port:sbcl
> +
> +build {
> + system "cd ${worksrcpath}/Lisp; sbcl --load 'install.lsp'"
> + reinplace "s|Qi.core|${prefix}/src/${name}/Lisp/Qi.core|g" ${worksrcpath}/Lisp/Qi-Linux-SBCL
> + system "cd ${worksrcpath}/Lisp; cat Qi-Linux-SBCL | col -b > Qi-Mac-SBCL"
Use "&&" not ";" to separate commands that depend on one another. "&&" ensures the previous command has completed successfully before trying the next one; ";" runs the next command regardless of whether the first one succeeded.
> + system "cd ${worksrcpath}/Lisp; chmod 755 Qi-Mac-SBCL"
> +}
To change permissions, use "file attributes -permissions" instead of using "system" to call "chmod".
> +destroot {
> + system "cp -R ${worksrcpath} ${destroot}${prefix}/src/${name}"
> +}
Why use "system" to call "cp -R" when you could just "copy"? Also, what is this ${prefix}/src? That is not a standard directory, and violates the mtree.
> +post-install {
> + system "ln -fs ${prefix}/src/${name}/Lisp/Qi-Mac-SBCL ${prefix}/bin/Qi"
> +}
> +
> +post-uninstall {
> + system "cd ${prefix}/bin; rm Qi"
> +}
Why in the world is the Qi symlink being manipulated in post-install and post-uninstall? Why not create it in destroot so it's registered to the port and handled by MacPorts automatically?
More information about the macports-dev
mailing list