Open CASCADE Community Edition fetch type

Joshua Root jmr at macports.org
Sat Jun 14 09:46:46 PDT 2014


On 2014-6-14 23:24 , Mark Brethen wrote:
> Open CASCADE Community Edition has both a git clone url (https://github.com/tpaviot/oce.git) and a tarball for download. I read in the port documentation that fetching with git url may cause non-reproducible builds, so downloaded the tarball (https://github.com/tpaviot/oce/archive/OCE-0.15.tar.gz) but it has the filename: "oce-OCE-0.15.tar.gz". I setup the Portfile as follows:
> 
> name              oce
> version           0.15
> master_sites    https://github.com/tpaviot/oce/archive/
> distname        OCE-${version}
> distfile        ${name}-OCE-${version}
> 
> Am I missing anything?

I assume 'distfile' is a typo and your portfile actually says
'distfiles' (otherwise it would fail to parse).

If you're going to set distfiles, it needs to contain complete
filenames, i.e. oce-OCE-0.15.tar.gz. The default value of distfiles is
${distname}${extract.suffix}. Setting distname when you also set
distfiles only ends up indirectly affecting the value of worksrcdir
(which has a default value of $distname). So when you have a single
distfile, it's more clear to not set distfiles at all, but do this:

distname	${name}-OCE-${version}
worksrcdir	OCE-${version}

- Josh


More information about the macports-dev mailing list