foamInstall in /usr/lib/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc is set to $HOME/$WM_PROJECT, but should be set to /usr/lib/$WM_PROJECT.
I can confirm this in 2.1.1-r1: ################################################################################ # USER EDITABLE PART: Changes made here may be lost with the next upgrade # # either set $FOAM_INST_DIR before sourcing this file or set # 'foamInstall' below to where OpenFOAM is installed # # Location of the OpenFOAM installation # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foamInstall=$HOME/$WM_PROJECT # foamInstall=~$WM_PROJECT # foamInstall=/opt/$WM_PROJECT # foamInstall=/usr/local/$WM_PROJECT # # END OF (NORMAL) USER EDITABLE PART ################################################################################
This bug persists for the new 2.2.0 ebuild. Manual changes to the bashrc after emerging are bad because they are not protected; bashrc will be overwritten with each new version. Can we move the environment to a conf.d or env.d file to make it Gentoo friendly?
Alternatively, we could just have the ebuild set $FOAM_INST_DIR as suggested in the bashrc...
Created attachment 348376 [details, diff] openfoam-2.2.0-bashrc.patch This change works fine four users of our HPC cluster on ~amd64.
I second leaving the install folder as is and patching the .bashrc file in the ebuild. At the moment my startOF aliases achieve the same thing: alias startOF21='export FOAM_INST_DIR=/usr/lib64/OpenFOAM;source /usr/lib64/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc' alias startOF22='export FOAM_INST_DIR=/usr/lib64/OpenFOAM;source /usr/lib64/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc'
+ 29 Jul 2013; Patrick Lauer <patrick@gentoo.org> +openfoam-2.2.1.ebuild, + metadata.xml: + Bump, fixes #478370 #428418 #463538