--- /dev/null
+--- libqxt~orig/doc/doc.pri 2010-08-19 17:06:12.000000000 +0200
++++ libqxt/doc/doc.pri 2010-08-19 17:08:16.000000000 +0200
+@@ -1,5 +1,3 @@
+-SUBDIRS += tools/3rdparty/qdoc3
+-
+ win32 {
+ QXT_WINCONFIG = release/
+ !CONFIG(release, debug|release) {
+@@ -16,14 +14,13 @@
+ }
+
+ $$unixstyle {
+- QDOC = QXT_SOURCE_TREE=$$QXT_SOURCE_TREE QXT_BUILD_TREE=$$QXT_BUILD_TREE $$QXT_BUILD_TREE/tools/3rdparty/qdoc3/$${QXT_WINCONFIG}qdoc3
++ QDOC = QXT_SOURCE_TREE=$$QXT_SOURCE_TREE QXT_BUILD_TREE=$$QXT_BUILD_TREE $$[QT_INSTALL_BINS]/qdoc3
+ } else {
+ QDOC = set QXT_SOURCE_TREE=$$QXT_SOURCE_TREE&& set QXT_BUILD_TREE=$$QXT_BUILD_TREE&& $$QXT_BUILD_TREE/tools/3rdparty/qdoc3/$${QXT_WINCONFIG}qdoc3.exe
+ QDOC = $$replace(QDOC, "/", "\\\\")
+ }
+
+ adp_docs.commands = ($$QDOC -DQXT_DOXYGEN_RUN $$QXT_SOURCE_TREE/doc/src/qxt.qdocconf)
+-adp_docs.depends += sub-tools-3rdparty-qdoc3
+ docs.depends = adp_docs
+ QMAKE_EXTRA_TARGETS += adp_docs docs
+
--- /dev/null
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/libqxt/libqxt-0.6.0-r2.ebuild,v 1.1 2010/08/20 09:26:59 hwoarang Exp $
+
+EAPI="3"
+
+inherit multilib qt4-r2
+
+DESCRIPTION="The Qt eXTension library provides cross-platform utility classes for the Qt toolkit"
+HOMEPAGE="http://libqxt.org/"
+SRC_URI="http://bitbucket.org/${PN}/${PN}/get/v${PV}.tar.bz2 -> ${P}.tar.bz2"
+
+LICENSE="|| ( CPL-1.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="berkdb crypt debug doc gui sql web xscreensaver zeroconf"
+
+COMMON_DEPEND="
+ gui? ( x11-libs/libXrandr )
+ x11-libs/qt-core:4
+ gui? ( x11-libs/qt-gui:4 )
+ berkdb? ( >=sys-libs/db-4.6 )
+ crypt? (
+ >=dev-libs/openssl-0.9.8
+ x11-libs/qt-core:4[ssl]
+ )
+ sql? ( x11-libs/qt-sql:4 )
+ web? ( >=dev-libs/fcgi-2.4 )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+"
+DEPEND="${COMMON_DEPEND}
+ doc? ( x11-libs/qt-assistant )
+"
+RDEPEND="${COMMON_DEPEND}
+ xscreensaver? ( x11-libs/libXScrnSaver )
+"
+
+S=${WORKDIR}/${PN}
+
+DOCS="AUTHORS CHANGES README"
+PATCHES=(
+ "${FILESDIR}/${PN}-use-system-qdoc3.patch"
+)
+
+src_prepare() {
+ qt4-r2_src_prepare
+
+ # eqmake4 disables qmake cache, so we have to use config.pri
+ # to store configuration variables instead of .qmake.cache
+ sed -i -e '/^QMAKE_CACHE=/s:\.qmake\.cache:config.pri:' configure || die
+ sed -i -e '1i include(config.pri)' ${PN}.pro || die
+ sed -i -e '1i include(../config.pri)' src/qxtbase.pri || die
+
+ # remove insecure runpath
+ sed -i -e '/-Wl,-rpath/d' src/qxtlibs.pri || die
+}
+
+src_configure() {
+ # custom configure script
+ local myconf="./configure
+ -prefix '${EPREFIX}/usr'
+ -libdir '${EPREFIX}/usr/$(get_libdir)'
+ -docdir '${EPREFIX}/usr/share/doc/${PF}'
+ -qmake-bin '${EPREFIX}/usr/bin/qmake'
+ $(use debug && echo -debug || echo -release)
+ $(use berkdb || echo -no-db -nomake berkeley)
+ $(use crypt || echo -no-openssl)
+ $(use gui || echo -nomake gui)
+ $(use doc || echo -nomake docs)
+ $(use sql || echo -nomake sql)
+ $(use web || echo -nomake web)
+ $(use zeroconf || echo -no-zeroconf -nomake zeroconf)
+ -verbose"
+ echo ${myconf}
+ eval ${myconf} || die "./configure failed"
+
+ eqmake4 -recursive
+}
+
+src_compile() {
+ qt4-r2_src_compile
+
+ if use doc; then
+ einfo "Building documentation"
+ emake docs || die
+ fi
+}
+
+pkg_postinst() {
+ if use doc; then
+ elog
+ elog "In case you want to browse ${PN} documentation using"
+ elog "Qt Assistant, perform the following steps:"
+ elog " 1. Open the Assistant"
+ elog " 2. Edit->Preferences->Documentation->Add"
+ elog " 3. Add this path: ${EPREFIX}/usr/share/doc/${PF}/qxt.qch"
+ elog
+ fi
+}