The environment-file 99geant which is generated during src_install if USE=data is enabled contains much more than just environment variable assignments. This breaks env-update and the file is ignored. I think "G4INCLUDE="/usr/include/Geant4"" should be added, and apart from that only the assignments in the block "Resource file paths" should stay in there, with removed "> /dev/null" which is somehow in there. Accomplishing this needs some additional sed magic in the ebuild-src_install-phase: sed -n "s,export \(G4.\+DATA=\"\).*\(/share/Geant.\+/data/.\+\) > /dev/null ; pwd\`,\1${EPREFIX}/usr\2,p" This works for me, an additional echo "G4INCLUDE=\"/usr/include/Geant4\"" >> 99geant should do the rest. Reproducible: Always
Created attachment 336268 [details] Geant 4.9.6 with the sed-line in src_install patched as described I added the ebuild with the change to the sed-line in src_install applied, it works fine for me. I did NOT add G4INCLUDE to the environment file, because I realized this should not be necessary (geant4-config should be used by everything linking against geant4).
Comment on attachment 336268 [details] Geant 4.9.6 with the sed-line in src_install patched as described --- geant-4.9.6.ebuild 2012-12-14 17:51:50.000000000 +0100 +++ - 2013-01-21 13:30:57.823816745 +0100 @@ -72,7 +72,7 @@ dodoc ReleaseNotes/Patch${mypv}-*.txt use examples && doins -r examples if use data ; then - sed "s,export \(G4.\+DATA=\"\).*\(/share/Geant.\+/data/.\+\); pwd\`,\1${EPREFIX}/usr\2," \ + sed -n "s,export \(G4.\+DATA=\"\).*\(/share/Geant.\+/data/.\+\) > /dev/null ; pwd\`,\1${EPREFIX}/usr\2,p" \ "${CMAKE_BUILD_DIR}/InstallTreeFiles/geant4.sh" > 99geant doenvd 99geant fi
+ 21 Jan 2013; Sébastien Fabbro <bicatali@gentoo.org> geant-4.9.6.ebuild: + Fixed the environment file when the data use flag is enabled, bug #453224 + thanks Oliver Freyermuth +