port ${name}

Mark Brethen mark.brethen at gmail.com
Sat Oct 18 19:35:32 PDT 2014


On Oct 13, 2014, at 4:03 PM, Ryan Schmidt <ryandesign at macports.org> wrote:

> All ports must install at least one file. You can look at other metaports to see what they do. Typically they create a file called README and put either a placeholder message or the port's description into it.
> 
> You'll also want to set "supported_archs noarch" and clear "distfiles", and you may as well clear "archive_sites" too.
> 
> I've requested that we make these kinds of ports easier by introducing a "stub" keyword, but we don't have this yet.

I've written the stub like so:

# This is just a stub that installs all REDUCE subports.
if {${name} eq ${subport}} {
    supported_archs noarch
    distfiles
    archive_sites

    use_configure   no

    build           {}

    depends_build-append\
        port:reduce-common\
        port:reduce-csl\
        port:reduce-psl\
        port:reduce-addons

    destroot {
        # Create a dummy file so the port can be successfully activated.
        xinstall -d ${docdir}
        set docfile [open ${docdir}/README.${name}.txt "w"]
        puts $docfile "REDUCE ${version} (MacPorts revision ${version}_${revision})\n"
        puts $docfile "${long_description}\n"
        close $docfile
        }
}

I don't think the order in which the subports are installed matters (I'm testing that presently). However an issue I've found is that if the install process is interrupted, a subsequent re-issue of 'port install reduce' will fail due to the fact that the subport that was interrupted isn't clean.

Mark






More information about the macports-dev mailing list