From 9e8cc175a04ae8dc7bbe7172482252cb2e8de2bf Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Tue, 5 Dec 2017 19:15:49 +0000 Subject: [PATCH] New port: science/mcxtrace: Monte Carlo X-ray tracing package PR: 206505 Submitted by: Erik B Knudsen Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D13216 --- science/Makefile | 1 + science/mcxtrace/Makefile | 28 ++++++++++++++++ science/mcxtrace/distinfo | 3 ++ .../patch-cmake_Modules_InstallMCCODE.cmake | 22 +++++++++++++ science/mcxtrace/pkg-descr | 9 ++++++ science/mcxtrace/pkg-plist | 32 +++++++++++++++++++ 6 files changed, 95 insertions(+) create mode 100644 science/mcxtrace/Makefile create mode 100644 science/mcxtrace/distinfo create mode 100644 science/mcxtrace/files/patch-cmake_Modules_InstallMCCODE.cmake create mode 100644 science/mcxtrace/pkg-descr create mode 100644 science/mcxtrace/pkg-plist diff --git a/science/Makefile b/science/Makefile index 5748d3013f9f..744b44ecd93c 100644 --- a/science/Makefile +++ b/science/Makefile @@ -96,6 +96,7 @@ SUBDIR += mbdyn SUBDIR += mcstas SUBDIR += mcstas-comps + SUBDIR += mcxtrace SUBDIR += medit SUBDIR += meep SUBDIR += mei diff --git a/science/mcxtrace/Makefile b/science/mcxtrace/Makefile new file mode 100644 index 000000000000..6fa57e31a1d3 --- /dev/null +++ b/science/mcxtrace/Makefile @@ -0,0 +1,28 @@ +# $FreeBSD$ + +PORTNAME= mcxtrace +DISTVERSION= 1.2 +DISTVERSIONSUFFIX= -src +CATEGORIES= science +MASTER_SITES= http://download.mcxtrace.org/${PORTNAME}-${DISTVERSION}/unix/mcxtrace-${DISTVERSION}-src/ + +MAINTAINER= erkn@fysik.dtu.dk +COMMENT= Monte Carlo X-ray tracing package + +LICENSE= LGPL21+ +LICENSE_FILE= ${WRKSRC}/lib/LGPL + +USES= bison:build cmake:outsource + +PLIST_SUB= DISTVERSION=${DISTVERSION} + +MXEXECS= mcxtrace mxformat + +post-install: +.for e in ${MXEXECS} + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/${PORTNAME}/${DISTVERSION}/bin/${e} + @${RLN} ${STAGEDIR}${PREFIX}/${PORTNAME}/${DISTVERSION}/bin/${e} ${STAGEDIR}${PREFIX}/bin/${e} +.endfor + @${RM} ${STAGEDIR}${PREFIX}/mcxtrace/${DISTVERSION}/LGPL + +.include diff --git a/science/mcxtrace/distinfo b/science/mcxtrace/distinfo new file mode 100644 index 000000000000..4bcf203f0cad --- /dev/null +++ b/science/mcxtrace/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1511475567 +SHA256 (mcxtrace-1.2-src.tar.gz) = 7202ff2c83ad24b6ff5dc7a601c529562492881596577dbb7ebefc025b09406a +SIZE (mcxtrace-1.2-src.tar.gz) = 266743 diff --git a/science/mcxtrace/files/patch-cmake_Modules_InstallMCCODE.cmake b/science/mcxtrace/files/patch-cmake_Modules_InstallMCCODE.cmake new file mode 100644 index 000000000000..7b148ed9a6be --- /dev/null +++ b/science/mcxtrace/files/patch-cmake_Modules_InstallMCCODE.cmake @@ -0,0 +1,22 @@ +--- cmake/Modules/InstallMCCODE.cmake.orig 2015-07-01 22:44:39 UTC ++++ cmake/Modules/InstallMCCODE.cmake +@@ -291,15 +291,14 @@ macro(installMCCODE) + # Man pages + install ( + FILES "${WORK}/doc/man/${FLAVOR}.1" +- DESTINATION ${FLAVOR}/${MCCODE_VERSION}/doc/man/man1 +- RENAME "${FLAVOR}${PROGRAM_SUFFIX}.1" ++ DESTINATION "man/man1" ++ RENAME "${FLAVOR}.1" + ) + install ( + FILES "${WORK}/doc/man/${FLAVOR_FMT}.1" +- DESTINATION "${FLAVOR}/${MCCODE_VERSION}/doc/man/man1" +- RENAME "${FLAVOR_FMT}${PROGRAM_SUFFIX}.1" ++ DESTINATION "man/man1" ++ RENAME "${FLAVOR_FMT}.1" + ) +- + # Binaries + install ( + PROGRAMS "${PROJECT_BINARY_DIR}/${FLAVOR}${DOT_EXE_SUFFIX}" diff --git a/science/mcxtrace/pkg-descr b/science/mcxtrace/pkg-descr new file mode 100644 index 000000000000..01221c18476d --- /dev/null +++ b/science/mcxtrace/pkg-descr @@ -0,0 +1,9 @@ +McXtrace - Monte Carlo ray tracing simulations of X-ray experiments. + +McXtrace is a tool for simulating X-ray instrumentation and experiments using a +ray-tracing formalism. Currently the main use of McXtrace is in the field of +synchrotron beamline instrumentation design, but various other uses have been +found, such as designing X-ray telescopes or for laboratory source-based +equipment. + +WWW: http://www.mcxtrace.org diff --git a/science/mcxtrace/pkg-plist b/science/mcxtrace/pkg-plist new file mode 100644 index 000000000000..45e513959586 --- /dev/null +++ b/science/mcxtrace/pkg-plist @@ -0,0 +1,32 @@ +bin/mcxtrace +bin/mxformat +mcxtrace/%%DISTVERSION%%/LICENSE.LIB +mcxtrace/%%DISTVERSION%%/NOMENCLATURE +mcxtrace/%%DISTVERSION%%/README +mcxtrace/%%DISTVERSION%%/bin/mcxtrace +mcxtrace/%%DISTVERSION%%/bin/mxformat +mcxtrace/%%DISTVERSION%%/data/Al.nxs +mcxtrace/%%DISTVERSION%%/data/Cu.nxs +mcxtrace/%%DISTVERSION%%/environment +mcxtrace/%%DISTVERSION%%/module +mcxtrace/%%DISTVERSION%%/share/adapt_tree-lib.c +mcxtrace/%%DISTVERSION%%/share/adapt_tree-lib.h +mcxtrace/%%DISTVERSION%%/share/interoff-lib.c +mcxtrace/%%DISTVERSION%%/share/interoff-lib.h +mcxtrace/%%DISTVERSION%%/share/mccode-r.c +mcxtrace/%%DISTVERSION%%/share/mccode-r.h +mcxtrace/%%DISTVERSION%%/share/mcxtrace-r.c +mcxtrace/%%DISTVERSION%%/share/mcxtrace-r.h +mcxtrace/%%DISTVERSION%%/share/nxslib/README.TXT +mcxtrace/%%DISTVERSION%%/share/nxslib/nxs.c +mcxtrace/%%DISTVERSION%%/share/nxslib/nxs.h +mcxtrace/%%DISTVERSION%%/share/nxslib/sgclib.c +mcxtrace/%%DISTVERSION%%/share/nxslib/sgfind.c +mcxtrace/%%DISTVERSION%%/share/nxslib/sghkl.c +mcxtrace/%%DISTVERSION%%/share/nxslib/sginfo.h +mcxtrace/%%DISTVERSION%%/share/nxslib/sgio.c +mcxtrace/%%DISTVERSION%%/share/nxslib/sgsi.c +mcxtrace/%%DISTVERSION%%/share/read_table-lib.c +mcxtrace/%%DISTVERSION%%/share/read_table-lib.h +man/man1/mcxtrace.1.gz +man/man1/mxformat.1.gz