/[gentoo-x86]/dev-lang/gdl/gdl-0.9.4.ebuild
Gentoo

Contents of /dev-lang/gdl/gdl-0.9.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu May 7 15:33:32 2015 UTC (3 years, 3 months ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +25 -18 lines
Version Bump; fix compatibility with latest plplot, bug #547380; fix python support bug #530774

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

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lang/gdl/gdl-0.9.4.ebuild,v 1.3 2015/04/08 08:22:09 mgorny Exp $
4
5 EAPI=5
6
7 WX_GTK_VER="2.8"
8 PYTHON_COMPAT=( python2_7 )
9
10 inherit cmake-utils eutils python-r1 wxwidgets toolchain-funcs virtualx
11
12 DESCRIPTION="GNU Data Language"
13 HOMEPAGE="http://gnudatalanguage.sourceforge.net/"
14 SRC_URI="mirror://sourceforge/gnudatalanguage/${P}.tar.gz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
19 IUSE="+eigen fftw grib gshhs hdf hdf5 imagemagick netcdf openmp
20 proj postscript python static-libs udunits wxwidgets"
21
22 RDEPEND="
23 sci-libs/gsl:0=
24 sci-libs/plplot:0=[-dynamic]
25 sys-libs/ncurses:5=
26 sys-libs/readline:0=
27 sys-libs/zlib:0=
28 x11-libs/libX11:0=
29 fftw? ( sci-libs/fftw:3.0= )
30 grib? ( sci-libs/grib_api:0= )
31 gshhs? ( sci-geosciences/gshhs-data sci-geosciences/gshhs:0= )
32 hdf? ( sci-libs/hdf:0= )
33 hdf5? ( sci-libs/hdf5:0= )
34 imagemagick? (
35 || (
36 media-gfx/graphicsmagick[cxx]
37 media-gfx/imagemagick[cxx]
38 )
39 )
40 netcdf? ( sci-libs/netcdf )
41 proj? ( sci-libs/proj )
42 postscript? ( dev-libs/pslib )
43 python? (
44 ${PYTHON_DEPS}
45 dev-python/numpy[${PYTHON_USEDEP}]
46 )
47 udunits? ( sci-libs/udunits )
48 wxwidgets? ( x11-libs/wxGTK:2.8[X,-odbc] )"
49
50 DEPEND="${RDEPEND}
51 >=dev-java/antlr-2.7.7-r5:0[cxx,java,script]
52 virtual/pkgconfig
53 eigen? ( dev-cpp/eigen:3 )"
54
55 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
56
57 PATCHES=(
58 "${FILESDIR}"/0.9.2-antlr.patch
59 "${FILESDIR}"/0.9.2-include.patch
60 "${FILESDIR}"/0.9.2-proj4.patch
61 "${FILESDIR}"/0.9.2-semaphore.patch
62 "${FILESDIR}"/0.9.3-plwidth.patch
63 "${FILESDIR}"/0.9.4-gsl.patch
64 "${FILESDIR}"/0.9.4-python.patch
65 "${FILESDIR}"/0.9.4-reorder.patch
66 "${FILESDIR}"/0.9.4-plplot.patch
67 "${FILESDIR}"/0.9.4-python2.patch
68 )
69
70 pkg_setup() {
71 use openmp && [[ $(tc-getCXX)$ == *g++* ]] && ! tc-has-openmp && \
72 die "You have openmp enabled but your current g++ does not support it"
73 }
74
75 src_prepare() {
76 cmake-utils_src_prepare
77
78 use hdf5 && has_version sci-libs/hdf5[mpi] && export CXX=mpicxx
79
80 # make sure antlr includes are from system and rebuild the sources with it
81 # https://sourceforge.net/tracker/?func=detail&atid=618685&aid=3465878&group_id=97659
82 rm -r src/antlr || die
83 einfo "Regenerating grammar"
84 pushd src > /dev/null
85 local i
86 for i in *.g; do antlr ${i} || die ; done
87 popd > /dev/null
88
89 # gentoo: use proj instead of libproj4 (libproj4 last update: 2004)
90 sed -i \
91 -e 's:proj4:proj:' \
92 -e 's:lib_proj\.h:proj_api\.h:g' \
93 CMakeModules/FindLibproj4.cmake src/math_utl.hpp || die
94
95 # gentoo: avoid install files in datadir directory
96 sed -i \
97 -e '/AUTHORS/d' \
98 CMakeLists.txt || die
99 }
100
101 src_configure() {
102 # MPI is still very buggy
103 # x11=off does not compile
104 local mycmakeargs=(
105 -DMPICH=OFF
106 -DBUNDLED_ANTLR=OFF
107 -DX11=ON
108 $(cmake-utils_use fftw)
109 $(cmake-utils_use eigen EIGEN3)
110 $(cmake-utils_use grib)
111 $(cmake-utils_use gshhs)
112 $(cmake-utils_use hdf)
113 $(cmake-utils_use hdf5)
114 $(cmake-utils_use netcdf)
115 $(cmake-utils_use openmp)
116 $(cmake-utils_use proj LIBPROJ4)
117 $(cmake-utils_use postscript PSLIB)
118 $(cmake-utils_use udunits)
119 $(cmake-utils_use wxwidgets)
120 )
121 if use imagemagick; then
122 if has_version media-gfx/graphicsmagick[cxx]; then
123 mycmakeargs+=( -DGRAPHICSMAGICK=ON -DMAGICK=OFF )
124 else
125 mycmakeargs+=( -DGRAPHICSMAGICK=OFF -DMAGICK=ON )
126 fi
127 else
128 mycmakeargs+=( -DGRAPHICSMAGICK=OFF -DMAGICK=OFF )
129 fi
130 configuration() {
131 mycmakeargs+=( $@ )
132 cmake-utils_src_configure
133 }
134 configuration -DPYTHON_MODULE=OFF -DPYTHON=OFF
135 use python && python_foreach_impl configuration -DPYTHON_MODULE=ON -DPYTHON=ON
136 }
137
138 src_compile() {
139 cmake-utils_src_compile
140 use python && python_foreach_impl cmake-utils_src_make
141 }
142
143 src_test() {
144 # there is check target instead of the ctest to define some LDPATH
145 Xemake -C "${BUILD_DIR}" check
146 }
147
148 src_install() {
149 cmake-utils_src_install
150 if use python; then
151 installation() {
152 mv src/libgdl.so GDL.so || die
153 python_domodule GDL.so
154 }
155 python_foreach_impl run_in_build_dir installation
156 dodoc PYTHON.txt
157 fi
158
159 echo "GDL_PATH=\"+${EROOT%/}/usr/share/gnudatalanguage\"" > 50gdl
160 doenvd 50gdl
161 }

  ViewVC Help
Powered by ViewVC 1.1.20