1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit cmake flag-o-matic pax-utils toolchain-funcs xdg
12 DESCRIPTION="A virtual lighttable and darkroom for photographers"
13 HOMEPAGE="https://www.darktable.org/"
14 SRC_URI="https://github.com/darktable-org/${PN}/releases/download/release-${MY_PV}/${MY_P}.tar.xz
15 https://dev.gentoo.org/~asturm/distfiles/${P}-gcc9.patch.tar.xz
16 doc? ( https://github.com/darktable-org/${PN}/releases/download/release-${DOC_PV}/${PN}-usermanual.pdf -> ${PN}-usermanual-${DOC_PV}.pdf )"
18 LICENSE="GPL-3 CC-BY-3.0"
21 LANGS=" ca cs de es fi fr hu ja nb nl pl pt-BR ru sl"
22 # TODO add lua once dev-lang/lua-5.2 is unmasked
23 IUSE="colord cups cpu_flags_x86_sse3 doc flickr geolocation gnome-keyring gphoto2 graphicsmagick jpeg2k kwallet
24 nls opencl openmp openexr pax_kernel webp
30 nls? ( sys-devel/gettext )
38 >=media-gfx/exiv2-0.25-r2:0=[xmp]
40 >=media-libs/lensfun-0.2.3:0=
48 >=x11-libs/gtk+-3.14:3
50 colord? ( x11-libs/colord-gtk:0= )
51 cups? ( net-print/cups )
52 flickr? ( media-libs/flickcurl )
53 geolocation? ( >=sci-geosciences/osm-gps-map-1.1.0 )
54 gnome-keyring? ( >=app-crypt/libsecret-0.18 )
55 gphoto2? ( media-libs/libgphoto2:= )
56 graphicsmagick? ( media-gfx/graphicsmagick )
57 jpeg2k? ( media-libs/openjpeg:2= )
58 opencl? ( virtual/opencl )
59 openexr? ( media-libs/openexr:0= )
60 webp? ( media-libs/libwebp:0= )
62 DEPEND="${COMMON_DEPEND}
68 RDEPEND="${COMMON_DEPEND}
69 kwallet? ( >=kde-frameworks/kwallet-5.34.0-r1 )
73 "${FILESDIR}"/"${PN}"-find-opencl-header.patch
74 "${WORKDIR}"/"${P}"-gcc9.patch
75 "${FILESDIR}"/"${P}"-exiv2-0.27.patch
78 S="${WORKDIR}/${P/_/~}"
82 tc-has-openmp || die "Please switch to an openmp compatible compiler"
87 use cpu_flags_x86_sse3 && append-flags -msse3
94 -DBUILD_PRINT=$(usex cups)
96 -DUSE_CAMERA_SUPPORT=$(usex gphoto2)
97 -DUSE_COLORD=$(usex colord)
98 -DUSE_FLICKR=$(usex flickr)
99 -DUSE_GRAPHICSMAGICK=$(usex graphicsmagick)
100 -DUSE_KWALLET=$(usex kwallet)
101 -DUSE_LIBSECRET=$(usex gnome-keyring)
103 -DUSE_MAP=$(usex geolocation)
104 -DUSE_NLS=$(usex nls)
105 -DUSE_OPENCL=$(usex opencl)
106 -DUSE_OPENEXR=$(usex openexr)
107 -DUSE_OPENJPEG=$(usex jpeg2k)
108 -DUSE_OPENMP=$(usex openmp)
109 -DUSE_WEBP=$(usex webp)
111 CMAKE_BUILD_TYPE="RELWITHDEBINFO"
117 use doc && dodoc "${DISTDIR}"/${PN}-usermanual-${DOC_PV}.pdf
120 for lang in ${LANGS} ; do
121 if ! use l10n_${lang}; then
122 rm -r "${ED}"/usr/share/locale/${lang/-/_} || die
127 if use pax_kernel && use opencl ; then
128 pax-mark Cm "${ED}"/usr/bin/${PN} || die
129 eqawarn "USE=pax_kernel is set meaning that ${PN} will be run"
130 eqawarn "under a PaX enabled kernel. To do so, the ${PN} binary"
131 eqawarn "must be modified and this *may* lead to breakage! If"
132 eqawarn "you suspect that ${PN} is broken by this modification,"
133 eqawarn "please open a bug."
140 elog "when updating from the currently stable 1.6 series,"
141 elog "please bear in mind that your edits will be preserved during this process,"
142 elog "but it will not be possible to downgrade from 2.0 to 1.6 any more."
144 ewarn "It will not be possible to downgrade!"