summaryrefslogtreecommitdiff
path: root/databases/mysql40-server
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2004-01-18 00:59:41 +0000
committerAlex Dupre <ale@FreeBSD.org>2004-01-18 00:59:41 +0000
commitd4e7faed04b1b60bd8a77c4e7a9e0a26f5a47a18 (patch)
treec54c63f68cd3fa5b6c46de2bd7dee0e0a4b0a522 /databases/mysql40-server
parent- from 0.01 to 0.02 (diff)
Sync with recent mysql323 changes:
- Correctly support PTHREAD_LIBS/CFLAGS - Use USE_GNOME=lthack - Propagate DB_DIR in packages - Use my @FreeBSD.org email address Approved by: nork (mentor/implicitly)
Notes
Notes: svn path=/head/; revision=98441
Diffstat (limited to 'databases/mysql40-server')
-rw-r--r--databases/mysql40-server/Makefile20
-rw-r--r--databases/mysql40-server/files/patch-configure8
-rw-r--r--databases/mysql40-server/pkg-descr2
-rw-r--r--databases/mysql40-server/pkg-install4
-rw-r--r--databases/mysql40-server/pkg-plist2
5 files changed, 16 insertions, 20 deletions
diff --git a/databases/mysql40-server/Makefile b/databases/mysql40-server/Makefile
index 28fe4529a63c..d568b42b90fe 100644
--- a/databases/mysql40-server/Makefile
+++ b/databases/mysql40-server/Makefile
@@ -22,15 +22,16 @@ MASTER_SITES= ftp://planetmirror.com/pub/mysql/Downloads/MySQL-4.0/ \
ftp://ftp.free.fr/pub/MySQL/Downloads/MySQL-4.0/
PKGNAMESUFFIX?= -server
-MAINTAINER= sysadmin@alexdupre.com
+MAINTAINER= ale@FreeBSD.org
COMMENT?= Multithreaded SQL database (server)
SLAVEDIRS= databases/mysql40-client
+PKGINSTALL?= ${WRKDIR}/pkg-install
DB_DIR?= /var/db/mysql
+USE_GNOME= lthack
USE_LIBTOOL= yes
USE_REINPLACE= yes
-GNU_CONFIGURE= yes
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --localstatedir=${DB_DIR} \
--without-debug \
@@ -79,6 +80,9 @@ CONFIGURE_ARGS+=-L${LOCALBASE}/lib -llthread -llgcc_r -llstdc++ -llsupc++'
LIB_DEPENDS+= lthread.2:${PORTSDIR}/devel/linuxthreads
CONFIGURE_ARGS+=-L${LOCALBASE}/lib -llthread -llgcc_r'
.endif
+.else
+CONFIGURE_ARGS+=--with-named-thread-libs=${PTHREAD_LIBS}
+CFLAGS+= ${PTHREAD_CFLAGS}
.endif
.if ${OSVERSION} < 500000
@@ -103,7 +107,8 @@ RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mys
CONFLICTS= mysql-server-3.* mysql-server-4.[1-9].* mysql-server-5.*
-PLIST_SUB= MYSQL_VERSION=${PORTVERSION}
+PLIST_SUB= DB_DIR=${DB_DIR} \
+ MYSQL_VERSION=${PORTVERSION}
ONLY_FOR_ARCHS= i386 alpha sparc64
@@ -135,7 +140,9 @@ pre-fetch:
post-patch:
@${REINPLACE_CMD} -e "s|SUBDIRS =|SUBDIRS = include @sql_server_dirs@ scripts support-files|g" ${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e "s|install: install-am|install:|g" ${WRKSRC}/include/Makefile.in
- @${FIND} ${WRKSRC} -name configure | ${XARGS} ${REINPLACE_CMD} "s|-pthread|${PTHREAD_LIBS}|g"
+
+post-build:
+ @${SED} "s|%%DB_DIR%%|${DB_DIR}|g" ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install
.if defined(WITH_OPENSSL) && defined(BUILD_STATIC)
pre-configure:
@@ -150,9 +157,9 @@ post-install:
.endif
.if !exists(${DB_DIR}) || (defined(OVERWRITE_DB) && ${OVERWRITE_DB:L} != "no")
.if defined(SKIP_DNS_CHECK)
- ${PREFIX}/bin/mysql_install_db --force
+ ${PREFIX}/bin/mysql_install_db --force --ldata=${DB_DIR}
.else
- ${PREFIX}/bin/mysql_install_db
+ ${PREFIX}/bin/mysql_install_db --ldata=${DB_DIR}
.endif
.endif
@${SETENV} DB_DIR=${DB_DIR} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@@ -184,7 +191,6 @@ CONFIGURE_ARGS+=--without-server
post-patch:
@${REINPLACE_CMD} -e "s|SUBDIRS =|SUBDIRS = include @sql_client_dirs@ tests man|g" ${WRKSRC}/Makefile.in
- @${FIND} ${WRKSRC} -name configure | ${XARGS} ${REINPLACE_CMD} "s|-pthread|${PTHREAD_LIBS}|g"
post-install:
@${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/mysql-client.sh > ${PREFIX}/etc/rc.d/000.mysql-client.sh
diff --git a/databases/mysql40-server/files/patch-configure b/databases/mysql40-server/files/patch-configure
index 58f8c5a5d900..fb5aac9eb51f 100644
--- a/databases/mysql40-server/files/patch-configure
+++ b/databases/mysql40-server/files/patch-configure
@@ -1,13 +1,5 @@
--- configure.orig Fri Oct 17 07:29:41 2003
+++ configure Wed Oct 22 15:12:52 2003
-@@ -8116,6 +8116,7 @@
-
- # This can be used to rebuild libtool when needed
- LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-+$ac_aux_dir/ltconfig $LIBTOOL_DEPS
-
- # Always use our own libtool.
- LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -9058,7 +9059,7 @@
;;
esac
diff --git a/databases/mysql40-server/pkg-descr b/databases/mysql40-server/pkg-descr
index cd19c135f9cc..4ddefbb70546 100644
--- a/databases/mysql40-server/pkg-descr
+++ b/databases/mysql40-server/pkg-descr
@@ -4,4 +4,4 @@ MySQL is a very fast, multi-threaded, multi-user and robust SQL
WWW: http://www.mysql.com/
- Alex Dupre
-sysadmin@alexdupre.com
+ale@FreeBSD.org
diff --git a/databases/mysql40-server/pkg-install b/databases/mysql40-server/pkg-install
index 27732bf35c89..88a0b1c66915 100644
--- a/databases/mysql40-server/pkg-install
+++ b/databases/mysql40-server/pkg-install
@@ -1,9 +1,6 @@
#!/bin/sh
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=/var/db/mysql
-fi
case $2 in
POST-INSTALL)
@@ -11,6 +8,7 @@ POST-INSTALL)
GROUP=${USER}
UID=88
GID=${UID}
+ DB_DIR=%%DB_DIR%%
if pw group show "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
diff --git a/databases/mysql40-server/pkg-plist b/databases/mysql40-server/pkg-plist
index 4ac1c44386a5..c37af74611f5 100644
--- a/databases/mysql40-server/pkg-plist
+++ b/databases/mysql40-server/pkg-plist
@@ -206,5 +206,5 @@ share/mysql/ukrainian/errmsg.txt
@dirrm share/mysql/swedish
@dirrm share/mysql/ukrainian
@dirrm share/mysql
-@exec %D/bin/mysql_install_db
+@exec [ -d %%DB_DIR%% ] || %D/bin/mysql_install_db --ldata=%%DB_DIR%%
@unexec /usr/bin/killall mysqld > /dev/null 2>&1 || true