<div dir="ltr"><br>On 30 March 2016 at 18:45, Abdulrahman Alshammari wrote:<br>&gt; Hey,<br>&gt;<br>&gt; The software that I want to build a port for is getting updated 3-5 times in<br>&gt; a year. So, I need to build the portfile in a way that will be easy to<br>&gt; update. So let me explain my issue.<br>&gt;<br>&gt; The homepage of the software is here:<br>&gt; <a href="http://vsl.cis.udel.edu/civl/index.html">http://vsl.cis.udel.edu/civl/index.html</a><br>&gt;<br>&gt; For download, this is the list of software versions:<br>&gt; <a href="http://vsl.cis.udel.edu/lib/sw/civl/">http://vsl.cis.udel.edu/lib/sw/civl/</a><br>&gt;<br>&gt; For each version, there are sub-versions start with rXXXX, Like in the<br>&gt; latest version I want to build a port for it:<br>&gt; 1.6 -&gt;&gt; r2872 &gt;&gt; downloads &gt;&gt; we get this page:<br>&gt;<br>&gt; <a href="http://vsl.cis.udel.edu/lib/sw/civl/1.6/r2872/release/index.html">http://vsl.cis.udel.edu/lib/sw/civl/1.6/r2872/release/index.html</a><br>&gt;<br>&gt; Then, I need to download  the file CIVL-1.6_2872.tgz<br>&gt;<br>&gt; Any suggestion how can I handle this, so when I need to update the port, I<br>&gt; just update a little bit in the portfile?<br><br>You have two options:<div><br></div><div>(1) either you specify &quot;version 1.6_2872&quot; and then automatically split it with some tcl tricks (I wrote the most dumb one, I&#39;m sure there is a more elegant way to do it)</div><div><br></div><div><div><font face="monospace, monospace">name                civl</font></div><div><font face="monospace, monospace">version             1.6_2872</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">set version_major   [lindex [split ${version} _] 0]</font></div><div><font face="monospace, monospace">set version_minor   [lindex [split ${version} _] 1]</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">extract.suffix      .tgz</font></div><div><font face="monospace, monospace">distname            CIVL-${version}</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">master_sites        <a href="http://vsl.cis.udel.edu/lib/sw/${name}/${version_major}/r${version_minor}/release">http://vsl.cis.udel.edu/lib/sw/${name}/${version_major}/r${version_minor}/release</a></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">checksums           rmd160  f9c755e26c7d3e2b4a5a29d4008c86551abda33b \</font></div><div><font face="monospace, monospace">                    sha256  b90db06b5f390b2888e0d3d9e25d68b77373a1e34ca20c73bfcef322708ff4c8</font></div></div><div><br></div><div><br></div><div>(2) or simply do the following:</div><div><br><div><font face="monospace, monospace">name            civl</font></div><div><font face="monospace, monospace">version         1.6</font></div><div><font face="monospace, monospace">set rev         2872</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">extract.suffix  .tgz</font></div><div><font face="monospace, monospace">distname        CIVL-${version}_${rev}</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">master_sites    <a href="http://vsl.cis.udel.edu/lib/sw/${name}/${version}/r${rev}/release">http://vsl.cis.udel.edu/lib/sw/${name}/${version}/r${rev}/release</a></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">checksums       rmd160  f9c755e26c7d3e2b4a5a29d4008c86551abda33b \</font></div><div><font face="monospace, monospace">                sha256  b90db06b5f390b2888e0d3d9e25d68b77373a1e34ca20c73bfcef322708ff4c8</font></div></div><div><br></div><div>It dependes whether you want the revision to be part of the reported version or not. If the revision number is relevant and version 1.6 would be also released under different revisions (= subversions) after some time, you should probably use the first approach. If users only really care about &quot;1.6&quot;, then you can increase the &quot;revision&quot; in Portfile by one when the next &quot;sub-version&quot; gets released.</div><div><br></div><div>Mojca</div><div><br></div></div>