Skip to content
Permalink
Browse files

Bug:

Submitted by:   maintainer
Reviewed by:
Approved by:
Obtained from:

new upstream version

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@3941 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Felix Kronlage
Felix Kronlage committed Nov 13, 2003
1 parent 5b7ff9f commit 0c36c30f0b8ec7187cf2a19274dd9690cf211fbf
Showing with 89 additions and 24 deletions.
  1. +62 −24 databases/mysql4/Portfile
  2. +27 −0 databases/mysql4/files/patch-configure
@@ -1,56 +1,82 @@
# $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
description Multithreaded SQL database server
long_description MySQL is an open-source, multi-threaded SQL database \
with a command syntax very similar to mSQL.
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}
distfiles ${filename}
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"

}

set dbdir ${prefix}/var/db/mysql
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 \

configure.env LDFLAGS=-L${prefix}/lib\\ -lncurses \
CPPFLAGS=-I${prefix}/include
}
set dbdir ${prefix}/var/db/mysql



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 {
if { ![variant_isset server] } {
configure.args-append --without-server
}

}

variant innodb {
configure.args-append --with-innodb
}

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

}

@@ -60,23 +86,18 @@ pre-destroot {
set gid [existsgroup mysql]
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
system "cp ${portpath}/files/my.cnf ${destroot}${prefix}/etc/mysql4/my.cnf.sample"
reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/etc/mysql4/my.cnf.sample
@@ -86,6 +107,23 @@ post-destroot {
system "install -o root -m 755 -d ${destroot}${prefix}/etc/rc.d"
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 "******************************************************"
}
}
@@ -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"

0 comments on commit 0c36c30

Please sign in to comment.
You can’t perform that action at this time.