[85113] trunk/dports/databases

nicos at macports.org nicos at macports.org
Sun Oct 9 15:11:37 PDT 2011


Revision: 85113
          http://trac.macports.org/changeset/85113
Author:   nicos at macports.org
Date:     2011-10-09 15:11:36 -0700 (Sun, 09 Oct 2011)
Log Message:
-----------
mariadb: Adding port (ticket #29169)

Added Paths:
-----------
    trunk/dports/databases/mariadb/
    trunk/dports/databases/mariadb/Portfile
    trunk/dports/databases/mariadb/files/
    trunk/dports/databases/mariadb/files/patch-Makefile.in.diff

Added: trunk/dports/databases/mariadb/Portfile
===================================================================
--- trunk/dports/databases/mariadb/Portfile	                        (rev 0)
+++ trunk/dports/databases/mariadb/Portfile	2011-10-09 22:11:36 UTC (rev 85113)
@@ -0,0 +1,130 @@
+# -*- 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
+# $Id$
+
+PortSystem              1.0
+
+name                    mariadb
+conflicts               mysql5-devel mysql5 mysql4
+version                 5.2.9
+categories              databases
+platforms               darwin
+license                 GPL-2
+maintainers             jogwtr at googlemail.com
+
+description \
+    A database server that offers drop-in replacement functionality for MySQL
+long_description \
+    MariaDB is a database server that offers drop-in replacement functionality for \
+    MySQL1. MariaDB is built by some of the original authors of MySQL, with \
+    assistance from the broader community of Free and open source software \
+    developers. In addition to the core functionality of MySQL, MariaDB offers a \
+    rich set of feature enhancements including alternate storage engines, server \
+    optimizations, and patches.
+
+homepage                http://mariadb.org/
+master_sites \
+    http://mirrors.supportex.net/mariadb/${distname}/kvm-tarbake-jaunty-x86/ \
+    http://www.percona.com/downloads/MariaDB/${distname}/kvm-tarbake-jaunty-x86/ \
+    http://ftp.osuosl.org/pub/mariadb/${distname}/kvm-tarbake-jaunty-x86/ \
+    http://mirrors.supportex.net/mariadb/${distname}/kvm-tarbake-jaunty-x86/ \
+    http://technocation.org/mirror/mariadb/${distname}/kvm-tarbake-jaunty-x86/ \
+    http://mirror.aarnet.edu.au/pub/MariaDB/${distname}/kvm-tarbake-jaunty-x86/ \
+    http://ftp-stud.hs-esslingen.de/pub/Mirrors/mariadb/${distname}/kvm-tarbake-jaunty-x86/ \
+    http://gd.tuwien.ac.at/db/mariadb/${distname}/kvm-tarbake-jaunty-x86/ \
+    http://mirrors.fe.up.pt/pub/mariadb/${distname}/kvm-tarbake-jaunty-x86/
+distname                mariadb-${version}
+
+checksums               md5     eb79ea79d3199c37f15d88fbd97e2216 \
+                        sha1    da87cdc4d3f76cbbe059684175461e18972f323b \
+                        rmd160  23f89e13ec9b9f731f42ba65f40ea07ad21a4471
+
+depends_lib             port:zlib \
+                        port:openssl
+
+set major_version       [strsed ${version} {s/\..*$//}]
+set mariadb             mysql5
+set libdir              ${prefix}/lib/${mariadb}
+set bindir              ${libdir}/bin
+set dbdir               ${prefix}/var/db/${mariadb}
+set sysconfdir          ${prefix}/etc/${mariadb}
+
+if {"darwin" == ${os.platform} && ${os.major} > 8} {
+    set mariadbuser       _mysql
+} else {
+    set mariadbuser       mysql
+}
+
+patchfiles                patch-Makefile.in.diff
+
+configure.args \
+    --mandir=${prefix}/share/man \
+    --infodir=${prefix}/share/info \
+    --localstatedir=${dbdir} \
+    --libdir=${libdir} \
+    --bindir=${bindir} \
+    --includedir=${prefix}/include/${mariadb} \
+    --datadir=${prefix}/share/${mariadb} \
+    --sysconfdir=${sysconfdir} \
+    --with-zlib-dir=bundled \
+    --with-ssl=${prefix} \
+    --with-extra-charsets=complex \
+    --with-unix-socket-path=${prefix}/var/run/${mariadb}/mysqld.sock \
+    --with-mysqld-user=${mariadbuser} \
+    --without-docs \
+    --with-plugins=max \
+    --enable-thread-safe-client \
+    --enable-assembler \
+    --enable-thread-safe-client \
+    --with-big-tables \
+    --with-plugin-aria \
+    --with-aria-tmp-tables \
+    --without-plugin-innodb_plugin \
+    --with-libevent \
+    --enable-local-infile
+
+# Add readline support.
+# "--without-readline" has the peculiar meaning "do not use the bundled copy
+# of readline but use the system's (i.e. MacPorts') copy of readline"
+depends_lib-append      port:readline
+configure.args-append   --without-readline
+
+# Build libmysqld embedded server.
+configure.cflags-append -fPIC
+configure.cxxflags-append -fPIC
+configure.args-append --with-embedded-server --with-pic
+
+post-build {
+    set dirs ${worksrcpath}
+    foreach dir ${dirs} {
+        reinplace -E {s|-arch [a-z0-9_]+||g} \
+            ${dir}/scripts/mysql_config \
+            ${dir}/scripts/mysqlbug
+    }
+}
+
+pre-destroot {
+    xinstall -m 755 -d ${destroot}${sysconfdir}
+    destroot.keepdirs-append ${destroot}${sysconfdir}
+}
+
+post-destroot {
+    # Fix paths in manpages and sample configuration files
+    foreach manpage [glob -type f ${destroot}${prefix}/share/man/man\[1-9\]/*] {
+        reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${manpage}
+    }
+    foreach samp_conffile [glob -type f ${destroot}${prefix}/share/${mariadb}/mysql/my-*.cnf] {
+        reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${samp_conffile}
+    }
+    
+    # Symlink mysql binaries into bin directory, with ${major_version} appended to the name
+    foreach f [glob -tails -directory ${destroot}${bindir} my*] {
+        ln -sf ${bindir}/${f} ${destroot}${prefix}/bin/${f}${major_version}
+    }
+}
+
+post-install {
+    if {![file exists ${prefix}/etc/LaunchDaemons/org.macports.${mariadb}/org.macports.${mariadb}.plist]} {
+        ui_msg "The MariaDB client has been installed."
+        ui_msg "If you also want a MariaDB server, install the mariadb52-server port."
+    }
+}


Property changes on: trunk/dports/databases/mariadb/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/databases/mariadb/files/patch-Makefile.in.diff
===================================================================
--- trunk/dports/databases/mariadb/files/patch-Makefile.in.diff	                        (rev 0)
+++ trunk/dports/databases/mariadb/files/patch-Makefile.in.diff	2011-10-09 22:11:36 UTC (rev 85113)
@@ -0,0 +1,11 @@
+--- Makefile.in.orig	2011-03-02 07:25:33.000000000 +0100
++++ Makefile.in	2011-03-13 20:32:33.000000000 +0100
+@@ -482,7 +482,7 @@
+ 			@sql_union_dirs@ storage \
+ 			@sql_server@ @man_dirs@ tests \
+ 			netware @libmysqld_dirs@ \
+-			mysql-test support-files sql-bench @tools_dirs@ \
++			support-files @tools_dirs@ \
+ 			win
+ 
+ DIST_SUBDIRS = . include Docs zlib \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111009/e8f08ce9/attachment-0001.html>


More information about the macports-changes mailing list