# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit qt3 eutils IUSE="doc" LANGS="pl" for i in ${LANGS}; do IUSE="${IUSE} linguas_${i}" done IUSE="${IUSE} doc" DESCRIPTION="Commodity and stock market charting and technical analysis" HOMEPAGE="http://qtstalker.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" DEPEND="$(qt_min_version 3.3) >=sys-libs/db-4 >=dev-libs/ta-lib-0.3.0" S="${WORKDIR}/${PN}" src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/${P}-parallel-make.patch epatch ${FILESDIR}/${P}-dont-install-docs.patch einfo "Gentooifying install paths (/usr/local to /usr)" grep -r '/usr/local' * \ | sed -e 's/:.*$//' -e '/.html$/d' -e '/CHANGELOG/d' \ | sort \ | uniq \ | xargs sed -e 's|/usr/local|/usr|' -i # multilib-strict fix: QTStalker .pro-settings assume there is only a single set of libs # residing in /usr/lib, but we will replace that with the real local one ACTUAL_LIBDIR="/usr/$(get_libdir)" einfo "multilib-strict fix: QTStalker libraries will be installed in " $ACTUAL_LIBDIR PROS="${S}/lib/lib.pro `find ${S}/plugins -name \"*.pro\"`" for i in ${PROS}; do sed -i -e "s+target.path = /usr/lib+target.path = $ACTUAL_LIBDIR+" $i done # /multilib-strict fix } src_compile() { eqmake3 ${S}/${PN}.pro cd ${S} emake || die "emake failed" einfo "Building langpacks..." for i in ${LINGUAS}; do if [ -f ${PN}_${i}.ts ]; then lrelease ${PN}_${i}.ts fi done } src_install() { export INSTALL_ROOT="${D}" make install || die "make install failed" if use doc; then einfo "Installing application manual and example indicators..." cd ${S}/docs dohtml *{html,png} cd ${S}/docs/indicator # use insinto rather than dohtml, so that the contents of # ${S}/docs/indicator/ gets copied where upstream intended. insinto /usr/share/doc/${PF}/html/indicator doins *html fi dodoc AUTHORS BUGS CHANGELOG-* TODO ${S}/README # install only needed langpacks einfo "Installing langpacks..." cd ${S}/i18n insinto /usr/share/${PN}/i18n for i in ${LINGUAS}; do if [ -f ${PN}_${i}.qm ]; then doins ${PN}_${i}.qm fi done # menu and icon domenu ${FILESDIR}/${PN}.desktop doicon ${S}/docs/${PN}.png }