source: trunk/dports/textproc/simstring/Portfile

Last change on this file was 133391, checked in by hum@…, 3 years ago

simstring: update to 20140723; fetch from github; add patch for libc++; add python port

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 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 133391 2015-02-28 11:42:51Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6
7github.setup        chokkan simstring 6209ea86d84f7043f8e19029d83299f458665ec5
8version             20140723
9categories          textproc math
10maintainers         hum openmaintainer
11
12description         A fast and simple algorithm for approximate string matching/retrieval
13long_description    SimString is a simple library for fast approximate string \
14                    retrieval. Approximate string retrieval finds strings in a \
15                    database whose similarity with a query string is no smaller \
16                    than a threshold. Finding not only identical but similar \
17                    strings, approximate string retrieval has various \
18                    applications including spelling correction, flexible \
19                    dictionary matching, duplicate detection, and record linkage.
20
21homepage            http://www.chokkan.org/software/simstring/
22platforms           darwin
23license             BSD
24
25checksums           rmd160  b583d69175504f70b7d761d9365b8a274628431a \
26                    sha256  298e292c597f21fd4d3e7a4e6478f9b73f46d04372b78c6ea0a901ecfeb52d2d
27
28if {[string match *clang* ${configure.cxx}] && ${configure.cxx_stdlib} == "libc++"} {
29    # https://github.com/chokkan/simstring/issues/16
30    patchfiles      patch-libc++.diff
31    notes "UTF16/32 not supported because of libc++ incompatibility"
32}
33
34depends_build       port:autoconf \
35                    port:automake \
36                    port:libtool
37
38use_autoconf        yes
39autoconf.cmd        ./autogen.sh
40
41# Python port
42subport py27-simstring {
43    PortGroup           python 1.0
44    name                py-simstring
45    python.versions     27
46    categories-append   textproc math
47    description         SimString Python module
48    long_description    ${description}
49    set python_dir      ${worksrcpath}/swig/python
50
51    depends_build-append  port:swig-python
52
53    use_configure       yes
54    build.dir           ${python_dir}
55    pre-build {
56        system -W ${python_dir} "./prepare.sh --swig"
57    }
58    build.target        build_ext
59    destroot.dir        ${python_dir}
60    post-destroot {
61        set exdir ${prefix}/share/examples/${subport}
62        xinstall -m 755 -d ${destroot}${exdir}
63        foreach py {sample.py sample_unicode.py} {
64            xinstall -m 755 ${python_dir}/${py} ${destroot}${exdir}
65            reinplace "s|#!/usr/bin/env python|#!${python.bin}|" ${destroot}${exdir}/${py}
66        }
67    }
68}
Note: See TracBrowser for help on using the repository browser.