Closed fbrosson closed 6 years ago
We should do this in a different way anyway. As an example, the openttd recipes shows how it could be done. There are separate recipes for the data packages (openttd_sfx, etc) and for the code. This way the data packages can be built on any arch separately from the code. And if possible (if the upstream has packaged their sources only, without the data), we can build the sources with a much smaller download.
OK
I'm closing this issue because a recipe should not even try to make data packages when haikuporter is building a recipe for a secondary arch. Data packages should only be created, if any, during primary arch builds.
(Sorry folks, I should have closed this issue a long time ago!)
Consider
freedroidrpg-0.15.1.recipe
in haikuports/games-rpg/freedroidrpg. It's an architecture-dependent port, but it has a data sub-package. Building it on any supported primary arch (x86 or x86_gcc4) produces the main arch-dependent package as well as the data package (freedroidrpg_data-0.15.1-2-any.hpkg
) which is correctly declared as arch-independent.Now, on x86_gcc2, freedroidrpg can only be built for x86 as secondary arch. The recipe has this bloc that describes the data "sub-package":
Well, instead of creating
freedroidrpg_x86_data-0.15.1-2-any.hpkg
is createsfreedroidrpg_x86_data-0.15.1-2-x86_gcc2.hpkg
.There are several other packages which have both an arch-depedent main package and one (or more) arch-independent sub-packages, but the only one that has support for secondary architectures is freedroidrpg. To tell the truth I did not try to build this port because it is really big. Instead I have played with 2 tiny packages which I have modified on a local clone for testing purposes.
Adding this to daa2iso:
(as well as a
packageEntries doc $documentationDir
inINSTALL()
) allows to create a real arch-independent daa2iso_doc sub-package.Unfortunately, with uif2iso, adding a similar bloc:
(with the same
packageEntries doc $documentationDir
inINSTALL()
) producesuif2iso_x86_doc-0.1.7c-2-x86_gcc2.hpkg
instead of the expecteduif2iso_x86_doc-0.1.7c-2-any.hpkg
when building uif2iso_x86.I've hit this problem while updating gnutls to 3.4.10 (https://github.com/haikuports/haikuports/pull/505) and found a workaround but it was not light enough to be merged.
I suppose this is either a bug or a known limitation. I also understand that freedroidrdp is currently the only package that would benefit from fixing this limitation. I have tried several variations (like also defining
SECONDARY_ARCHITECTURES_doc="any"
) but none worked. BTW, I'm creating this issue because @korli asked me to do so in this message: https://github.com/haikuports/haikuports/pull/505#issuecomment-196179796 Kind regards,