| 1 |
# Copyright 1999-2010 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/media-gfx/kst/kst-2.0.0_beta2-r1.ebuild,v 1.3 2010/02/10 08:13:59 tove Exp $
|
| 4 |
|
| 5 |
EAPI=2
|
| 6 |
|
| 7 |
inherit qt4-r2 multilib
|
| 8 |
|
| 9 |
MY_PV="${PV/_/-}"
|
| 10 |
MY_P="${PN}-${MY_PV}"
|
| 11 |
|
| 12 |
DESCRIPTION="Fast real-time large-dataset viewing and plotting tool for KDE4"
|
| 13 |
HOMEPAGE="http://kst.kde.org/"
|
| 14 |
SRC_URI="mirror://kde/unstable/apps/KDE4.x/scientific/${MY_P}.tar.gz"
|
| 15 |
|
| 16 |
LICENSE="GPL-2 LGPL-2 FDL-1.2"
|
| 17 |
SLOT="0"
|
| 18 |
KEYWORDS="~amd64 ~x86"
|
| 19 |
IUSE="debug"
|
| 20 |
|
| 21 |
DEPEND="x11-libs/qt-gui:4[debug?]
|
| 22 |
x11-libs/qt-opengl:4[debug?]
|
| 23 |
x11-libs/qt-qt3support:4[debug?]
|
| 24 |
x11-libs/qt-svg:4[debug?]
|
| 25 |
x11-libs/qt-xmlpatterns:4[debug?]
|
| 26 |
sci-libs/gsl
|
| 27 |
sci-libs/cfitsio"
|
| 28 |
RDEPEND="${DEPEND}"
|
| 29 |
|
| 30 |
PATCHES=( "${FILESDIR}/${PN}-cfitsio-includes.patch" )
|
| 31 |
|
| 32 |
S="${WORKDIR}/${PN}"
|
| 33 |
|
| 34 |
src_prepare() {
|
| 35 |
qt4-r2_src_prepare
|
| 36 |
sed -e "s:\(INSTALL_DIR/\)lib:\1$(get_libdir):" \
|
| 37 |
-i src/libkst/libkst.pro src/libkstapp/libkstapp.pro \
|
| 38 |
src/libkstmath/libkstmath.pro || die "sed libdir failed"
|
| 39 |
|
| 40 |
sed -e "s:\(INSTALL_DIR/\)plugin:\1$(get_libdir)/kst/plugins:" \
|
| 41 |
-i dataobjectplugin.pri datasourceplugin.pri src/widgets/widgets.pro \
|
| 42 |
|| die "sed plugins install path failed"
|
| 43 |
|
| 44 |
sed -e "s!QLibraryInfo::location(QLibraryInfo::PluginsPath)!\"/usr/$(get_libdir)/kst/plugins\"!" \
|
| 45 |
-i src/libkst/datasource.cpp src/libkstmath/dataobject.cpp \
|
| 46 |
|| die "sed plugins search path failed"
|
| 47 |
|
| 48 |
# libkstwidgets is a Qt Designer plugin but they link against it (!!!)
|
| 49 |
# so either we keep it in plugins dir and set the rpath, or move to
|
| 50 |
# lib dir and add a SONAME. Currently the first solution is in use.
|
| 51 |
sed -e "s!\(QMAKE_RPATHDIR += \).*!\1/usr/$(get_libdir)/kst/plugins!" \
|
| 52 |
-i kst.pri src/d2asc/d2asc.pro src/d2d/d2d.pro \
|
| 53 |
|| die "sed rpath failed"
|
| 54 |
}
|
| 55 |
|
| 56 |
src_configure() {
|
| 57 |
export INSTDIR="${D}/usr"
|
| 58 |
eqmake4
|
| 59 |
}
|
| 60 |
|
| 61 |
src_install() {
|
| 62 |
emake install || die "emake install failed"
|
| 63 |
doicon src/images/${PN}.png
|
| 64 |
make_desktop_entry ${PN} ${PN} ${PN} \
|
| 65 |
"Qt;Graphics;DataVisualization" || die "make_desktop_entry failed"
|
| 66 |
dodoc AUTHORS ChangeLog NEWS PORTINGTODO README RELEASE.NOTES || die "dodoc failed"
|
| 67 |
}
|