diff options
Diffstat (limited to 'sci-libs/openfoam-bin')
-rw-r--r-- | sci-libs/openfoam-bin/Manifest | 6 | ||||
-rw-r--r-- | sci-libs/openfoam-bin/metadata.xml | 11 | ||||
-rw-r--r-- | sci-libs/openfoam-bin/openfoam-bin-1.6.ebuild | 107 |
3 files changed, 124 insertions, 0 deletions
diff --git a/sci-libs/openfoam-bin/Manifest b/sci-libs/openfoam-bin/Manifest new file mode 100644 index 000000000000..0816c16e2fef --- /dev/null +++ b/sci-libs/openfoam-bin/Manifest @@ -0,0 +1,6 @@ +DIST OpenFOAM-1.6-compile.patch.bz2 5835 BLAKE2B 2fe8f45180cf8bac09047f0e59e758782442adc482144d2cb5cd9c860e985e2c196e58ac45c4066f6efb0896e7e3539f388d876c9088b85a4772605a1554b48d SHA512 625d6b30444bb5cfabd81b94ffcdad082dabafc7ee59eb70ab2f6cf816ee395bc7b9b5697308ed95a83c75cf2778ebd03eaa284fbcc3c17c226ac7443f5e76df +DIST OpenFOAM-1.6.General.tgz 241760751 BLAKE2B 34670d7b3ffc47cc78729a9f84c036d5f2de11d4c478e437ed3fef5c5d19a77b35da682ddb28e63a4d7148e4c6b4edcf19c86d7c005eebb7fd01ab1622d18a06 SHA512 88988426c5cbb980e0df82c0a8b6396490c8ac6f6a3633da9d3629f5a017849b4d8637cc0f5003e33f0dd5825003b9405ede6f868b5f747be5afb6f31c96d128 +DIST OpenFOAM-1.6.linux64GccDPOpt.tgz 44957838 BLAKE2B 058b2befa8beb438aedc5ade8d31067ec8938875f861bec9b9967cb4803f0994af205e84d79438cf3dbf9a890a76effaf24368843e7b6469651c7ba7591d51b3 SHA512 bc9f428d729b918597db5b507cb2d558ce52d3faeb1eabcb9b2382a4d4b937906073d336e98e1b5bc1c5a62d0658603348abd7870695001215e467033a8d8f02 +DIST OpenFOAM-1.6.linuxGccDPOpt.tgz 41587474 BLAKE2B c8f585b7e3fd20514ffc57d10aa2dd7e93c4aaa78ffa090f31a1f5d45854b457e1887adaf6504e0a92422674c2b0babce9eb3d725547e53e3430bd065cceeb7e SHA512 54c764780d563555766c4c4507b6fdd3f138a1cf7ec29e557a8ebc7040aee8626ce80672cf258196fbbabfedea21916ba5dc9dcab94a54d45fbae90ff0edee4b +EBUILD openfoam-bin-1.6.ebuild 2785 BLAKE2B 704d6dada2aba0a2e5e92bb71e459361cd6f9ab0aeec83e5a270b9aa91389c0bc8bb1b4ebe0e5036f0aa4adf5a80c95fcfd63624412e7e2625ad83b78f8a1287 SHA512 09b4fb9ecbb8b871f017a28150880cba9e9d163d1f785d5c79c6341122a83214663534cead65c626b5e1ba9fc1ce3b8220e9dc8d7aefbab0a9cd4dccec442b41 +MISC metadata.xml 321 BLAKE2B 0f842a095f2007a2a877d484525d519cdbd0baabeb9182a722b6ba869a736e02803c62d5166591f10acd46510ade247b21b953cc291348592ec0e941a9d58c74 SHA512 41fdfcf128d1878c48966236899c2edc777fac16d2a7fd2dc7507124a0e9c7ee442da7d2730e45efaa11561e3293678aee80d84b885695164a4122921b40774b diff --git a/sci-libs/openfoam-bin/metadata.xml b/sci-libs/openfoam-bin/metadata.xml new file mode 100644 index 000000000000..33f20063ea80 --- /dev/null +++ b/sci-libs/openfoam-bin/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">foam</remote-id> + </upstream> +</pkgmetadata> diff --git a/sci-libs/openfoam-bin/openfoam-bin-1.6.ebuild b/sci-libs/openfoam-bin/openfoam-bin-1.6.ebuild new file mode 100644 index 000000000000..bef10456aa1b --- /dev/null +++ b/sci-libs/openfoam-bin/openfoam-bin-1.6.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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="Open Field Operation and Manipulation - CFD Simulation Toolbox" +HOMEPAGE="http://www.opencfd.co.uk/openfoam/" +SRC_URI="mirror://sourceforge/foam/${MY_P}.General.gtgz -> ${MY_P}.General.tgz + x86? ( mirror://sourceforge/foam/${MY_P}.linuxGccDPOpt.gtgz -> ${MY_P}.linuxGccDPOpt.tgz ) + amd64? ( mirror://sourceforge/foam/${MY_P}.linux64GccDPOpt.gtgz -> ${MY_P}.linux64GccDPOpt.tgz ) + mirror://gentoo/${MY_P}-compile.patch.bz2" + +LICENSE="GPL-2" +SLOT="1.6" +KEYWORDS="-* ~amd64 ~x86" +IUSE="examples doc" + +DEPEND="!=sci-libs/openfoam-${MY_PV}* + !=sci-libs/openfoam-kernel-${MY_PV}* + !=sci-libs/openfoam-meta-${MY_PV}* + !=sci-libs/openfoam-solvers-${MY_PV}* + !=sci-libs/openfoam-utilities-${MY_PV}* + !=sci-libs/openfoam-wmake-${MY_PV}* + sci-visualization/opendx + virtual/mpi" +RDEPEND="${DEPEND} + =sys-libs/ncurses-5*" + +S=${WORKDIR}/${MY_P} +INSDIR="/usr/$(get_libdir)/${MY_PN}/${MY_P}" + +pkg_setup() { + ## binaries are compiled with gcc-4.3.3 + if ! version_is_at_least 4.3 $(gcc-version) ; then + die "${PN} requires >=sys-devel/gcc-4.3 in order to run." + fi + + elog + elog "In order to use ${MY_PN} you should add the following line to ~/.bashrc :" + elog + elog "alias startOF$(delete_all_version_separators ${MY_PV})='source ${INSDIR}/etc/bashrc'" + elog + elog "And everytime you want to use OpenFOAM you have to execute startOF$(delete_all_version_separators ${MY_PV})" + ewarn + ewarn "FoamX is deprecated since ${MY_PN}-1.5! " + ewarn +} + +src_prepare() { + epatch "${WORKDIR}"/${MY_P}-compile.patch +} + +src_configure() { + if has_version sys-cluster/mpich2 ; then + export WM_MPLIB=MPICH + export MPI_VERSION=mpich + elif has_version sys-cluster/openmpi ; then + export WM_MPLIB=OPENMPI + export MPI_VERSION=openmpi + else + die "You need one of the following mpi implementations: openmpi, mpich2" + fi + + sed -i -e "s|WM_MPLIB:=OPENMPI|WM_MPLIB:="${WM_MPLIB}"|" etc/bashrc + sed -i -e "s|setenv WM_MPLIB OPENMPI|setenv WM_MPLIB "${WM_MPLIB}"|" etc/cshrc + + use x86 && WM_OPTIONS="linuxGccDPOpt" + use amd64 && WM_OPTIONS="linux64GccDPOpt" + + mv lib/${WM_OPTIONS}/$MPI_VERSION* lib/${WM_OPTIONS}/$MPI_VERSION +} + +src_test() { + cd bin + ./foamInstallationTest +} + +src_install() { + insinto ${INSDIR} + doins -r etc + + use examples && doins -r tutorials + + insopts -m0755 + doins -r bin + + insinto ${INSDIR}/applications/bin + doins -r applications/bin/${WM_OPTIONS}/* + + insinto ${INSDIR}/lib + doins -r lib/${WM_OPTIONS}/* + + insinto ${INSDIR}/wmake + doins -r wmake/* + + dodoc {doc/Guides-a4/*.pdf,README} + + if use doc ; then + dohtml -r doc/Doxygen + fi +} |