# -*-mode: makefile-*-
# New ports collection makefile for:	KDE libraries 3
# Date created:				2 November 2001
# Whom:					will@cvs.kde.org
#
# $FreeBSD$
#

PORTNAME=	kdelibs
PORTVERSION=	${KDE4_VERSION}
CATEGORIES=	x11 kde ipv6
MASTER_SITES=	${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR=	unstable/${PORTVERSION}/src
PKGNAMESUFFIX?=	# empty
DIST_SUBDIR=	KDE

MAINTAINER=	kde@FreeBSD.org
COMMENT=	Base set of libraries needed by KDE programs

RUN_DEPENDS+=	${LOCALBASE}/kde4/bin/automoc4:${PORTSDIR}/misc/automoc
BUILD_DEPENDS+= ${LOCALBASE}/kde4/bin/automoc4:${PORTSDIR}/misc/automoc \
		update-mime-database:${PORTSDIR}/misc/shared-mime-info
LIB_DEPENDS=	searchclient:${PORTSDIR}/deskutils/strigi \
		soprano.4:${PORTSDIR}/textproc/soprano \
		IlmImf:${PORTSDIR}/graphics/OpenEXR \
		aspell:${PORTSDIR}/textproc/aspell \
		jasper:${PORTSDIR}/graphics/jasper \
		pcre:${PORTSDIR}/devel/pcre \
		avahi-core:${PORTSDIR}/net/avahi \
		enchant.1:${PORTSDIR}/textproc/enchant \
		ungif.5:${PORTSDIR}/graphics/libungif \
		png.5:${PORTSDIR}/graphics/png \
		jpeg:${PORTSDIR}/graphics/jpeg \
		dns_sd:${PORTSDIR}/net/mDNSResponder \
		idn:${PORTSDIR}/dns/libidn \
		hal.1:${PORTSDIR}/sysutils/hal \
		smbclient.0:${PORTSDIR}/net/samba-libsmbclient
RUN_DEPENDS=	${LOCALBASE}/share/icons/hicolor/index.theme:${PORTSDIR}/misc/hicolor-icon-theme

# XXX: hebrew/hspell?
# XXX: gssapi/kerberos special handling?

USE_KDE4=	#
USE_KDE4_BUILD=	yes
USE_BZIP2=	yes
USE_FAM=	yes
USE_GETTEXT=	yes
USE_OPENSSL=	yes
USE_QT_VER=	4
QT_COMPONENTS=	corelib dbus gui moc network opengl qmake qt3support qtestlib rcc script sql svg uic3 xml designer \
		assistant svg qdbusviewer makeqpf webkit
USE_GNOME=	libxml2 libxslt

MAN1=		checkXML.1 kde4-config.1 makekdewidgets.1
MAN7=		kdeoptions.7 qtoptions.7
MAN8=		kbuildsycoca4.8

post-extract:
	${MKDIR} ${WRKSRC} 

pre-configure:
	${REINPLACE_CMD} -e 's|<qdatetime.h>|<QDateTime>|'\
	    ${WRKSRC}/../kjs/api/kjsobject.cpp
	${REINPLACE_CMD} -e 's|include_directories(|include_directories( ${LOCALBASE}/include ${LOCALBASE}/kde4/include|'\
	    ${WRKSRC}/../CMakeLists.txt


.include <bsd.port.mk>
