diff options
author | Patrick Lauer <patrick@gentoo.org> | 2009-04-25 16:24:08 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2009-04-25 16:24:08 +0000 |
commit | 2fadf0ff79055f77d82d26bbd3438d7b0052649d (patch) | |
tree | 09f8da855d780bcd151ffccbbd8a9bb08a80f80c /sci-libs/openfoam-utilities/openfoam-utilities-1.5_p20090311.ebuild | |
parent | Initial import from sunrise. Thanks to Oliver Borm for the ebuild and the sun... (diff) | |
download | gentoo-2-2fadf0ff79055f77d82d26bbd3438d7b0052649d.tar.gz gentoo-2-2fadf0ff79055f77d82d26bbd3438d7b0052649d.tar.bz2 gentoo-2-2fadf0ff79055f77d82d26bbd3438d7b0052649d.zip |
Initial import from sunrise. Thanks to Oliver Borm for the ebuild and the sunrise people for massaging it into shape.
(Portage version: 2.2_rc31/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/openfoam-utilities/openfoam-utilities-1.5_p20090311.ebuild')
-rw-r--r-- | sci-libs/openfoam-utilities/openfoam-utilities-1.5_p20090311.ebuild | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/sci-libs/openfoam-utilities/openfoam-utilities-1.5_p20090311.ebuild b/sci-libs/openfoam-utilities/openfoam-utilities-1.5_p20090311.ebuild new file mode 100644 index 000000000000..a37590c52d46 --- /dev/null +++ b/sci-libs/openfoam-utilities/openfoam-utilities-1.5_p20090311.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/openfoam-utilities/openfoam-utilities-1.5_p20090311.ebuild,v 1.1 2009/04/25 16:24:08 patrick Exp $ + +EAPI="2" + +inherit eutils versionator multilib toolchain-funcs + +MY_PN="OpenFOAM" +MY_PV=$(get_version_component_range 1-2) +MY_P="${MY_PN}-${MY_PV}" + +DESCRIPTION="OpenFOAM - utilities" +HOMEPAGE="http://www.opencfd.co.uk/openfoam/" +SRC_URI="mirror://sourceforge/foam/${MY_P}.General.gtgz -> ${MY_P}.General.tgz + http://omploader.org/vMWRlMQ/${MY_PN}-git-${PVR}.patch + http://omploader.org/vMWRlMA/${MY_P}-svn.patch" + +LICENSE="GPL-2" +SLOT="1.5" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="!=sci-libs/openfoam-${MY_PV}* + !=sci-libs/openfoam-bin-${MY_PV}* + =sci-libs/openfoam-solvers-${MY_PV}*" +DEPEND="${RDEPEND} + >=sys-devel/gcc-4.1" + +S=${WORKDIR}/${MY_P} +INSDIR="/usr/$(get_libdir)/${MY_PN}/${MY_P}" + +pkg_setup() { + # just to be sure the right profile is selected (gcc-config) + if ! version_is_at_least 4.1 $(gcc-version) ; then + die "${PN} requires >=sys-devel/gcc-4.1 to compile." + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${MY_P}-compile.patch + epatch "${DISTDIR}"/${MY_P}-svn.patch + epatch "${DISTDIR}"/${MY_PN}-git-${PVR}.patch + epatch "${FILESDIR}"/${MY_P}-ggi.patch + + chmod +x applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake +} + +src_compile() { + cp -a ${INSDIR}/etc/{bashrc,settings.sh} "${S}"/etc/. || die "cannot copy bashrc" + + # This is a hack, due to the meta ebuild: + sed -i -e "s|FOAM_LIB=\$WM_PROJECT_DIR/lib|FOAM_LIB=${INSDIR}/lib|" \ + -e "s|FOAM_LIBBIN=\$FOAM_LIB|FOAM_LIBBIN=\$WM_PROJECT_DIR/lib|" \ + -e "s|_foamAddLib \$FOAM_USER_LIBBIN|_foamAddLib \$FOAM_LIB|" \ + etc/settings.sh || die "could not replace paths" + + sed -i -e "s|-L\$(LIB_WM_OPTIONS_DIR)|-L\$(LIB_WM_OPTIONS_DIR) -L${INSDIR}/lib|" \ + wmake/Makefile || die "could not replace search paths" + + sed -i -e "s|(FOAM_LIBBIN)|(FOAM_LIB)|" applications/utilities/postProcessing/velocityField/{flowType,Pe,uprime,vorticity,enstrophy,Q,Co,Lambda2,Mach}/Make/options || die "cannot change LIB dir" + sed -i -e "s|(FOAM_LIBBIN)|(FOAM_LIB)|" applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options || die "cannot change LIB dir" + + export FOAM_INST_DIR="${WORKDIR}" + source etc/bashrc + + cd applications/utilities + wmake all || die "could not build OpenFOAM utilities" +} + +src_install() { + insopts -m0755 + insinto ${INSDIR}/applications/bin + doins -r applications/bin/* + + insinto ${INSDIR}/lib + doins -r lib/* +} |