/[gentoo-x86]/sci-visualization/qtiplot/qtiplot-0.9.8.9-r1.ebuild
Gentoo

Contents of /sci-visualization/qtiplot/qtiplot-0.9.8.9-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sat Mar 2 23:28:36 2013 UTC (16 months, 1 week ago) by hwoarang
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +8 -8 lines
Move Qt dependencies to the new category

(Portage version: 2.1.11.52/cvs/Linux x86_64, signed Manifest commit with key C2BA7F3C!)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-visualization/qtiplot/qtiplot-0.9.8.9-r1.ebuild,v 1.7 2012/07/26 14:56:42 kensington Exp $
4
5 EAPI=3
6
7 PYTHON_DEPEND="python? 2"
8
9 inherit eutils qt4-r2 fdo-mime python
10
11 DESCRIPTION="Qt based clone of the Origin plotting package"
12 HOMEPAGE="http://soft.proindependent.com/qtiplot.html
13 http://www.staff.science.uu.nl/~zeven101/qtiplot.html"
14 SRC_URI="http://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2
15 http://dev.gentoo.org/~dilfridge/distfiles/${P}-origin.patch.bz2"
16
17 LICENSE="GPL-2 GPL-3"
18 SLOT="0"
19 KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
20 IUSE="bindist doc mono latex python"
21
22 LANGS="cn cz de es fr ja ro ru sv"
23 for l in ${LANGS}; do
24 lu=${l/cz/cs}
25 lu=${lu/cn/zh_CN}
26 IUSE="${IUSE} linguas_${lu}"
27 done
28
29 # qwtplot3d much modified from original upstream
30 # >=x11-libs/qwt-5.3 they are using trunk checkouts
31 CDEPEND="
32 media-libs/libemf
33 dev-qt/qthelp:4
34 dev-qt/qtgui:4
35 dev-qt/qtopengl:4
36 dev-qt/qt3support:4
37 || ( >=dev-qt/qthelp-4.7.0:4[compat] <dev-qt/qthelp-4.7.0:4 )
38 dev-qt/qtsvg:4
39 >=x11-libs/gl2ps-1.3.5[png]
40 >=dev-cpp/muParser-1.32
41 >=dev-libs/boost-1.35.0
42 dev-libs/quazip
43 media-libs/libpng
44 sci-libs/gsl
45 sci-libs/tamu_anova
46 latex? ( dev-tex/qtexengine )
47 mono? ( dev-dotnet/libgdiplus )"
48 DEPEND="${CDEPEND}
49 virtual/pkgconfig
50 python? ( >=dev-python/sip-4.9 )
51 doc? (
52 >=app-text/docbook-sgml-utils-0.6.14-r1
53 >=app-text/docbook-xml-dtd-4.4-r2:4.4 )"
54
55 RDEPEND="${CDEPEND}
56 python? ( dev-python/PyQt4[X] )"
57
58 PATCHES=(
59 "${DISTDIR}/${P}-origin.patch.bz2"
60 "${FILESDIR}/${P}-origin-2.patch"
61 "${FILESDIR}/${P}-qt48.patch"
62 "${FILESDIR}/${PN}-0.9.8.8-system-gl2ps.patch"
63 "${FILESDIR}/${PN}-0.9.7.10-dont-install-qwt.patch"
64 "${FILESDIR}/${PN}-0.9.8.6-gold.patch"
65 "${FILESDIR}/${PN}-0.9.8.7-kde.patch"
66 )
67
68 pkg_setup() {
69 use python && python_set_active_version 2
70 }
71
72 src_prepare() {
73 local mylibs
74
75 qt4-r2_src_prepare
76
77 rm -rf 3rdparty/{liborigin,QTeXEngine,/qwtplot3d/3rdparty/gl2ps/,boost} || die
78 sed \
79 -e "s:dll:static:g" \
80 -e "/INSTALLS/d" \
81 -i 3rdparty/qwtplot3d/*.pro
82
83 mylibs="${mylibs} -lquazip"
84 use mono && mylibs="${mylibs} $(pkg-config --libs libgdiplus)"
85
86 # Check build.conf for changes on bump.
87 cat > build.conf <<-EOF
88 # Automatically generated by Gentoo ebuild
89 isEmpty( QTI_ROOT ) {
90 message( "each file including this config needs to set QTI_ROOT to the dir containing this file!" )
91 }
92
93 MUPARSER_LIBS = \$\$system(pkg-config --libs muparser)
94 GSL_LIBS = \$\$system(pkg-config --libs gsl)
95 QWT_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwt/src
96 QWT_LIBS = \$\$QTI_ROOT/3rdparty/qwt/lib/libqwt.a
97 QWT3D_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwtplot3d/include
98 QWT3D_LIBS = \$\$QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a
99 EMF_INCLUDEPATH = "${EPREFIX}/usr/include/libEMF
100 SYS_LIBS = -lgl2ps ${mylibs} -lGLU
101
102 PYTHON = python
103 LUPDATE = lupdate
104 LRELEASE = lrelease
105
106 SCRIPTING_LANGS += muParser
107
108 CONFIG += release
109 CONFIG += CustomInstall
110 DEFINES += SCRIPTING_CONSOLE
111
112 EOF
113
114 use bindist && echo "DEFINES += QTIPLOT_SUPPORT" >> build.conf
115 use bindist || echo "DEFINES += QTIPLOT_PRO" >> build.conf
116 use python && echo "SCRIPTING_LANGS += Python" >> build.conf
117 use latex && echo "TEX_ENGINE_LIBS = -lQTeXEngine" >> build.conf
118 echo "LIBPNG_LIBS = -lpng" >> build.conf
119 echo "TAMUANOVA_LIBS = -ltamuanova" >> build.conf && \
120 echo "TAMUANOVA_INCLUDEPATH = \"${EPREFIX}/usr/include/tamu_anova\"" >> build.conf
121
122 sed \
123 -e "s:doc/${PN}/manual:doc/${PN}/html:" \
124 -e "s:/usr/local/${PN}:${EPREFIX}$(python_get_sitedir)/qtiplot:" \
125 -e '/INSTALLS.*documentation/d' \
126 -e '/INSTALLS.*manual/d' \
127 -e "/INSTALLBASE/s: /usr: ${EPREFIX}/usr:g" \
128 -e 's:/usr/local/qtiplot:$$INSTALLBASE:g' \
129 -i qtiplot/qtiplot.pro || die
130
131 sed \
132 -e "/^target.path/s:/usr:${EPREFIX}/usr:g" \
133 -i fitPlugins/*/*.pro || die
134
135 sed -e '/manual/d' -i qtiplot.pro || die
136
137 sed -e "s:QTIPLOT_PRO:QTIPLOT_PROFESSIONAL:g" -i qtiplot/src/core/main.cpp || die
138
139 # Drop langs only if LINGUAS is not empty
140 if [[ -n ${LINGUAS} ]]; then
141 for l in ${LANGS}; do
142 lu=${l/cz/cs}
143 lu=${lu/cn/zh_CN}
144 use linguas_${lu} || \
145 sed -e "s:translations/qtiplot_${l}.[tq][sm]::" \
146 -i qtiplot/qtiplot.pro || die
147 done
148 fi
149 chmod -x qtiplot/qti_wordlist.txt
150
151 # sed out debian paths
152 sed -e 's:\(/usr/share/sgml/\)docbook/stylesheet/dsssl/modular\(/html/docbook.dsl\):\1stylesheets/dsssl/docbook\2:' \
153 -i manual/qtiplot.dsl || die
154 sed -e 's:\(/usr/share/\)xml/docbook/stylesheet/nwalsh\(/html/chunk.xsl\):\1sgml/docbook/xsl-stylesheets\2:' \
155 -i manual/qtiplot_html.xsl || die
156
157 sed \
158 -e '1i#define OF(x) x' \
159 -i 3rdparty/zlib/minigzip.c || die
160 }
161
162 src_configure() {
163 use amd64 && export QMAKESPEC="linux-g++-64"
164 eqmake4
165 }
166
167 src_compile() {
168 emake || die "emake failed"
169 lrelease qtiplot/qtiplot.pro || die
170 if use doc; then
171 cd manual
172 emake web || die "html docbook building failed"
173 fi
174 }
175
176 src_install() {
177 qt4-r2_src_install
178 newicon qtiplot_logo.png qtiplot.png
179 make_desktop_entry qtiplot "QtiPlot Scientific Plotting" qtiplot
180 if use doc; then
181 insinto /usr/share/doc/${PN}/html
182 doins -r manual/html/* || die "install manual failed"
183 fi
184
185 if [[ -n ${LINGUAS} ]]; then
186 insinto /usr/share/${PN}/translations
187 for l in ${LANGS}; do
188 lu=${l/cz/cs}
189 lu=${lu/cn/zh_CN}
190 use linguas_${lu} && \
191 doins qtiplot/translations/qtiplot_${l}.qm
192 done
193 fi
194 }
195
196 pkg_postinst() {
197 if use python; then
198 elog "You might want to emerge"
199 elog "\t dev-python/pygsl"
200 elog "\t dev-python/rpy"
201 elog "\t sci-libs/scipy and"
202 elog "\t dev-python/sympy"
203 elog "to gain full python support."
204 fi
205
206 fdo-mime_desktop_database_update
207 use python && python_mod_optimize ${PN}
208 }
209
210 pkg_postrm() {
211 fdo-mime_desktop_database_update
212 use python && python_mod_cleanup ${PN}
213 }

  ViewVC Help
Powered by ViewVC 1.1.20