# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit flag-o-matic kde subversion DESCRIPTION="An open source framework designed to allow KDE applications to index and retrieve files" HOMEPAGE="http://kat.mandriva.com/" LICENSE="GPL-2" SLOT="0" KEYWORDS=" -*" IUSE="ext-debian ext-doc ext-dvi ext-gnumeric ext-koffice ext-kpresenter ext-kspread ext-kword ext-lyx ext-man ext-openoffice ext-pdf ext-ppt ext-ps ext-rpm ext-rtf ext-soffice ext-tex ext-xls xattr" RDEPEND="( || ( ( kde-base/kcontrol kde-base/kicker ) kde-base/kdebase ) ) ext-debian? ( app-arch/dpkg ) ext-doc? ( app-text/antiword ) ext-dvi? ( dev-tex/dvi2tty ) ext-gnumeric? ( app-office/gnumeric ) ext-koffice? ( || ( app-office/koffice app-office/koffice-meta ) ) ext-kpresenter? ( app-office/kpresenter ) ext-kspread? ( app-office/kspread ) ext-kword? ( app-office/kword ) ext-lyx? ( app-text/lyx2html ) ext-man? ( app-text/man2html ) ext-openoffice? ( virtual/ooo ) ext-pdf? ( app-text/poppler ) ext-ppt? ( app-text/xlhtml ) ext-rpm? ( app-arch/rpm ) ext-ps? ( app-text/pstotext ) ext-rtf? ( app-text/unrtf ) ext-soffice? ( app-office/staroffice ) ext-tex? ( dev-tex/untex ) ext-xls? ( app-text/xlhtml ) xattr? ( sys-apps/attr )" DEPEND="${RDEPEND} dev-db/sqlite dev-cpp/clucene >=dev-util/pkgconfig-0.9.0 !kde-misc/kat !kde-misc/kat-cvs" need-kde 3.3 pkg_setup() { # Check if clucene has been built with unicode enabled if has_version clucene && ! built_with_use clucene unicode ; then eerror "Re-emerge clucene with unicode use-flag enabled!" die "You need clucene built with unicode flag for use with Kat." fi } src_unpack() { # Based on http://www.jordswart.org/archives/category/free-software/ebuild # Fetching base directory needed to compile KDE SVN sources via subversion eclass ESVN_UPDATE_CMD="svn update -N" ESVN_FETCH_CMD="svn checkout -N" ESVN_REPO_URI="svn://anonsvn.kde.org/home/kde/trunk/playground/base" subversion_src_unpack # Fetching admin directory needed to compile KDE SVN sources via subversion eclass S=${WORKDIR}/{$P}/admin ESVN_REPO_URI="svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin" subversion_src_unpack # Fetching the latest Kat 0.7.x sources ESVN_UPDATE_CMD="svn up" ESVN_FETCH_CMD="svn checkout" S=${WORKDIR}/${P}/kat ESVN_REPO_URI="svn://anonsvn.kde.org/home/kde/trunk/playground/base/kat" subversion_src_unpack } src_compile() { # Filter fvisibility for now due to compile errors filter-flags -fvisibility-inlines-hidden -fvisibility=hidden # Kat SVN wants autoconf and automake set to newer versions export WANT_AUTOCONF=2.5 export WANT_AUTOMAKE=1.6 # Unset Unsermake as Kat does not compile with unsermake enabled export UNSERMAKE=no local myconf="prefix=`kde-config --prefix`" use debug && myconf="${myconf} debug=full" kde_src_compile } pkg_postinst() { if [ ! -d /proc/sys/fs/inotify ] ; then ewarn "Your kernel does not seem to have inotify support enabled." ewarn "In order to enable support for Kat's autoupdate deamon," ewarn "you need minimum kernel version 2.6.13." ewarn "Enable Inotify file change notification support (INOTIFY)" ewarn "within the kernel under Device Drivers / Character Devices." ewarn "For more information regarding the use of Inotify and Kat:" ewarn "http://kat.mandriva.com/wiki/index.php/Getting_started" ewarn "" epause 10 fi if [ IUSE=xattr ] ; then einfo "You selected support for Extented Attributes within Kat." einfo "You will need to set Extended Attributes on the file" einfo "systems that the autoupdate deamon of Kat indexes." einfo "(Has to be supported by the kernel e.g. EXT2_FS_XATTR," einfo "EXT3_FS_XATTR or REISERFS_FS_XATTR)" einfo "" einfo "To set extended attributes, add 'user_xattr' to the" einfo "relevant file systems in your /etc/fstab file. For example" einfo "/dev/hda3 /home reiserfs defaults,user_xattr 1 2" epause 10 fi }