Ticket #612: patch-mysql-20030603

File patch-mysql-20030603, 2.5 KB (added by bchesneau@…, 21 years ago)

Portfile patch

Line 
1--- Portfile-old        Tue Jun  3 03:35:07 2003
2+++ Portfile    Tue Jun  3 04:33:27 2003
3@@ -2,30 +2,29 @@
4 
5 PortSystem 1.0
6 name                   mysql
7-version                        3.23.52
8+version                        4.0.13 
9 categories             databases
10 maintainers            eric@opendarwin.org
11 description            Multithreaded SQL database server
12 long_description       MySQL is an open-source, multi-threaded SQL database \
13                        with a command syntax very similar to mSQL.
14 homepage               http://www.mysql.com/
15-platforms              darwin
16-master_sites           ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/MySQL-3.23/ \
17+master_sites           ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/MySQL-4.0/ \
18+                       http://mysql-mirror.free.fr/Downloads/MySQL-4.0/ \
19                        ftp://ftp.FreeBSD.org/pub/FreeBSD/distfiles/ \
20                        http://distfiles.opendarwin.org/:lt
21 
22+
23+
24 set filename           ${portname}-${portversion}${extract.sufx}
25-distfiles              ${filename} ltconfig13:lt ltmain13:lt
26+distfiles              ${filename} 
27 extract.only           ${filename}
28-depends_lib            lib:libdl.1:dlcompat
29 
30-checksums              mysql-3.23.52.tar.gz md5 \
31-                       88705b7f38e64b5c21ebb68c77b75e5a \
32-                       ltconfig13 md5 ea53f42a550c9f9e653758a8ed91574e \
33-                       ltmain13 md5 e094ae92724c4015dbab97de151c2525
34+checksums              mysql-4.0.13.tar.gz md5 4bad6dae73f53c16bfcf41c704681059
35 
36-post-patch {           system "cp ${distpath}/ltconfig13 ${worksrcpath}/ltconfig"
37-                       system "cp ${distpath}/ltmain13 ${worksrcpath}/ltmain.sh"
38+
39+variant darwin {
40+       depends_lib-append              lib:libdl.1:dlcompat
41 }
42 
43 set dbdir              ${prefix}/var/db/mysql
44@@ -33,13 +32,14 @@
45 configure.env          LDFLAGS=-L${prefix}/lib\\ -lncurses \
46                        CPPFLAGS=-I${prefix}/include
47 
48-configure.args         --localstatedir=${dbdir} \
49-                       --without-bench
50-
51-pre-install            { system "install -o root -m 755 -d ${dbdir}" }
52+configure.args         --localstatedir=${dbdir} --without-server --sysconfdir=${prefix}/etc --without-bench
53 
54 variant server {
55        depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup
56+       configure.args  --localstatedir=${dbdir} --sysconfdir=${prefix}/etc --without-bench
57+       
58+       pre-install     { system "install -o mysql -g mysql -m 775 -d ${destroot}${dbdir}" 
59+                       }
60 
61        post-install {
62                addgroup mysql
63@@ -52,7 +52,9 @@
64                system "install -o root -m 755 -d ${destroot}${prefix}/etc/rc.d"
65                set script [open ${destroot}${prefix}/etc/rc.d/mysql.sh w 0755]
66                puts $script "#!/bin/sh"
67-               puts $script "${prefix}/bin/safe_mysqld --user=mysql &"
68+               puts $script "${prefix}/bin/mysqld_safe --user=mysql &"
69                close $script
70+               system "cd ${workpath}/${worksrcdir} && \
71+                                       cp support-files/my-medium.cnf ${destroot}${prefix}/etc/my.cnf"
72        }
73 }