media-gfx/darktable: + AVIF support, - bundled liblua, unified release/live structure

Signed-off-by: Marek Szuba <marecki@gentoo.org>
This commit is contained in:
Marek Szuba
2020-12-26 23:18:16 +00:00
parent ecd2764588
commit dd47c8a2ca
3 changed files with 62 additions and 18 deletions
@@ -7,29 +7,41 @@ LUA_COMPAT=( lua5-3 )
inherit cmake flag-o-matic lua-single toolchain-funcs xdg
DOC_PV="3.4.0"
MY_PV="${PV/_/}"
MY_P="${P/_/.}"
DESCRIPTION="A virtual lighttable and darkroom for photographers"
HOMEPAGE="https://www.darktable.org/"
SRC_URI="https://github.com/darktable-org/${PN}/releases/download/release-${MY_PV}/${MY_P}.tar.xz
doc? ( https://github.com/darktable-org/${PN}/releases/download/release-${DOC_PV}/${PN}-usermanual.pdf -> ${PN}-usermanual-${DOC_PV}.pdf )"
LICENSE="GPL-3 CC-BY-3.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
LANGS=" af cs de es fi fr he hu it pl pt-BR ru sk sl"
IUSE="colord cups cpu_flags_x86_sse3 doc flickr geolocation gmic gnome-keyring gphoto2 graphicsmagick jpeg2k kwallet
lto lua nls opencl openmp openexr system-lua tools webp
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/darktable-org/${PN}.git"
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"
else
DOC_PV="3.4.0"
MY_PV="${PV/_/}"
MY_P="${P/_/.}"
SRC_URI="https://github.com/darktable-org/${PN}/releases/download/release-${MY_PV}/${MY_P}.tar.xz
doc? ( https://github.com/darktable-org/${PN}/releases/download/release-${DOC_PV}/${PN}-usermanual.pdf -> ${PN}-usermanual-${DOC_PV}.pdf )"
KEYWORDS="~amd64 ~arm64"
LANGS=" af cs de es fi fr he hu it pl pt-BR ru sk sl"
fi
IUSE="avif colord cups cpu_flags_x86_sse3 doc flickr geolocation gmic gnome-keyring gphoto2 graphicsmagick jpeg2k kwallet
lto lua nls opencl openmp openexr test tools webp
${LANGS// / l10n_}"
REQUIRED_USE="system-lua? ( lua ${LUA_REQUIRED_USE} )"
REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
BDEPEND="
dev-util/intltool
virtual/pkgconfig
nls? ( sys-devel/gettext )
test? ( >=dev-python/jsonschema-3.2.0 )
"
COMMON_DEPEND="
dev-db/sqlite:3
@@ -49,6 +61,7 @@ COMMON_DEPEND="
x11-libs/cairo
>=x11-libs/gtk+-3.22:3
x11-libs/pango
avif? ( >=media-libs/libavif-0.8.2 )
colord? ( x11-libs/colord-gtk:0= )
cups? ( net-print/cups )
flickr? ( media-libs/flickcurl )
@@ -58,9 +71,9 @@ COMMON_DEPEND="
gphoto2? ( media-libs/libgphoto2:= )
graphicsmagick? ( media-gfx/graphicsmagick )
jpeg2k? ( media-libs/openjpeg:2= )
lua? ( ${LUA_DEPS} )
opencl? ( virtual/opencl )
openexr? ( media-libs/openexr:0= )
system-lua? ( ${LUA_DEPS} )
webp? ( media-libs/libwebp:0= )
"
DEPEND="${COMMON_DEPEND}
@@ -76,7 +89,7 @@ RDEPEND="${COMMON_DEPEND}
PATCHES=(
"${FILESDIR}"/"${PN}"-find-opencl-header.patch
"${FILESDIR}"/${PN}-3.0.2_cmake-march-autodetection.patch
"${FILESDIR}"/${PN}-3.0.2_jsonschema-automagic.patch
"${FILESDIR}"/${PN}-3.4.0_jsonschema-automagic.patch
)
S="${WORKDIR}/${P/_/~}"
@@ -95,6 +108,10 @@ pkg_pretend() {
fi
}
pkg_setup() {
use lua && lua-single_pkg_setup
}
src_prepare() {
use cpu_flags_x86_sse3 && append-flags -msse3
@@ -104,15 +121,14 @@ src_prepare() {
}
src_configure() {
# As of darktable-3.2.1, AVIF support is not compatible with >=media-libs/libavif-0.8.0; see Bug #751352.
local mycmakeargs=(
-DBUILD_CURVE_TOOLS=$(usex tools)
-DBUILD_NOISE_TOOLS=$(usex tools)
-DBUILD_PRINT=$(usex cups)
-DCUSTOM_CFLAGS=ON
-DDONT_USE_INTERNAL_LUA=$(usex system-lua)
-DDONT_USE_INTERNAL_LUA=ON
-DRAWSPEED_ENABLE_LTO=$(usex lto)
-DUSE_AVIF=no
-DUSE_AVIF=$(usex avif)
-DUSE_CAMERA_SUPPORT=$(usex gphoto2)
-DUSE_COLORD=$(usex colord)
-DUSE_FLICKR=$(usex flickr)
@@ -128,6 +144,7 @@ src_configure() {
-DUSE_OPENJPEG=$(usex jpeg2k)
-DUSE_OPENMP=$(usex openmp)
-DUSE_WEBP=$(usex webp)
-DWANT_JSON_VALIDATION=$(usex test)
)
CMAKE_BUILD_TYPE="RELWITHDEBINFO"
cmake_src_configure
@@ -135,9 +152,10 @@ src_configure() {
src_install() {
cmake_src_install
# This USE flag is masked for -9999
use doc && dodoc "${DISTDIR}"/${PN}-usermanual-${DOC_PV}.pdf
if use nls ; then
if use nls; then
for lang in ${LANGS} ; do
if ! use l10n_${lang}; then
rm -r "${ED}"/usr/share/locale/${lang/-/_} || die
@@ -0,0 +1,25 @@
jsonschema is only used at install time to validate a file that release
tarballs already include, treat running it as a late part of tests.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -350,6 +350,9 @@
endif()
# we need jsonschema to check noiseprofiles.json
+# In case of Git clones this file is generated at build time, for releases
+# it is included in the tarball.
+if (WANT_JSON_VALIDATION)
find_program(jsonschema_BIN jsonschema)
if(${jsonschema_BIN} STREQUAL "jsonschema_BIN-NOTFOUND")
message(STATUS "Missing jsonschema, problems in noiseprofiles.json might go unnoticed")
@@ -358,6 +361,9 @@
message(STATUS "Found jsonschema")
set(VALIDATE_JSON 1)
endif(${jsonschema_BIN} STREQUAL "jsonschema_BIN-NOTFOUND")
+else()
+ set(VALIDATE_JSON 0)
+endif()
# we need an XSLT interpreter to generate preferences_gen.h and darktablerc
find_program(Xsltproc_BIN xsltproc)
+1
View File
@@ -10,6 +10,7 @@
<name>Markus Meier</name>
</maintainer>
<use>
<flag name="avif">Support importing and exporting AVIF images</flag>
<flag name="flickr">Add support for uploading photos to flickr</flag>
<flag name="geolocation">Enable geotagging support</flag>
<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>