source: trunk/dports/math/plda/Portfile

Last change on this file was 129985, checked in by sean@…, 3 years ago

mpi-1.0: remove mpi.choose

This variable never worked correctly and caused mpi ports to wrongly list
fortran variants when only a c/cxx compiler was needed. So, we use
compilers.choose now.

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