summaryrefslogtreecommitdiff
blob: 7e44462107c5f430262380e476ce8a254cd00edd (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
94
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

CMAKE_MAKEFILE_GENERATOR=emake
inherit cmake flag-o-matic xdg-utils

DESCRIPTION="An open-source full-featured 2D animation creation software"
HOMEPAGE="https://github.com/opentoonz/opentoonz"
SRC_URI="https://github.com/opentoonz/opentoonz/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="BSD libtiff"
SLOT="0"
KEYWORDS="~amd64 ~x86"

BDEPEND="
	dev-qt/linguist-tools:5
	virtual/pkgconfig
"
RDEPEND="
	app-arch/lz4:=
	dev-libs/boost:=
	dev-libs/lzo:2
	>=dev-qt/qtcore-5.9:5
	>=dev-qt/qtgui-5.9:5
	>=dev-qt/qtmultimedia-5.9:5[widgets]
	>=dev-qt/qtnetwork-5.9:5
	>=dev-qt/qtopengl-5.9:5
	>=dev-qt/qtprintsupport-5.9:5
	>=dev-qt/qtscript-5.9:5
	>=dev-qt/qtserialport-5.9:5
	>=dev-qt/qtsvg-5.9:5
	>=dev-qt/qtwidgets-5.9:5
	>=dev-qt/qtxml-5.9:5
	media-libs/freeglut
	media-libs/freetype:2
	media-libs/glew:=
	media-libs/libjpeg-turbo
	>=media-libs/libmypaint-1.3.0:=
	media-libs/libpng:=
	media-libs/opencv:=
	>=sci-libs/superlu-4.1:=
	sys-libs/zlib
	virtual/cblas
	virtual/libusb:1
	virtual/opengl
"
DEPEND="${RDEPEND}"

CMAKE_USE_DIR="${S}"/toonz/sources

PATCHES=(
	"${FILESDIR}"/${PN}-1.6.0-gcc13.patch
)

src_configure() {
	# bug #859778
	append-flags -fno-strict-aliasing
	filter-lto

	local mycmakeargs=(
		-DTIFF_LIBRARY="${S}/thirdparty/tiff-4.0.3/libtiff/.libs/libtiff.a"
		-DSUPERLU_INCLUDE_DIR="${EPREFIX}/usr/include/superlu"
		-DLZO_INCLUDE_DIR="${EPREFIX}/usr/include/lzo"
		-DCMAKE_SKIP_RPATH=ON
	)

	# The upstream uses their own modified libtiff
	# See: https://github.com/opentoonz/opentoonz/blob/master/doc/how_to_build_linux.md#building-libtiff
	cd thirdparty/tiff-4.0.3 || die
	CONFIG_SHELL="${BROOT}"/bin/bash econf \
		--with-pic \
		--disable-jbig \
		--enable-static \
		--disable-shared

	cmake_src_configure
}

src_compile() {
	cd "${S}"/thirdparty/tiff-4.0.3 || die
	emake

	cmake_src_compile
}

pkg_postinst() {
	xdg_icon_cache_update
}

pkg_postrm() {
	xdg_icon_cache_update
}