EAPI=4 inherit cmake-utils DESCRIPTION="Multi-platform implementation of Apple Grand Central Dispatch" HOMEPAGE="http://opensource.mlba-team.de/xdispatch/docs/current/index.html" SRC_URI="http://opensource.mlba-team.de/xdispatch/files/${PN}_${PV}_src.tar.gz" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="qt doc clang" DEPEND="qt? ( x11-libs/qt-gui:4 ) doc? ( app-doc/doxygen ) clang? ( sys-devel/clang )" RDEPEND="qt? ( x11-libs/qt-gui:4 )" S=${WORKDIR}/${PN}_${PV}_src src_configure() { epatch "${FILESDIR}/xdispatch-disable-native-detection.patch" epatch "${FILESDIR}/xdispatch-disable-svn-detect.patch" epatch "${FILESDIR}/libxdispatch-fix-aliasing-error.patch" epatch "${FILESDIR}/xdispatch-fix-doc-path.patch" if use qt; then epatch "${FILESDIR}/xdispatch-force-qt-no-debug.patch" fi if use clang; then epatch "${FILESDIR}/xdispatch-clang-wrap-unistd.patch" CC=clang CXX=clang++ fi mycmakeargs=( $(cmake-utils_use doc XDISPATCH_DOCS) -DXDISPATCH_DOCS_DIR="/usr/share/doc/${PF}" -DQT_NO_DEBUG=1 -G "Unix Makefiles" ) cmake-utils_src_configure } src_compile() { cmake-utils_src_compile use doc && cmake-utils_src_make xdispatch_docs } src_install() { cmake-utils_src_install dodoc ${S}/NOTICE ${S}/LICENSE ${S}/BUGS ${S}/TODO.txt }