diff options
author | pi <pi@FreeBSD.org> | 2015-01-05 17:15:55 +0800 |
---|---|---|
committer | pi <pi@FreeBSD.org> | 2015-01-05 17:15:55 +0800 |
commit | 6fe483d27e212485c115160f0ab416e85633deda (patch) | |
tree | a187b0ef63ca2341688d5d4a126ef0a96a99aa7a /science/mcstas | |
parent | 7f0193a8acd697c30428560564d2d5f3c953340f (diff) | |
download | freebsd-ports-gnome-6fe483d27e212485c115160f0ab416e85633deda.tar.gz freebsd-ports-gnome-6fe483d27e212485c115160f0ab416e85633deda.tar.zst freebsd-ports-gnome-6fe483d27e212485c115160f0ab416e85633deda.zip |
New port: science/mcstas
Monte Carlo ray tracing simulations of neutron experiments.
McStas is a tool for simulating neutron instrumentation and experiments
using a ray-tracing formalism. Currently the main use of McStas is
in the field of instrument design.
WWW: http://www.mcstas.org
PR: 194846
Submitted by: Erik B. Knudsen <erkn@fysik.dtu.dk>
Diffstat (limited to 'science/mcstas')
-rw-r--r-- | science/mcstas/Makefile | 43 | ||||
-rw-r--r-- | science/mcstas/distinfo | 2 | ||||
-rw-r--r-- | science/mcstas/pkg-deinstall | 30 | ||||
-rw-r--r-- | science/mcstas/pkg-descr | 7 | ||||
-rw-r--r-- | science/mcstas/pkg-install | 29 | ||||
-rw-r--r-- | science/mcstas/pkg-plist | 84 |
6 files changed, 195 insertions, 0 deletions
diff --git a/science/mcstas/Makefile b/science/mcstas/Makefile new file mode 100644 index 000000000000..49d703463fca --- /dev/null +++ b/science/mcstas/Makefile @@ -0,0 +1,43 @@ +# Created by: Erik B Knudsen <erkn@fysik.dtu.dk> +# $FreeBSD$ + +PORTNAME= mcstas +PORTVERSION= 2.1 +#PORTREVISION= beta +CATEGORIES= science +MASTER_SITES= http://download.mcstas.org/${PORTNAME}-${PORTVERSION}/unix/ +DISTNAME= ${PORTNAME}-${PORTVERSION}-src +DISTFILES= McStas-${PORTVERSION}-UNIX-src.tar.gz +DIST_SUBDIR= ${PORTNAME} +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER= erkn@fysik.dtu.dk +COMMENT= Monte Carlo neutron ray tracing package + +LICENSE= GPLv2 + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-src + +USES= cmake gmake bison:build +#should perhaps use the toolchain file - but remember the arch +CMAKE_ARGS= "-Denable_mcstas=1" +GNU_CONFIGURE= yes +#USE_GMAKE= yes +USE_BISON= yes + +.include <bsd.port.pre.mk> + +# this is necessary since mcxtrace and mcstas are packaged in a +# single tarball in which the kernel, component library, manual, +# and tool tarballs reside +post-fetch: +.if !exists(${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX}) + cd ${DISTDIR}/${DIST_SUBDIR};\ + ${TAR} --strip-components 1 -xzf ${DISTFILES} McStas-2.1-UNIX-src/${DISTNAME}.tar.gz; +.endif + +post-stage: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/mcstas/2.1/bin/mcstas + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/mcstas/2.1/bin/mcformat + +.include <bsd.port.post.mk> diff --git a/science/mcstas/distinfo b/science/mcstas/distinfo new file mode 100644 index 000000000000..1060d2c16f9f --- /dev/null +++ b/science/mcstas/distinfo @@ -0,0 +1,2 @@ +SHA256 (mcstas/McStas-2.1-UNIX-src.tar.gz) = 70d5b33d67ea9b8e4c276b4e8c7ece907ac28ec63f523d7e0cbcc9e425b4aaf4 +SIZE (mcstas/McStas-2.1-UNIX-src.tar.gz) = 27807879 diff --git a/science/mcstas/pkg-deinstall b/science/mcstas/pkg-deinstall new file mode 100644 index 000000000000..9db0cb3c3765 --- /dev/null +++ b/science/mcstas/pkg-deinstall @@ -0,0 +1,30 @@ +#!/bin/sh + +PKG_PREFIX=${PKG_PREFIX:-/usr/local} + +if [ $# -ne 2 ]; then + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 +fi + +pname=${1%-*} +pversion=${1##*-} + +#echo the extracted port name is $pname +#echo the extracted port version is $pversion + +execs="mcstas mcformat" + +case $2 in + DEINSTALL) + + if [ ! -f "${PKG_PREFIX}/bin" ]; then + echo "Deinstalling links to ${1} executables in ${PKG_PREFIX}/bin."; + for target in ${execs}; do + rm ${PKG_PREFIX}/bin/${target}; + done + fi + ;; +esac + +exit 0 diff --git a/science/mcstas/pkg-descr b/science/mcstas/pkg-descr new file mode 100644 index 000000000000..5d47fb370ab2 --- /dev/null +++ b/science/mcstas/pkg-descr @@ -0,0 +1,7 @@ +Monte Carlo ray tracing simulations of neutron experiments. + +McStas is a tool for simulating neutron instrumentation and experiments +using a ray-tracing formalism. Currently the main use of McStas is +in the field of instrument design. + +WWW: http://www.mcstas.org diff --git a/science/mcstas/pkg-install b/science/mcstas/pkg-install new file mode 100644 index 000000000000..242933726294 --- /dev/null +++ b/science/mcstas/pkg-install @@ -0,0 +1,29 @@ +#!/bin/sh + +PKG_PREFIX=${PKG_PREFIX:-/usr/local} + +if [ $# -ne 2 ]; then + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 +fi + +pname=${1%-*} +pversion=${1##*-} + +#echo the extracted port name is $pname +#echo the extracted port version is $pversion + +execs="mcstas mcformat" + +case $2 in + POST-INSTALL) + if [ ! -f "${PKG_PREFIX}/bin" ]; then + echo "Installing links to ${1} executables in ${PKG_PREFIX}/bin."; + for target in ${execs}; do + ln -s ${PKG_PREFIX}/${pname}/${pversion}/bin/${target} ${PKG_PREFIX}/bin/${target}; + done + fi + ;; +esac + +exit 0 diff --git a/science/mcstas/pkg-plist b/science/mcstas/pkg-plist new file mode 100644 index 000000000000..278e44225c91 --- /dev/null +++ b/science/mcstas/pkg-plist @@ -0,0 +1,84 @@ +mcstas/2.1/LGPL +mcstas/2.1/LICENSE.LIB +mcstas/2.1/NOMENCLATURE +mcstas/2.1/README +mcstas/2.1/bin/mcformat +mcstas/2.1/bin/mcstas +mcstas/2.1/data/Al.nxs +mcstas/2.1/data/Cu.nxs +mcstas/2.1/doc/man/man1/mcformat-2.1.1 +mcstas/2.1/doc/man/man1/mcstas-2.1.1 +mcstas/2.1/environment +mcstas/2.1/module +mcstas/2.1/share/adapt_tree-lib.c +mcstas/2.1/share/adapt_tree-lib.h +mcstas/2.1/share/general.c +mcstas/2.1/share/general.h +mcstas/2.1/share/interoff-lib.c +mcstas/2.1/share/interoff-lib.h +mcstas/2.1/share/interpolation/array-utils.c +mcstas/2.1/share/interpolation/array-utils.h +mcstas/2.1/share/interpolation/natural/README +mcstas/2.1/share/interpolation/natural/delaunay.c +mcstas/2.1/share/interpolation/natural/delaunay.h +mcstas/2.1/share/interpolation/natural/example.c +mcstas/2.1/share/interpolation/natural/natural.c +mcstas/2.1/share/interpolation/natural/natural.h +mcstas/2.1/share/interpolation/natural/predicates.c +mcstas/2.1/share/interpolation/natural/utils-extra.c +mcstas/2.1/share/interpolation/natural/utils-extra.h +mcstas/2.1/share/interpolation/natural/vertex.h +mcstas/2.1/share/interpolation/nearest/README +mcstas/2.1/share/interpolation/nearest/example.c +mcstas/2.1/share/interpolation/nearest/kdtree.c +mcstas/2.1/share/interpolation/nearest/kdtree.h +mcstas/2.1/share/interpolation/nearest/vertex.h +mcstas/2.1/share/interpolation/resample.c +mcstas/2.1/share/interpolation/resample.h +mcstas/2.1/share/intersection.c +mcstas/2.1/share/intersection.h +mcstas/2.1/share/mccode-r.c +mcstas/2.1/share/mccode-r.h +mcstas/2.1/share/mcstas-r.c +mcstas/2.1/share/mcstas-r.h +mcstas/2.1/share/nxslib/README.TXT +mcstas/2.1/share/nxslib/nxs.c +mcstas/2.1/share/nxslib/nxs.h +mcstas/2.1/share/nxslib/sgclib.c +mcstas/2.1/share/nxslib/sgfind.c +mcstas/2.1/share/nxslib/sghkl.c +mcstas/2.1/share/nxslib/sginfo.h +mcstas/2.1/share/nxslib/sgio.c +mcstas/2.1/share/nxslib/sgsi.c +mcstas/2.1/share/pol-lib.c +mcstas/2.1/share/pol-lib.h +mcstas/2.1/share/read_table-lib.c +mcstas/2.1/share/read_table-lib.h +mcstas/2.1/share/ref-lib.c +mcstas/2.1/share/ref-lib.h +mcstas/2.1/share/vitess-lib.c +mcstas/2.1/share/vitess-lib.h +@dir mcstas/2.1/bin +@dir mcstas/2.1/contrib/Gas_tables +@dir mcstas/2.1/contrib/ISIS_tables +@dir mcstas/2.1/contrib/Neutronics +@dir mcstas/2.1/contrib/doc +@dir mcstas/2.1/contrib +@dir mcstas/2.1/data +@dir mcstas/2.1/doc/man/man1 +@dir mcstas/2.1/doc/man +@dir mcstas/2.1/doc +@dir mcstas/2.1/examples +@dir mcstas/2.1/misc +@dir mcstas/2.1/monitors +@dir mcstas/2.1/obsolete +@dir mcstas/2.1/optics +@dir mcstas/2.1/samples +@dir mcstas/2.1/share/interpolation/natural +@dir mcstas/2.1/share/interpolation/nearest +@dir mcstas/2.1/share/interpolation +@dir mcstas/2.1/share/nxslib +@dir mcstas/2.1/share +@dir mcstas/2.1/sources +@dir mcstas/2.1 +@dir mcstas |