aboutsummaryrefslogtreecommitdiff
blob: 9dfe85f77d6aa721b324ae45403f1db4e92bbeba (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit cmake-utils

DESCRIPTION="High Performance Visualizations for ArrayFire"
HOMEPAGE="http://www.arrayfire.com/"
SRC_URI="https://github.com/arrayfire/${PN}/archive/af${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"

LICENSE="BSD"
SLOT="0"
IUSE="examples"

RDEPEND="
	media-libs/glew
	>=media-libs/glfw-3.1.1
	media-libs/freetype:2
	media-libs/fontconfig:1.0
	media-libs/glm
	virtual/opengl
	"
DEPEND="${RDEPEND}"

S="${WORKDIR}/${PN}-af${PV}"

PATCHES=( "${FILESDIR}/${P}"-find-glm.patch )

pkg_pretend() {
	if [[ ${MERGE_TYPE} != binary ]]; then
		if [[ $(gcc-major-version) -lt 4 ]] || ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]] ) ; then
			die "Compilation with gcc older than 4.7 is not supported."
		fi
	fi
}

src_configure() {
	local mycmakeargs=(
	   $(cmake-utils_use_build examples EXAMPLES)
	   -DUSE_SYSTEM_GLM=ON
	   -DUSE_SYSTEM_FREETYPE=ON
	)
	cmake-utils_src_configure
}