Please move files from /usr/lib64/petsc/share/ to /usr/share/petsc
The choice to install everything under the rather peculiar /usr/lib/$(get_libdir)/petsc directory has a reason. Actually, we had an FSHS conformant layout before that lead nowhere: The reason why we currently install everything under /usr/lib/lib64/petsc is due to compability. A long time ago PETSc decided to have a rather peculiar setup of PETSC_DIR and PETSC_ARCH environment variables and a strict, non-FSHS compliant layout of files (libraries, includes, etc). Unfortunately it is impossible for us to avoid creating this level of compatibility for this layout - downstream projects using PETSc often simply assume this PETSC_DIR/PETSC_ARCH setup. This means, if we install files the correct way PETSc is not found and cannot be used. There are two viable solutions to this problem: (a) Simply install petsc under /usr/lib/$(get_libdir)/petsc, alternatively, /opt/petsc, and let if have its way. This is an approach that we used heavily in the past for a number of packages. I agree that it is not the most elegant but it works reliably. (b) Install everything FSHS compliant and then create a dedicated $PETSC_DIR that contains the PETSC-specific build system bits and symlinks to all files at just the right locations. This is the approach that Debian has chosen where the PETSC_DIR is "reassembled" at /etc/alternatives/petsc$PV The reasons why we are not doing the latter is simply a lack of time on my side. So if someone wants to go ahead and fix this properly, please go ahead and create a pull request. I suggest to make sure that - the new setup is easily maintainable for version bumps - sci-mathematics/slepc installs cleanly alongside it - the simple petsc "makefile"s still work.
In Fedora they are respecting the FHS https://packages.fedoraproject.org/pkgs/petsc/petsc-devel/fedora-rawhide.html
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6f36a0ce2d4741e60807bf6ff9d0858dbc96585 commit a6f36a0ce2d4741e60807bf6ff9d0858dbc96585 Author: Matthias Maier <tamiko@gentoo.org> AuthorDate: 2022-12-28 05:11:20 +0000 Commit: Matthias Maier <tamiko@gentoo.org> CommitDate: 2022-12-28 06:24:50 +0000 sci-mathematics/petsc: add 3.18.2 Closes: https://bugs.gentoo.org/722612 Closes: https://bugs.gentoo.org/846428 Closes: https://bugs.gentoo.org/846425 Closes: https://bugs.gentoo.org/846422 Closes: https://bugs.gentoo.org/846431 Signed-off-by: Matthias Maier <tamiko@gentoo.org> sci-mathematics/petsc/Manifest | 1 + sci-mathematics/petsc/petsc-3.18.2.ebuild | 236 ++++++++++++++++++++++++++++++ 2 files changed, 237 insertions(+)