openbsd-ports/databases/mysql/Makefile

116 lines
2.9 KiB
Makefile
Raw Normal View History

2007-12-28 17:15:19 -05:00
# $OpenBSD: Makefile,v 1.136 2007/12/28 22:15:19 espie Exp $
.if ${MACHINE_ARCH} == "m88k"
BROKEN= gen_lex_hash hangs
.endif
COMMENT-main= multithreaded SQL database (client)
COMMENT-server= multithreaded SQL database (server)
COMMENT-tests= multithreaded SQL database (regression test suite)
VERSION= 5.0.45
DISTNAME= mysql-${VERSION}
PKGNAME-main= mysql-client-${VERSION}p0
PKGNAME-server= mysql-server-${VERSION}p0
PKGNAME-tests= mysql-tests-${VERSION}p0
CATEGORIES= databases
2006-01-05 19:13:26 -05:00
V= MySQL-5.0
2006-10-29 15:28:24 -05:00
SHARED_LIBS += mysqlclient_r 18.0 # .15.0
SHARED_LIBS += mysqlclient 18.0 # .15.0
2005-12-26 16:32:00 -05:00
MASTER_SITES= http://mysql.serenitynet.com/Downloads/$V/
HOMEPAGE= http://www.mysql.com/
MAINTAINER= Brad Smith <brad@comstyle.com>
2002-12-14 18:56:43 -05:00
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
2005-01-25 11:01:07 -05:00
WANTLIB= c crypto m pthread ssl z
2000-02-14 17:32:08 -05:00
DB_DIR?= /var/mysql
SOCKET_DIR= /var/run/mysql
SUBST_VARS= DB_DIR SOCKET_DIR VERSION
# XXX gcc bug, gcc/3.3.5
.if ${MACHINE_ARCH} == "alpha"
CFLAGS+= -mbwx
.endif
# Suggested flags for the C compiler, needed for
# high load servers otherwise MySQL will crash.
CXX= ${CC}
CXXFLAGS= ${CFLAGS} -felide-constructors -fno-exceptions -fno-rtti
VMEM_WARNING= Yes
USE_GMAKE= Yes
2005-12-26 16:32:00 -05:00
USE_LIBTOOL= Yes
CONFIGURE_STYLE= autoconf
AUTOCONF_VERSION= 2.59
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
CONFIGURE_ARGS+= --enable-thread-safe-client \
--localstatedir="${DB_DIR}" \
2006-01-05 19:13:26 -05:00
--with-big-tables \
--with-comment='OpenBSD port: ${FULLPKGNAME-server}' \
--with-libwrap \
2005-12-11 23:55:43 -05:00
--with-low-memory \
2003-08-26 20:14:49 -04:00
--with-mysqld-user="_mysql" \
--with-openssl \
--with-unix-socket-path="${SOCKET_DIR}/mysql.sock" \
--with-vio \
--without-bench \
2002-12-14 18:56:43 -05:00
--without-debug \
--without-docs \
--without-extra-tools \
2002-12-14 18:56:43 -05:00
--without-readline
2003-12-28 17:17:50 -05:00
.include <bsd.own.mk>
2003-12-28 17:17:50 -05:00
USE_GCC3?= No
2003-12-28 17:17:50 -05:00
.if ${USE_GCC3:L} == "yes"
2004-01-06 09:13:03 -05:00
CONFIGURE_ARGS+= --with-client-ldflags=-lsupc++ \
--with-mysqld-ldflags=-lsupc++
2003-12-28 17:17:50 -05:00
.endif
. if ${MACHINE_ARCH} == "i386"
CONFIGURE_ARGS+= --enable-assembler
.endif
MULTI_PACKAGES= -main -server -tests
RUN_DEPENDS-server= :mysql-client-5.0.*:databases/mysql \
:p5-DBD-mysql-*:databases/p5-DBD-mysql
LIB_DEPENDS-server= mysqlclient:mysql-client-5.0.*:databases/mysql
WANTLIB-server= ${WANTLIB} wrap
WANTLIB-main= ${WANTLIB} ncurses readline
PKG_ARCH-tests= *
WANTLIB-tests=
2007-12-28 17:15:19 -05:00
MAKE_FLAGS= mkdir_p='mkdir -p --'
FAKE_FLAGS= ${MAKE_FLAGS} DESTDIR=${WRKINST}
post-install:
2005-12-26 16:32:00 -05:00
cd ${PREFIX}/lib && \
ln -sf mysql/libmysqlclient.so.${LIBmysqlclient_VERSION} . && \
ln -sf mysql/libmysqlclient_r.so.${LIBmysqlclient_r_VERSION} .
sed -e s,@PREFIX@,${TRUEPREFIX},g ${FILESDIR}/README.OpenBSD > \
${WRKBUILD}/README.OpenBSD
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mysql
${INSTALL_DATA} ${WRKBUILD}/README.OpenBSD ${PREFIX}/share/doc/mysql
${INSTALL_DATA_DIR} ${PREFIX}/info
${INSTALL_DATA} ${WRKSRC}/Docs/mysql.info ${PREFIX}/info
2002-02-08 19:50:14 -05:00
do-regress:
@cd ${WRKSRC}/mysql-test && ./mysql-test-run-shell --force
2002-02-08 19:50:14 -05:00
.include <bsd.port.mk>