dev-qt/qtwayland: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / sci-libs / itpp / itpp-4.3.1-r1.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit cmake-utils
7
8 DESCRIPTION="C++ library of mathematical, signal processing and communication"
9 HOMEPAGE="http://itpp.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
11
12 SLOT="0"
13 LICENSE="GPL-3"
14 KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux"
15 IUSE="doc"
16
17 RDEPEND="
18         sci-libs/fftw:3.0=
19         virtual/blas
20         virtual/lapack
21 "
22 DEPEND="${RDEPEND}
23         virtual/pkgconfig
24         doc? (
25                 app-doc/doxygen
26                 virtual/latex-base
27         )
28 "
29
30 DOCS=( ChangeLog NEWS AUTHORS README )
31
32 src_prepare() {
33         cmake-utils_src_prepare
34
35         # gentoo redefines the CMAKE_BUILD_TYPE
36         sed -i \
37                 -e 's/CMAKE_BUILD_TYPE STREQUAL Release/NOT CMAKE_BUILD_TYPE STREQUAL Debug/' \
38                 CMakeLists.txt || die
39         # respect gentoo doc dir
40         sed -i \
41                 -e "s:share/doc/itpp:share/doc/${PF}:" \
42                 itpp/CMakeLists.txt || die
43
44         # respect gentoo libdir
45         sed -i "s#/lib#/$(get_libdir)#" itpp-config.cmake.in || die
46         sed -i "s#/lib#/$(get_libdir)#" itpp.pc.cmake.in || die
47         sed -i \
48                 -e "s#LIBRARY DESTINATION lib#LIBRARY DESTINATION $(get_libdir)#" \
49                 -e "s#ARCHIVE DESTINATION lib#ARCHIVE DESTINATION $(get_libdir)#" \
50                 itpp/CMakeLists.txt || die
51 }
52
53 src_configure() {
54         local mycmakeargs=(
55                 -DBLA_VENDOR=Generic
56                 -DHTML_DOCS=$(usex doc)
57         )
58         cmake-utils_src_configure
59 }