Ticket #34955: patch-mariadb-5.5.24.diff

File patch-mariadb-5.5.24.diff, 30.4 KB (added by pixilla (Bradley Giesbrecht), 12 years ago)
  • databases/mariadb/files/patch-Makefile.in.diff

     
    1 --- Makefile.in.orig    2011-03-02 07:25:33.000000000 +0100
    2 +++ Makefile.in 2011-03-13 20:32:33.000000000 +0100
    3 @@ -482,7 +482,7 @@
    4                         @sql_union_dirs@ storage \
    5                         @sql_server@ @man_dirs@ tests \
    6                         netware @libmysqld_dirs@ \
    7 -                       mysql-test support-files sql-bench @tools_dirs@ \
    8 +                       support-files @tools_dirs@ \
    9                         win
    10  
    11  DIST_SUBDIRS = . include Docs zlib \
  • databases/mariadb/files/patch-storage-maria-CMakeLists.txt.diff

     
     1--- a/storage/maria/CMakeLists.txt      2012-06-09 10:56:52.000000000 -0700
     2+++ b/storage/maria/CMakeLists.txt      2012-06-10 14:30:33.000000000 -0700
     3@@ -92,4 +92,7 @@
     4 CMAKE_DEPENDENT_OPTION(USE_ARIA_FOR_TMP_TABLES "Use Aria for temporary tables" ON
     5                        "WITH_ARIA_STORAGE_ENGINE" OFF)
     6 
     7-ADD_SUBDIRECTORY(unittest)
     8+IF(WITH_MARIA_STORAGE_ENGINE)
     9+  ENABLE_TESTING()
     10+  ADD_SUBDIRECTORY(unittest)
     11+ENDIF()
  • databases/mariadb/files/my.cnf

     
     1# Use default MacPorts settings
     2!include @PREFIX@/etc/@NAME@/macports-default.cnf
  • databases/mariadb/files/patch-storage-perfschema-CMakeLists.txt.diff

     
     1--- a/storage/perfschema/CMakeLists.txt 2012-06-09 10:56:53.000000000 -0700
     2+++ b/storage/perfschema/CMakeLists.txt 2012-06-10 14:23:06.000000000 -0700
     3@@ -74,6 +74,7 @@
     4 )
     5 
     6 MYSQL_ADD_PLUGIN(perfschema ${PERFSCHEMA_SOURCES} STORAGE_ENGINE DEFAULT STATIC_ONLY)
     7-IF(WITH_PERFSCHEMA_STORAGE_ENGINE)
     8+IF(WITH_PERFSCHEMA_STORAGE_ENGINE AND WITH_UNIT_TESTS)
     9+  ENABLE_TESTING()
     10   ADD_SUBDIRECTORY(unittest)
     11 ENDIF()
  • databases/mariadb/files/mariadb

     
     1-
     2-
     3-
     4-
     5-
     6lib/mariadb/bin/innochecksum
     7lib/mariadb/bin/msql2mysql
     8lib/mariadb/bin/my_print_defaults
     9lib/mariadb/bin/myisam_ftdump
     10lib/mariadb/bin/myisamchk
     11lib/mariadb/bin/myisamlog
     12lib/mariadb/bin/myisampack
     13lib/mariadb/bin/mysql
     14lib/mariadb/bin/mysql_client_test
     15-
     16lib/mariadb/bin/mysql_config
     17lib/mariadb/bin/mysql_convert_table_format
     18lib/mariadb/bin/mysql_find_rows
     19lib/mariadb/bin/mysql_fix_extensions
     20-
     21lib/mariadb/bin/mysql_install_db
     22lib/mariadb/bin/mysql_plugin
     23lib/mariadb/bin/mysql_secure_installation
     24lib/mariadb/bin/mysql_setpermission
     25lib/mariadb/bin/mysql_tzinfo_to_sql
     26lib/mariadb/bin/mysql_upgrade
     27lib/mariadb/bin/mysql_waitpid
     28lib/mariadb/bin/mysql_zap
     29lib/mariadb/bin/mysqlaccess
     30-
     31lib/mariadb/bin/mysqladmin
     32lib/mariadb/bin/mysqlbinlog
     33lib/mariadb/bin/mysqlbug
     34lib/mariadb/bin/mysqlcheck
     35lib/mariadb/bin/mysqld
     36lib/mariadb/bin/mysqld_multi
     37lib/mariadb/bin/mysqld_safe
     38lib/mariadb/bin/mysqldump
     39lib/mariadb/bin/mysqldumpslow
     40lib/mariadb/bin/mysqlhotcopy
     41lib/mariadb/bin/mysqlimport
     42-
     43lib/mariadb/bin/mysqlshow
     44lib/mariadb/bin/mysqlslap
     45lib/mariadb/bin/mysqltest
     46-
     47-
     48-
     49-
     50-
     51-
     52-
     53-
     54-
     55-
     56-
     57-
     58-
     59-
     60-
     61-
     62-
     63-
     64-
     65-
     66-
     67lib/mariadb/bin/perror
     68lib/mariadb/bin/replace
     69lib/mariadb/bin/resolve_stack_dump
     70lib/mariadb/bin/resolveip
     71-
     72-
     73share/man/mariadb/man1/innochecksum.1.gz
     74share/man/mariadb/man1/msql2mysql.1.gz
     75share/man/mariadb/man1/my_print_defaults.1.gz
     76share/man/mariadb/man1/myisam_ftdump.1.gz
     77share/man/mariadb/man1/myisamchk.1.gz
     78share/man/mariadb/man1/myisamlog.1.gz
     79share/man/mariadb/man1/myisampack.1.gz
     80share/man/mariadb/man1/mysql-stress-test.pl.1.gz
     81share/man/mariadb/man1/mysql-test-run.pl.1.gz
     82share/man/mariadb/man1/mysql.1.gz
     83share/man/mariadb/man1/mysql.server.1.gz
     84share/man/mariadb/man1/mysql_client_test.1.gz
     85share/man/mariadb/man1/mysql_client_test_embedded.1.gz
     86share/man/mariadb/man1/mysql_config.1.gz
     87share/man/mariadb/man1/mysql_convert_table_format.1.gz
     88share/man/mariadb/man1/mysql_find_rows.1.gz
     89share/man/mariadb/man1/mysql_fix_extensions.1.gz
     90share/man/mariadb/man1/mysql_fix_privilege_tables.1.gz
     91share/man/mariadb/man1/mysql_install_db.1.gz
     92-
     93share/man/mariadb/man1/mysql_secure_installation.1.gz
     94share/man/mariadb/man1/mysql_setpermission.1.gz
     95share/man/mariadb/man1/mysql_tzinfo_to_sql.1.gz
     96share/man/mariadb/man1/mysql_upgrade.1.gz
     97share/man/mariadb/man1/mysql_waitpid.1.gz
     98share/man/mariadb/man1/mysql_zap.1.gz
     99share/man/mariadb/man1/mysqlaccess.1.gz
     100share/man/mariadb/man1/mysqladmin.1.gz
     101share/man/mariadb/man1/mysqlbinlog.1.gz
     102-
     103share/man/mariadb/man1/mysqlcheck.1.gz
     104share/man/mariadb/man1/mysqld_multi.1.gz
     105share/man/mariadb/man1/mysqld_safe.1.gz
     106share/man/mariadb/man1/mysqldump.1.gz
     107share/man/mariadb/man1/mysqldumpslow.1.gz
     108share/man/mariadb/man1/mysqlhotcopy.1.gz
     109share/man/mariadb/man1/mysqlimport.1.gz
     110share/man/mariadb/man1/mysqlman.1.gz
     111share/man/mariadb/man1/mysqlshow.1.gz
     112share/man/mariadb/man1/mysqlslap.1.gz
     113share/man/mariadb/man1/mysqltest.1.gz
     114share/man/mariadb/man1/mysqltest_embedded.1.gz
     115-
     116-
     117-
     118-
     119-
     120-
     121-
     122-
     123-
     124-
     125-
     126-
     127-
     128-
     129-
     130-
     131-
     132-
     133share/man/mariadb/man1/perror.1.gz
     134share/man/mariadb/man1/replace.1.gz
     135share/man/mariadb/man1/resolve_stack_dump.1.gz
     136share/man/mariadb/man1/resolveip.1.gz
     137share/man/mariadb/man8/mysqld.8.gz
     138share/man/mariadb/man8/mysqlmanager.8.gz
     139-
     140-
     141-
     142-
     143-
     144-
     145-
     146-
     147lib/mariadb/bin/innochecksum
     148lib/mariadb/bin/msql2mysql
     149lib/mariadb/bin/my_print_defaults
     150lib/mariadb/bin/myisam_ftdump
     151lib/mariadb/bin/myisamchk
     152lib/mariadb/bin/myisamlog
     153lib/mariadb/bin/myisampack
     154lib/mariadb/bin/mysql
     155lib/mariadb/bin/mysql_client_test
     156-
     157lib/mariadb/bin/mysql_config
     158lib/mariadb/bin/mysql_convert_table_format
     159lib/mariadb/bin/mysql_find_rows
     160lib/mariadb/bin/mysql_fix_extensions
     161-
     162lib/mariadb/bin/mysql_install_db
     163lib/mariadb/bin/mysql_plugin
     164lib/mariadb/bin/mysql_secure_installation
     165lib/mariadb/bin/mysql_setpermission
     166lib/mariadb/bin/mysql_tzinfo_to_sql
     167lib/mariadb/bin/mysql_upgrade
     168lib/mariadb/bin/mysql_waitpid
     169lib/mariadb/bin/mysql_zap
     170lib/mariadb/bin/mysqlaccess
     171-
     172lib/mariadb/bin/mysqladmin
     173lib/mariadb/bin/mysqlbinlog
     174lib/mariadb/bin/mysqlbug
     175lib/mariadb/bin/mysqlcheck
     176lib/mariadb/bin/mysqld
     177lib/mariadb/bin/mysqld_multi
     178lib/mariadb/bin/mysqld_safe
     179lib/mariadb/bin/mysqldump
     180lib/mariadb/bin/mysqldumpslow
     181lib/mariadb/bin/mysqlhotcopy
     182lib/mariadb/bin/mysqlimport
     183-
     184lib/mariadb/bin/mysqlshow
     185lib/mariadb/bin/mysqlslap
     186lib/mariadb/bin/mysqltest
     187-
     188-
     189-
     190-
     191-
     192-
     193-
     194-
     195-
     196-
     197-
     198-
     199-
     200-
     201-
     202-
     203-
     204-
     205-
     206-
     207-
     208lib/mariadb/bin/perror
     209lib/mariadb/bin/replace
     210lib/mariadb/bin/resolve_stack_dump
     211lib/mariadb/bin/resolveip
     212-
     213-
     214share/man/mariadb/man1/innochecksum.1.gz
     215share/man/mariadb/man1/msql2mysql.1.gz
     216share/man/mariadb/man1/my_print_defaults.1.gz
     217share/man/mariadb/man1/myisam_ftdump.1.gz
     218share/man/mariadb/man1/myisamchk.1.gz
     219share/man/mariadb/man1/myisamlog.1.gz
     220share/man/mariadb/man1/myisampack.1.gz
     221share/man/mariadb/man1/mysql-stress-test.pl.1.gz
     222share/man/mariadb/man1/mysql-test-run.pl.1.gz
     223share/man/mariadb/man1/mysql.1.gz
     224share/man/mariadb/man1/mysql.server.1.gz
     225share/man/mariadb/man1/mysql_client_test.1.gz
     226share/man/mariadb/man1/mysql_client_test_embedded.1.gz
     227share/man/mariadb/man1/mysql_config.1.gz
     228share/man/mariadb/man1/mysql_convert_table_format.1.gz
     229share/man/mariadb/man1/mysql_find_rows.1.gz
     230share/man/mariadb/man1/mysql_fix_extensions.1.gz
     231share/man/mariadb/man1/mysql_fix_privilege_tables.1.gz
     232share/man/mariadb/man1/mysql_install_db.1.gz
     233-
     234share/man/mariadb/man1/mysql_secure_installation.1.gz
     235share/man/mariadb/man1/mysql_setpermission.1.gz
     236share/man/mariadb/man1/mysql_tzinfo_to_sql.1.gz
     237share/man/mariadb/man1/mysql_upgrade.1.gz
     238share/man/mariadb/man1/mysql_waitpid.1.gz
     239share/man/mariadb/man1/mysql_zap.1.gz
     240share/man/mariadb/man1/mysqlaccess.1.gz
     241share/man/mariadb/man1/mysqladmin.1.gz
     242share/man/mariadb/man1/mysqlbinlog.1.gz
     243-
     244share/man/mariadb/man1/mysqlcheck.1.gz
     245share/man/mariadb/man1/mysqld_multi.1.gz
     246share/man/mariadb/man1/mysqld_safe.1.gz
     247share/man/mariadb/man1/mysqldump.1.gz
     248share/man/mariadb/man1/mysqldumpslow.1.gz
     249share/man/mariadb/man1/mysqlhotcopy.1.gz
     250share/man/mariadb/man1/mysqlimport.1.gz
     251share/man/mariadb/man1/mysqlman.1.gz
     252share/man/mariadb/man1/mysqlshow.1.gz
     253share/man/mariadb/man1/mysqlslap.1.gz
     254share/man/mariadb/man1/mysqltest.1.gz
     255share/man/mariadb/man1/mysqltest_embedded.1.gz
     256-
     257-
     258-
     259-
     260-
     261-
     262-
     263-
     264-
     265-
     266-
     267-
     268-
     269-
     270-
     271-
     272-
     273-
     274share/man/mariadb/man1/perror.1.gz
     275share/man/mariadb/man1/replace.1.gz
     276share/man/mariadb/man1/resolve_stack_dump.1.gz
     277share/man/mariadb/man1/resolveip.1.gz
     278share/man/mariadb/man8/mysqld.8.gz
     279share/man/mariadb/man8/mysqlmanager.8.gz
     280-
     281-
     282-
     283-
     284-
     285-
     286-
     287-
     288lib/mariadb/bin/innochecksum
     289lib/mariadb/bin/msql2mysql
     290lib/mariadb/bin/my_print_defaults
     291lib/mariadb/bin/myisam_ftdump
     292lib/mariadb/bin/myisamchk
     293lib/mariadb/bin/myisamlog
     294lib/mariadb/bin/myisampack
     295lib/mariadb/bin/mysql
     296lib/mariadb/bin/mysql_client_test
     297-
     298lib/mariadb/bin/mysql_config
     299lib/mariadb/bin/mysql_convert_table_format
     300lib/mariadb/bin/mysql_find_rows
     301lib/mariadb/bin/mysql_fix_extensions
     302-
     303lib/mariadb/bin/mysql_install_db
     304lib/mariadb/bin/mysql_plugin
     305lib/mariadb/bin/mysql_secure_installation
     306lib/mariadb/bin/mysql_setpermission
     307lib/mariadb/bin/mysql_tzinfo_to_sql
     308lib/mariadb/bin/mysql_upgrade
     309lib/mariadb/bin/mysql_waitpid
     310lib/mariadb/bin/mysql_zap
     311lib/mariadb/bin/mysqlaccess
     312-
     313lib/mariadb/bin/mysqladmin
     314lib/mariadb/bin/mysqlbinlog
     315lib/mariadb/bin/mysqlbug
     316lib/mariadb/bin/mysqlcheck
     317lib/mariadb/bin/mysqld
     318lib/mariadb/bin/mysqld_multi
     319lib/mariadb/bin/mysqld_safe
     320lib/mariadb/bin/mysqldump
     321lib/mariadb/bin/mysqldumpslow
     322lib/mariadb/bin/mysqlhotcopy
     323lib/mariadb/bin/mysqlimport
     324-
     325lib/mariadb/bin/mysqlshow
     326lib/mariadb/bin/mysqlslap
     327lib/mariadb/bin/mysqltest
     328-
     329-
     330-
     331-
     332-
     333-
     334-
     335-
     336-
     337-
     338-
     339-
     340-
     341-
     342-
     343-
     344-
     345-
     346-
     347-
     348-
     349lib/mariadb/bin/perror
     350lib/mariadb/bin/replace
     351lib/mariadb/bin/resolve_stack_dump
     352lib/mariadb/bin/resolveip
     353-
     354-
     355share/man/mariadb/man1/innochecksum.1.gz
     356share/man/mariadb/man1/msql2mysql.1.gz
     357share/man/mariadb/man1/my_print_defaults.1.gz
     358share/man/mariadb/man1/myisam_ftdump.1.gz
     359share/man/mariadb/man1/myisamchk.1.gz
     360share/man/mariadb/man1/myisamlog.1.gz
     361share/man/mariadb/man1/myisampack.1.gz
     362share/man/mariadb/man1/mysql-stress-test.pl.1.gz
     363share/man/mariadb/man1/mysql-test-run.pl.1.gz
     364share/man/mariadb/man1/mysql.1.gz
     365share/man/mariadb/man1/mysql.server.1.gz
     366share/man/mariadb/man1/mysql_client_test.1.gz
     367share/man/mariadb/man1/mysql_client_test_embedded.1.gz
     368share/man/mariadb/man1/mysql_config.1.gz
     369share/man/mariadb/man1/mysql_convert_table_format.1.gz
     370share/man/mariadb/man1/mysql_find_rows.1.gz
     371share/man/mariadb/man1/mysql_fix_extensions.1.gz
     372share/man/mariadb/man1/mysql_fix_privilege_tables.1.gz
     373share/man/mariadb/man1/mysql_install_db.1.gz
     374-
     375share/man/mariadb/man1/mysql_secure_installation.1.gz
     376share/man/mariadb/man1/mysql_setpermission.1.gz
     377share/man/mariadb/man1/mysql_tzinfo_to_sql.1.gz
     378share/man/mariadb/man1/mysql_upgrade.1.gz
     379share/man/mariadb/man1/mysql_waitpid.1.gz
     380share/man/mariadb/man1/mysql_zap.1.gz
     381share/man/mariadb/man1/mysqlaccess.1.gz
     382share/man/mariadb/man1/mysqladmin.1.gz
     383share/man/mariadb/man1/mysqlbinlog.1.gz
     384-
     385share/man/mariadb/man1/mysqlcheck.1.gz
     386share/man/mariadb/man1/mysqld_multi.1.gz
     387share/man/mariadb/man1/mysqld_safe.1.gz
     388share/man/mariadb/man1/mysqldump.1.gz
     389share/man/mariadb/man1/mysqldumpslow.1.gz
     390share/man/mariadb/man1/mysqlhotcopy.1.gz
     391share/man/mariadb/man1/mysqlimport.1.gz
     392share/man/mariadb/man1/mysqlman.1.gz
     393share/man/mariadb/man1/mysqlshow.1.gz
     394share/man/mariadb/man1/mysqlslap.1.gz
     395share/man/mariadb/man1/mysqltest.1.gz
     396share/man/mariadb/man1/mysqltest_embedded.1.gz
     397-
     398-
     399-
     400-
     401-
     402-
     403-
     404-
     405-
     406-
     407-
     408-
     409-
     410-
     411-
     412-
     413-
     414-
     415share/man/mariadb/man1/perror.1.gz
     416share/man/mariadb/man1/replace.1.gz
     417share/man/mariadb/man1/resolve_stack_dump.1.gz
     418share/man/mariadb/man1/resolveip.1.gz
     419share/man/mariadb/man8/mysqld.8.gz
     420share/man/mariadb/man8/mysqlmanager.8.gz
     421-
     422-
     423-
  • databases/mariadb/files/macports-default.cnf

     
     1# WARNING! ANY CHANGES TO THIS FILE WILL BE LOST ON UNINSTALL/UPGRADES!
     2# Make your changes to @PREFIX@/etc/@NAME@/my.cnf
     3# YOU HAVE BEEN WARNED!
     4
     5# MacPorts default options
     6[mysqld]
     7# skip-networking so multple mysql server ports can be loaded
     8# without each competing for port 3306.
     9# One can always put the servers on different ports and
     10# remove or comment this option.
     11skip-networking
  • databases/mariadb/files/patch-cmake-install_layout.cmake.diff

     
     1--- a/cmake/install_layout.cmake        2012-06-09 10:56:48.000000000 -0700
     2+++ b/cmake/install_layout.cmake        2012-06-09 18:27:32.000000000 -0700
     3@@ -71,7 +71,7 @@
     4 ENDIF()
     5 
     6 SET(INSTALL_LAYOUT "${INSTALL_LAYOUT}"
     7-CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer) RPM DEB SVR4")
     8+CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer) RPM DEB SVR4 MACPORTS")
     9 
     10 IF(UNIX)
     11   IF(INSTALL_LAYOUT MATCHES "RPM")
     12@@ -89,7 +89,7 @@
     13     SET(CMAKE_INSTALL_PREFIX ${default_prefix}
     14       CACHE PATH "install prefix" FORCE)
     15   ENDIF()
     16-  SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR4")
     17+  SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR4" "MACPORTS")
     18   LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" ind)
     19   IF(ind EQUAL -1)
     20     MESSAGE(FATAL_ERROR "Invalid INSTALL_LAYOUT parameter:${INSTALL_LAYOUT}."
     21@@ -219,6 +219,31 @@
     22 SET(INSTALL_PLUGINTESTDIR_SVR4          ${plugin_tests})
     23 
     24 SET(INSTALL_UNIX_ADDRDIR_SVR            "/tmp/mysql.sock")
     25+#
     26+# MACPORTS layout
     27+#
     28+SET(INSTALL_BINDIR_MACPORTS             "lib/@NAME@/bin")
     29+SET(INSTALL_SBINDIR_MACPORTS            "lib/@NAME@/bin")
     30+SET(INSTALL_SCRIPTDIR_MACPORTS          "lib/@NAME@/bin")
     31+#
     32+SET(INSTALL_LIBDIR_MACPORTS             "lib/@NAME@/mysql")
     33+SET(INSTALL_PLUGINDIR_MACPORTS          "lib/@NAME@/plugin")
     34+#
     35+SET(INSTALL_INCLUDEDIR_MACPORTS         "include/@NAME@/mysql")
     36+#
     37+SET(INSTALL_DOCDIR_MACPORTS             "share/docs/@NAME@")
     38+SET(INSTALL_DOCREADMEDIR_MACPORTS       "share/docs/@NAME@")
     39+SET(INSTALL_MANDIR_MACPORTS             "share/man/@NAME@")
     40+SET(INSTALL_INFODIR_MACPORTS            "share/docs/@NAME@")
     41+#
     42+SET(INSTALL_SHAREDIR_MACPORTS           "share/@NAME@")
     43+SET(INSTALL_MYSQLSHAREDIR_MACPORTS      "share/@NAME@")
     44+SET(INSTALL_MYSQLTESTDIR_MACPORTS       "share/@NAME@/mysql-test")
     45+SET(INSTALL_SQLBENCHDIR_MACPORTS        "share/@NAME@")
     46+SET(INSTALL_SUPPORTFILESDIR_MACPORTS    "share/@NAME@/support-files")
     47+#
     48+SET(INSTALL_MYSQLDATADIR_MACPORTS       "var/db/@NAME@")
     49+SET(INSTALL_PLUGINTESTDIR_MACPORTS      ${plugin_tests})
     50 
     51 # Clear cached variables if install layout was changed
     52 IF(OLD_INSTALL_LAYOUT)
  • databases/mariadb/Portfile

     
    11# -*- 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
    22# $Id$
    33
    4 PortSystem              1.0
     4PortSystem          1.0
    55
    6 name                    mariadb
    7 conflicts               mysql5-devel mysql5 mysql4
    8 version                 5.2.9
    9 categories              databases
    10 platforms               darwin
    11 license                 GPL-2
    12 maintainers             jogwtr@googlemail.com
     6name                mariadb
     7set name_mysql      ${name}
     8version             5.5.24
     9# Please set revision_client and revision_server to 0 if you bump version.
     10set revision_client 0
     11set revision_server 0
     12categories          databases
     13platforms           darwin
     14license             GPL-2
     15maintainers         googlemail.com:jogwtr
    1316
    14 description \
    15     A database server that offers drop-in replacement functionality for MySQL
    16 long_description \
    17     MariaDB is a database server that offers drop-in replacement functionality for \
    18     MySQL1. MariaDB is built by some of the original authors of MySQL, with \
    19     assistance from the broader community of Free and open source software \
    20     developers. In addition to the core functionality of MySQL, MariaDB offers a \
    21     rich set of feature enhancements including alternate storage engines, server \
    22     optimizations, and patches.
     17if {$subport == $name} {
    2318
    24 homepage                http://mariadb.org/
    25 master_sites \
    26     http://mirrors.supportex.net/mariadb/${distname}/kvm-tarbake-jaunty-x86/ \
    27     http://www.percona.com/downloads/MariaDB/${distname}/kvm-tarbake-jaunty-x86/ \
    28     http://ftp.osuosl.org/pub/mariadb/${distname}/kvm-tarbake-jaunty-x86/ \
    29     http://mirrors.supportex.net/mariadb/${distname}/kvm-tarbake-jaunty-x86/ \
    30     http://technocation.org/mirror/mariadb/${distname}/kvm-tarbake-jaunty-x86/ \
    31     http://mirror.aarnet.edu.au/pub/MariaDB/${distname}/kvm-tarbake-jaunty-x86/ \
    32     http://ftp-stud.hs-esslingen.de/pub/Mirrors/mariadb/${distname}/kvm-tarbake-jaunty-x86/ \
    33     http://gd.tuwien.ac.at/db/mariadb/${distname}/kvm-tarbake-jaunty-x86/ \
    34     http://mirrors.fe.up.pt/pub/mariadb/${distname}/kvm-tarbake-jaunty-x86/
    35 distname                mariadb-${version}
     19    PortGroup           archcheck 1.0
     20    PortGroup           cmake 1.0
     21    PortGroup           select 1.0
    3622
    37 checksums               md5     eb79ea79d3199c37f15d88fbd97e2216 \
    38                         sha1    da87cdc4d3f76cbbe059684175461e18972f323b \
    39                         rmd160  23f89e13ec9b9f731f42ba65f40ea07ad21a4471
     23    set branch          [join [lrange [split ${version} .] 0 1] .]
    4024
    41 depends_lib             port:zlib \
    42                         port:openssl
     25    revision            ${revision_client}
     26    license             GPL-2
     27    description         Multithreaded SQL database server
     28    long_description    MySQL is an open-source, multi-threaded SQL database with a command \
     29                        syntax very similar to mSQL.
    4330
    44 set major_version       [strsed ${version} {s/\..*$//}]
    45 set mariadb             mysql5
    46 set libdir              ${prefix}/lib/${mariadb}
    47 set bindir              ${libdir}/bin
    48 set dbdir               ${prefix}/var/db/${mariadb}
    49 set sysconfdir          ${prefix}/etc/${mariadb}
     31    homepage            http://mariadb.org/
     32    master_sites \
     33        http://ftp.osuosl.org/pub/mariadb/mariadb-${version}/kvm-tarbake-jaunty-x86/ \
     34        http://mirror2.hs-esslingen.de/mariadb/mariadb-${version}/kvm-tarbake-jaunty-x86/ \
     35        http://mirror3.layerjet.com/mariadb/mariadb-${version}/kvm-tarbake-jaunty-x86/ \
     36        http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/mariadb-${version}/kvm-tarbake-jaunty-x86/ \
     37        http://mirrors.supportex.net/mariadb/mariadb-${version}/kvm-tarbake-jaunty-x86/ \
     38        http://mirror.switch.ch/mirror/mariadb/mariadb-${version}/kvm-tarbake-jaunty-x86/ \
     39        http://mirrors.fe.up.pt/pub/mariadb/mariadb-${version}/kvm-tarbake-jaunty-x86/ \
     40        http://gd.tuwien.ac.at/db/mariadb/mariadb-${version}/kvm-tarbake-jaunty-x86/ \
     41        http://mirror.aarnet.edu.au/pub/MariaDB/mariadb-${version}/kvm-tarbake-jaunty-x86/ \
     42        http://ftp.heanet.ie/mirrors/mariadb/mariadb-${version}/kvm-tarbake-jaunty-x86/
    5043
    51 if {"darwin" == ${os.platform} && ${os.major} > 8} {
    52     set mariadbuser       _mysql
    53 } else {
    54     set mariadbuser       mysql
    55 }
     44    use_parallel_build  yes
    5645
    57 patchfiles                patch-Makefile.in.diff
     46    patch.pre_args      -p1
     47    patchfiles          patch-cmake-install_layout.cmake.diff \
     48                        patch-storage-maria-CMakeLists.txt.diff \
     49                        patch-storage-perfschema-CMakeLists.txt.diff
    5850
    59 configure.args \
    60     --mandir=${prefix}/share/man \
    61     --infodir=${prefix}/share/info \
    62     --localstatedir=${dbdir} \
    63     --libdir=${libdir} \
    64     --bindir=${bindir} \
    65     --includedir=${prefix}/include/${mariadb} \
    66     --datadir=${prefix}/share/${mariadb} \
    67     --sysconfdir=${sysconfdir} \
    68     --with-zlib-dir=bundled \
    69     --with-ssl=${prefix} \
    70     --with-extra-charsets=complex \
    71     --with-unix-socket-path=${prefix}/var/run/${mariadb}/mysqld.sock \
    72     --with-mysqld-user=${mariadbuser} \
    73     --without-docs \
    74     --with-plugins=max \
    75     --enable-thread-safe-client \
    76     --enable-assembler \
    77     --enable-thread-safe-client \
    78     --with-big-tables \
    79     --with-plugin-aria \
    80     --with-aria-tmp-tables \
    81     --without-plugin-innodb_plugin \
    82     --with-libevent \
    83     --enable-local-infile
     51    checksums           rmd160  237dd9e77c110c11d078362cb7c84c3dcefbf785 \
     52                        sha256  ced8d6b851ad0047d6654520c784f1bcfc3afa986f154ddb798041d1ebf9118b
    8453
    85 # Add readline support.
    86 # "--without-readline" has the peculiar meaning "do not use the bundled copy
    87 # of readline but use the system's (i.e. MacPorts') copy of readline"
    88 depends_lib-append      port:readline
    89 configure.args-append   --without-readline
     54    depends_lib-append  port:zlib \
     55                        port:cmake
     56    depends_run-append  port:mysql_select
    9057
    91 # Build libmysqld embedded server.
    92 configure.cflags-append -fPIC
    93 configure.cxxflags-append -fPIC
    94 configure.args-append --with-embedded-server --with-pic
     58    select.group        mysql
     59    select.file         ${filespath}/${name_mysql}
    9560
    96 post-build {
    97     set dirs ${worksrcpath}
    98     foreach dir ${dirs} {
    99         reinplace -E {s|-arch [a-z0-9_]+||g} \
    100             ${dir}/scripts/mysql_config \
    101             ${dir}/scripts/mysqlbug
     61    archcheck.files     lib/libz.dylib
     62
     63    post-extract {
     64        file mkdir ${worksrcpath}/build_macports/macports
     65        copy ${filespath}/macports-default.cnf \
     66            ${filespath}/my.cnf \
     67            ${worksrcpath}/build_macports/macports/
    10268    }
    103 }
    10469
    105 pre-destroot {
    106     xinstall -m 755 -d ${destroot}${sysconfdir}
    107     destroot.keepdirs-append ${destroot}${sysconfdir}
    108 }
     70    post-patch {
     71        reinplace "s|@NAME@|${name_mysql}|g" \
     72            ${worksrcpath}/cmake/install_layout.cmake
     73        reinplace "s|@NAME@|${name_mysql}|g" \
     74            ${worksrcpath}/build_macports/macports/macports-default.cnf \
     75            ${worksrcpath}/build_macports/macports/my.cnf
     76        reinplace "s|@PREFIX@|${prefix}|g" \
     77            ${worksrcpath}/build_macports/macports/macports-default.cnf \
     78            ${worksrcpath}/build_macports/macports/my.cnf
     79    }
    10980
    110 post-destroot {
    111     # Fix paths in manpages and sample configuration files
    112     foreach manpage [glob -type f ${destroot}${prefix}/share/man/man\[1-9\]/*] {
    113         reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${manpage}
     81    configure.cmd       cmake ..
     82    configure.dir       ${worksrcpath}/build_macports
     83    build.dir           ${worksrcpath}/build_macports
     84
     85    configure.args-delete \
     86                        -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib
     87    configure.args-append \
     88                        -DCMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/${name_mysql}/mysql \
     89                        -DINSTALL_LAYOUT:STRING=MACPORTS \
     90                        -DSYSCONFDIR:PATH=${prefix}/etc/${name_mysql} \
     91                        -DMYSQL_UNIX_ADDR:PATH=${prefix}/var/run/${name_mysql}/mysqld.sock \
     92                        -DMYSQL_DATADIR:PATH=${prefix}/var/db/${name_mysql} \
     93                        -DDEFAULT_CHARSET:STRING=utf8 \
     94                        -DDEFAULT_COLLATION:STRING=utf8_general_ci \
     95                        -DWITH_EMBEDDED_SERVER:BOOL=OFF \
     96                        -DWITH_ZLIB:STRING=system \
     97                        -DWITH_UNIT_TESTS:BOOL=ON \
     98                        -DENABLE_GCOV:BOOL=OFF \
     99                        -DENABLE_DTRACE:BOOL=OFF \
     100                        -DWITH_READLINE:BOOL=ON \
     101                        -DWITH_LIBEDIT:BOOL=OFF \
     102                        -DWITH_LIBWRAP:BOOL=ON \
     103                        -DWITH_SSL:STRING=no
     104
     105    # OQGraph storage engine does not currently compile
     106    configure.args-append \
     107                        -DWITHOUT_OQGRAPH:BOOL=YES
     108
     109    post-build {
     110        set dirs ${worksrcpath}/build_macports
     111        foreach dir ${dirs} {
     112            reinplace -E {s|-arch [a-z0-9_]+||g} \
     113                ${dir}/scripts/mysql_config \
     114                ${dir}/scripts/mysqlbug
     115        }
    114116    }
    115     foreach samp_conffile [glob -type f ${destroot}${prefix}/share/${mariadb}/mysql/my-*.cnf] {
    116         reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${samp_conffile}
     117
     118    post-destroot {
     119        # proc portdestroot::destroot_finish fails to find and compress our man pages
     120        # so borrow the compress command and run on our files now.
     121        set manpath "${destroot}${prefix}/share/man"
     122        set gzip [findBinary gzip ${portutil::autoconf::gzip_path}]
     123        foreach manpage [glob -type f ${destroot}${prefix}/share/man/${name_mysql}/man\[1-9\]/*] {
     124            # Fix paths in manpages
     125            reinplace "s|/etc/|${prefix}/etc/${name_mysql}/|g" ${manpage}
     126            # Compress all manpages with gzip
     127            system "$gzip -9vf ${manpage}"
     128        }
     129        foreach samp_conffile [glob -type f ${destroot}${prefix}/share/${name_mysql}/support-files/my-*.cnf] {
     130            # Fix paths in sample configuration files
     131            reinplace "s|/etc/my.cnf|${prefix}/etc/${name_mysql}/my.cnf|g" ${samp_conffile}
     132        }
     133        xinstall -m 755 -o root -d \
     134            ${destroot}${prefix}/etc/${name_mysql}
     135        copy ${worksrcpath}/build_macports/macports/macports-default.cnf \
     136            ${destroot}${prefix}/etc/${name_mysql}/
     137        xinstall -m 755 -o root -d \
     138            ${destroot}${prefix}/share/${name_mysql}/support-files/macports
     139        copy ${worksrcpath}/build_macports/macports/my.cnf \
     140            ${destroot}${prefix}/share/${name_mysql}/support-files/macports/
    117141    }
     142
     143    post-install {
     144        if {![file exists ${prefix}/etc/LaunchDaemons/org.macports.${name_mysql}/org.macports.${name_mysql}-server.plist]} {
     145            ui_msg "The ${name_mysql} client has been installed."
     146            ui_msg "To install the ${name_mysql} server, install the ${name_mysql}-server port."
     147        }
     148    }
     149
     150    pre-activate {
     151        if { [file exists ${prefix}/etc/${name_mysql}/macports-default.cnf]
     152            && ![catch {set vers [lindex [registry_active ${name_mysql}-server] 0]}]
     153            && [vercmp [lindex $vers 1] 5.5.24] < 0 } {
     154       
     155            set deactivate_proc registry_deactivate_composite
     156            if {[info commands registry_deactivate_composite] == {}} {
     157                set deactivate_proc registry_deactivate
     158            }
     159            $deactivate_proc ${name_mysql}-server "" [list ports_nodepcheck 1]
     160        }
     161    }
     162
     163    post-activate {
     164        if {![file exists ${prefix}/etc/${name_mysql}/my.cnf]} {
     165            copy ${destroot}${prefix}/share/${name_mysql}/support-files/macports/my.cnf \
     166                ${prefix}/etc/${name_mysql}/
     167        }
     168    }
     169
     170    variant openssl description {Enable OpenSSL support} {
     171
     172        depends_lib-append      port:openssl
     173        configure.args-delete   -DWITH_SSL:STRING=no
     174        configure.args-append   -DWITH_SSL:STRING=system
     175        archcheck.files-append  lib/libssl.dylib
     176    }
     177
     178    variant system_readline description {Use system readline instead of bundled readline} {
    118179   
    119     # Symlink mysql binaries into bin directory, with ${major_version} appended to the name
    120     foreach f [glob -tails -directory ${destroot}${bindir} my*] {
    121         ln -sf ${bindir}/${f} ${destroot}${prefix}/bin/${f}${major_version}
     180        # Add readline support.
     181        # "-DWITH_READLINE:BOOL=OFF" has the peculiar meaning "do not use the bundled copy
     182        # of readline but use the system's (i.e. MacPorts') copy of readline"
     183        depends_lib-append      port:readline
     184        configure.args-delete   -DWITH_READLINE:BOOL=ON
     185        configure.args-append   -DWITH_READLINE:BOOL=OFF
     186        archcheck.files-append  lib/libreadline.dylib
    122187    }
     188
     189    livecheck.type      regex
     190    livecheck.url       http://downloads.mariadb.org/MariaDB/+releases/
     191    livecheck.regex     "<a href=\"/MariaDB/(\[^/\]+)/\">"
    123192}
    124193
    125 post-install {
    126     if {![file exists ${prefix}/etc/LaunchDaemons/org.macports.${mariadb}/org.macports.${mariadb}.plist]} {
    127         ui_msg "The MariaDB client has been installed."
    128         ui_msg "If you also want a MariaDB server, install the mariadb-server port."
     194subport ${name_mysql}-server {
     195
     196    revision            ${revision_server}
     197    license             BSD
     198    description         Run ${name_mysql} as server
     199    long_description    ${description}
     200
     201    supported_archs     noarch
     202    distfiles
     203
     204    depends_run         port:${name_mysql}
     205
     206    if {"darwin" == ${os.platform} && ${os.major} > 8} {
     207        set mysqluser       _mysql
     208    } else {
     209        set mysqluser       mysql
    129210    }
     211    add_users ${mysqluser} group=${mysqluser} realname=MySQL\ Server
     212
     213    startupitem.create      yes
     214    startupitem.executable  ${prefix}/lib/${name_mysql}/bin/mysqld --user=${mysqluser}
     215
     216    use_configure       no
     217
     218    build {}
     219
     220    destroot {
     221        xinstall -m 755 -o root -d \
     222            ${destroot}${prefix}/var/run
     223        xinstall -m 755 -o ${mysqluser} -g ${mysqluser} -d \
     224            ${destroot}${prefix}/etc/${name_mysql} \
     225            ${destroot}${prefix}/var/db/${name_mysql} \
     226            ${destroot}${prefix}/var/log/${name_mysql} \
     227            ${destroot}${prefix}/var/run/${name_mysql}
     228        destroot.keepdirs-append  \
     229            ${destroot}${prefix}/var/db/${name_mysql} \
     230            ${destroot}${prefix}/var/log/${name_mysql} \
     231            ${destroot}${prefix}/var/run/${name_mysql}
     232    }
     233
     234    notes "
     235If this is a new install you might want to run:
     236
     237\$ sudo -u ${mysqluser} ${prefix}/lib/${name_mysql}/bin/mysql_install_db
     238"
     239
     240    livecheck.type          none
    130241}