summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2020-12-26 23:14:19 +0000
committerMarek Szuba <marecki@gentoo.org>2020-12-26 23:18:26 +0000
commitb94a2b6d3df467544fb0b3257e30e2245737049a (patch)
tree7dd460e452296421beeae60963d4b80553966d40 /media-gfx
parentprofiles/base/package.use.mask: mask =media-gfx/darktable-9999[doc] (diff)
downloadgentoo-b94a2b6d3df467544fb0b3257e30e2245737049a.tar.gz
gentoo-b94a2b6d3df467544fb0b3257e30e2245737049a.tar.bz2
gentoo-b94a2b6d3df467544fb0b3257e30e2245737049a.zip
media-gfx/darktable: update the live ebuild
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/darktable/darktable-9999.ebuild68
1 files changed, 57 insertions, 11 deletions
diff --git a/media-gfx/darktable/darktable-9999.ebuild b/media-gfx/darktable/darktable-9999.ebuild
index 94d8c6574379..8405fd125512 100644
--- a/media-gfx/darktable/darktable-9999.ebuild
+++ b/media-gfx/darktable/darktable-9999.ebuild
@@ -3,25 +3,45 @@
EAPI=7
-inherit cmake flag-o-matic git-r3 toolchain-funcs xdg
+LUA_COMPAT=( lua5-3 )
-EGIT_REPO_URI="https://github.com/darktable-org/${PN}.git"
+inherit cmake flag-o-matic lua-single toolchain-funcs xdg
DESCRIPTION="A virtual lighttable and darkroom for photographers"
HOMEPAGE="https://www.darktable.org/"
-
LICENSE="GPL-3 CC-BY-3.0"
SLOT="0"
-#KEYWORDS="~amd64 ~arm64"
-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"
-IUSE="colord cups cpu_flags_x86_sse3 doc flickr geolocation gnome-keyring gphoto2 graphicsmagick jpeg2k kwallet
- lto lua nls opencl openmp openexr 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_}"
-BDEPEND=">=dev-python/jsonschema-3.2.0
+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
@@ -41,14 +61,17 @@ 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 )
geolocation? ( >=sci-geosciences/osm-gps-map-1.1.0 )
+ gmic? ( media-gfx/gmic )
gnome-keyring? ( >=app-crypt/libsecret-0.18 )
gphoto2? ( media-libs/libgphoto2:= )
graphicsmagick? ( media-gfx/graphicsmagick )
jpeg2k? ( media-libs/openjpeg:2= )
+ lua? ( ${LUA_DEPS} )
opencl? ( virtual/opencl )
openexr? ( media-libs/openexr:0= )
webp? ( media-libs/libwebp:0= )
@@ -65,8 +88,12 @@ RDEPEND="${COMMON_DEPEND}
PATCHES=(
"${FILESDIR}"/"${PN}"-find-opencl-header.patch
+ "${FILESDIR}"/${PN}-3.0.2_cmake-march-autodetection.patch
+ "${FILESDIR}"/${PN}-3.4.0_jsonschema-automagic.patch
)
+S="${WORKDIR}/${P/_/~}"
+
pkg_pretend() {
if [[ ${MERGE_TYPE} != binary ]]; then
# Bug #695658
@@ -81,6 +108,10 @@ pkg_pretend() {
fi
}
+pkg_setup() {
+ use lua && lua-single_pkg_setup
+}
+
src_prepare() {
use cpu_flags_x86_sse3 && append-flags -msse3
@@ -90,17 +121,18 @@ src_prepare() {
}
src_configure() {
- # TODO: switch to system Lua once 5.3 has been unmasked
local mycmakeargs=(
- -DDONT_USE_INTERNAL_LUA=OFF
-DBUILD_CURVE_TOOLS=$(usex tools)
-DBUILD_NOISE_TOOLS=$(usex tools)
-DBUILD_PRINT=$(usex cups)
-DCUSTOM_CFLAGS=ON
+ -DDONT_USE_INTERNAL_LUA=ON
-DRAWSPEED_ENABLE_LTO=$(usex lto)
+ -DUSE_AVIF=$(usex avif)
-DUSE_CAMERA_SUPPORT=$(usex gphoto2)
-DUSE_COLORD=$(usex colord)
-DUSE_FLICKR=$(usex flickr)
+ -DUSE_GMIC=$(usex gmic)
-DUSE_GRAPHICSMAGICK=$(usex graphicsmagick)
-DUSE_KWALLET=$(usex kwallet)
-DUSE_LIBSECRET=$(usex gnome-keyring)
@@ -112,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
@@ -119,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
@@ -129,3 +163,15 @@ src_install() {
done
fi
}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ elog
+ elog "When updating a major version,"
+ elog "please bear in mind that your edits will be preserved during this process,"
+ elog "but it will not be possible to downgrade any more."
+ elog
+ ewarn "It will not be possible to downgrade!"
+ ewarn
+}