diff options
author | Alessandro Barbieri <lssndrbarbieri@gmail.com> | 2021-10-01 00:44:12 +0200 |
---|---|---|
committer | Alessandro Barbieri <lssndrbarbieri@gmail.com> | 2021-10-03 20:30:43 +0200 |
commit | d00e6e81d3740762c729c3a743357e69342d6001 (patch) | |
tree | debcca43a3d4a1578b93680586b17a4addafdd8d /sci-physics | |
parent | dev-python/python-barbicanclient: new version (diff) | |
download | guru-d00e6e81d3740762c729c3a743357e69342d6001.tar.gz guru-d00e6e81d3740762c729c3a743357e69342d6001.tar.bz2 guru-d00e6e81d3740762c729c3a743357e69342d6001.zip |
sci-physics/mbdyn: new package
Package-Manager: Portage-3.0.26, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'sci-physics')
-rw-r--r-- | sci-physics/mbdyn/Manifest | 1 | ||||
-rw-r--r-- | sci-physics/mbdyn/files/mbdyn-octave-no-global-install.patch | 11 | ||||
-rw-r--r-- | sci-physics/mbdyn/files/mbdyn-respect-libtool.patch | 14 | ||||
-rw-r--r-- | sci-physics/mbdyn/mbdyn-1.7.3_p20210925.ebuild | 301 | ||||
-rw-r--r-- | sci-physics/mbdyn/metadata.xml | 113 |
5 files changed, 440 insertions, 0 deletions
diff --git a/sci-physics/mbdyn/Manifest b/sci-physics/mbdyn/Manifest new file mode 100644 index 000000000..e4c3170d8 --- /dev/null +++ b/sci-physics/mbdyn/Manifest @@ -0,0 +1 @@ +DIST mbdyn-ae57618c4e7b030b59707b8c156a6e2a94a6efd0.tar.bz2 3949822 BLAKE2B 26d27d16173f8f615973c51f7877c87f2e4aef414b9253afacbf6bcc37a5e4b995f4b9de044ed557a9a46d49ed2012e30d253cc6b5f0a1d47cd2cb3d95ca9c77 SHA512 01337f5653300847a2ccf7c332109d1052549d7ba189319630029a9dd8e7a08e06c12b1071d3eea05fafecb393793561b656ad8744d0a3754850a100e8029190 diff --git a/sci-physics/mbdyn/files/mbdyn-octave-no-global-install.patch b/sci-physics/mbdyn/files/mbdyn-octave-no-global-install.patch new file mode 100644 index 000000000..340a1458d --- /dev/null +++ b/sci-physics/mbdyn/files/mbdyn-octave-no-global-install.patch @@ -0,0 +1,11 @@ +--- a/utils/Makefile.am 2021-09-05 14:28:23.674273509 +0200 ++++ b/utils/Makefile.am 2021-09-05 14:28:56.501524237 +0200 +@@ -336,7 +336,7 @@ + @printf "Octave package file \"%s\" created\n" $(PKG_FILE) + + install-exec-local-oct: $(PKG_FILE) +- @$(OCTAVE_CLI) -qfHW --eval "pkg install -global $<" ++ @$(OCTAVE_CLI) -qfHW --eval "pkg install -local $<" + @printf "package \"%s\" installed\n" $(PKG_NAME) + else + install-exec-local-oct: diff --git a/sci-physics/mbdyn/files/mbdyn-respect-libtool.patch b/sci-physics/mbdyn/files/mbdyn-respect-libtool.patch new file mode 100644 index 000000000..50b93ebf5 --- /dev/null +++ b/sci-physics/mbdyn/files/mbdyn-respect-libtool.patch @@ -0,0 +1,14 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -1653,9 +1653,9 @@ + AC_DEFINE(HAVE_LTDL_H,1,[define if you have <ltdl.h>]) + AC_CHECK_LIB(ltdl, lt_dlinit,[have_lt_dlinit=yes],[have_lt_dlinit=no]) + if test $have_lt_dlinit = "yes" ; then +- eval `libtool --tag=CC --config|grep '^wl='` ++ eval `$LIBTOOL --tag=CC --config|grep '^wl='` + LIBS="$LIBS -lltdl" +- EXPORT_DYNAMIC_FLAG_SPEC=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` ++ EXPORT_DYNAMIC_FLAG_SPEC=`($LIBTOOL --config; echo eval echo \\$export_dynamic_flag_spec) | sh` + have_runtime_loading=yes + MODULE_LOADPATH=$libexecdir + fi diff --git a/sci-physics/mbdyn/mbdyn-1.7.3_p20210925.ebuild b/sci-physics/mbdyn/mbdyn-1.7.3_p20210925.ebuild new file mode 100644 index 000000000..5750bf3df --- /dev/null +++ b/sci-physics/mbdyn/mbdyn-1.7.3_p20210925.ebuild @@ -0,0 +1,301 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +COMMIT="ae57618c4e7b030b59707b8c156a6e2a94a6efd0" +MYP="${PN}-${COMMIT}" +PYTHON_COMPAT=( python3_{8..10} ) + +inherit autotools fortran-2 pam python-single-r1 + +DESCRIPTION="A general purpose Multibody Dynamics analysis software" +HOMEPAGE="https://www.mbdyn.org" +SRC_URI="https://public.gitlab.polimi.it/DAER/mbdyn/-/archive/${COMMIT}/${MYP}.tar.bz2" +S="${WORKDIR}/${MYP}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +# mbdyn-module-FMU # needs fmi-library +# mbdyn-module-aerodyn # needs aerodyn +# mbdyn-module-cudatest # needs cuda +IUSE_MBDYN_MODULE=" + mbdyn-module-asynchronous_machine + mbdyn-module-autodiff_test + mbdyn-module-ballbearing_contact + mbdyn-module-bullet + mbdyn-module-charm + mbdyn-module-constlaw-f90 + mbdyn-module-constlaw-f95 + mbdyn-module-constlaw + mbdyn-module-cont-contact + mbdyn-module-controller + mbdyn-module-convtest + mbdyn-module-cyclocopter + mbdyn-module-damper-gandhi + mbdyn-module-damper-graall + mbdyn-module-damper-hydraulic + mbdyn-module-damper + mbdyn-module-diff + mbdyn-module-dot + mbdyn-module-drive-test + mbdyn-module-drive + mbdyn-module-dummy + mbdyn-module-eu2phi + mbdyn-module-fab-electric + mbdyn-module-fab-motion + mbdyn-module-fab-sbearings + mbdyn-module-fabricate + mbdyn-module-flightgear + mbdyn-module-friction + mbdyn-module-friction3 + mbdyn-module-hfelem + mbdyn-module-hid + mbdyn-module-hunt-crossley + mbdyn-module-hydrodynamic_plain_bearing + mbdyn-module-hydrodynamic_plain_bearing2 + mbdyn-module-imu + mbdyn-module-indvel + mbdyn-module-inline_friction + mbdyn-module-inplane_friction + mbdyn-module-journal_bearing + mbdyn-module-leapmotion + mbdyn-module-loadinc + mbdyn-module-marble + mbdyn-module-md + mbdyn-module-mds + mbdyn-module-minmaxdrive + mbdyn-module-multi_step_drive + mbdyn-module-muscles + mbdyn-module-namespace + mbdyn-module-nodedistdrive + mbdyn-module-nonsmooth-node + mbdyn-module-ns + mbdyn-module-octave + mbdyn-module-randdrive + mbdyn-module-rollercoaster + mbdyn-module-rotor-loose-coupling + mbdyn-module-scalarfunc + mbdyn-module-switch_drive + mbdyn-module-tclpgin + mbdyn-module-template + mbdyn-module-template2 + mbdyn-module-triangular_contact + mbdyn-module-udunits + mbdyn-module-uni_in_plane + mbdyn-module-wheel2 + mbdyn-module-wheel4 +" +IUSE="${IUSE_MBDYN_MODULE//_/-} ann arpack autodiff blender boost bullet chaco crypt +debug eig ginac jdqz +mbc metis mpi multithread-naive netcdf octave openblas +pam pastix pmpi python qrupdate rt sasl schur sparse superlu taucs tests threads +udunits +y12" + +# dev-libs/blitz +RDEPEND=" + dev-libs/libltdl + virtual/blas + virtual/lapack + + ann? ( sci-libs/ann ) + arpack? ( sci-libs/arpack ) + blender? ( media-gfx/blender:= ) + boost? ( dev-libs/boost ) + bullet? ( sci-physics/bullet ) + chaco? ( sci-mathematics/chaco ) + crypt? ( virtual/libcrypt ) + ginac? ( sci-mathematics/ginac ) + jdqz? ( sci-libs/jdqz ) + mbdyn-module-damper? ( sci-libs/gsl ) + mpi? ( virtual/mpi[cxx] ) + metis? ( sci-libs/metis ) + netcdf? ( sci-libs/netcdf-cxx:* ) + octave? ( sci-mathematics/octave ) + openblas? ( sci-libs/openblas ) + pam? ( sys-libs/pam ) + pastix? ( sci-libs/pastix ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]') + ) + qrupdate? ( sci-libs/qrupdate ) + sasl? ( dev-libs/cyrus-sasl ) + sparse? ( + sci-libs/klu + sci-libs/umfpack + ) + superlu? ( sci-libs/superlu_mt ) + taucs? ( sci-libs/taucs ) + threads? ( dev-libs/libatomic_ops ) + udunits? ( sci-libs/udunits ) +" +# rtai? ( sys-libs/rtai ) +DEPEND=" + ${RDEPEND} + blender? ( sys-apps/pkgcore ) +" +BDEPEND="python? ( dev-lang/swig )" + +PATCHES=( + "${FILESDIR}/${PN}-octave-no-global-install.patch" +) +# "${FILESDIR}/${PN}-respect-libtool.patch" +REQUIRED_USE=" + mbdyn-module-bullet? ( bullet ) + mbdyn-module-octave? ( octave ) + mbdyn-module-udunits? ( udunits ) + mbdyn-module-wheel4? ( ginac ) + multithread-naive? ( threads ) + pmpi? ( mpi ) + python? ( ${PYTHON_REQUIRED_USE} ) + schur? ( + || ( chaco metis ) + mpi + ) +" +# ?? ( rt rtai ) + +pkg_setup() { + fortran-2_pkg_setup +} + +src_prepare() { + default + eautoreconf + #from bootstrap.sh + if test -d contrib ; then + for i in `find contrib -name 'bootstrap.sh'` ; do + dir=`echo "${i}" | sed "s/\(.*\)\/bootstrap\.sh/\1/"` + pushd "${dir}" || die + eautoreconf + popd || die + done + fi +} + +src_configure() { + python_setup +# append-cxxflags "-I/usr/include/openmpi/ompi/mpi/cxx/" + local myconf=( + --disable-static + --disable-Werror + --enable-runtime-loading + --with-lapack + --without-charm + --without-g2c + --without-goto + --without-harwell + --without-pardiso + --without-rtai + --without-static-modules + --without-strumpack + --without-wsmp + + $(use_enable autodiff) + $(use_enable crypt) + $(use_enable debug) + $(use_enable eig) + $(use_enable mbc) + $(use_enable multithread-naive) + $(use_enable netcdf) + $(use_enable octave) + $(use_enable octave octave-utils) + $(use_enable python) + $(use_enable schur) + $(use_enable tests install_test_progs) + $(use_enable threads multithread) + + $(use_with ann) + $(use_with arpack) + $(use_with boost) + $(use_with bullet) + $(use_with ginac) + $(use_with jdqz) + $(use_with metis) + $(use_with openblas) + $(use_with pam) + $(use_with pastix) + $(use_with qrupdate) + $(use_with rt) + $(use_with sasl sasl2) + $(use_with sparse klu) + $(use_with sparse suitesparseqr) + $(use_with sparse umfpack) + $(use_with superlu) + $(use_with taucs) + $(use_with threads) + $(use_with y12) + ) + + if ( use autodiff && use sparse ); then + myconf+=( "--enable-sparse-autodiff" ) + else + myconf+=( "--disable-sparse-autodiff" ) + fi + if ( use debug && use mpi ); then + myconf+=( "--enable-debug-mpi" ) + else + myconf+=( "--disable-debug-mpi" ) + fi + if use mpi; then + if use pmpi; then + myconf+=( "--with-mpi=pmpi" ) + else + myconf+=( "--with-mpi" ) + fi + else + myconf+=( "--without-mpi" ) + fi + + declare -A mbdynmodules + for m in ${IUSE_MBDYN_MODULE} ; do + mbdynmodules[${m//_/-}]="${m/mbdyn-module-/}" + done + + local usemodules="" + for u in ${IUSE_MBDYN_MODULE//_/-} ; do + use ${u} && usemodules+=" ${mbdynmodules[${u}]}" + done + + # remove leading whitespace characters + usemodules="${usemodules#"${usemodules%%[![:space:]]*}"}" + + myconf+=( "--with-module=\"${usemodules}\"" ) + + econf "${myconf[@]}" +} + +src_install() { + mkdir -p "${HOME}/octave" || die +# octave --exec "pkg prefix ${T}" || die + emake DESTDIR="${D}" install + + if use blender; then + local blenderslots="$(pquery -I media-gfx/blender --one-attr slot)" + local blenderscriptdir + for i in $blenderslots ; do + blenderscriptdir="/usr/share/blender/${i}/scripts/" + insinto "${blenderscriptdir}" + doins -r contrib/blenderandmbdyn + done + fi + + if use python; then + local site="${D}/$(python_get_sitedir)" + mkdir -p "${site}" || die + mv "${D}/usr/libexec/mbpy" "${site}" || die + fi + + use pam && dopamd etc/pam.d/mbdyn + + mkdir -p "${D}/usr/share/octave/mbdyn" || die + mv "${D}"/usr/share/octave/*.m "${D}/usr/share/octave/mbdyn" || die + + if use octave; then + insinto "/usr/share/octave/mbdyn" + doins -r contrib/MLS/. + fi + + find "${D}" -name '*.la' -delete || die +} diff --git a/sci-physics/mbdyn/metadata.xml b/sci-physics/mbdyn/metadata.xml new file mode 100644 index 000000000..58bd967bc --- /dev/null +++ b/sci-physics/mbdyn/metadata.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>lssndrbarbieri@gmail.com</email> + <name>Alessandro Barbieri</name> + </maintainer> + <upstream> + <bugs-to>https://public.gitlab.polimi.it/DAER/mbdyn/-/issues</bugs-to> + </upstream> + <use> + <flag name="ann">With ANN<pkg>sci-libs/ann</pkg> support</flag> + <flag name="arpack">With <pkg>sci-libs/arpack</pkg> math library</flag> + <flag name="autodiff">Enable automatic differentiation in order to compute the Jacobian matrix</flag> + <flag name="blender">Install <pkg>media-gfx/blender</pkg> plugins</flag> + <flag name="boost">With <pkg>dev-libs/boost</pkg> support</flag> + <flag name="bullet">With <pkg>sci-physics/bullet</pkg> support</flag> + <flag name="chaco">With <pkg>sci-mathematics/chaco</pkg> model partitioning support</flag> + <flag name="crypt">Enable crypt</flag> + <flag name="eig">Enable direct eigensolution</flag> + <flag name="ginac">With <pkg>sci-mathematics/ginac</pkg> support</flag> + <flag name="jdqz">With <pkg>sci-libs/jdqz</pkg> math library</flag> + <flag name="mbc">Enable MBC - multibody communication library</flag> + <!--<flag name="mbdyn-module-FMU">This is a module to import and cosimulation of FMUs, developed using FMI standards, for MBDyn</flag>--> + <!--<flag name="mbdyn-module-aerodyn">This is MBDyn's module for the wind-turbine aerodynamics library AeroDyn</flag>--> + <flag name="mbdyn-module-asynchronous-machine">The purpose of this code is the simulation of an asynchronous electrical machine as a part of a multibody model</flag> + <flag name="mbdyn-module-autodiff-test">This element implements a inline joint with friction</flag> + <flag name="mbdyn-module-ballbearing-contact">ball bearing contact</flag> + <flag name="mbdyn-module-bullet"><pkg>sci-physics/bullet</pkg> module</flag> + <flag name="mbdyn-module-charm">This module implements a user-defined induced velocity element based on CDI's CHARM free wake</flag> + <flag name="mbdyn-module-constlaw-f90">This directory contains an example of run-time loadable constitutive law written in Fortran 90</flag> + <flag name="mbdyn-module-constlaw-f95">This directory contains an example of run-time loadable constitutive law written in Fortran 95</flag> + <flag name="mbdyn-module-constlaw">This directory contains an example of run-time loadable constitutive law</flag> + <flag name="mbdyn-module-cont-contact">continuous contact</flag> + <flag name="mbdyn-module-controller">controller module</flag> + <flag name="mbdyn-module-convtest">convergence test module</flag> + <!--<flag name="mbdyn-module-cudatest"></flag>--> + <flag name="mbdyn-module-cyclocopter">This module implements induced velocity models for cycloidal rotors</flag> + <flag name="mbdyn-module-damper-gandhi">Gandhi, F. and Chopra, I., "An analytical model for a nonlinear elastomeric lag damper and its effect on aeromechanical stability in hover" Journal of the American Helicopter Society, Vol. 39, 1994, pp. 59-69.</flag> + <flag name="mbdyn-module-damper-graall">GRAALL Damper Constitutive Law</flag> + <flag name="mbdyn-module-damper-hydraulic">Hydraulic Damper Constitutive Law</flag> + <flag name="mbdyn-module-damper">It implements a 1D constitutive law based on a generic nonlinear rheological formula, whose coefficients are computed by means of parameter identification from experimental measurements</flag> + <flag name="mbdyn-module-diff">diff drive module</flag> + <flag name="mbdyn-module-dot">dot language module</flag> + <flag name="mbdyn-module-drive-test">drive test module</flag> + <flag name="mbdyn-module-drive">example of run-time loadable drive</flag> + <flag name="mbdyn-module-dummy">Dummy module --- does nothing, used to test the infrastructure</flag> + <flag name="mbdyn-module-eu2phi">converts three Euler angles into the corresponding Euler vector</flag> + <flag name="mbdyn-module-fab-electric">Library of electric components for "digital fabrication" machines</flag> + <flag name="mbdyn-module-fab-motion">Library of motion transmission components for "digital fabrication" machines</flag> + <flag name="mbdyn-module-fab-sbearings">Library of bearings for "digital fabrication" machines</flag> + <flag name="mbdyn-module-fabricate">Library of components of "digital fabrication" machines</flag> + <flag name="mbdyn-module-flightgear">flightgear module</flag> + <flag name="mbdyn-module-friction">eXperimental friction model</flag> + <flag name="mbdyn-module-friction3">eXperimental friction model (2nd try)</flag> + <flag name="mbdyn-module-hfelem">Harmonic Excitation Element</flag> + <flag name="mbdyn-module-hid">This module registers a file driver that captures the input from HID USB devices (only tested with some joysticks)</flag> + <flag name="mbdyn-module-hunt-crossley">HuntCrossley constitutive law</flag> + <flag name="mbdyn-module-hydrodynamic-plain-bearing">This module implements a hydrodynamic plain bearing according to Hans Juergen Butenschoen 1976 Das hydrodynamische zylindrische Gleitlager endlicher Breite unter instationaerer Belastung</flag> + <flag name="mbdyn-module-hydrodynamic-plain-bearing2">module hydrodynamic plain bearing2</flag> + <flag name="mbdyn-module-imu">implements two uses of a IMU</flag> + <flag name="mbdyn-module-indvel">This module implements a dummy induced velocity model</flag> + <flag name="mbdyn-module-inline-friction">This element implements a inline joint with friction</flag> + <flag name="mbdyn-module-inplane-friction">In plane friction</flag> + <flag name="mbdyn-module-journal-bearing">This element implements a journal bearing with lugre friction</flag> + <flag name="mbdyn-module-leapmotion">leapmotion hand</flag> + <flag name="mbdyn-module-loadinc">load increment normalization</flag> + <flag name="mbdyn-module-marble">marble model for icecube robot</flag> + <flag name="mbdyn-module-md">MD module</flag> + <flag name="mbdyn-module-mds">mds module</flag> + <flag name="mbdyn-module-minmaxdrive">minmaxdrive module</flag> + <flag name="mbdyn-module-multi-step-drive">multi step drive module</flag> + <flag name="mbdyn-module-muscles">muscle module</flag> + <flag name="mbdyn-module-namespace">namespace module</flag> + <flag name="mbdyn-module-nodedistdrive">node dist drive module</flag> + <flag name="mbdyn-module-nonsmooth-node">Defines a unilateral constraint in form of a contact between a node and one or more planes, optionally with friction</flag> + <flag name="mbdyn-module-ns">ns1 module</flag> + <flag name="mbdyn-module-octave">octave module</flag> + <flag name="mbdyn-module-randdrive">rand drive module</flag> + <flag name="mbdyn-module-rollercoaster">rollercoaster module</flag> + <flag name="mbdyn-module-rotor-loose-coupling">rotor loose coupling</flag> + <flag name="mbdyn-module-scalarfunc">example of run-time loadable scalar function</flag> + <flag name="mbdyn-module-switch-drive">switch drive module</flag> + <flag name="mbdyn-module-tclpgin">tcl plugin</flag> + <flag name="mbdyn-module-template">template module; use it as guideline for user-defined elements</flag> + <flag name="mbdyn-module-template2">template module; use it as guideline for user-defined elements</flag> + <flag name="mbdyn-module-triangular-contact">This element implements unilateral contact with friction between an arbitrary rigid body, represented by a triangular mesh, and a set of nodes with arbitrary offsets</flag> + <flag name="mbdyn-module-udunits">This module adds a namespace "units" with the only function "convert", which is thus invoked as "units::convert"</flag> + <flag name="mbdyn-module-uni-in-plane">This element implements the unilateral contact between a point and a plane</flag> + <flag name="mbdyn-module-wheel2">Connects 2 structural nodes: Wheel Ground</flag> + <flag name="mbdyn-module-wheel4">L. Gagnon, M. J. Richard, P. Masarati, M. Morandini, and G. Dore. Multibody simulation of tires operating on an uneven road. In Multibody Dynamics 2011, 4-7 July 2011</flag> + <flag name="metis">With <pkg>sci-libs/metis</pkg> model partitioning support</flag> + <flag name="mpi">With MPI support</flag> + <flag name="multithread-naive">Enable multithread naive solver</flag> + <flag name="netcdf">Enable NetCDF based binary output</flag> + <flag name="octave">Enable <pkg>sci-mathematics/octave</pkg> support</flag> + <flag name="openblas">With <pkg>sci-libs/openblas</pkg> implementation</flag> + <flag name="pam">With <pkg>sys-libs/pam</pkg> support</flag> + <flag name="pastix">With <pkg>sci-libs/pastix</pkg> math library</flag> + <flag name="pmpi">With pmpi for MPI profiling</flag> + <flag name="qrupdate">With <pkg>sci-libs/qrupdate</pkg> library</flag> + <flag name="rt">With POSIX realtime support</flag> + <flag name="sasl">With <pkg>dev-libs/cyrus-sasl</pkg> support</flag> + <flag name="schur">Enable Schur parallel solver</flag> + <flag name="sparse">Enable sparse solvers</flag> + <flag name="superlu">With <pkg>sci-libs/superlu</pkg> math library - eXperimental</flag> + <flag name="taucs">With <pkg>sci-libs/taucs</pkg> math library - eXperimental</flag> + <flag name="tests">Enable installation of some test programs which are otherwise not installed</flag> + <flag name="threads">With threads</flag> + <flag name="y12">With Y12 sparse math library</flag> + <flag name="udunits">With <pkg>sci-libs/udunits</pkg></flag> + </use> +</pkgmetadata> |