<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">I haven’t tried to build MacPorts 2.8.0 under FreeBSD (the source tarball gives a 404), but I last tried 2.7.2 built and it installed cleanly, but was unusable as portindex failed. I could debug to the point where it failed, but never could figure out what was going on.</div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Marius</div><div class="">--</div><div class="">Marius Schamschula</div><div class=""><br class=""></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">

</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Oct 22, 2022, at 3:50 AM, Joshua Root <<a href="mailto:jmr@macports.org" class="">jmr@macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">MacPorts 2.8.0 lets you specify which OS versions your ports work on via the platforms option. This indicates a port that works on darwin versions from 10.x to 19.x inclusive:<br class=""><br class="">platforms {darwin >= 10 < 20}<br class=""><br class="">Most ports will probably only need one comparison, but you can have as many as you need. Operators supported are ==, !=, >, <, >= and <=. For == and !=, a string comparison that allows globs is used. For the rest, vercmp is used. If any comparison doesn't match, known_fail is set to yes.<br class=""><br class="">Note that the comparison is against ${os.version}, not ${os.major}, so you'll usually want to use e.g. < 20 for the upper bound rather than <= 19 (the latter would exclude all 19.x versions).<br class=""><br class="">These are all valid:<br class=""><br class="">platforms {darwin >= 11}<br class="">platforms {darwin < 19} freebsd<br class="">platforms {darwin >= 16 != 18.2.* < 23} {linux != *}<br class=""><br class="">The second one indicates FreeBSD support in a purely informational way, as per the usage of the platforms option in older MacPorts versions. The last one indicates that it doesn't work on Linux and will set known_fail there. Again, most ports will probably only use something like the first example, but the flexibility is there if you need it.<br class=""><br class="">All of the above can be used without making your Portfile incompatible with 2.7. There is another way that platforms can be used:<br class=""><br class="">platforms any<br class="">platforms {darwin any}<br class=""><br class="">The first one indicates that the port will install identical files no matter what platform it is built on, and will set the platform in the archive filename to "any_any". The second one indicates that the port will install identical files when built on any version of Darwin, but may install different files when built on other platforms, and sets the platform in the archive filename to "darwin_any" when on Darwin.<br class=""><br class="">These will usually only be applicable to noarch ports, though rare exceptions may exist. Ports that install only data files or scripts will often be able to use "any". Python scripts are an exception because Python uses a framework layout on Darwin only, so they will be "{darwin any}".<br class=""><br class="">Since the archive filename is changed, using this will of course prevent users on older MacPorts versions from using the archives. So we would normally wait 2 weeks after the release of 2.8.0 before starting to use this feature.<br class=""><br class="">However, with the release of Ventura in a couple days, it may pay to set these platforms values on as many eligible ports as possible, both to make the archives available to Ventura users even before we have a Ventura buildbot worker up and running, and to reduce the load on that worker once it is up.<br class=""><br class="">- Josh<br class=""></div></div></blockquote></div><br class=""></body></html>