source: trunk/dports/math/plda/Portfile @ 116356

Last change on this file since 116356 was 116356, checked in by sean@…, 6 years ago

plda: use mpi portgroup

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# -*- 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
2# $Id: Portfile 116356 2014-01-23 20:13:19Z sean@macports.org $
3
4PortSystem          1.0
5PortGroup           mpi 1.0
6
7compilers.choose    cc cxx
8mpi.choose
9mpi.setup
10
11name                plda
12version             3.1
13revision            3
14categories          math textproc
15maintainers         hum openmaintainer
16
17description         A parallel C++ implementation of fast Gibbs sampling of Latent Dirichlet Allocation
18
19long_description    plda is a parallel C++ implementation of fast Gibbs sampling of \
20                    Latent Dirichlet Allocation (LDA).
21
22homepage            http://code.google.com/p/plda/
23platforms           darwin
24license             Apache-2
25
26master_sites        googlecode
27checksums           rmd160  f1551328db9eabd99d0ed29d2352e94fcd0249d0 \
28                    sha256  aae495f96fdbf048b71080dec4506f242044ce40930ad2fdf5ad71e4fedad682
29
30worksrcdir          ${name}
31
32variant universal   {}
33
34use_configure       no
35
36build.target        lda infer
37
38pre-build {
39    build.args      CC=${configure.cxx} \
40                    CFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]"
41}
42
43if {[mpi_variant_isset]} {
44    build.target        lda infer mpi_lda
45    post-extract {
46        reinplace "s/mpicxx/${mpi.cxx} -Wno-type-safety/" Makefile
47    }
48    post-destroot {
49        xinstall -m 755 ${worksrcpath}/mpi_lda ${destroot}${prefix}/bin/mpi_plda
50    }
51}
52
53destroot {
54    # install binaries as 'plda' and 'plda_infer'.
55    xinstall -m 755 ${worksrcpath}/lda   ${destroot}${prefix}/bin/${name}
56    xinstall -m 755 ${worksrcpath}/infer ${destroot}${prefix}/bin/${name}_infer
57    # install additional documents.
58    set doc_dir  ${prefix}/share/doc/${name}
59    xinstall -m 755 -d ${destroot}${doc_dir}
60    xinstall -m 644 -W ${worksrcpath} \
61        COPYING README \
62        ${destroot}${doc_dir}
63    # install a useful script and a sample data file.
64    set plda_dir ${prefix}/share/${name}
65    xinstall -m 755 -d ${destroot}${plda_dir}
66    xinstall -m 755 ${worksrcpath}/view_model.py          ${destroot}${plda_dir}
67    xinstall -m 644 ${worksrcpath}/testdata/test_data.txt ${destroot}${plda_dir}
68    reinplace "s|/usr/bin/python2\.4|/usr/bin/env python|" \
69        ${destroot}${plda_dir}/view_model.py
70}
Note: See TracBrowser for help on using the repository browser.