1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit cmake-utils flag-o-matic toolchain-funcs gnome2-utils fdo-mime pax-utils eutils
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 doc? ( https://github.com/darktable-org/${PN}/releases/download/release-${DOC_PV}/${PN}-usermanual.pdf -> ${PN}-usermanual-${DOC_PV}.pdf )"
17 LICENSE="GPL-3 CC-BY-3.0"
20 LANGS=" ca cs da de es fr he hu it ja nl pl ru sk sl sv uk"
21 # TODO add lua once dev-lang/lua-5.2 is unmasked
22 IUSE="colord cups cpu_flags_x86_sse3 doc flickr geo gphoto2 graphicsmagick jpeg2k kwallet libsecret
23 nls opencl openmp openexr pax_kernel webp
26 # sse3 support is required to build darktable
27 REQUIRED_USE="cpu_flags_x86_sse3"
35 >=media-gfx/exiv2-0.25-r2:0=[xmp]
37 >=media-libs/lensfun-0.2.3:0=
46 >=x11-libs/gtk+-3.14:3
48 colord? ( x11-libs/colord-gtk:0= )
49 cups? ( net-print/cups )
50 flickr? ( media-libs/flickcurl )
51 geo? ( >=sci-geosciences/osm-gps-map-1.1.0 )
52 gphoto2? ( media-libs/libgphoto2:= )
53 graphicsmagick? ( media-gfx/graphicsmagick )
54 jpeg2k? ( media-libs/openjpeg:0 )
55 libsecret? ( >=app-crypt/libsecret-0.18 )
56 opencl? ( virtual/opencl )
57 openexr? ( media-libs/openexr:0= )
58 webp? ( media-libs/libwebp:0= )"
61 >=kde-frameworks/kwallet-5.34.0-r1
67 nls? ( sys-devel/gettext )"
69 S="${WORKDIR}/${P/_/~}"
73 tc-has-openmp || die "Please switch to an openmp compatible compiler"
78 use cpu_flags_x86_sse3 && append-flags -msse3
80 cmake-utils_src_prepare
85 -DBUILD_PRINT=$(usex cups)
86 -DCMAKE_INSTALL_DOCDIR="/usr/share/doc/${PF}"
88 -DUSE_CAMERA_SUPPORT=$(usex gphoto2)
89 -DUSE_COLORD=$(usex colord)
90 -DUSE_FLICKR=$(usex flickr)
91 -DUSE_GRAPHICSMAGICK=$(usex graphicsmagick)
92 -DUSE_KWALLET=$(usex kwallet)
93 -DUSE_LIBSECRET=$(usex libsecret)
97 -DUSE_OPENCL=$(usex opencl)
98 -DUSE_OPENEXR=$(usex openexr)
99 -DUSE_OPENJPEG=$(usex jpeg2k)
100 -DUSE_OPENMP=$(usex openmp)
101 -DUSE_WEBP=$(usex webp)
103 cmake-utils_src_configure
107 cmake-utils_src_install
108 use doc && dodoc "${DISTDIR}"/${PN}-usermanual-${DOC_PV}.pdf
110 for lang in ${LANGS} ; do
111 use l10n_${lang} || rm -r "${ED}"/usr/share/locale/${lang/-/_}
114 if use pax_kernel && use opencl ; then
115 pax-mark Cm "${ED}"/usr/bin/${PN} || die
116 eqawarn "USE=pax_kernel is set meaning that ${PN} will be run"
117 eqawarn "under a PaX enabled kernel. To do so, the ${PN} binary"
118 eqawarn "must be modified and this *may* lead to breakage! If"
119 eqawarn "you suspect that ${PN} is broken by this modification,"
120 eqawarn "please open a bug."
129 gnome2_icon_cache_update
130 fdo-mime_desktop_database_update
132 elog "when updating from the currently stable 1.6 series,"
133 elog "please bear in mind that your edits will be preserved during this process,"
134 elog "but it will not be possible to downgrade from 2.0 to 1.6 any more."
136 ewarn "It will not be possible to downgrade!"
140 gnome2_icon_cache_update
141 fdo-mime_desktop_database_update