summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
Diffstat (limited to 'databases')
-rw-r--r--databases/mysql-client/Makefile28
-rw-r--r--databases/mysql-client/Makefile.common7
-rw-r--r--databases/mysql-client/buildlink.mk51
-rw-r--r--databases/mysql-client/distinfo4
-rw-r--r--databases/mysql-client/patches/patch-af15
5 files changed, 65 insertions, 40 deletions
diff --git a/databases/mysql-client/Makefile b/databases/mysql-client/Makefile
index 3de39533c13..066584b1226 100644
--- a/databases/mysql-client/Makefile
+++ b/databases/mysql-client/Makefile
@@ -1,37 +1,23 @@
-# $NetBSD: Makefile,v 1.15 2001/10/18 15:20:05 veego Exp $
+# $NetBSD: Makefile,v 1.16 2001/11/02 02:57:28 jlam Exp $
#
-.include "../../databases/mysql-client/Makefile.common"
+.include "Makefile.common"
PKGNAME= ${DISTNAME:S/-/-client-/}
SVR4_PKGNAME= mysqc
COMMENT= MySQL, a free SQL database (client)
-INFO_FILES= mysql.info
+USE_BUILDLINK_ONLY= YES
+REPLACE_BUILDLINK+= scripts/mysql_config
+REPLACE_BUILDLINK+= scripts/mysqlbug
CONFIGURE_ARGS+= --without-server
-.if exists(/usr/include/readline.h) || exists(/usr/include/readline/readline.h)
-CONFIGURE_ENV+= readline_lib="edit"
-.else
-DEPENDS+= readline>=4.0:../../devel/readline
-CPPFLAGS+= -I${LOCALBASE}/include
-.endif
-
-# The compilation looks for <readline/readline.h>, so make sure
-# /usr/include/readline.h may be accessed that way if it's the readline
-# header available on the system.
-#
-.if exists(/usr/include/readline.h)
-CPPFLAGS+= -I${WRKDIR}
-
-pre-build:
- ${RM} -f ${WRKDIR}/readline
- ${LN} -sf /usr/include ${WRKDIR}/readline
-.endif
+INFO_FILES= mysql.info
post-install:
cd ${PREFIX}/man/man1; ${RM} -f mysqld.1 safe_mysqld.1
${INSTALL_DATA} ${WRKSRC}/Docs/mysql.info ${PREFIX}/info
+.include "../../devel/readline/buildlink.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/databases/mysql-client/Makefile.common b/databases/mysql-client/Makefile.common
index 521e40ced24..639b318a6c9 100644
--- a/databases/mysql-client/Makefile.common
+++ b/databases/mysql-client/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.4 2001/10/08 17:23:19 veego Exp $
+# $NetBSD: Makefile.common,v 1.5 2001/11/02 02:57:28 jlam Exp $
DISTNAME= mysql-3.23.43
CATEGORIES= databases
@@ -18,9 +18,8 @@ MYSQL_DATADIR?= /var/mysql
GNU_CONFIGURE= # defined
CONFIGURE_ARGS+= --localstatedir=${MYSQL_DATADIR}
CONFIGURE_ARGS+= --with-named-z-libs=z
-CONFIGURE_ARGS+= --with-libwrap
+CONFIGURE_ARGS+= --without-libwrap
CONFIGURE_ARGS+= --with-named-curses-libs="-lcurses -ltermcap"
-CONFIGURE_ARGS+= --without-perl
# We always use our own readline, either system- or pkgsrc-supplied.
CONFIGURE_ARGS+= --without-readline
@@ -52,3 +51,5 @@ post-extract:
$${file}.orig > $${file}; \
${RM} $${file}.orig; \
done
+
+.include "../../devel/zlib/buildlink.mk"
diff --git a/databases/mysql-client/buildlink.mk b/databases/mysql-client/buildlink.mk
new file mode 100644
index 00000000000..7520874bd3d
--- /dev/null
+++ b/databases/mysql-client/buildlink.mk
@@ -0,0 +1,51 @@
+# $NetBSD: buildlink.mk,v 1.1 2001/11/02 02:57:28 jlam Exp $
+#
+# This Makefile fragment is included by packages that use mysql-client.
+#
+# To use this Makefile fragment, simply:
+#
+# (1) Optionally define BUILDLINK_DEPENDS.mysql-client to the dependency pattern
+# for the version of mysql-client desired.
+# (2) Include this Makefile fragment in the package Makefile,
+# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
+# search path, and
+# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search
+# path.
+
+.if !defined(MYSQL_CLIENT_BUILDLINK_MK)
+MYSQL_CLIENT_BUILDLINK_MK= # defined
+
+.include "../../mk/bsd.buildlink.mk"
+
+BUILDLINK_DEPENDS.mysql-client?= mysql-client>=3.22
+DEPENDS+= ${BUILDLINK_DEPENDS.mysql-client}:../../databases/mysql-client
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.mysql-client=mysql-client
+BUILDLINK_PREFIX.mysql-client_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.mysql-client= include/mysql/*.h
+BUILDLINK_FILES.mysql-client+= lib/mysql/libmysqlclient.*
+
+.include "../../devel/zlib/buildlink.mk"
+
+BUILDLINK_TARGETS.mysql-client= mysql-client-buildlink
+BUILDLINK_TARGETS.mysql-client+= mysql-client-buildlink-config-wrapper
+BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.mysql-client}
+
+BUILDLINK_CONFIG.mysql-client= \
+ ${BUILDLINK_PREFIX.mysql-client}/bin/mysql_config
+BUILDLINK_CONFIG_WRAPPER.mysql-client= \
+ ${BUILDLINK_DIR}/bin/mysql_config
+REPLACE_BUILDLINK_SED+= \
+ -e "s|${BUILDLINK_CONFIG_WRAPPER.mysql-client}|${BUILDLINK_CONFIG.mysql-client}|g"
+
+.if defined(USE_CONFIG_WRAPPER)
+MYSQL_CONFIG?= ${BUILDLINK_CONFIG_WRAPPER.mysql-client}
+CONFIGURE_ENV+= MYSQL_CONFIG="${MYSQL_CONFIG}"
+MAKE_ENV+= MYSQL_CONFIG="${MYSQL_CONFIG}"
+.endif
+
+pre-configure: ${BUILDLINK_TARGETS.mysql-client}
+mysql-client-buildlink: _BUILDLINK_USE
+mysql-client-buildlink-config-wrapper: _BUILDLINK_CONFIG_WRAPPER_USE
+
+.endif # MYSQL_CLIENT_BUILDLINK_MK
diff --git a/databases/mysql-client/distinfo b/databases/mysql-client/distinfo
index 415fbb2ca14..43d5556524f 100644
--- a/databases/mysql-client/distinfo
+++ b/databases/mysql-client/distinfo
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.5 2001/10/08 17:23:19 veego Exp $
+$NetBSD: distinfo,v 1.6 2001/11/02 02:57:28 jlam Exp $
SHA1 (mysql-3.23.43.tar.gz) = ebae00aeac2b301ebaf9a919c070a0005d4b1ac3
Size (mysql-3.23.43.tar.gz) = 11777006 bytes
-SHA1 (patch-af) = 25c08717f4d4f90ded90d3a0c2621fb2073abd7c
+SHA1 (patch-af) = 5e2482e85b9e37cd9405cb815cb3a18b9c5e6ebb
diff --git a/databases/mysql-client/patches/patch-af b/databases/mysql-client/patches/patch-af
index 26a04d3f6de..9c28fdada92 100644
--- a/databases/mysql-client/patches/patch-af
+++ b/databases/mysql-client/patches/patch-af
@@ -1,4 +1,4 @@
-$NetBSD: patch-af,v 1.3 2001/10/08 17:23:20 veego Exp $
+$NetBSD: patch-af,v 1.4 2001/11/02 02:57:29 jlam Exp $
--- configure-orig Wed Oct 3 18:08:48 2001
+++ configure Sun Oct 7 19:22:25 2001
@@ -10,16 +10,3 @@ $NetBSD: patch-af,v 1.3 2001/10/08 17:23:20 veego Exp $
# Don't build readline, i have it already
-@@ -9638,7 +9637,11 @@
- # This requires readline to be in a standard place. Mosty for linux
- # there readline may be a shared library.
- readline_dir=""
-- readline_link="-lreadline"
-+ if test -z "$readline_lib"
-+ then
-+ readline_lib="readline"
-+ fi
-+ readline_link="-l$readline_lib"
- fi
-
-