Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 453224 - sci-physics/geant-4.9.6: Environment file 99geant in env.d is incorrect
Summary: sci-physics/geant-4.9.6: Environment file 99geant in env.d is incorrect
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Physics related packages
URL:
Whiteboard:
Keywords: EBUILD, PATCH
Depends on:
Blocks:
 
Reported: 2013-01-20 20:12 UTC by Oliver Freyermuth
Modified: 2013-01-21 17:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Geant 4.9.6 with the sed-line in src_install patched as described (geant-4.9.6.ebuild,2.83 KB, text/plain)
2013-01-20 20:54 UTC, Oliver Freyermuth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Freyermuth 2013-01-20 20:12:05 UTC
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
Comment 1 Oliver Freyermuth 2013-01-20 20:54:59 UTC
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 2 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-21 12:31:04 UTC
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
Comment 3 Sébastien Fabbro (RETIRED) gentoo-dev 2013-01-21 17:17:47 UTC
+  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
+