source: trunk/dports/databases/mysql4/Portfile @ 33297

Last change on this file since 33297 was 33297, checked in by ryandesign@…, 11 years ago

For all nomaintainer and openmaintainer ports, remove occurrences of

platform darwin 8 {
    configure.compiler gcc-4.0
}

MacPorts 1.6 already ensures that GCC 4.0 is used by default on Tiger. See #14046.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.0 KB
Line 
1# $Id: Portfile 33297 2008-01-23 09:32:47Z ryandesign@macports.org $
2
3PortSystem 1.0
4name              mysql4
5version           4.1.22
6categories        databases
7maintainers       nomaintainer
8description       Multithreaded SQL database server
9long_description  MySQL is an open-source, multi-threaded SQL database \
10                    with a command syntax very similar to mSQL.
11homepage          http://www.mysql.com/
12platforms         darwin
13
14set sitedir       Downloads/MySQL-4.1/
15master_sites      http://www.mirrorservice.org/sites/ftp.mysql.com/${sitedir} \
16                    http://www.softagency.co.jp/MySQL/${sitedir} \
17                    http://mirrors.tilian.co.uk/mysql.com/${sitedir} \
18                    ftp://planetmirror.com/pub/mysql/${sitedir} \
19                    ftp://sunsite.dk/mirrors/mysql/${sitedir} \
20                    http://mysql.mediatraffic.fi/${sitedir} \
21                    ftp://filepile.tiscali.de/mirror/mysql/${sitedir} \
22                    ftp://ftp.rtfm.no/pub/mysql/${sitedir} \
23                    http://www.mysql.cz/${sitedir} \
24                    ftp://ftp.u-paris10.fr/mysql.com/${sitedir} \
25                    http://mysql.oms-net.nl/${sitedir} \
26                    ftp://ftp.free.fr/pub/MySQL\${sitedir}
27
28distname         mysql-${version}
29checksums        md5 37b4479951fa0cf052269d27c41ca200
30
31depends_lib      port:openssl
32
33set dbdir        ${prefix}/var/db/mysql
34
35post-patch {
36        reinplace "s%/etc/my.cnf%${prefix}/etc/${name}/my.cnf%g" \
37                ${worksrcpath}/scripts/mysqlaccess.sh \
38                ${worksrcpath}/scripts/mysqld_multi.sh \
39                ${worksrcpath}/scripts/mysqldumpslow.sh \
40                ${worksrcpath}/scripts/mysqlhotcopy.sh \
41                ${worksrcpath}/sql-bench/bench-init.pl.sh \
42                ${worksrcpath}/support-files/my-huge.cnf.sh \
43                ${worksrcpath}/support-files/my-innodb-heavy-4G.cnf.sh \
44                ${worksrcpath}/support-files/my-large.cnf.sh \
45                ${worksrcpath}/support-files/my-medium.cnf.sh \
46                ${worksrcpath}/support-files/my-small.cnf.sh \
47                ${worksrcpath}/support-files/mysql.server.sh
48        reinplace "s%/etc/%${prefix}/etc/${name}/%g" \
49                ${worksrcpath}/mysys/default.c
50}
51
52platform darwin 6 {
53        depends_lib-append              lib:libdl:dlcompat
54       
55        configure.ldflags-append        "-lncurses"
56        configure.cflags        "-O3 -fno-omit-frame-pointer"
57        configure.cxx   gcc
58        configure.cxxflags      "-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"
59
60}
61
62platform darwin 7 {
63        configure.ldflags       "-lncurses"
64        configure.cflags        "-O3 -fno-omit-frame-pointer"
65        configure.cxx   gcc
66        configure.cxxflags      "-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"
67        configure.env-append    LIBS=-ldl
68
69}
70
71configure.args  --sysconfdir=${prefix}/etc/${name} --without-debug  \
72                  --without-bench \
73                  --mandir=${prefix}/share/man --infodir=${prefix}/share/info \
74                  --enable-thread-safe-client --with-extra-charsets=complex \
75                  --with-openssl=${prefix} --with-innodb \
76                  --localstatedir=${dbdir} \
77                  --with-unix-socket-path=${prefix}/var/run/mysqld/mysqld.sock \
78                  --with-mysqld-user=mysql
79
80variant server  {
81        # Create a startupitem to start/stop the server
82    startupitem.create    yes
83    startupitem.start    "${prefix}/share/mysql/mysql.server start"
84    startupitem.stop    "${prefix}/share/mysql/mysql.server stop"
85}
86
87pre-destroot    {
88        xinstall -m 755 -d ${destroot}${prefix}/var/log/mysql
89        destroot.keepdirs ${destroot}${prefix}/var/log/mysql
90
91        if { [variant_isset server] } {
92                addgroup mysql
93                set gid [existsgroup mysql]
94                adduser mysql gid=${gid} realname=MySQL\ Server
95               
96                system "chown mysql:mysql ${destroot}${prefix}/var/log/mysql"
97        }
98}
99
100post-destroot {
101                system "rm -rf ${destroot}${prefix}/mysql-test"
102
103                xinstall -m 775 -d ${destroot}${dbdir}
104                xinstall -m 755 -d ${destroot}${prefix}/var/run/mysqld
105                destroot.keepdirs-append ${destroot}${dbdir}
106                destroot.keepdirs-append ${destroot}${prefix}/var/run/mysqld
107                if { [variant_isset server] } {
108                                        xinstall -o root -m 755 -d ${destroot}${prefix}/etc/${name}
109                        xinstall -o root -m 644 -c ${filespath}/my.cnf ${destroot}${prefix}/etc/${name}/my.cnf.sample
110                        reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/etc/${name}/my.cnf.sample
111                        xinstall -o mysql -g mysql -m 775 -d ${destroot}${dbdir}
112                        destroot.keepdirs-append ${destroot}${dbdir}
113                        system "chown -R mysql:mysql ${destroot}${dbdir}"
114                       
115                        xinstall -o mysql -g mysql -m 755 -d ${destroot}${prefix}/var/run/mysqld
116                        destroot.keepdirs-append ${destroot}${prefix}/var/run/mysqld
117                        system "chown -R mysql:mysql ${destroot}${prefix}/var/run/mysqld"
118                }
119               
120}
121
122post-install {
123                ui_msg "******************************************************"
124                ui_msg "* You might want to run                              *"
125                ui_msg "* sudo -u mysql mysql_install_db                     *"
126                ui_msg "* if this is a new install                           *"
127                ui_msg "*                                                    *"
128                ui_msg "* If you did not choose the server variant you may   *"
129                ui_msg "* add a mysql user and you will need to change the   *"
130                ui_msg "* ownership to that user for the following:          *"
131                ui_msg "*    ${dbdir}                                        *"
132                ui_msg "*    ${prefix}/var/run/mysqld                        *"
133                ui_msg "*    ${prefix}/var/log/mysql                         *"
134                ui_msg "******************************************************"
135}
Note: See TracBrowser for help on using the repository browser.