[93204] trunk/dports/sysutils
Ryan Schmidt
ryandesign at macports.org
Thu May 17 12:56:38 PDT 2012
On May 17, 2012, at 14:31, cal at macports.org wrote:
> Revision: 93204
> https://trac.macports.org/changeset/93204
> Author: cal at macports.org
> Date: 2012-05-17 12:31:12 -0700 (Thu, 17 May 2012)
> Log Message:
> -----------
> new port: ttyrec, a command line recorder
>
> Added Paths:
> -----------
> trunk/dports/sysutils/ttyrec/
> trunk/dports/sysutils/ttyrec/Portfile
>
> Added: trunk/dports/sysutils/ttyrec/Portfile
> ===================================================================
> --- trunk/dports/sysutils/ttyrec/Portfile (rev 0)
> +++ trunk/dports/sysutils/ttyrec/Portfile 2012-05-17 19:31:12 UTC (rev 93204)
> @@ -0,0 +1,52 @@
> +# -*- 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
> +
> +name ttyrec
> +version 1.0.8
> +categories sysutils
> +maintainers cal openmaintainer
> +platforms darwin
> +license BSD
> +description ttyrec is a tty recorder and player.
> +long_description \
> + ttyrec is a tty recorder. Recorded data can be played back with the \
> + included ttyplay command. ttyrec is just a derivative of script command \
> + for recording timing information with microsecond accuracy as well. It \
> + can record emacs -nw, vi, lynx, or any programs running on tty.
> +
> +homepage http://0xcc.net/ttyrec/
> +master_sites ${homepage}
> +
> +checksums sha256 ef5e9bf276b65bb831f9c2554cd8784bd5b4ee65353808f82b7e2aef851587ec \
> + rmd160 f7538fa742d1c1e07b8b48f3fa79cfcf13ca8044
> +
> +use_configure no
> +universal_variant yes
> +
> +build.args CC='${configure.cc}' \
> + CFLAGS='${configure.cflags} [get_canonical_archflags]' \
> + LDFLAGS='${configure.ldflags} [get_canonical_archflags]'
This doesn't work. To get "get_canonical_archflags" to realize a universal variant exists, it must actually be declared beforehand. You must use "variant universal {}". "universal_variant yes" does not do the same thing and does not work for this.
> +destroot {
> + set bin {ttyrec ttyplay ttytime}
> + set man {ttyrec.1 ttyplay.1 ttytime.1}
> + set share {README}
> + foreach binfile $bin {
> + xinstall -m 755 "${worksrcpath}/${binfile}" "${destroot}${prefix}/bin/"
> + }
> + foreach manfile $man {
> + xinstall -m 644 "${worksrcpath}/${manfile}" "${destroot}${prefix}/share/man/man1/"
> + }
> + xinstall -d -m 755 "${destroot}${prefix}/share/doc"
> + xinstall -d -m 755 "${destroot}${prefix}/share/doc/${name}"
> + foreach sharefile $share {
> + xinstall -m 644 "${worksrcpath}/${sharefile}" "${destroot}${prefix}/share/doc/${name}/"
> + }
> +}
This destroot is very complicated and can be simplified significantly. There's no need for creating lists and looping. xinstall's -W flag is much simpler. Note that xinstall -d creates intermediate directories for you. Note that there's no need to quote paths, even if some of the variables used in those paths might contain spaces (which these variables wouldn't anyway); this is Tcl, not a shell script.
I've made the above changes in r93208.
More information about the macports-dev
mailing list