aboutsummaryrefslogtreecommitdiff
path: root/databases/mysql323-server
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2005-01-10 14:44:25 +0000
committerAlex Dupre <ale@FreeBSD.org>2005-01-10 14:44:25 +0000
commitef69cdc1a98b85fc0e04de5381dc504a7b4a6262 (patch)
treeddb0e94d573df741d74928cefd86b2db83941269 /databases/mysql323-server
parentb23a50741737a5f5b6ccf3d8c41f870ed4be9f6e (diff)
downloadports-ef69cdc1a98b85fc0e04de5381dc504a7b4a6262.tar.gz
ports-ef69cdc1a98b85fc0e04de5381dc504a7b4a6262.zip
Notes
Diffstat (limited to 'databases/mysql323-server')
-rw-r--r--databases/mysql323-server/Makefile29
-rw-r--r--databases/mysql323-server/files/patch-sql::mysqld.cc47
-rw-r--r--databases/mysql323-server/files/patch-sql::mytcpd.h147
-rw-r--r--databases/mysql323-server/files/patch-sql_mysqld.cc12
4 files changed, 207 insertions, 28 deletions
diff --git a/databases/mysql323-server/Makefile b/databases/mysql323-server/Makefile
index 81ad76919a34..3b35727fc083 100644
--- a/databases/mysql323-server/Makefile
+++ b/databases/mysql323-server/Makefile
@@ -7,19 +7,10 @@
PORTNAME?= mysql
PORTVERSION= 3.23.58
-PORTREVISION?= 2
+PORTREVISION?= 3
CATEGORIES= databases
-MASTER_SITES= ftp://planetmirror.com/pub/mysql/Downloads/MySQL-3.23/ \
- http://www.softagency.co.jp/MySQL/Downloads/MySQL-3.23/ \
- ftp://sunsite.dk/mirrors/mysql/Downloads/MySQL-3.23/ \
- http://mysql.mediatraffic.fi/Downloads/MySQL-3.23/ \
- ftp://filepile.tiscali.de/mirror/mysql/Downloads/MySQL-3.23/ \
- http://mirrors.tilian.co.uk/mysql.com/Downloads/MySQL-3.23/ \
- ftp://ftp.rtfm.no/pub/mysql/Downloads/MySQL-3.23/ \
- http://www.mysql.cz/Downloads/MySQL-3.23/ \
- ftp://ftp.u-paris10.fr/mysql.com/Downloads/MySQL-3.23/ \
- http://mysql.proserve.nl/Downloads/MySQL-3.23/ \
- ftp://ftp.free.fr/pub/MySQL/Downloads/MySQL-3.23/
+MASTER_SITES= ${MASTER_SITE_MYSQL}
+MASTER_SITE_SUBDIR= MySQL-3.23
PKGNAMESUFFIX?= -server
MAINTAINER= ale@FreeBSD.org
@@ -39,7 +30,6 @@ CONFIGURE_ARGS= --localstatedir=${DB_DIR} \
--with-libwrap \
--with-low-memory \
--with-comment='FreeBSD port: ${PKGNAME}' \
- --with-innodb \
--enable-thread-safe-client
.ifdef USE_MYSQL
@@ -55,6 +45,9 @@ CONFIGURE_ARGS+=--with-extra-charsets=${WITH_XCHARSET}
.if defined(BUILD_STATIC)
CONFIGURE_ARGS+=--with-mysqld-ldflags=-all-static
.endif
+.if !defined(WITHOUT_INNODB)
+CONFIGURE_ARGS+=--with-innodb
+.endif
.include <bsd.port.pre.mk>
@@ -67,10 +60,10 @@ CONFIGURE_ARGS+=-D_THREAD_SAFE -I${LOCALBASE}/include/pthread/linuxthreads
CFLAGS+= -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE
CFLAGS+= -I${LOCALBASE}/include/pthread/linuxthreads
.if ${OSVERSION} > 500000
-LIB_DEPENDS+= lthread.3:${PORTSDIR}/devel/linuxthreads
+LIB_DEPENDS+= lthread.[35]:${PORTSDIR}/devel/linuxthreads
CONFIGURE_ARGS+=-L${LOCALBASE}/lib -llthread -llgcc_r -llstdc++ -llsupc++'
.else
-LIB_DEPENDS+= lthread.2:${PORTSDIR}/devel/linuxthreads
+LIB_DEPENDS+= lthread.[24]:${PORTSDIR}/devel/linuxthreads
CONFIGURE_ARGS+=-L${LOCALBASE}/lib -llthread -llgcc_r'
.endif
.else
@@ -120,14 +113,15 @@ pre-fetch:
@${ECHO} " WITH_OPENSSL=yes Enable secure connections."
@${ECHO} " DB_DIR=directory Set alternate directory for database files"
@${ECHO} " (default is /var/db/mysql)."
+ @${ECHO} " WITH_LINUXTHREADS=yes Use the linuxthreads pthread library."
@${ECHO} " WITH_PROC_SCOPE_PTH=yes Use process scope threads"
@${ECHO} " (try it if you use libpthread)."
- @${ECHO} " WITH_LINUXTHREADS=yes Use the linuxthreads pthread library."
@${ECHO} " OVERWRITE_DB=yes Re-initialize default databases."
@${ECHO} " BUILD_OPTIMIZED=yes Enable compiler optimizations"
@${ECHO} " (use it if you need speed)."
@${ECHO} " BUILD_STATIC=yes Build a static version of mysqld."
@${ECHO} " (use it if you need even more speed)."
+ @${ECHO} " WITHOUT_INNODB=yes Disable support for InnoDB table handler."
@${ECHO} ""
post-patch:
@@ -212,5 +206,8 @@ post-patch:
@${REINPLACE_CMD} -e "s|man_MANS =|man_MANS = ${MAN1}|g" ${WRKSRC}/man/Makefile.in
.endif
.endif
+# Common part
+post-extract:
+ @${CP} /usr/include/tcpd.h ${WRKSRC}/sql/mytcpd.h
.include <bsd.port.post.mk>
diff --git a/databases/mysql323-server/files/patch-sql::mysqld.cc b/databases/mysql323-server/files/patch-sql::mysqld.cc
new file mode 100644
index 000000000000..8b6159b9c32b
--- /dev/null
+++ b/databases/mysql323-server/files/patch-sql::mysqld.cc
@@ -0,0 +1,47 @@
+--- sql/mysqld.cc.orig Sat Dec 18 18:25:05 2004
++++ sql/mysqld.cc Sun Jan 9 12:43:21 2005
+@@ -99,7 +99,7 @@
+ #endif /* __WIN__ */
+
+ #ifdef HAVE_LIBWRAP
+-#include <tcpd.h>
++#include "mytcpd.h"
+ #include <syslog.h>
+ #ifdef NEED_SYS_SYSLOG_H
+ #include <sys/syslog.h>
+@@ -107,15 +107,6 @@
+ int allow_severity = LOG_INFO;
+ int deny_severity = LOG_WARNING;
+
+-#ifdef __STDC__
+-#define my_fromhost(A) fromhost(A)
+-#define my_hosts_access(A) hosts_access(A)
+-#define my_eval_client(A) eval_client(A)
+-#else
+-#define my_fromhost(A) fromhost()
+-#define my_hosts_access(A) hosts_access()
+-#define my_eval_client(A) eval_client()
+-#endif
+ #endif /* HAVE_LIBWRAP */
+
+ #ifdef HAVE_SYS_MMAN_H
+@@ -3240,8 +3231,8 @@
+ struct request_info req;
+ signal(SIGCHLD, SIG_DFL);
+ request_init(&req, RQ_DAEMON, libwrapName, RQ_FILE, new_sock, NULL);
+- my_fromhost(&req);
+- if (!my_hosts_access(&req))
++ fromhost(&req);
++ if (!hosts_access(&req))
+ {
+ /*
+ This may be stupid but refuse() includes an exit(0)
+@@ -3249,7 +3240,7 @@
+ clean_exit() - same stupid thing ...
+ */
+ syslog(deny_severity, "refused connect from %s",
+- my_eval_client(&req));
++ eval_client(&req));
+
+ /*
+ C++ sucks (the gibberish in front just translates the supplied
diff --git a/databases/mysql323-server/files/patch-sql::mytcpd.h b/databases/mysql323-server/files/patch-sql::mytcpd.h
new file mode 100644
index 000000000000..3eb28a0f42fe
--- /dev/null
+++ b/databases/mysql323-server/files/patch-sql::mytcpd.h
@@ -0,0 +1,147 @@
+--- sql/mytcpd.h.orig Sun Jan 9 13:33:51 2005
++++ sql/mytcpd.h Sun Jan 9 13:41:42 2005
+@@ -6,6 +6,25 @@
+ * $FreeBSD: /tmp/pcvs/ports/databases/mysql323-server/files/Attic/patch-sql::mytcpd.h,v 1.1 2005-01-10 14:44:25 ale Exp $
+ */
+
++#ifndef _TCPWRAPPERS_TCPD_H
++#define _TCPWRAPPERS_TCPD_H
++
++/* someone else may have defined this */
++#undef __P
++
++/* use prototypes if we have an ANSI C compiler or are using C++ */
++#if defined(__STDC__) || defined(__cplusplus)
++#define __P(args) args
++#else
++#define __P(args) ()
++#endif
++
++/* Need definitions of struct sockaddr_in and FILE. */
++#include <netinet/in.h>
++#include <stdio.h>
++
++__BEGIN_DECLS
++
+ /* Structure to describe one communications endpoint. */
+
+ #define STRING_LENGTH 128 /* hosts, users, processes */
+@@ -31,10 +50,10 @@
+ char pid[10]; /* access via eval_pid(request) */
+ struct host_info client[1]; /* client endpoint info */
+ struct host_info server[1]; /* server endpoint info */
+- void (*sink) (); /* datagram sink function or 0 */
+- void (*hostname) (); /* address to printable hostname */
+- void (*hostaddr) (); /* address to printable address */
+- void (*cleanup) (); /* cleanup function or 0 */
++ void (*sink) __P((int)); /* datagram sink function or 0 */
++ void (*hostname) __P((struct host_info *)); /* address to printable hostname */
++ void (*hostaddr) __P((struct host_info *)); /* address to printable address */
++ void (*cleanup) __P((struct request_info *)); /* cleanup function or 0 */
+ struct netconfig *config; /* netdir handle */
+ };
+
+@@ -67,20 +86,23 @@
+ /* Global functions. */
+
+ #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
+-extern void fromhost(); /* get/validate client host info */
++extern void fromhost __P((struct request_info *)); /* get/validate client host info */
+ #else
+ #define fromhost sock_host /* no TLI support needed */
+ #endif
+
+-extern int hosts_access(); /* access control */
+-extern void shell_cmd(); /* execute shell command */
+-extern char *percent_x(); /* do %<char> expansion */
+-extern void rfc931(); /* client name from RFC 931 daemon */
+-extern void clean_exit(); /* clean up and exit */
+-extern void refuse(); /* clean up and exit */
+-extern char *xgets(); /* fgets() on steroids */
+-extern char *split_at(); /* strchr() and split */
+-extern unsigned long dot_quad_addr(); /* restricted inet_addr() */
++extern void shell_cmd __P((char *)); /* execute shell command */
++extern char *percent_x __P((char *, int, char *, struct request_info *)); /* do %<char> expansion */
++#ifdef INET6
++extern void rfc931 __P((struct sockaddr *, struct sockaddr *, char *)); /* client name from RFC 931 daemon */
++#else
++extern void rfc931 __P((struct sockaddr_in *, struct sockaddr_in *, char *)); /* client name from RFC 931 daemon */
++#endif
++extern void clean_exit __P((struct request_info *)); /* clean up and exit */
++extern void refuse __P((struct request_info *)); /* clean up and exit */
++extern char *xgets __P((char *, int, FILE *)); /* fgets() on steroids */
++extern char *split_at __P((char *, int)); /* strchr() and split */
++extern unsigned long dot_quad_addr __P((char *)); /* restricted inet_addr() */
+
+ /* Global variables. */
+
+@@ -98,9 +120,14 @@
+ */
+
+ #ifdef __STDC__
++extern int hosts_access(struct request_info *request);
++extern int hosts_ctl(char *daemon, char *client_name, char *client_addr,
++ char *client_user);
+ extern struct request_info *request_init(struct request_info *,...);
+ extern struct request_info *request_set(struct request_info *,...);
+ #else
++extern int hosts_access();
++extern int hosts_ctl();
+ extern struct request_info *request_init(); /* initialize request */
+ extern struct request_info *request_set(); /* update request structure */
+ #endif
+@@ -123,27 +150,27 @@
+ * host_info structures serve as caches for the lookup results.
+ */
+
+-extern char *eval_user(); /* client user */
+-extern char *eval_hostname(); /* printable hostname */
+-extern char *eval_hostaddr(); /* printable host address */
+-extern char *eval_hostinfo(); /* host name or address */
+-extern char *eval_client(); /* whatever is available */
+-extern char *eval_server(); /* whatever is available */
++extern char *eval_user __P((struct request_info *)); /* client user */
++extern char *eval_hostname __P((struct host_info *)); /* printable hostname */
++extern char *eval_hostaddr __P((struct host_info *)); /* printable host address */
++extern char *eval_hostinfo __P((struct host_info *)); /* host name or address */
++extern char *eval_client __P((struct request_info *)); /* whatever is available */
++extern char *eval_server __P((struct request_info *)); /* whatever is available */
+ #define eval_daemon(r) ((r)->daemon) /* daemon process name */
+ #define eval_pid(r) ((r)->pid) /* process id */
+
+ /* Socket-specific methods, including DNS hostname lookups. */
+
+-extern void sock_host(); /* look up endpoint addresses */
+-extern void sock_hostname(); /* translate address to hostname */
+-extern void sock_hostaddr(); /* address to printable address */
++extern void sock_host __P((struct request_info *));
++extern void sock_hostname __P((struct host_info *));
++extern void sock_hostaddr __P((struct host_info *));
+ #define sock_methods(r) \
+ { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; }
+
+ /* The System V Transport-Level Interface (TLI) interface. */
+
+ #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
+-extern void tli_host(); /* look up endpoint addresses etc. */
++extern void tli_host __P((struct request_info *)); /* look up endpoint addresses etc. */
+ #endif
+
+ /*
+@@ -184,7 +211,7 @@
+ * behavior.
+ */
+
+-extern void process_options(); /* execute options */
++extern void process_options __P((char *, struct request_info *)); /* execute options */
+ extern int dry_run; /* verification flag */
+
+ /* Bug workarounds. */
+@@ -223,3 +250,7 @@
+ #define strtok my_strtok
+ extern char *my_strtok();
+ #endif
++
++__END_DECLS
++
++#endif /* tcpd.h */
diff --git a/databases/mysql323-server/files/patch-sql_mysqld.cc b/databases/mysql323-server/files/patch-sql_mysqld.cc
deleted file mode 100644
index 5155bd5f33cd..000000000000
--- a/databases/mysql323-server/files/patch-sql_mysqld.cc
+++ /dev/null
@@ -1,12 +0,0 @@
---- sql/mysqld.cc.orig Thu Oct 10 12:17:28 2002
-+++ sql/mysqld.cc Tue Nov 12 23:23:27 2002
-@@ -92,7 +92,8 @@
- int allow_severity = LOG_INFO;
- int deny_severity = LOG_WARNING;
-
--#ifdef __STDC__
-+#include <osreldate.h>
-+#if defined(__STDC__) && __FreeBSD_version < 500000
- #define my_fromhost(A) fromhost(A)
- #define my_hosts_access(A) hosts_access(A)
- #define my_eval_client(A) eval_client(A)