source: trunk/dports/textproc/sphinx/Portfile

Last change on this file was 125650, checked in by pixilla@…, 3 years ago

textproc/sphinx:

  • Remove mysql sphinx plugin subports committed by mistake, they are not ready.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.0 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 125650 2014-09-23 16:30:01Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                sphinx
7version             2.2.4
8categories          textproc net
9license             GPL-2
10platforms           darwin
11maintainers         nomaintainer
12
13description         Sphinx is a full-text search engine
14
15long_description    Sphinx is a full-text search engine, meant to provide \
16                    fast, size-efficient and relevant fulltext search \
17                    functions to other applications. Sphinx was specially \
18                    designed to integrate well with SQL databases and \
19                    scripting languages. Currently built-in data sources \
20                    support fetching data either via direct connection to \
21                    MySQL or PostgreSQL, or from an XML pipe.
22
23homepage            http://sphinxsearch.com/
24master_sites        ${homepage}files/
25distname            ${name}-${version}-release
26
27checksums           rmd160  44d282421b62bbeb7dc269849bcc366bd16722a9 \
28                    sha256  c76a88789ca1d7d86df9869718ad217ae8a72740b9e84f2b98b61fa47feb64ef
29
30if {${name} eq ${subport}} {
31depends_lib         port:expat \
32                    port:libiconv
33
34post-extract {
35    # Copy launchd plists to worksrcpath
36    file copy ${filespath}/org.macports.${name}.plist ${worksrcpath}/org.macports.${name}.plist
37}
38
39#patchfiles          endian.patch
40post-patch {
41    reinplace "s|@NAME@|${name}|g" ${worksrcpath}/org.macports.${name}.plist
42    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/org.macports.${name}.plist
43}
44
45configure.args      --datadir=${prefix}/share/doc \
46                    --sysconfdir=${prefix}/etc/${name} \
47                    --localstatedir=${prefix}/var/${name} \
48                    --without-mysql \
49                    --without-unixodbc
50
51destroot.keepdirs   ${destroot}${prefix}/var/${name}/data \
52                    ${destroot}${prefix}/var/${name}/log
53post-destroot {
54    file mkdir ${destroot}${prefix}/share/${name}
55    copy ${worksrcpath}/api \
56        ${destroot}${prefix}/share/${name}/api
57    file mkdir ${destroot}${prefix}/var/${name}/data
58    file mkdir ${destroot}${prefix}/var/${name}/log
59    file mkdir ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}
60    file copy ${worksrcpath}/org.macports.${name}.plist \
61        ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/
62}
63
64post-activate {
65    if {![file exists ${prefix}/etc/${name}/${name}.conf]} {
66        copy ${prefix}/etc/${name}/${name}.conf.dist \
67            ${prefix}/etc/${name}/${name}.conf
68    }
69}
70
71startupitem.create      yes
72startupitem.executable  ${prefix}/bin/searchd --nodetach
73
74test.run            yes
75
76variant postgresql82 conflicts postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 description {Enable PostgreSQL 8.2 support} {
77    depends_lib-append      port:postgresql82
78    configure.args-append   --with-pgsql \
79                            --with-pgsql-includes=${prefix}/include/postgresql82 \
80                            --with-pgsql-libs=${prefix}/lib/postgresql82
81}
82
83variant postgresql83 conflicts postgresql82 postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 description {Enable PostgreSQL 8.3 support} {
84    depends_lib-append      port:postgresql83
85    configure.args-append   --with-pgsql \
86                            --with-pgsql-includes=${prefix}/include/postgresql83 \
87                            --with-pgsql-libs=${prefix}/lib/postgresql83
88}
89
90variant postgresql84 conflicts postgresql82 postgresql83 postgresql90 postgresql91 postgresql92 postgresql93 description {Enable PostgreSQL 8.4 support} {
91    depends_lib-append      port:postgresql84
92    configure.args-append   --with-pgsql \
93                            --with-pgsql-includes=${prefix}/include/postgresql84 \
94                            --with-pgsql-libs=${prefix}/lib/postgresql84
95}
96
97variant postgresql90 conflicts postgresql82 postgresql83 postgresql84 postgresql91 postgresql92 postgresql93 description {Enable PostgreSQL 9.0 support} {
98    depends_lib-append      port:postgresql90
99    configure.args-append   --with-pgsql \
100                            --with-pgsql-includes=${prefix}/include/postgresql90 \
101                            --with-pgsql-libs=${prefix}/lib/postgresql90
102}
103
104variant postgresql91 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql92 postgresql93 description {Enable PostgreSQL 9.1 support} {
105    depends_lib-append      port:postgresql91
106    configure.args-append   --with-pgsql \
107                            --with-pgsql-includes=${prefix}/include/postgresql91 \
108                            --with-pgsql-libs=${prefix}/lib/postgresql91
109}
110
111variant postgresql92 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql93 description {Enable PostgreSQL 9.2 support} {
112    depends_lib-append      port:postgresql92
113    configure.args-append   --with-pgsql \
114                            --with-pgsql-includes=${prefix}/include/postgresql92 \
115                            --with-pgsql-libs=${prefix}/lib/postgresql92
116}
117
118variant postgresql93 conflicts postgresql82 postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 description {Enable PostgreSQL 9.3 support} {
119    depends_lib-append      port:postgresql93
120    configure.args-append   --with-pgsql \
121                            --with-pgsql-includes=${prefix}/include/postgresql93 \
122                            --with-pgsql-libs=${prefix}/lib/postgresql93
123}
124
125variant mysql5 conflicts mysql51 mysql55 mysql56 mariadb percona description {Enable MySQL 5 support} {
126    depends_lib-append      path:bin/mysql_config5:mysql5
127    configure.args-delete   --without-mysql
128    configure.args-append   --with-mysql-includes=${prefix}/include/mysql5/mysql \
129                            --with-mysql-libs=${prefix}/lib/mysql5/mysql
130}
131
132variant mysql51 conflicts mysql5 mysql55 mysql56 mariadb percona description {Enable MySQL 5.1 support} {
133    depends_lib-append      port:mysql51
134    configure.args-delete   --without-mysql
135    configure.args-append   --with-mysql=${prefix}/lib/mysql51
136}
137
138variant mysql55 conflicts mysql5 mysql51 mysql56 mariadb percona description {Enable MySQL 5.5 support} {
139    depends_lib-append      port:mysql55
140    configure.args-delete   --without-mysql
141    configure.args-append   --with-mysql=${prefix}/lib/mysql55
142}
143
144variant mysql56 conflicts mysql5 mysql51 mysql55 mariadb percona description {Enable MySQL 5.6 support} {
145    depends_lib-append      port:mysql56
146    configure.args-delete   --without-mysql
147    configure.args-append   --with-mysql=${prefix}/lib/mysql56
148}
149
150variant mariadb conflicts mysql5 mysql51 mysql55 percona description {Enable MariaDB support} {
151    depends_lib-append      port:mariadb
152    configure.args-delete   --without-mysql
153    configure.args-append   --with-mysql=${prefix}/lib/mariadb
154}
155
156variant percona conflicts mysql5 mysql51 mysql55 mariadb description {Enable Percona support} {
157    depends_lib-append      port:percona
158    configure.args-delete   --without-mysql
159    configure.args-append   --with-mysql=${prefix}/lib/percona
160}
161
162if {![variant_isset postgresql82] && ![variant_isset postgresql83] && ![variant_isset postgresql84] && ![variant_isset postgresql90] && ![variant_isset postgresql91] && ![variant_isset postgresql92] && ![variant_isset postgresql93] && ![variant_isset mysql5] && ![variant_isset mysql51] && ![variant_isset mysql55] && ![variant_isset mysql56] && ![variant_isset mariadb] && ![variant_isset percona]} {
163    default_variants +mysql5
164}
165
166livecheck.type      regex
167livecheck.url       ${homepage}downloads/release/
168livecheck.regex     ${name}-(\[0-9.\]+)-release${extract.suffix}
169} else {
170    livecheck.type      none
171}
172
173subport libsphinxclient {
174    license             LGPL-2
175   
176    description         C library to talk to the Sphinx full-text search engine
177   
178    long_description    ${description}
179   
180    worksrcdir          ${worksrcdir}/api/${subport}
181   
182    # build shared library too
183    use_autoreconf      yes
184   
185    use_parallel_build  no
186}
Note: See TracBrowser for help on using the repository browser.