> On Jan 16, 2016, at 8:54 AM, [email protected] wrote:
> 
> Revision
> 144726
> Author
> [email protected]
> Date
> 2016-01-16 06:54:58 -0800 (Sat, 16 Jan 2016)
> Log Message
> 
> esorepo: Provide easy access to ESO's ports tree
> 
> Closes #46954
> 
> Added Paths
> 
>       • trunk/dports/science/esorepo/
>       • trunk/dports/science/esorepo/Portfile
> Diff
> 
> Added: trunk/dports/science/esorepo/Portfile (0 => 144726)
> 
> --- trunk/dports/science/esorepo/Portfile                             (rev 0)
> +++ trunk/dports/science/esorepo/Portfile     2016-01-16 14:54:58 UTC (rev 
> 144726)
> 
> @@ -0,0 +1,127 @@
> 
> +# -*- 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                esorepo
> +version             1.1
> +categories          science
> +license             GPL-2+
> +platforms           darwin
> +supported_archs     noarch
> +maintainers         eso.org:usd-help
> +
> +description         ESO repository of software for astronomical data 
> reduction
> +
> +long_description    \
> +    The European Southern Observatory (ESO) maintains and distributes a 
> number \
> +    of open source software packages (e.g. data reduction pipelines and 
> front-end \
> +    tools) for the astronomical science community. This port provides a 
> convenient \
> +    configuration mechanism to add an additional repository URL to allow 
> further \
> +    installation of ESO software via MacPorts.
> +
> +homepage            http://www.eso.org/sci/software
> +master_sites        
> ftp://ftp.eso.org/pub/dfs/pipelines/repositories/macports/
> +
> +fetch {}
> +checksum {}
> +extract {}

Instead of overriding the fetch, checksum and extract phases, you should 
declare that the port has no distfiles, by writing on a line by itself:

distfiles

With no distfiles, the master_sites line isn't needed either. ("port lint" will 
complain about missing master_sites, but that's a bug in "port lint".)


> +test {}

The test phase is disabled by default. There is no need to override it with an 
empty block.


> +use_configure no
> +
> +build {
> +  set key_file [open "${workpath}/eso-pubkey.pem" w]
> +  puts ${key_file} "-----BEGIN PUBLIC KEY-----"
> +  puts ${key_file} 
> "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy2Au5qRNn/zoRRZ7rdsn"
> +  puts ${key_file} 
> "g3lbrM33Iz3xew4yZD5L6LI69qVVfmaUsELreeK+bZAf8bLl5+HYHHvM/pBZq/+6"
> +  puts ${key_file} 
> "LBf+NnESVwmKfhEppHim3MqRNyTfSOJAM+J1xt1/dvZkBX8ehZO8piRRaKUPzauW"
> +  puts ${key_file} 
> "WhahV417jD37AWKXlRCNPxUtgEk7kRrMQuP4olWWVul+m7piGrDMzQsAOtvEMX5R"
> +  puts ${key_file} 
> "J5Ygr3iZNq8WSXhAMqfm6cksxq7kMa8sfpw8lU1jXKfN4wREH3w2oJohkkTYFqUq"
> +  puts ${key_file} 
> "0FBnqBkGZlv5e1FUEFW1rnvUpbzOxgDgfdOKwzqNWw2EGl6baQT63iIqa752kCE7"
> +  puts ${key_file} "SwIDAQAB"
> +  puts ${key_file} "-----END PUBLIC KEY-----"
> +  close ${key_file}
> +}

The whitespace of this portfile does not conform to what the modeline says the 
whitespace is. (Indents should be at multiples of 4 spaces, not 2.)

Why construct this file in the build phase? Why not just put the real file in 
the files directory and copy it from there? Wouldn't that be much more 
straightforward?

_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to