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 111558 2013-09-25 19:46:20Z pixilla@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup github 1.0 |
---|
6 | |
---|
7 | |
---|
8 | set package.name lib_mysqludf_preg |
---|
9 | set mysql.name mysql55 |
---|
10 | github.setup mysqludf lib_mysqludf_preg 1.1 |
---|
11 | master_sites https://codeload.github.com/${github.author}/${github.project}/[string range ${extract.suffix} 1 end] |
---|
12 | name ${mysql.name}-${package.name} |
---|
13 | |
---|
14 | set mysql.ports {mysql5 mysql51 mysql55 mariadb percona} |
---|
15 | foreach mysql.port ${mysql.ports} { |
---|
16 | |
---|
17 | lappend mysql.extension.ports "${mysql.port}-${package.name}" |
---|
18 | } |
---|
19 | foreach mysql.extension.port ${mysql.extension.ports} { |
---|
20 | |
---|
21 | set idx [lsearch ${mysql.extension.ports} ${mysql.extension.port}] |
---|
22 | set mysql.port [lindex ${mysql.ports} $idx] |
---|
23 | if {${mysql.extension.port} == ${name} == ${subport}} { |
---|
24 | |
---|
25 | depends_lib-append port:${mysql.port} |
---|
26 | } else { |
---|
27 | |
---|
28 | subport ${mysql.port}-${package.name} { |
---|
29 | |
---|
30 | set mysql.name ${mysql.port} |
---|
31 | depends_lib-append port:${mysql.port} |
---|
32 | } |
---|
33 | } |
---|
34 | } |
---|
35 | |
---|
36 | categories databases lang |
---|
37 | maintainers pixilla openmaintainer |
---|
38 | platforms darwin |
---|
39 | |
---|
40 | description ${package.name} is a library of mysql UDFs (user-defined-functions) that \ |
---|
41 | provide access to the PCRE (perl compatible-regular-expressions) library for \ |
---|
42 | pattern matching. |
---|
43 | long_description ${description} The PCRE library is a set of functions that implement regular \ |
---|
44 | expression pattern matching using the same syntax and semantics as Perl 5. \ |
---|
45 | This syntax can often handle more complex expressions and capturing than \ |
---|
46 | standard regular expression implementations. |
---|
47 | |
---|
48 | dist_subdir lib_mysqludf |
---|
49 | distname ${package.name}-${version} |
---|
50 | distfiles ${distname} |
---|
51 | worksrcdir ${package.name}-${distname} |
---|
52 | checksums rmd160 0d0dcc2e80c593a0c8f0f1e19b71a4f823a2d49c \ |
---|
53 | sha256 a8e540cfcd8eaa427b31368772098b1b1cc963e56faa0d8e1dddb7352ace55cf |
---|
54 | |
---|
55 | configure.args-append \ |
---|
56 | --with-pcre=${prefix} \ |
---|
57 | --with-mysql=${prefix}/lib/${mysql.name}/bin/mysql_config \ |
---|
58 | --with-mysqlbin=${prefix}/lib/${mysql.name}/bin/ \ |
---|
59 | --with-mysqladmin=${prefix}/lib/${mysql.name}/bin/mysqladmin \ |
---|
60 | --with-mysqltest=${prefix}/lib/${mysql.name}/bin/mysqltestc |
---|
61 | |
---|
62 | post-destroot { |
---|
63 | xinstall -m 755 -d ${destroot}${prefix}/share/${mysql.name}/${package.name} |
---|
64 | xinstall -m 644 -W ${worksrcpath} \ |
---|
65 | AUTHORS COPYING ChangeLog INSTALL NEWS README.md installdb.sql uninstalldb.sql \ |
---|
66 | ${destroot}${prefix}/share/${mysql.name}/${package.name} |
---|
67 | copy ${worksrcpath}/test \ |
---|
68 | ${destroot}${prefix}/share/${mysql.name}/${package.name} |
---|
69 | delete ${destroot}${prefix}/share/${mysql.name}/${package.name}/test/Makefile |
---|
70 | delete ${destroot}${prefix}/share/${mysql.name}/${package.name}/test/Makefile.am |
---|
71 | delete ${destroot}${prefix}/share/${mysql.name}/${package.name}/test/Makefile.in |
---|
72 | } |
---|
73 | |
---|
74 | livecheck.url ${master_sites} |
---|
75 | livecheck.type regex |
---|
76 | livecheck.regex "${package.name}-(\\d+\\.\\d+(\[\\drc.\]+)?)${extract.suffix}" |
---|
77 | |
---|
78 | notes " |
---|
79 | |
---|
80 | This port installs two mysql scripts to simplify the install/uninstall of the ${package.name} |
---|
81 | UDFs (user-defined-functions) along with html documentation describing the functions syntax. |
---|
82 | |
---|
83 | Install: |
---|
84 | \$ ${prefix}/lib/${mysql.name}/bin/mysql -uroot -p < ${prefix}/share/${mysql.name}/${package.name}/installdb.sql |
---|
85 | |
---|
86 | Uninstall: |
---|
87 | \$ ${prefix}/lib/${mysql.name}/bin/mysql -uroot -p < ${prefix}/share/${mysql.name}/${package.name}/uninstalldb.sql |
---|
88 | |
---|
89 | HTML Documentation: |
---|
90 | $ open ${prefix}/share/${mysql.name}/${package.name}/doc/html/index.html |
---|
91 | " |
---|