Do I want subports?
Ryan Schmidt
ryandesign at macports.org
Thu Sep 8 10:41:17 PDT 2016
> On Sep 8, 2016, at 12:33 PM, Ken Cunningham <ken.cunningham.webuse at gmail.com> wrote:
>
> Working on the optimal way to do this emulator + GUI program.
>
> The emulator itself is best built with i386, for the JIT. This requires libSDL to be available in i386 (so presumably +universal). You can monkey around with a no-JIT version, but you wouldn't want it, ultimately.
>
> The rather tiny little GUI (that just edits a simple config file with text lines) is compatible with gtk1 or gtk2 has no reason to be any special architecture (x86-64 would be just fine, if you have the gtk tree built that way).
>
> I don't want to make people reinstall their whole gtk tree as universal for no reason... on Snow Leopard (building from source) this takes half a day. (OK, not quite -- but a long time).
>
> Is this a role for subports, with the emulator forced to i386, but the gui left to be whatever?
Subports are helpful when several ports share common code, for example a bunch of plugins that are built the same way except for some configure options or dependencies.
Subports are also often used when several ports share the same version, master_sites, distfiles and checksums; that way, when you need to update the version, you only need to do it in one place instead of in several portfiles.
You can place any differentiating code in the subport block, or check the ${subport} variable. If one subport requires i386 but others don't, you can put the "supported_archs i386" line in that subport block only.
More information about the macports-dev
mailing list