By default, pymol-2.4.0 needs sci-libs/netcdf to build: x86_64-pc-linux-gnu-gcc -w -march=native -O2 -pipe -fPIC -D_PYMOL_LIBPNG -D_PYMOL_FREETYPE -D_PYMOL_VMD_PLUGINS -D_HAVE_LIBXML -DMMTF_MSGPACK_USE_CPP11 -D_PYMOL_NO_MAIN -D_PYMOL_NUMPY -Iinclude -Icontrib/uiuc/plugins/include -Iov/src -Ilayer0 -Ilayer1 -Ilayer2 -Ilayer3 -Ilayer4 -Ilayer5 -Imodules/cealign/src -Ibuild/generated -Icontrib/uiuc/plugins/molfile_plugin/src -Icontrib/mmtf-c -I/usr/lib/python3.7/site-packages/numpy/core/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/python3.7m -c -MMD contrib/uiuc/plugins/molfile_plugin/src/netcdfplugin.c -o /var/tmp/portage/sci-chemistry/pymol-2.4.0/work/pymol-open-source-2.4.0-python3_7/temp.linux-x86_64-3.7/contrib/uiuc/plugins/molfile_plugin/src/netcdfplugin.o -Werror=return-type -Wunused-variable -Wno-switch -Wno-narrowing -Wno-char-subscripts -O3 contrib/uiuc/plugins/molfile_plugin/src/netcdfplugin.c:27:10: fatal error: netcdf.h: No such file or directory #include <netcdf.h> ^~~~~~~~~~ compilation terminated However, this dependency can be removed by passing --no-vmd-plugins to setup.py . I'll attach a patch that fixes the ebuild. Reproducible: Always
Created attachment 675967 [details, diff] pymol-2.4.0.ebuild.fix_netcdf_dependency.patch
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85e6d34ad04bc76ea9a8f9fa04eb46af9ebf433d commit 85e6d34ad04bc76ea9a8f9fa04eb46af9ebf433d Author: Pacho Ramos <pacho@gentoo.org> AuthorDate: 2021-01-13 19:05:06 +0000 Commit: Pacho Ramos <pacho@gentoo.org> CommitDate: 2021-01-13 19:11:11 +0000 sci-chemistry/pymol: Fix netcdf handling Also fix upstream bug and use xdg.eclass to not need to redefine every pkg_ phase Closes: https://bugs.gentoo.org/757798 Thanks-to: Soren Harward Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Pacho Ramos <pacho@gentoo.org> .../pymol/files/pymol-2.4.0-fix_bug119.patch | 34 ++++++ sci-chemistry/pymol/pymol-2.4.0-r1.ebuild | 117 +++++++++++++++++++++ 2 files changed, 151 insertions(+)
(In reply to Larry the Git Cow from comment #2) > The bug has been closed via the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=85e6d34ad04bc76ea9a8f9fa04eb46af9ebf433d Still fails to build w/o netcdf. The problem is line 53 of the ebuild: 53: -e "/import/s:argparse:argparseX:g" This disables parsing of arguments in the setup script, so the command on line 66 66: use !netcdf && mydistutilsargs=( --no-vmd-plugins ) Doesn't actually do what it should do, because the setup script never parses the argument. I have no idea why argparse was disabled. I traced in back to https://gitweb.gentoo.org/repo/gentoo/historical.git/commit/sci-chemistry/pymol?id=6c187333ec3ff7357d538168666f4291ab0720bd where no explanation was given other than "Supress unnecessary argparse import" [sic]. Since it seems like argparse is actually necessary, line 53 of the current ebuild should be deleted.
> The problem is line 53 of the ebuild: > > 53: -e "/import/s:argparse:argparseX:g" Okay, there's another problem besides this one. For some reason, having replaced the xdg-utils eclass (in the 2.4.0 ebuild) with the xdg eclass (in the 2.4.0-r1 ebuild), *nothing* in the python_prepare_all() block gets called. Reordering the inherit line to inherit desktop optfeature flag-o-matic xdg distutils-r1 (putting distutils-r1 after xdg) causes python_prepare_all to be run. I don't know why xdg and distutils-r1 don't play nicely together, but that's an issue for another bug.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d707db016087c78a6a39b8f6607f9304e90361ed commit d707db016087c78a6a39b8f6607f9304e90361ed Author: Pacho Ramos <pacho@gentoo.org> AuthorDate: 2021-01-14 23:11:09 +0000 Commit: Pacho Ramos <pacho@gentoo.org> CommitDate: 2021-01-14 23:11:09 +0000 sci-chemistry/pymol: Ensure proper prepare phase is run and don't drop argparse Thanks-to: Soren Harward Closes: https://bugs.gentoo.org/757798 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Pacho Ramos <pacho@gentoo.org> sci-chemistry/pymol/pymol-2.4.0-r1.ebuild | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)