# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: inherit eutils qt4 QCA_VER="2.0-beta5" MY_PV="${PV/_p/-}" MY_P="${PN}-${MY_PV}" DESCRIPTION="Qt SSL features as a plugin for QCA" HOMEPAGE="http://delta.affinix.com/qca/" SRC_URI="http://delta.affinix.com/download/qca/${QCA_VER/-*/}/${QCA_VER/*-/}/${MY_P}.tar.bz2" LICENSE="GPL-2" SLOT="2" KEYWORDS="~x86" IUSE="debug" RDEPEND="$(qt4_min_version 4.2.0) >app-crypt/qca-1.99 dev-libs/openssl" DEPEND="${RDEPEND}" # >=sys-apps/sed-4.0" S="${WORKDIR}/${MY_P}" pkg_setup() { if use debug && ! built_with_use qt debug; then einfo einfo "You are trying to compile ${PN} package with active USE=\"debug\"" einfo "while qt4 is build without this particular flag. It will not" einfo "work." einfo einfo "Possible solutions to this problem are:" einfo "a) install package ${PN} without debug USE flag" einfo "b) re-emerge qt4 with debug USE flag" einfo die "can't emerge ${PN} with debug USE flag" fi } src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/qca-openssl-slotted-qca2.patch } src_compile() { local qmyconf="CONFIG += no_fixpath" local myconf="" if use debug; then qmyconf="${qmyconf} debug_and_release" myconf="--debug-and-release" else qmyconf="${qmyconf} release" myconf="--release" fi QTDIR="/usr/lib" ./configure ${myconf} || die "configure failed" qmake ${PN}.pro \ QMAKE_CFLAGS_RELEASE="${CFLAGS}" \ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \ QMAKE_RPATH= \ QTDIR="/usr/lib" \ "${qmyconf}" \ || die "qmake failed" # ugly workaround... # if ! built_with_use qt debug || ! use debug; then # sed -i -e 's/QtCore_debug/QtCore/g' Makefile # fi; make || die "make failed" } src_install() { make INSTALL_ROOT="${D}" install || die "make install failed" if [ "$(get_libdir)" != "lib" ]; then mv ${D}/usr/lib ${D}/usr/$(get_libdir) fi dodoc README TODO }