# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: inherit eutils subversion ESVN_REPO_URI="svn://anonsvn.kde.org/home/kde/trunk/kdesupport/strigi" ESVN_PROJECT="strigi" DESCRIPTION="Fast crawling Desktop-Searchengine with (optional) QT4 GUI" HOMEPAGE="http://www.vandenoever.info/software/strigi" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="clucene dbus hyperestraier inotify log qt4 sqlite3 xattr xercesc" RDEPEND=" >=app-arch/bzip2-1.0.3 dev-libs/openssl dev-libs/expat >=sys-libs/zlib-1.2.3 virtual/libiconv clucene? ( =dev-cpp/clucene-0.9.16* ) !clucene? ( !hyperestraier? ( !sqlite3? ( =dev-cpp/clucene-0.9.16* ) ) ) dbus? ( sys-apps/dbus ) hyperestraier? ( app-text/hyperestraier ) log? ( >=dev-libs/log4cxx-0.9.7 ) qt4? ( >=x11-libs/qt-4.2.1-r1 ) sqlite3? ( =dev-db/sqlite-3* ) xattr? ( sys-apps/attr ) xercesc? ( dev-libs/xerces-c )" DEPEND="${RDEPEND} >=dev-util/cmake-2.4.2" CMAKELIST="${S}/CMakeLists.txt" cmake_use() { # from sys-apps/initng-ifiles if use "${1}" then echo "-D${2}=ON" else echo "-D${2}=OFF" fi } cmake_emagic() { # enable a package sed -i "83 ifind_package(${1} REQUIRED)" "${CMAKELIST}" } src_unpack() { subversion_src_unpack # disable autodetection by filtering all find_package that are not REQUIRED sed -i 's/find_package([[:alnum:]]*)//' "${CMAKELIST}" cmake_emagic Expat use xattr && cmake_emagic XAttr if use clucene || use hyperestraier || use sqlite3 || use xercesc ; then use clucene && cmake_emagic CLucene use hyperestraier && cmake_emagic HyperEstraier use sqlite3 && cmake_emagic SQLite use xercesc && cmake_emagic XERCESC else cmake_emagic CLucene fi if use qt4; then cmake_emagic Qt4 if use dbus && ! built_with_use "x11-libs/qt" dbus; then eerror "You are building Stingi with qt4 and dbus, but qt4 wasn't built with dbus." eerror "Please reemerge qt4 with dbus, or disable dbus in Stingi." die elif ! use dbus; then ewarn "You are building Stingi with qt4 but without dbus." ewarn "Strigiclient won't be able to detect a running Strigi daemon." ewarn "To avoid this, please enable both qt4 and dbus." fi fi # inotify still in development and unstable if use inotify; then ewarn "Inotify support in stingi is still unstable" ewarn "If you get problems, please rebuild strigi without inotify" fi } src_compile() { cmake $(cmake_use inotify ENABLE_INOTIFY) \ $(cmake_use dbus ENABLE_DBUS) \ $(cmake_use log ENABLE_LOG4CXX) \ -DCMAKE_INSTALL_PREFIX:PATH=/usr \ -DLIB_DESTINATION:PATH=$(get_libdir) \ . || die emake || die } src_install() { emake install DESTDIR=${D} || die }