[93320] trunk/dports/databases/dbslayer/Portfile

pixilla at macports.org pixilla at macports.org
Sat May 19 21:22:44 PDT 2012


Revision: 93320
          https://trac.macports.org/changeset/93320
Author:   pixilla at macports.org
Date:     2012-05-19 21:22:39 -0700 (Sat, 19 May 2012)
Log Message:
-----------
database/dbslayer:
- Add mysql variants.

Modified Paths:
--------------
    trunk/dports/databases/dbslayer/Portfile

Modified: trunk/dports/databases/dbslayer/Portfile
===================================================================
--- trunk/dports/databases/dbslayer/Portfile	2012-05-20 01:58:02 UTC (rev 93319)
+++ trunk/dports/databases/dbslayer/Portfile	2012-05-20 04:22:39 UTC (rev 93320)
@@ -3,11 +3,10 @@
 
 PortSystem          1.0
 
-set version_mysql   5
 name                dbslayer
 version             beta-12
 categories          databases lang www
-maintainers         pixilla
+maintainers         pixilla openmaintainer
 platforms           darwin
 license             Apache-2.0
 
@@ -28,8 +27,7 @@
 
 worksrcdir          ${name}
 
-depends_lib-append  port:apr-util \
-                    path:${prefix}/lib/mysql${version_mysql}/bin/mysql_config:mysql${version_mysql}
+depends_lib-append  port:apr-util
 
 extract.suffix      .tgz
 
@@ -40,8 +38,7 @@
 }
 use_autoreconf      yes
 
-configure.args      --with-mysql-config=${prefix}/bin/mysql_config${version_mysql} \
-                    --with-apr-1-config=${prefix}/bin/apr-1-config \
+configure.args      --with-apr-1-config=${prefix}/bin/apr-1-config \
                     --with-apu-1-config=${prefix}/bin/apu-1-config
 
 post-destroot {
@@ -52,7 +49,70 @@
             ${destroot}${prefix}/share/${name}
 }
 
+variant mysql5 \
+    conflicts mysql51 mysql55 mariadb percona \
+    description {build with mysql5 port} {
 
+    depends_lib-append      port:mysql5
+    configure.args-append   --with-mysql-config=${prefix}/lib/mysql5/bin/mysql_config
+}
+
+variant mysql51 \
+    conflicts mysql5 mysql55 mariadb percona \
+    description {build with mysql51 port} {
+
+    depends_lib-append      port:mysql51
+    configure.args-append   --with-mysql-config=${prefix}/lib/mysql51/bin/mysql_config
+}
+
+variant mysql55 \
+    conflicts mysql5 mysql51 mariadb percona \
+    description {build with mysql55 port} {
+
+    depends_lib-append      port:mysql55
+    configure.args-append   --with-mysql-config=${prefix}/lib/mysql55/bin/mysql_config
+}
+
+variant mariadb \
+    conflicts mysql5 mysql51 mysql55 percona \
+    description {build with mariadb port} {
+
+    depends_lib-append      port:mariadb
+    configure.args-append   --with-mysql-config=${prefix}/lib/mariadb/bin/mysql_config
+}
+
+variant percona \
+    conflicts mysql5 mysql51 mysql55 mariadb \
+    description {build with percona port} {
+
+    depends_lib-append      port:percona
+    configure.args-append   --with-mysql-config=${prefix}/lib/percona/bin/mysql_config
+}
+
+if {
+
+    ![variant_isset mysql5]
+    && ![variant_isset mysql51]
+    && ![variant_isset mysql55]
+    && ![variant_isset mariadb]
+    && ![variant_isset percona]
+} {
+    default_variants    +mysql5
+}
+pre-fetch {
+    if {
+
+        ![variant_isset mysql5]
+        && ![variant_isset mysql51]
+        && ![variant_isset mysql55]
+        && ![variant_isset mariadb]
+        && ![variant_isset percona]
+    } {
+
+        return -code error "${name} requires one of these variants: +mysql5, +mysql51, +mysql55, +mariadb or +percona"
+    }
+}
+
 livecheck.url       ${master_sites}
 livecheck.type      regex
 livecheck.regex     ">${name}-((?!\${extract.suffix}).*)${extract.suffix}<"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120519/d2663faf/attachment.html>


More information about the macports-changes mailing list