1 |
commit: b94a2b6d3df467544fb0b3257e30e2245737049a |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 26 23:14:19 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 26 23:18:26 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b94a2b6d |
7 |
|
8 |
media-gfx/darktable: update the live ebuild |
9 |
|
10 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
11 |
|
12 |
media-gfx/darktable/darktable-9999.ebuild | 68 ++++++++++++++++++++++++++----- |
13 |
1 file changed, 57 insertions(+), 11 deletions(-) |
14 |
|
15 |
diff --git a/media-gfx/darktable/darktable-9999.ebuild b/media-gfx/darktable/darktable-9999.ebuild |
16 |
index 94d8c657437..8405fd12551 100644 |
17 |
--- a/media-gfx/darktable/darktable-9999.ebuild |
18 |
+++ b/media-gfx/darktable/darktable-9999.ebuild |
19 |
@@ -3,25 +3,45 @@ |
20 |
|
21 |
EAPI=7 |
22 |
|
23 |
-inherit cmake flag-o-matic git-r3 toolchain-funcs xdg |
24 |
+LUA_COMPAT=( lua5-3 ) |
25 |
|
26 |
-EGIT_REPO_URI="https://github.com/darktable-org/${PN}.git" |
27 |
+inherit cmake flag-o-matic lua-single toolchain-funcs xdg |
28 |
|
29 |
DESCRIPTION="A virtual lighttable and darkroom for photographers" |
30 |
HOMEPAGE="https://www.darktable.org/" |
31 |
- |
32 |
LICENSE="GPL-3 CC-BY-3.0" |
33 |
SLOT="0" |
34 |
-#KEYWORDS="~amd64 ~arm64" |
35 |
-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" |
36 |
-IUSE="colord cups cpu_flags_x86_sse3 doc flickr geolocation gnome-keyring gphoto2 graphicsmagick jpeg2k kwallet |
37 |
- lto lua nls opencl openmp openexr tools webp |
38 |
+ |
39 |
+if [[ ${PV} == *9999 ]]; then |
40 |
+ inherit git-r3 |
41 |
+ EGIT_REPO_URI="https://github.com/darktable-org/${PN}.git" |
42 |
+ |
43 |
+ 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" |
44 |
+else |
45 |
+ DOC_PV="3.4.0" |
46 |
+ MY_PV="${PV/_/}" |
47 |
+ MY_P="${P/_/.}" |
48 |
+ |
49 |
+ SRC_URI="https://github.com/darktable-org/${PN}/releases/download/release-${MY_PV}/${MY_P}.tar.xz |
50 |
+ doc? ( https://github.com/darktable-org/${PN}/releases/download/release-${DOC_PV}/${PN}-usermanual.pdf -> ${PN}-usermanual-${DOC_PV}.pdf )" |
51 |
+ |
52 |
+ KEYWORDS="~amd64 ~arm64" |
53 |
+ LANGS=" af cs de es fi fr he hu it pl pt-BR ru sk sl" |
54 |
+fi |
55 |
+ |
56 |
+IUSE="avif colord cups cpu_flags_x86_sse3 doc flickr geolocation gmic gnome-keyring gphoto2 graphicsmagick jpeg2k kwallet |
57 |
+ lto lua nls opencl openmp openexr test tools webp |
58 |
${LANGS// / l10n_}" |
59 |
|
60 |
-BDEPEND=">=dev-python/jsonschema-3.2.0 |
61 |
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )" |
62 |
+ |
63 |
+RESTRICT="!test? ( test )" |
64 |
+ |
65 |
+BDEPEND=" |
66 |
dev-util/intltool |
67 |
virtual/pkgconfig |
68 |
nls? ( sys-devel/gettext ) |
69 |
+ test? ( >=dev-python/jsonschema-3.2.0 ) |
70 |
" |
71 |
COMMON_DEPEND=" |
72 |
dev-db/sqlite:3 |
73 |
@@ -41,14 +61,17 @@ COMMON_DEPEND=" |
74 |
x11-libs/cairo |
75 |
>=x11-libs/gtk+-3.22:3 |
76 |
x11-libs/pango |
77 |
+ avif? ( >=media-libs/libavif-0.8.2 ) |
78 |
colord? ( x11-libs/colord-gtk:0= ) |
79 |
cups? ( net-print/cups ) |
80 |
flickr? ( media-libs/flickcurl ) |
81 |
geolocation? ( >=sci-geosciences/osm-gps-map-1.1.0 ) |
82 |
+ gmic? ( media-gfx/gmic ) |
83 |
gnome-keyring? ( >=app-crypt/libsecret-0.18 ) |
84 |
gphoto2? ( media-libs/libgphoto2:= ) |
85 |
graphicsmagick? ( media-gfx/graphicsmagick ) |
86 |
jpeg2k? ( media-libs/openjpeg:2= ) |
87 |
+ lua? ( ${LUA_DEPS} ) |
88 |
opencl? ( virtual/opencl ) |
89 |
openexr? ( media-libs/openexr:0= ) |
90 |
webp? ( media-libs/libwebp:0= ) |
91 |
@@ -65,8 +88,12 @@ RDEPEND="${COMMON_DEPEND} |
92 |
|
93 |
PATCHES=( |
94 |
"${FILESDIR}"/"${PN}"-find-opencl-header.patch |
95 |
+ "${FILESDIR}"/${PN}-3.0.2_cmake-march-autodetection.patch |
96 |
+ "${FILESDIR}"/${PN}-3.4.0_jsonschema-automagic.patch |
97 |
) |
98 |
|
99 |
+S="${WORKDIR}/${P/_/~}" |
100 |
+ |
101 |
pkg_pretend() { |
102 |
if [[ ${MERGE_TYPE} != binary ]]; then |
103 |
# Bug #695658 |
104 |
@@ -81,6 +108,10 @@ pkg_pretend() { |
105 |
fi |
106 |
} |
107 |
|
108 |
+pkg_setup() { |
109 |
+ use lua && lua-single_pkg_setup |
110 |
+} |
111 |
+ |
112 |
src_prepare() { |
113 |
use cpu_flags_x86_sse3 && append-flags -msse3 |
114 |
|
115 |
@@ -90,17 +121,18 @@ src_prepare() { |
116 |
} |
117 |
|
118 |
src_configure() { |
119 |
- # TODO: switch to system Lua once 5.3 has been unmasked |
120 |
local mycmakeargs=( |
121 |
- -DDONT_USE_INTERNAL_LUA=OFF |
122 |
-DBUILD_CURVE_TOOLS=$(usex tools) |
123 |
-DBUILD_NOISE_TOOLS=$(usex tools) |
124 |
-DBUILD_PRINT=$(usex cups) |
125 |
-DCUSTOM_CFLAGS=ON |
126 |
+ -DDONT_USE_INTERNAL_LUA=ON |
127 |
-DRAWSPEED_ENABLE_LTO=$(usex lto) |
128 |
+ -DUSE_AVIF=$(usex avif) |
129 |
-DUSE_CAMERA_SUPPORT=$(usex gphoto2) |
130 |
-DUSE_COLORD=$(usex colord) |
131 |
-DUSE_FLICKR=$(usex flickr) |
132 |
+ -DUSE_GMIC=$(usex gmic) |
133 |
-DUSE_GRAPHICSMAGICK=$(usex graphicsmagick) |
134 |
-DUSE_KWALLET=$(usex kwallet) |
135 |
-DUSE_LIBSECRET=$(usex gnome-keyring) |
136 |
@@ -112,6 +144,7 @@ src_configure() { |
137 |
-DUSE_OPENJPEG=$(usex jpeg2k) |
138 |
-DUSE_OPENMP=$(usex openmp) |
139 |
-DUSE_WEBP=$(usex webp) |
140 |
+ -DWANT_JSON_VALIDATION=$(usex test) |
141 |
) |
142 |
CMAKE_BUILD_TYPE="RELWITHDEBINFO" |
143 |
cmake_src_configure |
144 |
@@ -119,9 +152,10 @@ src_configure() { |
145 |
|
146 |
src_install() { |
147 |
cmake_src_install |
148 |
+ # This USE flag is masked for -9999 |
149 |
use doc && dodoc "${DISTDIR}"/${PN}-usermanual-${DOC_PV}.pdf |
150 |
|
151 |
- if use nls ; then |
152 |
+ if use nls; then |
153 |
for lang in ${LANGS} ; do |
154 |
if ! use l10n_${lang}; then |
155 |
rm -r "${ED}"/usr/share/locale/${lang/-/_} || die |
156 |
@@ -129,3 +163,15 @@ src_install() { |
157 |
done |
158 |
fi |
159 |
} |
160 |
+ |
161 |
+pkg_postinst() { |
162 |
+ xdg_pkg_postinst |
163 |
+ |
164 |
+ elog |
165 |
+ elog "When updating a major version," |
166 |
+ elog "please bear in mind that your edits will be preserved during this process," |
167 |
+ elog "but it will not be possible to downgrade any more." |
168 |
+ elog |
169 |
+ ewarn "It will not be possible to downgrade!" |
170 |
+ ewarn |
171 |
+} |