# New ports collection makefile for:	mysql-navigator
# Date created:				2 June 2000
# Whom:					Maxim Sobolev <sobomax@FreeBSD.org>
#
# $FreeBSD: ports/databases/mysql-navigator/Makefile,v 1.19 2003/02/23 11:36:52 demon Exp $
#

PORTNAME=	mysql-navigator
PORTVERSION=	1.4.1
CATEGORIES=	databases kde
MASTER_SITES=	http://ftp.kde.com/Database/MySQL_Navigator/ \
		http://sql.kldp.org/snapshots/ \
		ftp://sise15.mizi.com/pub/
DISTNAME=	mysqlnavigator-${PORTVERSION}

MAINTAINER=	demon@FreeBSD.org
COMMENT=	MySQL database server administration package for KDE

LIB_DEPENDS=	mysqlclient.10:${PORTSDIR}/databases/mysql323-client

USE_KDELIBS_VER=3
INSTALLS_SHLIB=	yes
USE_GMAKE=	yes
GNU_CONFIGURE=	yes
USE_REINPLACE=	yes
CONFIGURE_ARGS+=--with-mysql-includes=${LOCALBASE}/include/mysql \
		--with-mysql-libraries=${LOCALBASE}/lib/mysql
CONFIGURE_ENV+=	MOC="${MOC}" QTDIR="${X11BASE}"
MAKE_ENV+=	MOC="${MOC}" QTDIR="${X11BASE}"

post-patch:
	@${REINPLACE_CMD} 's#-O2#$(CXXFLAGS)#g' ${WRKSRC}/configure
	@${FIND} ${WRKSRC} -name "*_moc.cpp" -exec rm -f {} \;

pre-configure:
	@${REINPLACE_CMD} "s#-lqt#-lqt-mt ${PTHREAD_LIBS}#g" \
		${WRKSRC}/src/main/Makefile.in

.include <bsd.port.mk>
