graphics/upscaler: add new port

Upscaler is a GTK4 + libadwaita application that allows you to upscale
and enhance a given image. It is a front-end for Real-ESRGAN ncnn Vulkan.

https://gitlab.com/TheEvilSkeleton/Upscaler
(cherry picked from commit 4b15a96231)
This commit is contained in:
Jan Beich 2022-12-10 21:01:05 +00:00
parent ba2be1158c
commit 15b2d393d2
6 changed files with 67 additions and 0 deletions

View File

@ -1123,6 +1123,7 @@
SUBDIR += tweeny
SUBDIR += ufraw
SUBDIR += unpaper
SUBDIR += upscaler
SUBDIR += urho3d
SUBDIR += urt
SUBDIR += vapoursynth-fmtconv

View File

@ -0,0 +1,27 @@
PORTNAME= upscaler
DISTVERSION= 1.1.2
CATEGORIES= graphics
MAINTAINER= jbeich@FreeBSD.org
COMMENT= Upscale and enhance images
WWW= https://gitlab.com/TheEvilSkeleton/Upscaler
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= blueprint-compiler:devel/blueprint-compiler
RUN_DEPENDS= realesrgan-ncnn-vulkan:graphics/realesrgan-ncnn-vulkan
USES= desktop-file-utils gettext-tools gnome meson python
USE_GITLAB= yes
USE_GNOME= gtk40 libadwaita pygobject3
GL_ACCOUNT= TheEvilSkeleton
GL_PROJECT= Upscaler
GL_COMMIT= 5aaab9ccaf56b3c7a0eb7d1dbba372d8ff970d69
GLIB_SCHEMAS= io.gitlab.theevilskeleton.Upscaler.gschema.xml
post-patch:
# Derive Python version from Meson
@${REINPLACE_CMD} -e "s,'python3',," ${WRKSRC}/${PORTNAME}/meson.build
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1670706065
SHA256 (TheEvilSkeleton-Upscaler-5aaab9ccaf56b3c7a0eb7d1dbba372d8ff970d69_GL0.tar.gz) = d92ad00e1e652c543ae5e819c6ef0f72d4348e4014013344c75e49275048d25a
SIZE (TheEvilSkeleton-Upscaler-5aaab9ccaf56b3c7a0eb7d1dbba372d8ff970d69_GL0.tar.gz) = 130006

View File

@ -0,0 +1,14 @@
Avoid spurious error "Algorithm failed" as poll() returns None when
the subprocess hasn't finished yet.
--- upscaler/window.py.orig 2022-12-10 21:01:05 UTC
+++ upscaler/window.py
@@ -203,7 +203,7 @@ class UpscalerWindow(Adw.ApplicationWindow):
bad = True
continue
""" Process algorithm output. """
- result = self.process.poll()
+ result = self.process.wait(1)
if result != 0:
raise AlgorithmFailed(result, output)
if bad:

View File

@ -0,0 +1,2 @@
Upscaler is a GTK4 + libadwaita application that allows you to upscale
and enhance a given image. It is a front-end for Real-ESRGAN ncnn Vulkan.

View File

@ -0,0 +1,20 @@
bin/upscaler
share/applications/io.gitlab.theevilskeleton.Upscaler.desktop
share/icons/hicolor/scalable/apps/io.gitlab.theevilskeleton.Upscaler.svg
share/icons/hicolor/symbolic/apps/io.gitlab.theevilskeleton.Upscaler-symbolic.svg
share/locale/de/LC_MESSAGES/upscaler.mo
share/locale/fr/LC_MESSAGES/upscaler.mo
share/locale/id/LC_MESSAGES/upscaler.mo
share/locale/it/LC_MESSAGES/upscaler.mo
share/locale/nl/LC_MESSAGES/upscaler.mo
share/locale/ru/LC_MESSAGES/upscaler.mo
share/locale/tr/LC_MESSAGES/upscaler.mo
share/metainfo/io.gitlab.theevilskeleton.Upscaler.metainfo.xml
%%DATADIR%%/upscaler.gresource
%%DATADIR%%/upscaler/__init__.py
%%DATADIR%%/upscaler/app_profile.py
%%DATADIR%%/upscaler/file_chooser.py
%%DATADIR%%/upscaler/filters.py
%%DATADIR%%/upscaler/main.py
%%DATADIR%%/upscaler/threading.py
%%DATADIR%%/upscaler/window.py