# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ IUSE="" inherit kde-base || die need-kde 3 newdepend "app-text/gocr" PATCHES="${FILESDIR}/${P}-compilefix.patch ${FILESDIR}/${P}-clipboard.patch" DESCRIPTION="Klicklack - a plugin-based dictionary application for your KDE Desktop" HOMEPAGE="http://klicklack.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="GPL-2" KEYWORDS="x86" # Remake this function because # the application doesn't compile with --disable-debug option kde_src_compile() { debug-print-function $FUNCNAME $* [ -z "$1" ] && kde_src_compile all cd ${S} export kde_widgetdir="$KDEDIR/lib/kde3/plugins/designer" # fix the sandbox errors "can't writ to .kde or .qt" problems. # this is a fake homedir that is writeable under the sandbox, so that the build process # can do anything it wants with it. REALHOME="$HOME" mkdir -p $T/fakehome/.kde mkdir -p $T/fakehome/.qt export HOME="$T/fakehome" # things that should access the real homedir [ -d "$REALHOME/.ccache" ] && ln -sf "$REALHOME/.ccache" "$HOME/" while [ "$1" ]; do case $1 in myconf) debug-print-section myconf myconf="$myconf --host=${CHOST} --prefix=${PREFIX} --with-x --enable-mitshm --with-qt-dir=${QTDIR}" # calculate dependencies separately from compiling, enables ccache to work on kde compiles myconf="$myconf --disable-dependency-tracking" use qtmt && myconf="$myconf --enable-mt" [ -n "$DEBUG" ] && myconf="$myconf --enable-debug=full --with-debug" || myconf="$myconf" debug-print "$FUNCNAME: myconf: set to ${myconf}" ;; configure) debug-print-section configure debug-print "$FUNCNAME::configure: myconf=$myconf" [ -n "$KDE_REMOVE_DIR" ] && kde_remove_dir $KDE_REMOVE_DIR # rebuild configure script, etc # This can happen with e.g. a cvs snapshot if [ ! -f "./configure" ]; then for x in Makefile.cvs admin/Makefile.common; do if [ -f "$x" ] && [ -z "$makefile" ]; then makefile="$x"; fi done debug-print "$FUNCNAME: configure: generating configure script, running make -f $makefile" make -f $makefile [ -f "./configure" ] || die "no configure script found, generation unsuccessful" fi export PATH="${KDEDIR}/bin:${PATH}" # configure doesn't need to know about the other KDEs installed. # in fact, if it does, it sometimes tries to use the wrong dcopidl, etc. # due to the messed up way configure searches for things export KDEDIRS="${PREFIX}:${KDEDIR}" cd $S ./configure ${myconf} || die "died running ./configure, $FUNCNAME:configure" ;; make) export PATH="${KDEDIR}/bin:${PATH}" debug-print-section make emake || die "died running emake, $FUNCNAME:make" ;; all) debug-print-section all kde_src_compile myconf configure make ;; esac shift done }