summaryrefslogtreecommitdiff
blob: a20932d4a6957fcfd873ce77dc470ad66b3a6dc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-libs/qwt/qwt-5.0.1.ebuild,v 1.5 2007/05/16 15:22:31 corsair Exp $

inherit multilib eutils

SRC_URI="mirror://sourceforge/qwt/${P}.tar.bz2"
HOMEPAGE="http://qwt.sourceforge.net/"
DESCRIPTION="2D plotting library for Qt4"
LICENSE="qwt"
KEYWORDS="~amd64 ~x86"
SLOT="5"
IUSE="doc"

QWTVER="5.0.1"

DEPEND="=x11-libs/qt-4*
	>=sys-apps/sed-4"

src_unpack () {
	unpack ${A}

	cd ${S}

	qwtconfig=${S}/"qwtconfig.pri"
	echo > ${qwtconfig} ""
	echo >> ${qwtconfig} "target.path = /usr/$(get_libdir)"
	echo >> ${qwtconfig} "headers.path = /usr/include/qwt5"
	echo >> ${qwtconfig} "doc.path = /usr/share/doc/${PF}"
	echo >> ${qwtconfig}
	echo >> ${qwtconfig} "CONFIG += qt warn_on thread"
	echo >> ${qwtconfig} "CONFIG += release"
	echo >> ${qwtconfig} "CONFIG += QwtDll QwtPlot QwtWidgets QwtDesigner"

	# Can also do QwtExamples for example building

	echo >> ${qwtconfig} "QMAKE_CFLAGS_RELEASE += ${CFLAGS}"
	echo >> ${qwtconfig} "QMAKE_CXXFLAGS_RELEASE += ${CXXFLAGS}"

	# They got the version wrong
	sed -e "s/5.0.0/5.0.1/g" -i "${S}/src/src.pro"

	if ! useq doc; then
		echo >> "${S}/src/src.pro" "INSTALLS = target headers"
	fi

}

src_compile () {
	# -j1 due to parallel build failures ( bug # 170625 )
	/usr/bin/qmake qwt.pro
	MAKEOPTS="$MAKEOPTS -j1" emake || die

	cd designer
	/usr/bin/qmake qwtplugin.pro
	MAKEOPTS="$MAKETOPS -j1" emake || die
}

src_install () {
	make INSTALL_ROOT=${D} install
}