The CERN Program Library (CERNLIB) is a collection of general purpose software libraries and program modules for scientific computing, developed at the European Organization for Nuclear Research CERN. Latest version dated by 2023-10-31, builds on gentoo just fine without any problems. Reproducible: Always
https://repology.org/project/cernlib/versions You can try the ebuild from the science overlay until it is in the main tree: https://gpo.zugaina.org/Overlays/science/sci-physics/cernlib