Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/darktable/, media-gfx/darktable/files/
Date: Sat, 26 Dec 2020 23:18:44
Message-Id: 1609024696.dd47c8a2caa923d5eb2355a8c3101e2124b83ca2.marecki@gentoo
1 commit: dd47c8a2caa923d5eb2355a8c3101e2124b83ca2
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 25 00:58:28 2020 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 26 23:18:16 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd47c8a2
7
8 media-gfx/darktable: + AVIF support, - bundled liblua, unified release/live structure
9
10 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
11
12 ...able-3.4.0.ebuild => darktable-3.4.0-r1.ebuild} | 54 ++++++++++++++--------
13 .../darktable-3.4.0_jsonschema-automagic.patch | 25 ++++++++++
14 media-gfx/darktable/metadata.xml | 1 +
15 3 files changed, 62 insertions(+), 18 deletions(-)
16
17 diff --git a/media-gfx/darktable/darktable-3.4.0.ebuild b/media-gfx/darktable/darktable-3.4.0-r1.ebuild
18 similarity index 73%
19 rename from media-gfx/darktable/darktable-3.4.0.ebuild
20 rename to media-gfx/darktable/darktable-3.4.0-r1.ebuild
21 index ffafc687cb4..8405fd12551 100644
22 --- a/media-gfx/darktable/darktable-3.4.0.ebuild
23 +++ b/media-gfx/darktable/darktable-3.4.0-r1.ebuild
24 @@ -7,29 +7,41 @@ LUA_COMPAT=( lua5-3 )
25
26 inherit cmake flag-o-matic lua-single toolchain-funcs xdg
27
28 -DOC_PV="3.4.0"
29 -MY_PV="${PV/_/}"
30 -MY_P="${P/_/.}"
31 -
32 DESCRIPTION="A virtual lighttable and darkroom for photographers"
33 HOMEPAGE="https://www.darktable.org/"
34 -SRC_URI="https://github.com/darktable-org/${PN}/releases/download/release-${MY_PV}/${MY_P}.tar.xz
35 - doc? ( https://github.com/darktable-org/${PN}/releases/download/release-${DOC_PV}/${PN}-usermanual.pdf -> ${PN}-usermanual-${DOC_PV}.pdf )"
36 -
37 LICENSE="GPL-3 CC-BY-3.0"
38 SLOT="0"
39 -KEYWORDS="~amd64 ~arm64"
40 -LANGS=" af cs de es fi fr he hu it pl pt-BR ru sk sl"
41 -IUSE="colord cups cpu_flags_x86_sse3 doc flickr geolocation gmic gnome-keyring gphoto2 graphicsmagick jpeg2k kwallet
42 - lto lua nls opencl openmp openexr system-lua tools webp
43 +
44 +if [[ ${PV} == *9999 ]]; then
45 + inherit git-r3
46 + EGIT_REPO_URI="https://github.com/darktable-org/${PN}.git"
47 +
48 + LANGS=" af ca cs da de el es fi fr gl he hu it ja nb nl pl pt-BR pt-PT ro ru sk sl sq sv th uk zh-CN zh-TW"
49 +else
50 + DOC_PV="3.4.0"
51 + MY_PV="${PV/_/}"
52 + MY_P="${P/_/.}"
53 +
54 + SRC_URI="https://github.com/darktable-org/${PN}/releases/download/release-${MY_PV}/${MY_P}.tar.xz
55 + doc? ( https://github.com/darktable-org/${PN}/releases/download/release-${DOC_PV}/${PN}-usermanual.pdf -> ${PN}-usermanual-${DOC_PV}.pdf )"
56 +
57 + KEYWORDS="~amd64 ~arm64"
58 + LANGS=" af cs de es fi fr he hu it pl pt-BR ru sk sl"
59 +fi
60 +
61 +IUSE="avif colord cups cpu_flags_x86_sse3 doc flickr geolocation gmic gnome-keyring gphoto2 graphicsmagick jpeg2k kwallet
62 + lto lua nls opencl openmp openexr test tools webp
63 ${LANGS// / l10n_}"
64
65 -REQUIRED_USE="system-lua? ( lua ${LUA_REQUIRED_USE} )"
66 +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
67 +
68 +RESTRICT="!test? ( test )"
69
70 BDEPEND="
71 dev-util/intltool
72 virtual/pkgconfig
73 nls? ( sys-devel/gettext )
74 + test? ( >=dev-python/jsonschema-3.2.0 )
75 "
76 COMMON_DEPEND="
77 dev-db/sqlite:3
78 @@ -49,6 +61,7 @@ COMMON_DEPEND="
79 x11-libs/cairo
80 >=x11-libs/gtk+-3.22:3
81 x11-libs/pango
82 + avif? ( >=media-libs/libavif-0.8.2 )
83 colord? ( x11-libs/colord-gtk:0= )
84 cups? ( net-print/cups )
85 flickr? ( media-libs/flickcurl )
86 @@ -58,9 +71,9 @@ COMMON_DEPEND="
87 gphoto2? ( media-libs/libgphoto2:= )
88 graphicsmagick? ( media-gfx/graphicsmagick )
89 jpeg2k? ( media-libs/openjpeg:2= )
90 + lua? ( ${LUA_DEPS} )
91 opencl? ( virtual/opencl )
92 openexr? ( media-libs/openexr:0= )
93 - system-lua? ( ${LUA_DEPS} )
94 webp? ( media-libs/libwebp:0= )
95 "
96 DEPEND="${COMMON_DEPEND}
97 @@ -76,7 +89,7 @@ RDEPEND="${COMMON_DEPEND}
98 PATCHES=(
99 "${FILESDIR}"/"${PN}"-find-opencl-header.patch
100 "${FILESDIR}"/${PN}-3.0.2_cmake-march-autodetection.patch
101 - "${FILESDIR}"/${PN}-3.0.2_jsonschema-automagic.patch
102 + "${FILESDIR}"/${PN}-3.4.0_jsonschema-automagic.patch
103 )
104
105 S="${WORKDIR}/${P/_/~}"
106 @@ -95,6 +108,10 @@ pkg_pretend() {
107 fi
108 }
109
110 +pkg_setup() {
111 + use lua && lua-single_pkg_setup
112 +}
113 +
114 src_prepare() {
115 use cpu_flags_x86_sse3 && append-flags -msse3
116
117 @@ -104,15 +121,14 @@ src_prepare() {
118 }
119
120 src_configure() {
121 - # As of darktable-3.2.1, AVIF support is not compatible with >=media-libs/libavif-0.8.0; see Bug #751352.
122 local mycmakeargs=(
123 -DBUILD_CURVE_TOOLS=$(usex tools)
124 -DBUILD_NOISE_TOOLS=$(usex tools)
125 -DBUILD_PRINT=$(usex cups)
126 -DCUSTOM_CFLAGS=ON
127 - -DDONT_USE_INTERNAL_LUA=$(usex system-lua)
128 + -DDONT_USE_INTERNAL_LUA=ON
129 -DRAWSPEED_ENABLE_LTO=$(usex lto)
130 - -DUSE_AVIF=no
131 + -DUSE_AVIF=$(usex avif)
132 -DUSE_CAMERA_SUPPORT=$(usex gphoto2)
133 -DUSE_COLORD=$(usex colord)
134 -DUSE_FLICKR=$(usex flickr)
135 @@ -128,6 +144,7 @@ src_configure() {
136 -DUSE_OPENJPEG=$(usex jpeg2k)
137 -DUSE_OPENMP=$(usex openmp)
138 -DUSE_WEBP=$(usex webp)
139 + -DWANT_JSON_VALIDATION=$(usex test)
140 )
141 CMAKE_BUILD_TYPE="RELWITHDEBINFO"
142 cmake_src_configure
143 @@ -135,9 +152,10 @@ src_configure() {
144
145 src_install() {
146 cmake_src_install
147 + # This USE flag is masked for -9999
148 use doc && dodoc "${DISTDIR}"/${PN}-usermanual-${DOC_PV}.pdf
149
150 - if use nls ; then
151 + if use nls; then
152 for lang in ${LANGS} ; do
153 if ! use l10n_${lang}; then
154 rm -r "${ED}"/usr/share/locale/${lang/-/_} || die
155
156 diff --git a/media-gfx/darktable/files/darktable-3.4.0_jsonschema-automagic.patch b/media-gfx/darktable/files/darktable-3.4.0_jsonschema-automagic.patch
157 new file mode 100644
158 index 00000000000..45d61e6af6c
159 --- /dev/null
160 +++ b/media-gfx/darktable/files/darktable-3.4.0_jsonschema-automagic.patch
161 @@ -0,0 +1,25 @@
162 +jsonschema is only used at install time to validate a file that release
163 +tarballs already include, treat running it as a late part of tests.
164 +
165 +--- a/CMakeLists.txt
166 ++++ b/CMakeLists.txt
167 +@@ -350,6 +350,9 @@
168 + endif()
169 +
170 + # we need jsonschema to check noiseprofiles.json
171 ++# In case of Git clones this file is generated at build time, for releases
172 ++# it is included in the tarball.
173 ++if (WANT_JSON_VALIDATION)
174 + find_program(jsonschema_BIN jsonschema)
175 + if(${jsonschema_BIN} STREQUAL "jsonschema_BIN-NOTFOUND")
176 + message(STATUS "Missing jsonschema, problems in noiseprofiles.json might go unnoticed")
177 +@@ -358,6 +361,9 @@
178 + message(STATUS "Found jsonschema")
179 + set(VALIDATE_JSON 1)
180 + endif(${jsonschema_BIN} STREQUAL "jsonschema_BIN-NOTFOUND")
181 ++else()
182 ++ set(VALIDATE_JSON 0)
183 ++endif()
184 +
185 + # we need an XSLT interpreter to generate preferences_gen.h and darktablerc
186 + find_program(Xsltproc_BIN xsltproc)
187
188 diff --git a/media-gfx/darktable/metadata.xml b/media-gfx/darktable/metadata.xml
189 index 5661ac61bfd..a46ea727d4c 100644
190 --- a/media-gfx/darktable/metadata.xml
191 +++ b/media-gfx/darktable/metadata.xml
192 @@ -10,6 +10,7 @@
193 <name>Markus Meier</name>
194 </maintainer>
195 <use>
196 + <flag name="avif">Support importing and exporting AVIF images</flag>
197 <flag name="flickr">Add support for uploading photos to flickr</flag>
198 <flag name="geolocation">Enable geotagging support</flag>
199 <flag name="gmic">Use the G'MIC image-processing framework (<pkg>media-gfx/gmic</pkg>), e.g. to support Colour LUTs compressed using their compression scheme</flag>