Question regarding supported_archs noarch
Joshua Root
jmr at macports.org
Thu Jan 13 20:26:36 UTC 2022
On 2022-1-14 04:12 , Jason Liu wrote:
> Hi all,
>
> A hopefully quick and simple question regarding 'supported_archs
> noarch'. Is 'noarch' meant to specify that the build itself isn't
> supposed to be architecture-specific, or does it mean that the final
> output products are not architecture-specific?
Strictly speaking it refers to the installed files, but it's pretty
unusual to require specific archs during build but only install noarch
files. (BTW, not installing any Mach-O files doesn't guarantee that a
port is noarch - it's possible to have architecture-specific information
in other file types.)
> I have a subport that basically runs through the entire build, including
> compiling the source code, but then in the end simply throws away those
> compiled objects, and the only files that are retained (i.e. staged into
> destroot) are the game data files, which are basically just a bunch of
> text files and images (which are not architecture-specific). It seems
> that the upstream developers wrote the makefiles this way because some
> of the game data files get generated during the compile process, and
> they never bothered to cleanly split off the generating of the game data
> files into a separate makefile that can be run by itself.
Whether this would work with the subport marked noarch depends on the
build system and its dependencies. If it links with external libraries,
not having them available for the right archs could certainly make the
build fail (pointlessly, since the file failing to link won't be
installed). That may be an uncommon case, but the best idea would be to
see if there's a different Makefile target you can run that just builds
and installs the data, and if not, maybe add one.
- Josh
More information about the macports-dev
mailing list