source: trunk/dports/textproc/sphinx/Portfile @ 99045

Last change on this file since 99045 was 99045, checked in by ryandesign@…, 8 years ago

sphinx: add libsphinxclient subport (#26736)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.5 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 99045 2012-10-25 01:57:39Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                sphinx
7version             2.0.6
8revision            1
9categories          textproc net
10license             GPL-2
11platforms           darwin
12maintainers         nomaintainer
13
14description         Sphinx is a full-text search engine
15
16long_description    Sphinx is a full-text search engine, meant to provide \
17                    fast, size-efficient and relevant fulltext search \
18                    functions to other applications. Sphinx was specially \
19                    designed to integrate well with SQL databases and \
20                    scripting languages. Currently built-in data sources \
21                    support fetching data either via direct connection to \
22                    MySQL or PostgreSQL, or from an XML pipe.
23
24homepage            http://sphinxsearch.com/
25master_sites        ${homepage}files/
26distname            ${name}-${version}-release
27
28checksums           rmd160  6fd53230457e62a6aabcb5321265abd8ea324cf6 \
29                    sha256  de943c397efda706661b3a12e12e9f8cc8a03bf6c02c5a6ba967a06384feede2
30
31if {${name} == ${subport}} {
32depends_lib         port:expat \
33                    port:libiconv
34
35patchfiles          endian.patch
36
37configure.args      --datadir=${prefix}/share/doc \
38                    --sysconfdir=${prefix}/etc/sphinx \
39                    --without-mysql \
40                    --without-unixodbc
41
42test.run            yes
43
44variant postgres requires postgresql82 description {Legacy compatibility variant} {}
45
46variant postgresql82 conflicts postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 description {Enable PostgreSQL 8.2 support} {
47    depends_lib-append      port:postgresql82
48    configure.args-append   --with-pgsql \
49                            --with-pgsql-includes=${prefix}/include/postgresql82 \
50                            --with-pgsql-libs=${prefix}/lib/postgresql82
51}
52
53variant postgresql83 conflicts postgresql82 postgresql84 postgresql90 postgresql91 postgresql92 description {Enable PostgreSQL 8.3 support} {
54    depends_lib-append      port:postgresql83
55    configure.args-append   --with-pgsql \
56                            --with-pgsql-includes=${prefix}/include/postgresql83 \
57                            --with-pgsql-libs=${prefix}/lib/postgresql83
58}
59
60variant postgresql84 conflicts postgresql82 postgresql83 postgresql90 postgresql91 postgresql92 description {Enable PostgreSQL 8.4 support} {
61    depends_lib-append      port:postgresql84
62    configure.args-append   --with-pgsql \
63                            --with-pgsql-includes=${prefix}/include/postgresql84 \
64                            --with-pgsql-libs=${prefix}/lib/postgresql84
65}
66
67variant postgresql90 conflicts postgresql82 postgresql83 postgresql84 postgresql91 postgresql92 description {Enable PostgreSQL 9.0 support} {
68    depends_lib-append      port:postgresql90
69    configure.args-append   --with-pgsql \
70                            --with-pgsql-includes=${prefix}/include/postgresql90 \
71                            --with-pgsql-libs=${prefix}/lib/postgresql90
72}
73
74variant postgresql91 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql92 description {Enable PostgreSQL 9.1 support} {
75    depends_lib-append      port:postgresql91
76    configure.args-append   --with-pgsql \
77                            --with-pgsql-includes=${prefix}/include/postgresql91 \
78                            --with-pgsql-libs=${prefix}/lib/postgresql91
79}
80
81variant postgresql92 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 description {Enable PostgreSQL 9.2 support} {
82    depends_lib-append      port:postgresql92
83    configure.args-append   --with-pgsql \
84                            --with-pgsql-includes=${prefix}/include/postgresql92 \
85                            --with-pgsql-libs=${prefix}/lib/postgresql92
86}
87
88variant mysql5 conflicts mysql51 mysql55 mariadb percona description {Enable MySQL 5 support} {
89    depends_lib-append      path:bin/mysql_config5:mysql5
90    configure.args-delete   --without-mysql
91    configure.args-append   --with-mysql-includes=${prefix}/include/mysql5/mysql \
92                            --with-mysql-libs=${prefix}/lib/mysql5/mysql
93}
94
95variant mysql51 conflicts mysql5 mysql55 mariadb percona description {Enable MySQL 5.1 support} {
96    depends_lib-append      port:mysql51
97    configure.args-delete   --without-mysql
98    configure.args-append   --with-mysql-includes=${prefix}/include/mysql51/mysql \
99                            --with-mysql-libs=${prefix}/lib/mysql51/mysql
100}
101
102variant mysql55 conflicts mysql5 mysql51 mariadb percona description {Enable MySQL 5.5 support} {
103    depends_lib-append      port:mysql55
104    configure.args-delete   --without-mysql
105    configure.args-append   --with-mysql-includes=${prefix}/include/mysql55/mysql \
106                            --with-mysql-libs=${prefix}/lib/mysql55/mysql
107}
108
109variant mariadb conflicts mysql5 mysql51 mysql55 percona description {Enable MariaDB support} {
110    depends_lib-append      port:mariadb
111    configure.args-delete   --without-mysql
112    configure.args-append   --with-mysql-includes=${prefix}/include/mariadb/mysql \
113                            --with-mysql-libs=${prefix}/lib/mariadb/mysql
114}
115
116variant percona conflicts mysql5 mysql51 mysql55 mariadb description {Enable Percona support} {
117    depends_lib-append      port:percona
118    configure.args-delete   --without-mysql
119    configure.args-append   --with-mysql-includes=${prefix}/include/percona/mysql \
120                            --with-mysql-libs=${prefix}/lib/percona/mysql
121}
122
123if {![variant_isset postgresql82] && ![variant_isset postgresql83] && ![variant_isset postgresql84] && ![variant_isset postgresql90] && ![variant_isset postgresql91] && ![variant_isset postgresql92] && ![variant_isset mysql5] && ![variant_isset mysql51] && ![variant_isset mysql55] && ![variant_isset mariadb] && ![variant_isset percona]} {
124    default_variants +mysql5
125}
126
127livecheck.type      regex
128livecheck.url       ${homepage}downloads/release/
129livecheck.regex     ${name}-(\[0-9.\]+)-release${extract.suffix}
130} else {
131    livecheck.type      none
132}
133
134subport libsphinxclient {
135    license             LGPL-2
136   
137    description         C library to talk to the Sphinx full-text search engine
138   
139    long_description    ${description}
140   
141    worksrcdir          ${worksrcdir}/api/${subport}
142   
143    # build shared library too
144    use_autoreconf      yes
145   
146    use_parallel_build  no
147}
Note: See TracBrowser for help on using the repository browser.