aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--science/Makefile1
-rw-r--r--science/mcstas/Makefile43
-rw-r--r--science/mcstas/distinfo2
-rw-r--r--science/mcstas/pkg-deinstall30
-rw-r--r--science/mcstas/pkg-descr7
-rw-r--r--science/mcstas/pkg-install29
-rw-r--r--science/mcstas/pkg-plist84
7 files changed, 196 insertions, 0 deletions
diff --git a/science/Makefile b/science/Makefile
index a6b3ea42992e..286a7ca49382 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -79,6 +79,7 @@
SUBDIR += linsmith
SUBDIR += massxpert
SUBDIR += mbdyn
+ SUBDIR += mcstas
SUBDIR += medit
SUBDIR += meep
SUBDIR += mei
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