Index: trunk/dports/databases/mysql4/Portfile
===================================================================
--- trunk/dports/databases/mysql4/Portfile	(revision 3936)
+++ trunk/dports/databases/mysql4/Portfile	(revision 3941)
@@ -1,7 +1,7 @@
-# $Id: Portfile,v 1.2 2003/10/24 09:12:19 fkr Exp $
+# $Id: Portfile,v 1.3 2003/11/13 17:08:48 fkr Exp $
 
 PortSystem 1.0
 name		mysql4
-version	 	4.0.15a
+version	 	4.0.16
 categories	databases
 maintainers 	bchesneau@mac.com	
@@ -11,7 +11,16 @@
 homepage		http://www.mysql.com/
 platforms		darwin
-master_sites	ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/MySQL-4.0 \
-		http://mysql-mirror.free.fr/Downloads/MySQL-4.0 \
- 		ftp://ftp.FreeBSD.org/pub/FreeBSD/distfiles
+master_sites	ftp://planetmirror.com/pub/mysql/Downloads/MySQL-4.0/ \
+                http://www.softagency.co.jp/MySQL/Downloads/MySQL-4.0/ \
+                ftp://sunsite.dk/mirrors/mysql/Downloads/MySQL-4.0/ \
+                http://mysql.mediatraffic.fi/Downloads/MySQL-4.0/ \
+                ftp://filepile.tiscali.de/mirror/mysql/Downloads/MySQL-4.0/ \
+                http://mirrors.tilian.co.uk/mysql.com/Downloads/MySQL-4.0/ \
+                ftp://ftp.rtfm.no/pub/mysql/Downloads/MySQL-4.0/ \
+                http://www.mysql.cz/Downloads/MySQL-4.0/ \
+                ftp://ftp.u-paris10.fr/mysql.com/Downloads/MySQL-4.0/ \
+                http://mysql.oms-net.nl/Downloads/MySQL-4.0/ \
+                ftp://ftp.free.fr/pub/MySQL/Downloads/MySQL-4.0/
+				
 
 set filename	mysql-${version}${extract.sufx}
@@ -19,19 +28,36 @@
 distname	mysql-${version}
 extract.only	${filename}
-checksums	md5 45ee33e80667bb7af3fd6ea8cd1f264c
+checksums	md5 ddc959b9cdc2f5e30dc6a4d3650d3db5
+patchfiles patch-configure
 
-variant darwin {
+
+
+platform darwin 6 {
 	depends_lib-append		lib:libdl.1:dlcompat
+	
+	configure.env	LDFLAGS="-L${prefix}/lib -lncurses" \
+				CPPFLAGS=-I${prefix}/include \
+				CFLAGS="-O3 -fno-omit-frame-pointer" \
+				CXX=gcc \
+				CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"
+
 }
 
+platform darwin 7 {
+	configure.env	LDFLAGS="-lncurses" \
+					CFLAGS="-O3 -fno-omit-frame-pointer" \
+					CXX=gcc \
+					CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" \
+					LIBS=-ldl \
+
+}
 set dbdir	${prefix}/var/db/mysql
 
-configure.env	LDFLAGS=-L${prefix}/lib\\ -lncurses \
-		CPPFLAGS=-I${prefix}/include
+				
 
 
-configure.args 	--sysconfdir=${prefix}/etc/mysql4 --without-bench \
-		--mandir=${prefix}/share/man --infodir=${prefix}/share/info
-
+configure.args 	--sysconfdir=${prefix}/etc/mysql4 --without-debug --without-bench \
+				--mandir=${prefix}/share/man --infodir=${prefix}/share/info \
+				--enable-thread-safe-client --with-extra-charsets=complex
 
 pre-configure {
@@ -39,4 +65,5 @@
 		configure.args-append --without-server
 	}
+	
 }
 
@@ -45,11 +72,10 @@
 }
 
