summaryrefslogtreecommitdiff
blob: 4995aa764c60fe11b2b0ac1ac625183492e67b07 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

MY_P="${PN}2-${PV}"
inherit desktop qmake-utils toolchain-funcs xdg-utils

DESCRIPTION="Tool to render 3D fractals"
HOMEPAGE="https://www.mandelbulber.com"
SRC_URI="https://github.com/buddhi1980/${PN}2/releases/download/${PV}/${MY_P}.tar.gz mirror://sourceforge/${PN}/${MY_P}.tar.gz"

LICENSE="CC-BY-4.0 GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="joystick opencl openexr sndfile tiff"

BDEPEND="
	virtual/pkgconfig
"
RDEPEND="
	dev-libs/lzo
	dev-qt/qtcore:5
	dev-qt/qtgui:5
	dev-qt/qtmultimedia:5
	dev-qt/qtnetwork:5
	dev-qt/qttest:5
	dev-qt/qtwidgets:5
	media-libs/libpng:0=
	sci-libs/gsl:=
	joystick? ( dev-qt/qtgamepad:5 )
	opencl? (
		dev-libs/clhpp
		virtual/opencl
	)
	openexr? (
		media-libs/ilmbase:=
		media-libs/openexr:=
	)
	sndfile? ( media-libs/libsndfile )
	tiff? ( media-libs/tiff:0 )
"
DEPEND="${RDEPEND}
	dev-qt/designer:5
"

S=${WORKDIR}/${MY_P}

pkg_pretend() {
	[[ ${MERGE_TYPE} != binary ]] && tc-check-openmp
}

pkg_setup() {
	[[ ${MERGE_TYPE} != binary ]] && tc-check-openmp
}

src_prepare() {
	default

	use joystick || sed -i -e "s/qtHaveModule(gamepad)/false/" makefiles/common.pri || die
	use openexr || sed -i -e "s/packagesExist(IlmBase)/false/" makefiles/common.pri || die
	use sndfile || sed -i -e "s/packagesExist(sndfile)/false/" makefiles/common.pri || die
	use tiff || sed -i -e "s/packagesExist(libtiff-4)/false/" makefiles/common.pri || die
}

src_configure() {
	if use opencl; then
		eqmake5 makefiles/${PN}-opencl.pro
	else
		eqmake5 makefiles/${PN}.pro
	fi
}

src_install() {
	dobin ${PN}2

	dodoc README NEWS usr/share/doc/${PN}2/Mandelbulber_Manual.pdf

	insinto /usr/share/${PN}2
	doins -r usr/share/${PN}2/*

	domenu ${PN}2.desktop

	newicon -s 256 qt/icons/${PN}.png ${PN}2.png
}

pkg_postinst() {
	xdg_icon_cache_update
}

pkg_postrm() {
	xdg_icon_cache_update
}