Ticket #399: 3.23.57.patch

File 3.23.57.patch, 3.4 KB (added by mike.mclean@…, 21 years ago)

Patch against CVS version to install MySQL 3.23.57

  • Portfile

    old new  
    11# $Id: Portfile,v 1.28 2003/03/03 06:13:24 mij Exp $
    22
     3# mysql 3.23.57 Portfile
     4#
     5# - Includes server/client variant modificatins from bchesneau@mac.com, bug #399
     6#   http://www.opendarwin.org/bugzilla/show_bug.cgi?id=399
     7#
     8# - Includes platform fixes from harlan+opendarwinbugs@pfcs.com, bug #390
     9#   http://www.opendarwin.org/bugzilla/show_bug.cgi?id=390
     10#
     11# - Some systems might still want the 3.23.x verison of MySQL. This Portfile renames
     12#   the Port to "mysql3" in anticipation of a new port being created for the MySQL 4
     13#   series, named "mysql4"
     14#
     15# - Introduces a variant for InnoDB tables
     16#
     17
     18
     19
    320PortSystem 1.0
    4 name                    mysql
    5 version                 3.23.52
     21name                    mysql3
     22version                 3.23.57
    623categories              databases
    7 maintainers             eric@opendarwin.org
     24maintainers             eric@opendarwin.org
    825description             Multithreaded SQL database server
    926long_description        MySQL is an open-source, multi-threaded SQL database \
    1027                        with a command syntax very similar to mSQL.
    1128homepage                http://www.mysql.com/
    12 platforms               darwin
     29platforms               darwin sunos
    1330master_sites            ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/MySQL-3.23/ \
    1431                        ftp://ftp.FreeBSD.org/pub/FreeBSD/distfiles/ \
    15                         http://distfiles.opendarwin.org/:lt
     32                        http://distfiles.opendarwin.org/
    1633
    17 set filename            ${portname}-${portversion}${extract.sufx}
    18 distfiles               ${filename} ltconfig13:lt ltmain13:lt
     34set distname            mysql-${portversion}
     35set filename            mysql-${portversion}${extract.sufx}
    1936extract.only            ${filename}
    20 depends_lib             lib:libdl.1:dlcompat
     37distfiles               ${filename}
     38variant darwin  {
     39                        depends_lib lib:libdl.1:dlcompat
     40                }
    2141
    22 checksums               mysql-3.23.52.tar.gz md5 \
    23                         88705b7f38e64b5c21ebb68c77b75e5a \
    24                         ltconfig13 md5 ea53f42a550c9f9e653758a8ed91574e \
    25                         ltmain13 md5 e094ae92724c4015dbab97de151c2525
    26 
    27 post-patch {            system "cp ${distpath}/ltconfig13 ${worksrcpath}/ltconfig"
    28                         system "cp ${distpath}/ltmain13 ${worksrcpath}/ltmain.sh"
    29 }
     42checksums               mysql-3.23.57.tar.gz md5 892f7d97af1ce7502e89d824031abd05
    3043
    3144set dbdir               ${prefix}/var/db/mysql
    3245
    3346configure.env           LDFLAGS=-L${prefix}/lib\\ -lncurses \
    3447                        CPPFLAGS=-I${prefix}/include
    3548
    36 configure.args          --localstatedir=${dbdir} \
    37                         --without-bench
     49variant sunos   {
     50                        configure.env   LDFLAGS=-L${prefix}/lib CPPFLAGS=-I${prefix}/include
     51                }
    3852
    39 pre-install             { system "install -o root -m 755 -d ${dbdir}" }
     53configure.args          --localstatedir=${dbdir} --without-server --sysconfdir=${prefix}/etc --without-bench
    4054
    41 variant server  {
     55variant innodb { configure.args-append --with-innodb }
     56
     57variant server {
    4258        depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup
     59        configure.args  --localstatedir=${dbdir} --sysconfdir=${prefix}/etc --with-innodb --without-bench
     60        pre-install     { system "install -o mysql -g mysql -m 775 -d ${dbdir}"
     61                        }
     62
    4363
    4464        post-install {
    4565                addgroup mysql
     
    4868
    4969                #system "${destroot}${prefix}/bin/mysql_install_db"
    5070                #system "chown -R mysql:mysql ${dbdir}"
    51                
     71                #system "chmod -R 777 ${prefix}/var/run
     72         
    5273                system "install -o root -m 755 -d ${destroot}${prefix}/etc/rc.d"
    5374                set script [open ${destroot}${prefix}/etc/rc.d/mysql.sh w 0755]
    5475                puts $script "#!/bin/sh"
    5576                puts $script "${prefix}/bin/safe_mysqld --user=mysql &"
    5677                close $script
     78                system "cd ${workpath}/${worksrcdir} && \
     79                                        cp support-files/my-medium.cnf ${destroot}${prefix}/etc/my.cnf"
    5780        }
    5881}