[Midnightbsd-cvs] mports: mports/databases: add mysql60
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon Aug 4 09:58:14 EDT 2008
Log Message:
-----------
add mysql60
Modified Files:
--------------
mports/databases:
Makefile (r1.64 -> r1.65)
Added Files:
-----------
mports/databases/mysql60-client:
Makefile (r1.1)
mports/databases/mysql60-scripts:
Makefile (r1.1)
mports/databases/mysql60-server:
Makefile (r1.1)
distinfo (r1.1)
pkg-descr (r1.1)
pkg-install (r1.1)
pkg-message (r1.1)
pkg-plist (r1.1)
pkg-plist.client (r1.1)
pkg-plist.scripts (r1.1)
mports/databases/mysql60-server/files:
mysql-server.sh.in (r1.1)
patch-Docs::Makefile.in (r1.1)
patch-Makefile.in (r1.1)
patch-client_mysql_upgrade.c (r1.1)
patch-configure (r1.1)
patch-extra_yassl_Makefile.in (r1.1)
patch-extra_yassl_taocrypt_Makefile.in (r1.1)
patch-include_my_libwrap.h (r1.1)
patch-include_my_tcpd.h (r1.1)
patch-man::Makefile.in (r1.1)
patch-mysys_default.c (r1.1)
patch-scripts::Makefile.in (r1.1)
patch-scripts_mysqld_safe.sh (r1.1)
patch-sql::mysqld.cc (r1.1)
patch-support-files_Makefile.in (r1.1)
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/databases/Makefile,v
retrieving revision 1.64
retrieving revision 1.65
diff -L databases/Makefile -L databases/Makefile -u -r1.64 -r1.65
--- databases/Makefile
+++ databases/Makefile
@@ -38,6 +38,9 @@
SUBDIR += mysql51-client
SUBDIR += mysql51-scripts
SUBDIR += mysql51-server
+ SUBDIR += mysql60-client
+ SUBDIR += mysql60-scripts
+ SUBDIR += mysql60-server
SUBDIR += p5-Class-DBI
SUBDIR += p5-Ima-DBI
SUBDIR += p5-Data-Page
--- /dev/null
+++ databases/mysql60-client/Makefile
@@ -0,0 +1,22 @@
+# New ports collection makefile for: MySQL-client
+# Date created: 28 Jan 2006
+# Whom: Alex Dupre <ale at FreeBSD.org>
+#
+# $MidnightBSD: mports/databases/mysql60-client/Makefile,v 1.1 2008/08/04 13:58:11 laffer1 Exp $
+# $FreeBSD: ports/databases/mysql60-client/Makefile,v 1.100 2008/07/26 08:33:37 ale Exp $
+#
+
+PORTNAME= mysql
+PKGNAMESUFFIX= -client
+
+COMMENT= Multithreaded SQL database (client)
+
+MASTERDIR= ${.CURDIR}/../mysql60-server
+
+PKGINSTALL= mustnotexist
+PKGMESSAGE= mustnotexist
+PLIST= ${PKGDIR}/pkg-plist.client
+
+CLIENT_ONLY= yes
+
+.include "${MASTERDIR}/Makefile"
--- /dev/null
+++ databases/mysql60-scripts/Makefile
@@ -0,0 +1,22 @@
+# New ports collection makefile for: MySQL-scripts
+# Date created: 28 Jan 2006
+# Whom: Alex Dupre <ale at FreeBSD.org>
+#
+# $MidnightBSD: mports/databases/mysql60-scripts/Makefile,v 1.1 2008/08/04 13:58:11 laffer1 Exp $
+# $FreeBSD: ports/databases/mysql60-scripts/Makefile,v 1.13 2008/07/26 08:33:38 ale Exp $
+#
+
+PORTNAME= mysql
+PKGNAMESUFFIX= -scripts
+
+COMMENT= Multithreaded SQL database (scripts)
+
+MASTERDIR= ${.CURDIR}/../mysql60-server
+
+PKGINSTALL= mustnotexist
+PKGMESSAGE= mustnotexist
+PLIST= ${PKGDIR}/pkg-plist.scripts
+
+SCRIPTS_ONLY= yes
+
+.include "${MASTERDIR}/Makefile"
--- /dev/null
+++ databases/mysql60-server/pkg-message
@@ -0,0 +1,3 @@
+Remember to run mysql_upgrade (with the optional --datadir=<dbdir> flag)
+the first time you start the MySQL server after an upgrade from an
+earlier version.
--- /dev/null
+++ databases/mysql60-server/pkg-descr
@@ -0,0 +1,7 @@
+MySQL is a very fast, multi-threaded, multi-user and robust SQL
+(Structured Query Language) database server.
+
+WWW: http://www.mysql.com/
+
+- Alex Dupre
+ale at FreeBSD.org
--- /dev/null
+++ databases/mysql60-server/pkg-plist
@@ -0,0 +1,184 @@
+ at stopdaemon mysql-server
+bin/innochecksum
+bin/my_print_defaults
+bin/myisam_ftdump
+bin/myisamchk
+bin/myisamlog
+bin/myisampack
+bin/mysql_install_db
+bin/mysql_tzinfo_to_sql
+bin/mysql_waitpid
+bin/mysqld_safe
+%%NDB%%bin/ndb_config
+%%NDB%%bin/ndb_delete_all
+%%NDB%%bin/ndb_desc
+%%NDB%%bin/ndb_drop_index
+%%NDB%%bin/ndb_drop_table
+%%NDB%%bin/ndb_error_reporter
+%%NDB%%bin/ndb_mgm
+%%NDB%%bin/ndb_print_backup_file
+%%NDB%%bin/ndb_print_schema_file
+%%NDB%%bin/ndb_print_sys_file
+%%NDB%%bin/ndb_redo_log_reader
+%%NDB%%bin/ndb_restore
+%%NDB%%bin/ndb_select_all
+%%NDB%%bin/ndb_select_count
+%%NDB%%bin/ndb_show_tables
+%%NDB%%bin/ndb_size.pl
+%%NDB%%bin/ndb_test_platform
+%%NDB%%bin/ndb_waiter
+bin/perror
+bin/replace
+bin/resolve_stack_dump
+bin/resolveip
+%%NDB%%include/mysql/storage/ndb/mgmapi/mgmapi.h
+%%NDB%%include/mysql/storage/ndb/mgmapi/mgmapi_config_parameters.h
+%%NDB%%include/mysql/storage/ndb/mgmapi/mgmapi_config_parameters_debug.h
+%%NDB%%include/mysql/storage/ndb/mgmapi/mgmapi_debug.h
+%%NDB%%include/mysql/storage/ndb/mgmapi/mgmapi_error.h
+%%NDB%%include/mysql/storage/ndb/mgmapi/ndb_logevent.h
+%%NDB%%include/mysql/storage/ndb/mgmapi/ndbd_exit_codes.h
+%%NDB%%include/mysql/storage/ndb/ndb_constants.h
+%%NDB%%include/mysql/storage/ndb/ndb_init.h
+%%NDB%%include/mysql/storage/ndb/ndb_types.h
+%%NDB%%include/mysql/storage/ndb/ndb_version.h
+%%NDB%%include/mysql/storage/ndb/ndbapi/Ndb.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbApi.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbBlob.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbDictionary.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbError.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbEventOperation.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbIndexOperation.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbIndexScanOperation.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbIndexStat.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbInterpretedCode.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbOperation.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbPool.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbRecAttr.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbReceiver.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbScanFilter.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbScanOperation.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/NdbTransaction.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/ndbapi_limits.h
+%%NDB%%include/mysql/storage/ndb/ndbapi/ndb_cluster_connection.hpp
+%%NDB%%include/mysql/storage/ndb/ndbapi/ndb_opt_defaults.h
+%%NDB%%include/mysql/storage/ndb/ndbapi/ndberror.h
+lib/mysql/libdbug.a
+lib/mysql/libheap.a
+lib/mysql/libmyisam.a
+lib/mysql/libmyisammrg.a
+lib/mysql/libmystrings.a
+lib/mysql/libmysys.a
+%%NDB%%lib/mysql/libndbclient.a
+%%NDB%%lib/mysql/libndbclient.la
+%%NDB%%lib/mysql/libndbclient.so
+%%NDB%%lib/mysql/libndbclient.so.3
+lib/mysql/libvio.a
+lib/mysql/plugin/ha_example.a
+lib/mysql/plugin/ha_example.la
+lib/mysql/plugin/ha_example.so
+lib/mysql/plugin/ha_example.so.0
+libexec/mysqld
+%%NDB%%libexec/ndb_cpcd
+%%NDB%%libexec/ndb_mgmd
+%%NDB%%libexec/ndbd
+%%DATADIR%%/binary-configure
+%%DATADIR%%/charsets/Index.xml
+%%DATADIR%%/charsets/README
+%%DATADIR%%/charsets/armscii8.xml
+%%DATADIR%%/charsets/ascii.xml
+%%DATADIR%%/charsets/cp1250.xml
+%%DATADIR%%/charsets/cp1251.xml
+%%DATADIR%%/charsets/cp1256.xml
+%%DATADIR%%/charsets/cp1257.xml
+%%DATADIR%%/charsets/cp850.xml
+%%DATADIR%%/charsets/cp852.xml
+%%DATADIR%%/charsets/cp866.xml
+%%DATADIR%%/charsets/dec8.xml
+%%DATADIR%%/charsets/geostd8.xml
+%%DATADIR%%/charsets/greek.xml
+%%DATADIR%%/charsets/hebrew.xml
+%%DATADIR%%/charsets/hp8.xml
+%%DATADIR%%/charsets/keybcs2.xml
+%%DATADIR%%/charsets/koi8r.xml
+%%DATADIR%%/charsets/koi8u.xml
+%%DATADIR%%/charsets/latin1.xml
+%%DATADIR%%/charsets/latin2.xml
+%%DATADIR%%/charsets/latin5.xml
+%%DATADIR%%/charsets/latin7.xml
+%%DATADIR%%/charsets/macce.xml
+%%DATADIR%%/charsets/macroman.xml
+%%DATADIR%%/charsets/swe7.xml
+%%DATADIR%%/config.huge.ini
+%%DATADIR%%/config.medium.ini
+%%DATADIR%%/config.small.ini
+%%DATADIR%%/czech/errmsg.sys
+%%DATADIR%%/danish/errmsg.sys
+%%DATADIR%%/dutch/errmsg.sys
+%%DATADIR%%/english/errmsg.sys
+%%DATADIR%%/errmsg.txt
+%%DATADIR%%/estonian/errmsg.sys
+%%DATADIR%%/fill_help_tables.sql
+%%DATADIR%%/french/errmsg.sys
+%%DATADIR%%/german/errmsg.sys
+%%DATADIR%%/greek/errmsg.sys
+%%DATADIR%%/hungarian/errmsg.sys
+%%DATADIR%%/italian/errmsg.sys
+%%DATADIR%%/japanese/errmsg.sys
+%%DATADIR%%/korean/errmsg.sys
+%%DATADIR%%/mi_test_all
+%%DATADIR%%/mi_test_all.res
+%%DATADIR%%/my-huge.cnf
+%%DATADIR%%/my-innodb-heavy-4G.cnf
+%%DATADIR%%/my-large.cnf
+%%DATADIR%%/my-medium.cnf
+%%DATADIR%%/my-small.cnf
+%%DATADIR%%/mysql_system_tables.sql
+%%DATADIR%%/mysql_system_tables_data.sql
+%%DATADIR%%/mysql-log-rotate
+%%DATADIR%%/mysql.server
+%%DATADIR%%/mysqld_multi.server
+%%DATADIR%%/ndb-config-2-node.ini
+%%DATADIR%%/norwegian-ny/errmsg.sys
+%%DATADIR%%/norwegian/errmsg.sys
+%%DATADIR%%/polish/errmsg.sys
+%%DATADIR%%/portuguese/errmsg.sys
+%%DATADIR%%/romanian/errmsg.sys
+%%DATADIR%%/russian/errmsg.sys
+%%DATADIR%%/serbian/errmsg.sys
+%%DATADIR%%/slovak/errmsg.sys
+%%DATADIR%%/spanish/errmsg.sys
+%%DATADIR%%/swedish/errmsg.sys
+%%DATADIR%%/ukrainian/errmsg.sys
+%%NDB%%@dirrm include/mysql/storage/ndb/mgmapi
+%%NDB%%@dirrm include/mysql/storage/ndb/ndbapi
+%%NDB%%@dirrm include/mysql/storage/ndb
+%%NDB%%@dirrm include/mysql/storage
+ at dirrmtry include/mysql
+ at dirrm lib/mysql/plugin
+ at dirrmtry lib/mysql
+ at dirrm %%DATADIR%%/charsets
+ at dirrm %%DATADIR%%/czech
+ at dirrm %%DATADIR%%/danish
+ at dirrm %%DATADIR%%/dutch
+ at dirrm %%DATADIR%%/english
+ at dirrm %%DATADIR%%/estonian
+ at dirrm %%DATADIR%%/french
+ at dirrm %%DATADIR%%/german
+ at dirrm %%DATADIR%%/greek
+ at dirrm %%DATADIR%%/hungarian
+ at dirrm %%DATADIR%%/italian
+ at dirrm %%DATADIR%%/japanese
+ at dirrm %%DATADIR%%/korean
+ at dirrm %%DATADIR%%/norwegian
+ at dirrm %%DATADIR%%/norwegian-ny
+ at dirrm %%DATADIR%%/polish
+ at dirrm %%DATADIR%%/portuguese
+ at dirrm %%DATADIR%%/romanian
+ at dirrm %%DATADIR%%/russian
+ at dirrm %%DATADIR%%/serbian
+ at dirrm %%DATADIR%%/slovak
+ at dirrm %%DATADIR%%/spanish
+ at dirrm %%DATADIR%%/swedish
+ at dirrm %%DATADIR%%/ukrainian
+ at dirrmtry %%DATADIR%%
--- /dev/null
+++ databases/mysql60-server/pkg-plist.scripts
@@ -0,0 +1,11 @@
+bin/msql2mysql
+bin/mysql_convert_table_format
+bin/mysql_find_rows
+bin/mysql_fix_extensions
+bin/mysql_secure_installation
+bin/mysql_setpermission
+bin/mysql_zap
+bin/mysqlaccess
+bin/mysqld_multi
+bin/mysqldumpslow
+bin/mysqlhotcopy
--- /dev/null
+++ databases/mysql60-server/distinfo
@@ -0,0 +1,3 @@
+MD5 (mysql-6.0.5-alpha.tar.gz) = 8e637e3c0c9d10645a9f188094bf6709
+SHA256 (mysql-6.0.5-alpha.tar.gz) = 0834a1c731905b10fdc5099ef395dd38b38b0a2ee28eb725cf4614f50ecf84ce
+SIZE (mysql-6.0.5-alpha.tar.gz) = 29979599
--- /dev/null
+++ databases/mysql60-server/pkg-plist.client
@@ -0,0 +1,60 @@
+bin/mysql
+bin/mysql_config
+bin/mysql_fix_privilege_tables
+bin/mysql_upgrade
+bin/mysqladmin
+bin/mysqlbinlog
+bin/mysqlbug
+bin/mysqlcheck
+bin/mysqldump
+bin/mysqlimport
+bin/mysqlshow
+bin/mysqlslap
+bin/mysqltest
+include/mysql/decimal.h
+include/mysql/errmsg.h
+include/mysql/keycache.h
+include/mysql/m_ctype.h
+include/mysql/m_string.h
+include/mysql/my_alloc.h
+include/mysql/my_attribute.h
+include/mysql/my_config.h
+include/mysql/my_dbug.h
+include/mysql/my_dir.h
+include/mysql/my_getopt.h
+include/mysql/my_global.h
+include/mysql/my_list.h
+include/mysql/my_net.h
+include/mysql/my_no_pthread.h
+include/mysql/my_pthread.h
+include/mysql/my_sys.h
+include/mysql/my_xml.h
+include/mysql/mysql.h
+include/mysql/mysql_com.h
+include/mysql/mysql_embed.h
+include/mysql/mysql_time.h
+include/mysql/mysql_version.h
+include/mysql/mysqld_ername.h
+include/mysql/mysqld_error.h
+include/mysql/plugin.h
+include/mysql/plugin_audit.h
+include/mysql/plugin_ftparser.h
+include/mysql/sql_common.h
+include/mysql/sql_state.h
+include/mysql/sslopt-case.h
+include/mysql/sslopt-longopts.h
+include/mysql/sslopt-vars.h
+include/mysql/typelib.h
+lib/mysql/libmysqlclient.a
+lib/mysql/libmysqlclient.la
+lib/mysql/libmysqlclient.so
+lib/mysql/libmysqlclient.so.16
+lib/mysql/libmysqlclient_r.a
+lib/mysql/libmysqlclient_r.la
+lib/mysql/libmysqlclient_r.so
+lib/mysql/libmysqlclient_r.so.16
+share/aclocal/mysql.m4
+%%DATADIR%%/mysql_fix_privilege_tables.sql
+ at dirrm include/mysql
+ at dirrm lib/mysql
+ at dirrm %%DATADIR%%
--- /dev/null
+++ databases/mysql60-server/pkg-install
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+PATH=/bin:/usr/sbin
+
+case $2 in
+POST-INSTALL)
+ USER=mysql
+ GROUP=${USER}
+ UID=88
+ GID=${UID}
+
+ if pw group show "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+ else
+ if pw groupadd ${GROUP} -g ${GID}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+ fi
+
+ if pw user show "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+ else
+ if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -d /nonexistent -s /sbin/nologin -c "MySQL Daemon"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+ fi
+ ;;
+esac
--- /dev/null
+++ databases/mysql60-server/Makefile
@@ -0,0 +1,221 @@
+# New ports collection makefile for: MySQL-server
+# Date created: 28 Jan 2006
+# Whom: Alex Dupre <ale at FreeBSD.org>
+#
+# $MidnightBSD: mports/databases/mysql60-server/Makefile,v 1.1 2008/08/04 13:58:11 laffer1 Exp $
+# $FreeBSD: ports/databases/mysql60-server/Makefile,v 1.236 2008/07/26 08:33:37 ale Exp $
+#
+
+PORTNAME?= mysql
+PORTVERSION= 6.0.5
+PORTREVISION?= 0
+CATEGORIES= databases
+MASTER_SITES= ${MASTER_SITE_MYSQL}
+MASTER_SITE_SUBDIR= MySQL-6.0
+PKGNAMESUFFIX?= -server
+DISTNAME= ${PORTNAME}-${PORTVERSION}-alpha
+
+MAINTAINER= ports at MidnightBSD.org
+COMMENT?= Multithreaded SQL database (server)
+LICENSE= gpl2
+
+SLAVEDIRS= databases/mysql60-client databases/mysql60-scripts
+USE_AUTOTOOLS= libtool:15
+USE_GMAKE= yes
+
+CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd6.0
+CONFIGURE_ARGS= --localstatedir=/var/db/mysql \
+ --without-debug \
+ --without-readline \
+ --without-libedit \
+ --with-libwrap \
+ --with-mysqlfs \
+ --with-low-memory \
+ --with-comment='MidnightBSD port: ${PKGNAME}' \
+ --enable-thread-safe-client
+
+.ifdef USE_MYSQL
+.error You have `USE_MYSQL' variable defined either in environment or in make(1) arguments. Please undefine and try again.
+.endif
+
+.if defined(WITH_CHARSET) && ${WITH_CHARSET} != ""
+CONFIGURE_ARGS+=--with-charset=${WITH_CHARSET}
+.endif
+.if defined(WITH_XCHARSET) && ${WITH_XCHARSET} != ""
+CONFIGURE_ARGS+=--with-extra-charsets=${WITH_XCHARSET}
+.endif
+.if defined(WITH_OPENSSL)
+CONFIGURE_ARGS+=--with-ssl=bundled
+.endif
+.if defined(WITH_FAST_MUTEXES)
+CONFIGURE_ARGS+=--with-fast-mutexes
+.endif
+.if defined(WITH_THREAD_POOL)
+CONFIGURE_ARGS+=--with-libevent
+.endif
+.if defined(BUILD_STATIC)
+CONFIGURE_ARGS+=--with-mysqld-ldflags=-all-static
+.endif
+.if defined(WITH_NDB)
+CONFIGURE_ARGS+=--with-plugins=max
+.else
+CONFIGURE_ARGS+=--with-plugins=max-no-ndb
+.endif
+.if defined(WITH_COLLATION) && ${WITH_COLLATION} != ""
+CONFIGURE_ARGS+=--with-collation=${WITH_COLLATION}
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "i386"
+CONFIGURE_ARGS+=--enable-assembler
+.endif
+.if defined(WITH_LINUXTHREADS)
+CONFIGURE_ARGS+=--with-named-thread-libs='-DHAVE_GLIBC2_STYLE_GETHOSTBYNAME_R
+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
+LIB_DEPENDS+= lthread.[35]:${PORTSDIR}/devel/linuxthreads
+CONFIGURE_ARGS+=-L${LOCALBASE}/lib -llthread -llgcc_r -llstdc++ -llsupc++'
+.else
+CONFIGURE_ARGS+=--with-named-thread-libs=${PTHREAD_LIBS}
+CFLAGS+= ${PTHREAD_CFLAGS}
+.endif
+
+.if defined(BUILD_OPTIMIZED)
+CFLAGS+= -O3 -fno-omit-frame-pointer
+CFLAGS+= -fno-gcse
+.endif
+CXXFLAGS+= ${CFLAGS} -felide-constructors -fno-rtti
+CXXFLAGS+= -fno-exceptions
+
+# MySQL-Server part
+.if !defined(CLIENT_ONLY) && !defined(SCRIPTS_ONLY)
+USE_MYSQL= yes
+WANT_MYSQL_VER= 60
+
+LATEST_LINK= mysql60-server
+
+CONFLICTS= mysql-server-3.* mysql-server-4.* mysql-server-5.*
+
+USE_RC_SUBR= mysql-server.sh
+
+.if defined(WITH_NDB)
+PLIST_SUB+= NDB=""
+.else
+PLIST_SUB+= NDB="@comment "
+.endif
+
+MAN1= myisamchk.1 myisamlog.1 myisampack.1 \
+ my_print_defaults.1 mysql_tzinfo_to_sql.1 \
+ mysqld_safe.1 mysql.server.1 perror.1 replace.1
+
+INFO= mysql
+
+pre-fetch:
+ @${ECHO} ""
+ @${ECHO} "You may use the following build options:"
+ @${ECHO} ""
+ @${ECHO} " WITH_CHARSET=charset Define the primary built-in charset (latin1)."
+ @${ECHO} " WITH_XCHARSET=list Define other built-in charsets (may be 'all')."
+ @${ECHO} " WITH_COLLATION=collate Define default collation (latin1_swedish_ci)."
+ @${ECHO} " WITH_OPENSSL=yes Enable secure connections."
+ @${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_THREAD_POOL=yes Use libevent to have connection pooling."
+ @${ECHO} " WITH_FAST_MUTEXES=yes Replace mutexes with spinlocks."
+ @${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} " WITH_NDB=yes Enable support for NDB Cluster."
+ @${ECHO} ""
+
+post-patch:
+ @${REINPLACE_CMD} -e "s|SUBDIRS =|SUBDIRS = include @docs_dirs@ sql-common @sql_server_dirs@ storage scripts @sql_server@ @man_dirs@ support-files|g" ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e "s|bin_SCRIPTS =|bin_SCRIPTS = @server_scripts@|g" ${WRKSRC}/scripts/Makefile.in
+ @${REINPLACE_CMD} -e "s|dist_pkgdata_DATA =|dist_pkgdata_DATA = fill_help_tables.sql mysql_system_tables.sql mysql_system_tables_data.sql|g" ${WRKSRC}/scripts/Makefile.in
+ @${REINPLACE_CMD} -e "s|man1_MANS =|man1_MANS = ${MAN1}|g" ${WRKSRC}/man/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-data-am: install-pkgincludeHEADERS|install-data-am:|g" ${WRKSRC}/extra/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-data-am: install-includeHEADERS|install-data-am:|g" ${WRKSRC}/extra/libevent/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-data-am: install-pkgincludeHEADERS|install-data-am:|g" ${WRKSRC}/include/Makefile.in
+ @${REINPLACE_CMD} -e "s|PROGRAMS = \$$(noinst_PROGRAMS)|PROGRAMS =|g" ${WRKSRC}/storage/archive/Makefile.in
+ @${REINPLACE_CMD} -e "/^AM_CXXFLAGS/s|=.*|+= \$$(NDB_CXXFLAGS)|" `${FIND} ${WRKSRC}/storage/ndb -name Makefile.in`
+.if defined(WITH_PROC_SCOPE_PTH)
+ @${REINPLACE_CMD} -e "s|PTHREAD_SCOPE_SYSTEM|PTHREAD_SCOPE_PROCESS|g" ${WRKSRC}/sql/mysqld.cc
+.endif
+
+post-install:
+.if !defined(PACKAGE_BUILDING)
+ @${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.endif
+
+.else
+# MySQL-Client part
+.if defined(CLIENT_ONLY)
+LATEST_LINK= mysql60-client
+
+CONFLICTS= mysql-client-3.* mysql-client-4.* mysql-client-5.*
+
+MAN1= mysql_config.1 mysql.1 mysqladmin.1 mysqlbinlog.1 \
+ mysqlcheck.1 mysqldump.1 mysqlimport.1 mysqlshow.1
+
+MAN8= mysqlmanager.8
+
+USE_LDCONFIG= ${PREFIX}/lib/mysql
+
+CONFIGURE_ARGS+=--without-server
+
+post-patch:
+ @${REINPLACE_CMD} -e "s|SUBDIRS =|SUBDIRS = include sql-common scripts strings regex mysys dbug extra libmysql libmysql_r client @man_dirs@|g" ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/strings/Makefile.in ${WRKSRC}/mysys/Makefile.in ${WRKSRC}/dbug/Makefile.in
+ @${REINPLACE_CMD} -e "s|bin_SCRIPTS =|bin_SCRIPTS = mysql_config mysql_fix_privilege_tables mysqlbug|g" ${WRKSRC}/scripts/Makefile.in
+ @${REINPLACE_CMD} -e "s|dist_pkgdata_DATA =|dist_pkgdata_DATA = mysql_fix_privilege_tables.sql|g" ${WRKSRC}/scripts/Makefile.in
+ @${REINPLACE_CMD} -e "s|man1_MANS =|man1_MANS = ${MAN1}|g;s|man8_MANS =|man8_MANS = ${MAN8}|g" ${WRKSRC}/man/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-exec-am: install-binPROGRAMS|install-exec-am:|g" ${WRKSRC}/extra/Makefile.in
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/support-files/mysql.m4 ${PREFIX}/share/aclocal/
+
+.else
+# MySQL-Scripts part
+USE_MYSQL= yes
+WANT_MYSQL_VER= 60
+USE_PERL5= yes
+
+RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql60
+.if ${PERL_LEVEL} <= 500800
+RUN_DEPENDS+= ${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp
+.endif
+
+LATEST_LINK= mysql60-scripts
+
+CONFLICTS= mysql-scripts-3.* mysql-scripts-4.* mysql-scripts-5.*
+
+MAN1= msql2mysql.1 mysql_zap.1 mysqlaccess.1 mysqlhotcopy.1 \
+ mysqld_multi.1 mysql_fix_privilege_tables.1
+
+SCRIPTS= msql2mysql mysql_fix_extensions mysql_setpermission \
+ mysql_secure_installation mysql_zap mysqlaccess \
+ mysql_convert_table_format mysql_find_rows mysqlhotcopy \
+ mysqldumpslow mysqld_multi
+
+post-patch:
+ @${REINPLACE_CMD} -e "s|SUBDIRS =|SUBDIRS = scripts @man_dirs@|g" ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e "s|bin_SCRIPTS =|bin_SCRIPTS = ${SCRIPTS}|g" ${WRKSRC}/scripts/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-exec-am install-data-am|install-exec-am|g" ${WRKSRC}/scripts/Makefile.in
+ @${REINPLACE_CMD} -e "s|man1_MANS =|man1_MANS = ${MAN1}|g" ${WRKSRC}/man/Makefile.in
+.endif
+.endif
+# Common part
+post-extract:
+ @${CP} /usr/include/tcpd.h ${WRKSRC}/include/my_tcpd.h
+
+.if defined(WITH_OPENSSL) && defined(BUILD_STATIC)
+pre-configure:
+ @${ECHO} "You can't use the BUILD_STATIC option when using OpenSSL."
+ @${FALSE}
+.endif
+
+.include <bsd.port.post.mk>
--- /dev/null
+++ databases/mysql60-server/files/patch-extra_yassl_Makefile.in
@@ -0,0 +1,11 @@
+--- extra/yassl/Makefile.in.orig Thu Oct 26 14:02:58 2006
++++ extra/yassl/Makefile.in Tue Nov 7 08:17:34 2006
+@@ -351,7 +351,7 @@
+ yassl_libs = @yassl_libs@
+ yassl_taocrypt_extra_cxxflags = @yassl_taocrypt_extra_cxxflags@
+ zlib_dir = @zlib_dir@
+-SUBDIRS = taocrypt src testsuite
++SUBDIRS = taocrypt src
+ EXTRA_DIST = yassl.dsp yassl.dsw yassl.vcproj \
+ CMakeLists.txt
+
--- /dev/null
+++ databases/mysql60-server/files/patch-scripts_mysqld_safe.sh
@@ -0,0 +1,24 @@
+--- scripts/mysqld_safe.sh.orig 2007-10-08 10:39:23.000000000 +0200
++++ scripts/mysqld_safe.sh 2007-10-08 10:40:52.000000000 +0200
+@@ -242,10 +242,10 @@
+
+ if test -z "$MYSQL_HOME"
+ then
+- if test -r "$MY_BASEDIR_VERSION/my.cnf" && test -r "$DATADIR/my.cnf"
++ if test -r "$MY_BASEDIR_VERSION/etc/my.cnf" && test -r "$DATADIR/my.cnf"
+ then
+ log_error "WARNING: Found two instances of my.cnf -
+-$MY_BASEDIR_VERSION/my.cnf and
++$MY_BASEDIR_VERSION/etc/my.cnf and
+ $DATADIR/my.cnf
+ IGNORING $DATADIR/my.cnf"
+
+@@ -254,7 +254,7 @@
+ then
+ log_error "WARNING: Found $DATADIR/my.cnf
+ The data directory is a deprecated location for my.cnf, please move it to
+-$MY_BASEDIR_VERSION/my.cnf"
++$MY_BASEDIR_VERSION/etc/my.cnf"
+ MYSQL_HOME=$DATADIR
+ else
+ MYSQL_HOME=$MY_BASEDIR_VERSION
--- /dev/null
+++ databases/mysql60-server/files/patch-Makefile.in
@@ -0,0 +1,18 @@
+--- Makefile.in.orig 2008-06-12 15:27:07.000000000 +0200
++++ Makefile.in 2008-07-25 08:10:32.000000000 +0200
+@@ -419,14 +419,7 @@
+ EXTRA_DIST = INSTALL-SOURCE INSTALL-WIN-SOURCE \
+ README COPYING EXCEPTIONS-CLIENT CMakeLists.txt
+
+-SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
+- @readline_topdir@ sql-common scripts \
+- @pstack_dir@ \
+- @sql_union_dirs@ unittest storage plugin \
+- @sql_server@ @man_dirs@ tests \
+- netware @libmysqld_dirs@ \
+- mysql-test support-files sql-bench \
+- win
++SUBDIRS =
+
+ DIST_SUBDIRS = . include Docs zlib \
+ cmd-line-utils sql-common scripts \
--- /dev/null
+++ databases/mysql60-server/files/patch-Docs::Makefile.in
@@ -0,0 +1,20 @@
+--- Docs/Makefile.in.orig 2008-01-29 22:43:40.000000000 +0100
++++ Docs/Makefile.in 2008-02-14 08:21:57.000000000 +0100
+@@ -368,7 +368,7 @@
+ yassl_taocrypt_extra_cxxflags = @yassl_taocrypt_extra_cxxflags@
+ zlib_dir = @zlib_dir@
+ EXTRA_DIST = mysql.info INSTALL-BINARY @extra_docs@
+-all: all-am
++all:
+
+ .SUFFIXES:
+ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+@@ -453,7 +453,7 @@
+ install-data: install-data-am
+ uninstall: uninstall-am
+
+-install-am: all-am
++install-am:
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+ installcheck: installcheck-am
--- /dev/null
+++ databases/mysql60-server/files/patch-extra_yassl_taocrypt_Makefile.in
@@ -0,0 +1,11 @@
+--- extra/yassl/taocrypt/Makefile.in.orig Thu Oct 26 14:02:59 2006
++++ extra/yassl/taocrypt/Makefile.in Tue Nov 7 08:18:38 2006
+@@ -351,7 +351,7 @@
+ yassl_libs = @yassl_libs@
+ yassl_taocrypt_extra_cxxflags = @yassl_taocrypt_extra_cxxflags@
+ zlib_dir = @zlib_dir@
+-SUBDIRS = src test benchmark
++SUBDIRS = src
+ EXTRA_DIST = taocrypt.dsw taocrypt.dsp taocrypt.vcproj CMakeLists.txt $(wildcard mySTL/*.hpp)
+ all: all-recursive
+
--- /dev/null
+++ databases/mysql60-server/files/patch-client_mysql_upgrade.c
@@ -0,0 +1,13 @@
+--- client/mysql_upgrade.c.orig 2008-01-29 22:42:00.000000000 +0100
++++ client/mysql_upgrade.c 2008-02-14 08:29:52.000000000 +0100
+@@ -427,10 +427,6 @@
+
+ verbose("Looking for '%s' in: %s", tool_name, tool_path);
+
+- /* Make sure the tool exists */
+- if (my_access(tool_path, F_OK) != 0)
+- die("Can't find '%s'", tool_path);
+-
+ /*
+ Make sure it can be executed
+ */
--- /dev/null
+++ databases/mysql60-server/files/patch-mysys_default.c
@@ -0,0 +1,19 @@
+--- mysys/default.c.orig 2008-04-08 13:23:13.000000000 +0200
++++ mysys/default.c 2008-04-21 19:20:44.000000000 +0200
+@@ -623,7 +623,7 @@
+ {
+ MY_STAT stat_info;
+ if (!my_stat(name,&stat_info,MYF(0)))
+- return 1;
++ return 0;
+ /*
+ Ignore world-writable regular files.
+ This is mainly done to protect us to not read a file created by
+@@ -1105,6 +1105,7 @@
+ #ifdef DEFAULT_SYSCONFDIR
+ if (DEFAULT_SYSCONFDIR != "")
+ ADD_DIRECTORY(DEFAULT_SYSCONFDIR);
++ ADD_DIRECTORY(DEFAULT_SYSCONFDIR "/mysql/");
+ #endif
+ ADD_COMMON_DIRECTORIES();
+ ADD_DIRECTORY("~/");
--- /dev/null
+++ databases/mysql60-server/files/patch-include_my_libwrap.h
@@ -0,0 +1,11 @@
+--- include/my_libwrap.h.orig Tue Nov 7 08:39:53 2006
++++ include/my_libwrap.h Tue Nov 7 08:40:17 2006
+@@ -15,7 +15,7 @@
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+ #ifdef HAVE_LIBWRAP
+-#include <tcpd.h>
++#include <my_tcpd.h>
+ #include <syslog.h>
+ #ifdef NEED_SYS_SYSLOG_H
+ #include <sys/syslog.h>
--- /dev/null
+++ databases/mysql60-server/files/patch-man::Makefile.in
@@ -0,0 +1,13 @@
+--- man/Makefile.in.orig Thu Oct 26 14:03:04 2006
++++ man/Makefile.in Tue Nov 7 08:19:50 2006
+@@ -363,8 +363,8 @@
+ yassl_libs = @yassl_libs@
+ yassl_taocrypt_extra_cxxflags = @yassl_taocrypt_extra_cxxflags@
+ zlib_dir = @zlib_dir@
+-man1_MANS = @man1_files@
+-man8_MANS = @man8_files@
++man1_MANS =
++man8_MANS =
+ EXTRA_DIST = $(man1_MANS) $(man8_MANS)
+ all: all-am
+
--- /dev/null
+++ databases/mysql60-server/files/patch-configure
@@ -0,0 +1,22 @@
+--- configure.orig Sat May 26 12:22:14 2007
++++ configure Fri Jun 1 07:53:46 2007
+@@ -20394,8 +20394,6 @@
+ # This can be used to rebuild libtool when needed
+ LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+-# Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+ # Prevent multiple expansion
+
+@@ -26935,8 +26933,8 @@
+ # Some system specific hacks
+ #
+
+-MAX_C_OPTIMIZE="-O3"
+-MAX_CXX_OPTIMIZE="-O3"
++MAX_C_OPTIMIZE=""
++MAX_CXX_OPTIMIZE=""
+
+ case $SYSTEM_TYPE in
+ *solaris2.7*)
--- /dev/null
+++ databases/mysql60-server/files/patch-scripts::Makefile.in
@@ -0,0 +1,38 @@
+--- scripts/Makefile.in.orig Tue May 8 11:42:25 2007
++++ scripts/Makefile.in Thu May 17 09:30:48 2007
+@@ -399,21 +399,7 @@
+ BUILT_SOURCES = mysql_fix_privilege_tables.sql \
+ mysql_fix_privilege_tables_sql.c
+
+-bin_SCRIPTS = @server_scripts@ \
+- msql2mysql \
+- mysql_config \
+- mysql_fix_privilege_tables \
+- mysql_fix_extensions \
+- mysql_setpermission \
+- mysql_secure_installation \
+- mysql_zap \
+- mysqlaccess \
+- mysqlbug \
+- mysql_convert_table_format \
+- mysql_find_rows \
+- mysqlhotcopy \
+- mysqldumpslow \
+- mysqld_multi
++bin_SCRIPTS =
+
+ noinst_SCRIPTS = make_binary_distribution \
+ make_sharedlib_distribution
+@@ -445,11 +431,7 @@
+ mysql_system_tables_fix.sql \
+ CMakeLists.txt
+
+-dist_pkgdata_DATA = fill_help_tables.sql \
+- mysql_fix_privilege_tables.sql \
+- mysql_system_tables.sql \
+- mysql_system_tables_data.sql \
+- mysql_test_data_timezone.sql
++dist_pkgdata_DATA =
+
+ CLEANFILES = @server_scripts@ \
+ make_binary_distribution \
--- /dev/null
+++ databases/mysql60-server/files/mysql-server.sh.in
@@ -0,0 +1,74 @@
+#!/bin/sh
+#
+# $FreeBSD: ports/databases/mysql60-server/files/mysql-server.sh.in,v 1.8 2008/07/30 06:11:16 ale Exp $
+#
+
+# PROVIDE: mysql
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable mysql:
+# mysql_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable MySQL.
+# mysql_limits (bool): Set to "NO" by default.
+# Set it to yes to run `limits -e -U mysql`
+# just before mysql starts.
+# mysql_dbdir (str): Default to "/var/db/mysql"
+# Base database directory.
+# mysql_args (str): Custom additional arguments to be passed
+# to mysqld_safe (default empty).
+#
+
+. %%RC_SUBR%%
+
+name="mysql"
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+: ${mysql_enable="NO"}
+: ${mysql_limits="NO"}
+: ${mysql_dbdir="/var/db/mysql"}
+: ${mysql_args=""}
+
+mysql_user="mysql"
+mysql_limits_args="-e -U ${mysql_user}"
+pidfile="${mysql_dbdir}/`/bin/hostname`.pid"
+command="%%PREFIX%%/bin/mysqld_safe"
+command_args="--defaults-extra-file=${mysql_dbdir}/my.cnf --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args} > /dev/null 2>&1 &"
+procname="%%PREFIX%%/libexec/mysqld"
+start_precmd="${name}_prestart"
+start_postcmd="${name}_poststart"
+mysql_install_db="%%PREFIX%%/bin/mysql_install_db"
+mysql_install_db_args="--ldata=${mysql_dbdir}"
+
+mysql_create_auth_tables()
+{
+ eval $mysql_install_db $mysql_install_db_args >/dev/null 2>/dev/null
+ [ $? -eq 0 ] && chown -R ${mysql_user}:${mysql_user} ${mysql_dbdir}
+}
+
+mysql_prestart()
+{
+ if [ ! -d "${mysql_dbdir}/mysql/." ]; then
+ mysql_create_auth_tables || return 1
+ fi
+ if checkyesno mysql_limits; then
+ eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null
+ else
+ return 0
+ fi
+}
+
+mysql_poststart()
+{
+ local timeout=15
+ while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do
+ timeout=$(( timeout - 1 ))
+ sleep 1
+ done
+ return 0
+}
+
+run_rc_command "$1"
--- /dev/null
+++ databases/mysql60-server/files/patch-support-files_Makefile.in
@@ -0,0 +1,11 @@
+--- support-files/Makefile.in.orig Thu Apr 19 09:31:48 2007
++++ support-files/Makefile.in Thu Apr 19 09:33:03 2007
+@@ -419,7 +419,7 @@
+
+ pkgdata_SCRIPTS = mysql.server
+ aclocaldir = $(datadir)/aclocal
+-aclocal_DATA = mysql.m4
++aclocal_DATA =
+ noinst_DATA = mysql- at VERSION@.spec \
+ MySQL-shared-compat.spec
+
--- /dev/null
+++ databases/mysql60-server/files/patch-sql::mysqld.cc
@@ -0,0 +1,11 @@
+--- sql/mysqld.cc.orig Sat Aug 6 03:39:41 2005
++++ sql/mysqld.cc Sun Aug 28 20:41:38 2005
+@@ -3177,7 +3177,7 @@
+ init_ssl();
+
+ #ifdef HAVE_LIBWRAP
+- libwrapName= my_progname+dirname_length(my_progname);
++ libwrapName= (char *) my_progname+dirname_length(my_progname);
+ openlog(libwrapName, LOG_PID, LOG_AUTH);
+ #endif
+
--- /dev/null
+++ databases/mysql60-server/files/patch-include_my_tcpd.h
@@ -0,0 +1,147 @@
+--- include/my_tcpd.h.orig Sun Jan 9 13:33:51 2005
++++ include/my_tcpd.h Sun Jan 9 13:41:42 2005
+@@ -6,6 +6,25 @@
+ * $FreeBSD: ports/databases/mysql60-server/files/patch-include_my_tcpd.h,v 1.3 2008/07/26 08:33:37 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 */
More information about the Midnightbsd-cvs
mailing list