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/
Date: Thu, 24 Dec 2020 13:10:41
Message-Id: 1608815069.11a24734848f33bf68f73be572452c1252764b60.marecki@gentoo
1 commit: 11a24734848f33bf68f73be572452c1252764b60
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 24 13:02:23 2020 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 24 13:04:29 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11a24734
7
8 media-gfx/darktable: restore 3.2.1-r1
9
10 That one was stable on amd64, my bad.
11
12 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
13
14 media-gfx/darktable/darktable-3.2.1-r1.ebuild | 160 ++++++++++++++++++++++++++
15 1 file changed, 160 insertions(+)
16
17 diff --git a/media-gfx/darktable/darktable-3.2.1-r1.ebuild b/media-gfx/darktable/darktable-3.2.1-r1.ebuild
18 new file mode 100644
19 index 00000000000..05d2a6634f2
20 --- /dev/null
21 +++ b/media-gfx/darktable/darktable-3.2.1-r1.ebuild
22 @@ -0,0 +1,160 @@
23 +# Copyright 1999-2020 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +
28 +LUA_COMPAT=( lua5-3 )
29 +
30 +inherit cmake flag-o-matic lua-single toolchain-funcs xdg
31 +
32 +DOC_PV="3.0.0"
33 +MY_PV="${PV/_/}"
34 +MY_P="${P/_/.}"
35 +
36 +DESCRIPTION="A virtual lighttable and darkroom for photographers"
37 +HOMEPAGE="https://www.darktable.org/"
38 +SRC_URI="https://github.com/darktable-org/${PN}/releases/download/release-${MY_PV}/${MY_P}.tar.xz
39 + doc? ( https://github.com/darktable-org/${PN}/releases/download/release-${DOC_PV}/${PN}-usermanual.pdf -> ${PN}-usermanual-${DOC_PV}.pdf )"
40 +
41 +LICENSE="GPL-3 CC-BY-3.0"
42 +SLOT="0"
43 +KEYWORDS="amd64 ~arm64"
44 +LANGS=" de es fr he it pl pt-BR ru sl"
45 +IUSE="colord cups cpu_flags_x86_sse3 doc flickr geolocation gnome-keyring gphoto2 graphicsmagick jpeg2k kwallet
46 + lto lua nls opencl openmp openexr system-lua tools webp
47 + ${LANGS// / l10n_}"
48 +
49 +REQUIRED_USE="system-lua? ( lua ${LUA_REQUIRED_USE} )"
50 +
51 +BDEPEND="
52 + dev-util/intltool
53 + virtual/pkgconfig
54 + nls? ( sys-devel/gettext )
55 +"
56 +COMMON_DEPEND="
57 + dev-db/sqlite:3
58 + dev-libs/json-glib
59 + dev-libs/libxml2:2
60 + >=dev-libs/pugixml-1.8:0=
61 + gnome-base/librsvg:2
62 + >=media-gfx/exiv2-0.25-r2:0=[xmp]
63 + media-libs/lcms:2
64 + >=media-libs/lensfun-0.2.3:0=
65 + media-libs/libpng:0=
66 + media-libs/tiff:0
67 + net-libs/libsoup:2.4
68 + net-misc/curl
69 + sys-libs/zlib:=
70 + virtual/jpeg:0
71 + x11-libs/cairo
72 + >=x11-libs/gtk+-3.22:3
73 + x11-libs/pango
74 + colord? ( x11-libs/colord-gtk:0= )
75 + cups? ( net-print/cups )
76 + flickr? ( media-libs/flickcurl )
77 + geolocation? ( >=sci-geosciences/osm-gps-map-1.1.0 )
78 + gnome-keyring? ( >=app-crypt/libsecret-0.18 )
79 + gphoto2? ( media-libs/libgphoto2:= )
80 + graphicsmagick? ( media-gfx/graphicsmagick )
81 + jpeg2k? ( media-libs/openjpeg:2= )
82 + opencl? ( virtual/opencl )
83 + openexr? ( media-libs/openexr:0= )
84 + system-lua? ( ${LUA_DEPS} )
85 + webp? ( media-libs/libwebp:0= )
86 +"
87 +DEPEND="${COMMON_DEPEND}
88 + opencl? (
89 + >=sys-devel/clang-4
90 + >=sys-devel/llvm-4
91 + )
92 +"
93 +RDEPEND="${COMMON_DEPEND}
94 + kwallet? ( >=kde-frameworks/kwallet-5.34.0-r1 )
95 +"
96 +
97 +PATCHES=(
98 + "${FILESDIR}"/"${PN}"-find-opencl-header.patch
99 + "${FILESDIR}"/${PN}-3.0.2_cmake-march-autodetection.patch
100 + "${FILESDIR}"/${PN}-3.0.2_jsonschema-automagic.patch
101 +)
102 +
103 +S="${WORKDIR}/${P/_/~}"
104 +
105 +pkg_pretend() {
106 + if [[ ${MERGE_TYPE} != binary ]]; then
107 + # Bug #695658
108 + if tc-is-gcc; then
109 + test-flags-CC -floop-block &> /dev/null || \
110 + die "Please switch to a gcc version built with USE=graphite"
111 + fi
112 +
113 + if use openmp ; then
114 + tc-has-openmp || die "Please switch to an openmp compatible compiler"
115 + fi
116 + fi
117 +}
118 +
119 +src_prepare() {
120 + use cpu_flags_x86_sse3 && append-flags -msse3
121 +
122 + sed -i -e 's:/appdata:/metainfo:g' data/CMakeLists.txt || die
123 +
124 + cmake_src_prepare
125 +}
126 +
127 +src_configure() {
128 + # As of darktable-3.2.1, AVIF support is not compatible with >=media-libs/libavif-0.8.0; see Bug #751352.
129 + # GMIC support mostly works but there are several problems with the media-gfx/gmic ebuilds currently
130 + # in the tree, and the package itself has got no maintainer.
131 + local mycmakeargs=(
132 + -DBUILD_CURVE_TOOLS=$(usex tools)
133 + -DBUILD_NOISE_TOOLS=$(usex tools)
134 + -DBUILD_PRINT=$(usex cups)
135 + -DCUSTOM_CFLAGS=ON
136 + -DDONT_USE_INTERNAL_LUA=$(usex system-lua)
137 + -DRAWSPEED_ENABLE_LTO=$(usex lto)
138 + -DUSE_AVIF=no
139 + -DUSE_CAMERA_SUPPORT=$(usex gphoto2)
140 + -DUSE_COLORD=$(usex colord)
141 + -DUSE_FLICKR=$(usex flickr)
142 + -DUSE_GMIC=no
143 + -DUSE_GRAPHICSMAGICK=$(usex graphicsmagick)
144 + -DUSE_KWALLET=$(usex kwallet)
145 + -DUSE_LIBSECRET=$(usex gnome-keyring)
146 + -DUSE_LUA=$(usex lua)
147 + -DUSE_MAP=$(usex geolocation)
148 + -DUSE_NLS=$(usex nls)
149 + -DUSE_OPENCL=$(usex opencl)
150 + -DUSE_OPENEXR=$(usex openexr)
151 + -DUSE_OPENJPEG=$(usex jpeg2k)
152 + -DUSE_OPENMP=$(usex openmp)
153 + -DUSE_WEBP=$(usex webp)
154 + )
155 + CMAKE_BUILD_TYPE="RELWITHDEBINFO"
156 + cmake_src_configure
157 +}
158 +
159 +src_install() {
160 + cmake_src_install
161 + use doc && dodoc "${DISTDIR}"/${PN}-usermanual-${DOC_PV}.pdf
162 +
163 + if use nls ; then
164 + for lang in ${LANGS} ; do
165 + if ! use l10n_${lang}; then
166 + rm -r "${ED}"/usr/share/locale/${lang/-/_} || die
167 + fi
168 + done
169 + fi
170 +}
171 +
172 +pkg_postinst() {
173 + xdg_pkg_postinst
174 +
175 + elog
176 + elog "When updating a major version,"
177 + elog "please bear in mind that your edits will be preserved during this process,"
178 + elog "but it will not be possible to downgrade any more."
179 + elog
180 + ewarn "It will not be possible to downgrade!"
181 + ewarn
182 +}