-variant debug {
-	configure.args-append --with-debug
-}
 
 variant server	{
  	depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup
- 	configure.args-append --localstatedir=${dbdir} --with-unix-socket-path=${prefix}/var/run/mysqld/mysqld.sock 
+ 	configure.args-append --localstatedir=${dbdir} \
+						--with-unix-socket-path=${prefix}/var/run/mysqld/mysqld.sock \
+						--with-mysqld-user=mysql
 	
 }
@@ -61,20 +87,15 @@
 		adduser mysql gid=${gid} realname=MySQL\ Server
 		
-		if { [variant_isset server] } {
-			system "install -o mysql -g mysql -m 775 -d ${destroot}${dbdir}"
-			
-			file mkdir ${destroot}${prefix}/var/run/mysqld
-			system "touch ${destroot}${prefix}/var/run/mysqld/.turd"
-			system "chown -R mysql:mysql ${destroot}${prefix}/var/run/mysqld"
-		}
 		
 		
 		file mkdir ${destroot}${prefix}/var/log/mysql
 		system "touch ${destroot}${prefix}/var/log/mysql/.turd"  
-        	system "chown mysql:mysql ${destroot}${prefix}/var/log/mysql"
+        system "chown mysql:mysql ${destroot}${prefix}/var/log/mysql"
         
 }
 
 post-destroot {
+		
+		system "rm -rf ${destroot}${prefix}/mysql-test"
 		
 		file mkdir ${destroot}${prefix}/etc/mysql4
@@ -87,5 +108,22 @@
 			system "install -o root -m 755 -c ${portpath}/files/mysql4.sh ${destroot}${prefix}/etc/rc.d/"
 			reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/etc/rc.d/mysql4.sh
+			
+			system "install -o mysql -g mysql -m 775 -d ${destroot}${dbdir}"
+			
+			file mkdir ${destroot}${prefix}/var/run/mysqld
+			system "touch ${destroot}${prefix}/var/run/mysqld/.turd"
+			system "chown -R mysql:mysql ${destroot}${prefix}/var/run/mysqld"
+			
 		}
 		
 }
+
+post-install {
+	if { [variant_isset server] } {
+		ui_msg "******************************************************"
+		ui_msg "* You might want to run                              *"
+		ui_msg "* mysql_install_db                                   *"
+		ui_msg "* if this is a new install                           *"	
+		ui_msg "******************************************************"
+	}
+}
Index: trunk/dports/databases/mysql4/files/patch-configure
===================================================================
--- trunk/dports/databases/mysql4/files/patch-configure	(revision 3941)
+++ trunk/dports/databases/mysql4/files/patch-configure	(revision 3941)
@@ -0,0 +1,27 @@
+--- configure-orig	Thu Nov 13 05:25:08 2003
++++ configure	Thu Nov 13 05:28:49 2003
+@@ -5734,7 +5734,7 @@
+ whole_archive_flag_spec=
+ thread_safe_flag_spec=
+ hardcode_into_libs=no
+-hardcode_libdir_flag_spec=
++hardcode_libdir_flag_spec=' '
+ hardcode_libdir_separator=
+ hardcode_direct=no
+ hardcode_minus_L=no
+@@ -12766,6 +12766,15 @@
+     if test "$ac_cv_c_compiler_gnu" = "yes"
+     then
+       FLAGS="-DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH -DFN_NO_CASE_SENCE"
++      CFLAGS="$CFLAGS $FLAGS"
++      CXXFLAGS="$CXXFLAGS $FLAGS"
++      MAX_C_OPTIMIZE="-O"
++    fi
++    ;;
++  *darwin7*)
++    if test "$ac_cv_c_compiler_gnu" = "yes"
++    then
++     FLAGS="-DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH -DFN_NO_CASE_SENCE"
+       CFLAGS="$CFLAGS $FLAGS"
+       CXXFLAGS="$CXXFLAGS $FLAGS"
+       MAX_C_OPTIMIZE="-O"
