aboutsummaryrefslogtreecommitdiffstats
path: root/biology/phyml/Makefile
blob: 4d512f5145dc49854b74d94b352ed255844099f9 (plain) (blame)
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
# Created by: ballen
# $FreeBSD$

PORTNAME=   phyml
DISTVERSIONPREFIX=  v
DISTVERSION=    3.2.0
PORTEPOCH=  1
CATEGORIES= biology

MAINTAINER= ports@FreeBSD.org
COMMENT=    Simple, fast, and accurate algorithm to estimate large phylogenies

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/COPYING

USE_GITHUB= yes
GH_ACCOUNT= stephaneguindon

USES=       autoreconf libtool pkgconfig
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --disable-beagle

PORTDOCS=   *
PORTEXAMPLES=   *
PLIST_FILES=    bin/phyml${BIN_SUFFIX}

OPTIONS_DEFINE=     DOCS EXAMPLES
OPTIONS_RADIO=      MPI
OPTIONS_RADIO_MPI=  MPICH2 OPENMPI

MPICH2_LIB_DEPENDS= libmpich.so:${PORTSDIR}/net/mpich2
MPICH2_MAKE_ARGS=   CC="${LOCALBASE}/bin/mpicc"
OPENMPI_LIB_DEPENDS=    libmpi.so:${PORTSDIR}/net/openmpi
OPENMPI_MAKE_ARGS=  CC="${LOCALBASE}/mpi/openmpi/bin/mpicc"

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MMPICH2} || ${PORT_OPTIONS:MOPENMPI}
CONFIGURE_ARGS+=    --enable-mpi
BIN_SUFFIX=     -mpi
.else
CONFIGURE_ARGS+=    --disable-mpi
BIN_SUFFIX=     # none
.endif

post-patch:
    @${REINPLACE_CMD} -e \
        's|-O2 .* $${ARCH_flag}|$${CFLAGS}|' ${WRKSRC}/configure.ac

post-install-DOCS-on:
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    (cd ${WRKSRC}/doc && ${INSTALL_DATA} *.pdf \
        ${STAGEDIR}${DOCSDIR})

post-install-EXAMPLES-on:
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    @(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . \
        ${STAGEDIR}${EXAMPLESDIR})

.include <bsd.port.mk>