source: trunk/dports/databases/mysql55-lib_mysqludf_xql/Portfile

Last change on this file was 98511, checked in by pixilla@…, 5 years ago

databases/mysql55-lib_mysqludf_xql:

  • New port, user defined function xql.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: Portfile 98511 2012-10-07 18:58:07Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6set package.name    lib_mysqludf_xql
7version             1.0.0
8set mysql.name      mysql55
9name                ${mysql.name}-${package.name}
10
11set mp.ports {
12    mysql5
13    mysql51
14    mysql55
15    mariadb
16    percona
17}
18set mp.names        {}
19foreach mp.port ${mp.ports} {
20
21    lappend mp.names "${mp.port}-${package.name}"
22}
23foreach mp.name ${mp.names} {
24
25    set idx [lsearch ${mp.names} ${mp.name}]
26    set mp.port [lindex ${mp.ports} $idx]
27    if {[string compare ${mp.name} ${name}] == 0 && [string compare ${mp.name} ${subport}] == 0} {
28
29        depends_lib-append  port:${mp.port}
30    } else {
31
32        subport ${mp.name} {
33   
34            set mysql.name      ${mp.port}
35            depends_lib-append  port:${mp.port}
36        }
37    }
38}
39
40categories          databases lang
41maintainers         pixilla
42platforms           darwin
43
44description         The lib_mysqludf_xql library provides an array of functions, which can be used \
45                    to create XML output directly from MySQL using a single SQL query.
46long_description    ${description} This prevents having to convert a MySQL result to XML in a PHP \
47                    script, Ruby script, etc. This improves performance and simplifies your code. \
48                    \
49                    The library provides the same functionality as SQL/XML, seen in MS SQL server \
50                    and Oracle. However it uses normal functions. By using subqueries the same \
51                    results as SQL/XML can be generated.
52
53homepage            http://www.mysqludf.org/${package.name}/
54master_sites        ${homepage}
55
56dist_subdir         lib_mysqludf
57distname            ${package.name}-${version}
58
59checksums           rmd160  6750ca0e97ee096194c33703d0b35b645920a0ee \
60                    sha256  f992fcd77f7596aee32ddeccbd9b31aa67c9cf2cd04f84959db63f87e1ca0321
61
62depends_lib-append  port:libxml2
63
64configure.args-append \
65                    --with-libxml2=${prefix}/lib/xml2Conf.sh \
66                    --with-mysql=${prefix}/lib/${mysql.name}/bin/mysql_config \
67                    --with-mysqlbin=${prefix}/lib/${mysql.name}/bin/ \
68                    --with-mysqladmin=${prefix}/lib/${mysql.name}/bin/mysqladmin \
69                    --with-mysqltest=${prefix}/lib/${mysql.name}/bin/mysqltestc
70
71post-destroot {
72    xinstall -m 755 -d ${destroot}${prefix}/share/${mysql.name}/${package.name}
73    xinstall -m 644 -W ${worksrcpath} \
74        API AUTHORS COPYING ChangeLog INSTALL NEWS README installdb.sql uninstalldb.sql \
75        ${destroot}${prefix}/share/${mysql.name}/${package.name}
76    copy ${worksrcpath}/test \
77        ${destroot}${prefix}/share/${mysql.name}/${package.name}
78}
79
80livecheck.url       ${master_sites}
81livecheck.type      regex
82livecheck.regex     "${package.name}-(\\d+\\.\\d+(\[\\drc.\]+)?)${extract.suffix}"
83
84notes "
85
86    This port installs two mysql scripts to simplify the install/uninstall of the ${package.name}
87    UDFs (user-defined-functions).
88   
89    Install:
90    \$ ${prefix}/lib/${mysql.name}/bin/mysql -uroot -p < ${prefix}/share/${mysql.name}/${package.name}/installdb.sql
91
92    Uninstall:
93    \$ ${prefix}/lib/${mysql.name}/bin/mysql -uroot -p < ${prefix}/share/${mysql.name}/${package.name}/uninstalldb.sql
94   
95    API:
96    $ cat ${prefix}/share/${mysql.name}/${package.name}/API
97    "
Note: See TracBrowser for help on using the repository browser.