forked from plumed/plumed2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Portfile.in
114 lines (95 loc) · 4.41 KB
/
Portfile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
# Notice that this rules out gcc variants.
# See https://github.com/macports/macports-ports/pull/1252
PortGroup cxx11 1.1
PortGroup mpi 1.0
PortGroup linear_algebra 1.0
PortGroup debug 1.0
version @_VERSION_@
revision @_REVISION_@
name plumed
categories science
# Most of the PLUMED code is L-GPL3. However, PLUMED containts
# molfile plugins from VMD that are released with a BSD-like license
# http://www.ks.uiuc.edu/Research/vmd/plugins/molfile/
license LGPL-3 BSD
maintainers {gmail.com:giovanni.bussi @GiovanniBussi} openmaintainer
description PLUMED is a plugin for molecular dynamics
long_description PLUMED is a plugin for molecular dynamics that can be used \
in combination with popular molecular dynamics codes to perform biased simulations. \
Additionally, it can be used as a standalone tool to analyze trajectories.
platforms darwin
homepage http://www.plumed.org/
@_FETCH_@
### This is required so that patch made with "git format-patch" work correctly
# patch.pre_args -p1
### In case patches from github should be included to fix behavior on macports one should
### - put patch files (as obtained with git format-patch) in files/ directory
### - list their name here:
# patchfiles file1 \
# file2
### etc
# Disable additional features.
# --disable-doc: Do not create documentation, and avoid searching for Doxygen.
# --disable-libsearch: Avoid searching libraries using their default names.
# This forces the libraries names to be explicitly passed (e.g. "-lz").
# It has the advantage that during compilation from source it does not
# link packages that are not explicitely required.
# --disable-static-patch: Avoid a number of tests that are only required when linking plumed
# statically to an MD code.
# --disable-mpi: Do not search for MPI compiler (replaced when enabling mpi, see below)
configure.args-append \
--disable-doc \
--disable-libsearch \
--disable-static-patch \
--disable-mpi \
--disable-python \
BASH_COMPLETION_DIR=${prefix}/share/bash-completion/completions
# Hardcode path for libplumedKernel.dylib.
# This allows to patch MD codes using the --runtime option but using as
# default kernel the installed one. In this way, MacPorts users
# can just use patched MD codes with the installed plumed or replace it
# by setting PLUMED_KERNEL at runtime
configure.cppflags-append "-D__PLUMED_DEFAULT_KERNEL=${prefix}/lib/libplumedKernel.dylib"
compilers.choose cc cxx
mpi.setup
# To enable mpi, replace a configure flag
if {[mpi_variant_isset]} {
configure.args-replace --disable-mpi --enable-mpi
# command should be included in a pre-configure block to access properly the mpi.exec variable
pre-configure {
# MPIEXEC is stored so that it can be used to perform tests
configure.args-append MPIEXEC="${mpi.exec}"
}
}
# Libraries.
# Library names are specified here to make sure that
# only requested packages are linked.
configure.ldflags-append \
-lxdrfile -lz -lgsl
depends_lib-append port:gsl \
port:xdrfile \
port:zlib
# C++ library
# Required in order to use clang with gcc library on old OSX versions.
# See https://github.com/macports/macports-ports/pull/1254
if [string match *clang* ${configure.compiler}] {
configure.ldflags-append -stdlib=${configure.cxx_stdlib}
}
# This variant enables optional modules in PLUMED.
# Notice that one of the optional modules (drr) requires boost_serialization
variant allmodules description {Enable all optional modules} {
configure.args-append --enable-modules=all
configure.args-append --enable-boost-serialization
configure.ldflags-append -lboost_serialization-mt
depends_lib-append port:boost
}
# Link lapack/blas libraries
pre-configure {
# commands should be included in a pre-configure block to access tcl variables
configure.ldflags-append ${linalglib}
}
# Allow running tests from MacPorts
test.run yes
test.target check