* [gentoo-commits] repo/gentoo:master commit in: media-gfx/hydrus/files/, media-gfx/hydrus/
@ 2021-05-31 14:11 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2021-05-31 14:11 UTC (permalink / raw
To: gentoo-commits
commit: 964d7dde6015ceb12521877cab13a918d00cbfed
Author: Ekaterina Vaartis <vaartis <AT> kotobank <DOT> ch>
AuthorDate: Fri May 7 15:01:51 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 31 14:11:32 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=964d7dde
media-gfx/hydrus: New package
Signed-off-by: Ekaterina Vaartis <vaartis <AT> kotobank.ch>
Closes: https://github.com/gentoo/gentoo/pull/20720
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/hydrus/Manifest | 1 +
media-gfx/hydrus/files/hydrus-client | 3 +
media-gfx/hydrus/files/hydrus-server | 2 +
.../hydrus/files/userpath-in-local-share.patch | 12 ++
media-gfx/hydrus/hydrus-441.ebuild | 156 +++++++++++++++++++++
media-gfx/hydrus/metadata.xml | 26 ++++
6 files changed, 200 insertions(+)
diff --git a/media-gfx/hydrus/Manifest b/media-gfx/hydrus/Manifest
new file mode 100644
index 00000000000..0265c837b47
--- /dev/null
+++ b/media-gfx/hydrus/Manifest
@@ -0,0 +1 @@
+DIST hydrus-441.tar.gz 38807432 BLAKE2B e8294a8eb4d808792f2ff50ad4776f078ba1003962b065883ec22fd68f46dc250b2bccf47005731fcc964b75e07977aed45023da1c7e4513fcfcc29d1b4d1a97 SHA512 81eeb59006644b9b33c33c8da3e003640116488509ce2e1426d2a5c0161adf208e31a45c2a5efc2902769bf91e3db56aabc6384f77e8354e0e113bcc6df3a131
diff --git a/media-gfx/hydrus/files/hydrus-client b/media-gfx/hydrus/files/hydrus-client
new file mode 100644
index 00000000000..7a6e42747c5
--- /dev/null
+++ b/media-gfx/hydrus/files/hydrus-client
@@ -0,0 +1,3 @@
+#!/bin/sh
+export QT_API="${QT_API:-pyside2}"
+exec /usr/bin/python -OO /opt/hydrus/client.pyw "$@"
diff --git a/media-gfx/hydrus/files/hydrus-server b/media-gfx/hydrus/files/hydrus-server
new file mode 100644
index 00000000000..cecb9adc1a2
--- /dev/null
+++ b/media-gfx/hydrus/files/hydrus-server
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/python -OO /opt/hydrus/server.py "$@"
diff --git a/media-gfx/hydrus/files/userpath-in-local-share.patch b/media-gfx/hydrus/files/userpath-in-local-share.patch
new file mode 100644
index 00000000000..8b4c12be071
--- /dev/null
+++ b/media-gfx/hydrus/files/userpath-in-local-share.patch
@@ -0,0 +1,12 @@
+diff --git a/hydrus/core/HydrusConstants.py b/hydrus/core/HydrusConstants.py
+index 05fff23..d68fc06 100644
+--- a/hydrus/core/HydrusConstants.py
++++ b/hydrus/core/HydrusConstants.py
+@@ -67,6 +67,7 @@ if USERPATH_DB_DIR == desired_userpath_db_dir:
+
+ USERPATH_DB_DIR = None
+
++USERPATH_DB_DIR = os.path.expanduser ( os.path.join( '~', '.local', 'share', 'hydrus', 'db' ) )
+
+ LICENSE_PATH = os.path.join( BASE_DIR, 'license.txt' )
+
diff --git a/media-gfx/hydrus/hydrus-441.ebuild b/media-gfx/hydrus/hydrus-441.ebuild
new file mode 100644
index 00000000000..ae3f806847c
--- /dev/null
+++ b/media-gfx/hydrus/hydrus-441.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..8} )
+PYTHON_REQ_USE="sqlite"
+
+inherit python-single-r1 desktop optfeature
+
+DESCRIPTION="A booru-like media organizer for the desktop"
+HOMEPAGE="http://hydrusnetwork.github.io/hydrus/ https://github.com/hydrusnetwork/hydrus"
+SRC_URI="https://github.com/hydrusnetwork/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+# hydrus itself is WTFPL
+# icons included are CC-BY-2.5
+LICENSE="WTFPL-2 CC-BY-2.5"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+mpv +ffmpeg +lz4 socks +cloudscraper charts test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/chardet[${PYTHON_MULTI_USEDEP}]
+ dev-python/html5lib[${PYTHON_MULTI_USEDEP}]
+ dev-python/lxml[${PYTHON_MULTI_USEDEP}]
+ dev-python/numpy[${PYTHON_MULTI_USEDEP}]
+ dev-python/pillow[${PYTHON_MULTI_USEDEP}]
+ dev-python/psutil[${PYTHON_MULTI_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_MULTI_USEDEP}]
+ dev-python/pyside2[widgets,gui,charts?,${PYTHON_MULTI_USEDEP}]
+ dev-python/pyyaml[${PYTHON_MULTI_USEDEP}]
+ dev-python/requests[${PYTHON_MULTI_USEDEP}]
+ dev-python/send2trash[${PYTHON_MULTI_USEDEP}]
+ dev-python/service_identity[${PYTHON_MULTI_USEDEP}]
+ dev-python/six[${PYTHON_MULTI_USEDEP}]
+ dev-python/twisted[${PYTHON_MULTI_USEDEP}]
+ media-libs/opencv[python,${PYTHON_MULTI_USEDEP}]
+
+ >=dev-python/QtPy-1.9.0-r4[pyside2,${PYTHON_MULTI_USEDEP}]
+ dev-python/beautifulsoup:4[${PYTHON_MULTI_USEDEP}]
+
+ cloudscraper? ( dev-python/cloudscraper[${PYTHON_MULTI_USEDEP}] )
+ ffmpeg? ( media-video/ffmpeg )
+ lz4? ( dev-python/lz4[${PYTHON_MULTI_USEDEP}] )
+ mpv? (
+ media-video/mpv[libmpv,${PYTHON_MULTI_USEDEP}]
+ dev-python/python-mpv[${PYTHON_MULTI_USEDEP}]
+ )
+ socks? (
+ || ( dev-python/requests[socks5,${PYTHON_MULTI_USEDEP}]
+ dev-python/PySocks[${PYTHON_MULTI_USEDEP}] )
+ )
+ ')
+"
+BDEPEND="
+ ${RDEPEND}
+ $(python_gen_cond_dep '
+ test? (
+ dev-python/httmock[${PYTHON_MULTI_USEDEP}]
+ dev-python/mock[${PYTHON_MULTI_USEDEP}]
+ dev-python/nose[${PYTHON_MULTI_USEDEP}]
+ dev-python/unittest2[${PYTHON_MULTI_USEDEP}]
+ )
+ ')
+"
+
+PATCHES=(
+ "${FILESDIR}/userpath-in-local-share.patch"
+)
+
+# Delete files only needed for testing
+delete_test_files() {
+ rm test.py || die
+ rm hydrus/hydrus_test.py || die
+ rm -r hydrus/test/ || die
+ rm -r static/testing/ || die
+}
+
+src_prepare() {
+ default
+
+ # If tests will run, leave the files until tests are run.
+ # They will be deleted before installing the package.
+ if ! use test; then
+ delete_test_files
+ fi
+
+ # Contains pre-built binaries for other systems and a broken swf renderer for linux
+ rm -r bin/ || die
+ # Build files used for CI, not actually needed
+ rm -r static/build_files || die
+ # Duplicate license file, not needed
+ rm license.txt || die
+ # Python requirements files, not needed
+ rm requirements_*.txt || die
+}
+
+src_compile() {
+ python_optimize "${S}"
+}
+
+src_test() {
+ # The tests use unittest, but are run with a custom runner script.
+ # QT_QPA_PLATFORM is required to make them run without X
+ export QT_QPA_PLATFORM=offscreen
+ "${EPYTHON}" "${S}/test.py" || die "Tests failed"
+}
+
+src_install() {
+ local DOC="${EPREFIX}/usr/share/doc/${PF}"
+ elog "Hydrus includes an excellent manual, that can either be viewed at"
+ elog "${DOC}/html/help/index.html"
+ elog "or accessed through the hydrus help menu."
+
+ mv "help my client will not boot.txt" "help_my_client_will_not_boot.txt" || die
+
+ DOCS=(COPYING README.md Readme.txt help_my_client_will_not_boot.txt db/)
+ HTML_DOCS=("${S}"/help/)
+ einstalldocs
+
+ if use test; then
+ # Delete files only needed for tests now. No need to install them.
+ # If the tests didn't run, the files have been deleted already.
+ delete_test_files
+ fi
+
+ # These files are copied into DOC
+ rm COPYING README.md Readme.txt help_my_client_will_not_boot.txt || die
+ rm -r help/ db/ || die
+ # The program expects to find documentation here, so add a symlink to DOC
+ ln -s "${DOC}/html/help" help || die
+
+ insopts -m0755
+ insinto /opt/hydrus
+ doins -r "${S}"/*
+
+ exeinto /usr/bin
+
+ sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-server" > "${T}/hydrus-server" || die
+ sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-client" > "${T}/hydrus-client" || die
+
+ python_doexe "${T}/hydrus-server"
+ python_doexe "${T}/hydrus-client"
+
+ make_desktop_entry "hydrus-client" "Hydrus Client" "/opt/hydrus/static/hydrus_non-transparent.png"\
+ "AudioVideo;FileTools;Graphics;Network;"
+}
+
+pkg_postinst() {
+ optfeature "support for automatic port forwarding" "net-libs/miniupnpc"
+}
diff --git a/media-gfx/hydrus/metadata.xml b/media-gfx/hydrus/metadata.xml
new file mode 100644
index 00000000000..0b2b3b92808
--- /dev/null
+++ b/media-gfx/hydrus/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>vaartis@kotobank.ch</email>
+ <name>Ekaterina Vaartis</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ The hydrus network client is an application written for those who have large image/swf/webm collections. It browses
+ with tags instead of folders, a little like a booru on your desktop. Advanced users can share tags and files
+ anonymously through custom servers that any user may run
+ </longdescription>
+ <use>
+ <flag name="charts">Support for bandwidth charts</flag>
+ <flag name="cloudscraper">Support working around cloudflare anti-bot page</flag>
+ <flag name="ffmpeg">Show duration and other information on video thumbnails</flag>
+ <flag name="lz4">Enable memory compression in the client</flag>
+ <flag name="mpv">Support playing videos with libmpv</flag>
+ <flag name="socks">Support SOCKS proxies</flag>
+ </use>
+ <stabilize-allarches/>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/hydrus/files/, media-gfx/hydrus/
@ 2021-06-05 12:36 Michał Górny
0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2021-06-05 12:36 UTC (permalink / raw
To: gentoo-commits
commit: 46ae38a7e0e44aef269a444bab234ee200e6f080
Author: Ekaterina Vaartis <vaartis <AT> kotobank <DOT> ch>
AuthorDate: Thu Jun 3 08:15:35 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jun 5 12:36:15 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46ae38a7
media-gfx/hydrus: Update to 442 + upnpc fix
Signed-off-by: Ekaterina Vaartis <vaartis <AT> kotobank.ch>
Closes: https://github.com/gentoo/gentoo/pull/21100
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
media-gfx/hydrus/Manifest | 1 +
media-gfx/hydrus/files/test-exitcode.patch | 36 ++++++++++++
media-gfx/hydrus/files/upnpc.patch | 40 +++++++++++++
.../{hydrus-441.ebuild => hydrus-441-r1.ebuild} | 68 ++++++++--------------
.../{hydrus-441.ebuild => hydrus-442.ebuild} | 68 ++++++++--------------
5 files changed, 125 insertions(+), 88 deletions(-)
diff --git a/media-gfx/hydrus/Manifest b/media-gfx/hydrus/Manifest
index 0265c837b47..667917701ae 100644
--- a/media-gfx/hydrus/Manifest
+++ b/media-gfx/hydrus/Manifest
@@ -1 +1,2 @@
DIST hydrus-441.tar.gz 38807432 BLAKE2B e8294a8eb4d808792f2ff50ad4776f078ba1003962b065883ec22fd68f46dc250b2bccf47005731fcc964b75e07977aed45023da1c7e4513fcfcc29d1b4d1a97 SHA512 81eeb59006644b9b33c33c8da3e003640116488509ce2e1426d2a5c0161adf208e31a45c2a5efc2902769bf91e3db56aabc6384f77e8354e0e113bcc6df3a131
+DIST hydrus-442.tar.gz 38818985 BLAKE2B 955f5d9969bd46184fbf5fb11b1bc17257d184acd34a9533a20bc35e20ff5cabcc3715ebbb39f42b926b8b00f570c7f483eed3b11472c78f82b9ceeafc3dc765 SHA512 5a78338426127b276b067b52f590e275e132ea2676a4933162183e183a015556351e13e55271240059a145627d8a2ce1f6fe1a07ef267580604e998328c5c4f6
diff --git a/media-gfx/hydrus/files/test-exitcode.patch b/media-gfx/hydrus/files/test-exitcode.patch
new file mode 100644
index 00000000000..d61d341ee1e
--- /dev/null
+++ b/media-gfx/hydrus/files/test-exitcode.patch
@@ -0,0 +1,36 @@
+diff --git a/hydrus/hydrus_test.py b/hydrus/hydrus_test.py
+index 3504c9c..7f95af8 100644
+--- a/hydrus/hydrus_test.py
++++ b/hydrus/hydrus_test.py
+@@ -91,6 +91,9 @@ def boot():
+ if sys.stdin.isatty():
+
+ input( 'Press any key to exit.' )
++ else:
+
++ success = 0 if controller.was_successful else 1
++ sys.exit(success)
+
+
+diff --git a/hydrus/test/TestController.py b/hydrus/test/TestController.py
+index 0c43440..7e6c5ef 100644
+--- a/hydrus/test/TestController.py
++++ b/hydrus/test/TestController.py
+@@ -168,7 +168,6 @@ only_run = None
+ class Controller( object ):
+
+ def __init__( self, win, only_run ):
+-
+ self.app = win
+ self.win = win
+ self.only_run = only_run
+@@ -827,8 +826,7 @@ class Controller( object ):
+ def do_it():
+
+ try:
+-
+- runner.run( suite )
++ self.was_successful = runner.run( suite ).wasSuccessful()
+
+ finally:
+
diff --git a/media-gfx/hydrus/files/upnpc.patch b/media-gfx/hydrus/files/upnpc.patch
new file mode 100644
index 00000000000..ea78f2b70b6
--- /dev/null
+++ b/media-gfx/hydrus/files/upnpc.patch
@@ -0,0 +1,40 @@
+diff --git a/hydrus/core/networking/HydrusNATPunch.py b/hydrus/core/networking/HydrusNATPunch.py
+index c959753..6792d89 100644
+--- a/hydrus/core/networking/HydrusNATPunch.py
++++ b/hydrus/core/networking/HydrusNATPunch.py
+@@ -3,6 +3,7 @@ import socket
+ import subprocess
+ import threading
+ import traceback
++import shutil
+
+ from hydrus.core import HydrusConstants as HC
+ from hydrus.core import HydrusData
+@@ -18,7 +19,7 @@ if HC.PLATFORM_WINDOWS:
+
+ else:
+
+- possible_bin_filenames = [ 'upnpc-static', 'upnpc-shared', 'miniupnpc' ]
++ possible_bin_filenames = [ 'upnpc', 'upnpc-static', 'upnpc-shared', 'miniupnpc' ]
+
+ if HC.PLATFORM_LINUX:
+
+@@ -42,7 +43,17 @@ for filename in possible_bin_filenames:
+
+ UPNPC_PATH = possible_path
+
+-
++ break
++
++ maybe_in_path = shutil.which( filename )
++
++ if maybe_in_path:
++
++ UPNPC_PATH = maybe_in_path
++
++ break
++
++
+ EXTERNAL_IP = {}
+ EXTERNAL_IP[ 'ip' ] = None
+ EXTERNAL_IP[ 'time' ] = 0
diff --git a/media-gfx/hydrus/hydrus-441.ebuild b/media-gfx/hydrus/hydrus-441-r1.ebuild
similarity index 65%
copy from media-gfx/hydrus/hydrus-441.ebuild
copy to media-gfx/hydrus/hydrus-441-r1.ebuild
index 2e6f4152ae7..5ce5c4bdf64 100644
--- a/media-gfx/hydrus/hydrus-441.ebuild
+++ b/media-gfx/hydrus/hydrus-441-r1.ebuild
@@ -9,7 +9,7 @@ PYTHON_REQ_USE="sqlite"
inherit python-single-r1 desktop optfeature
DESCRIPTION="A booru-like media organizer for the desktop"
-HOMEPAGE="http://hydrusnetwork.github.io/hydrus/ https://github.com/hydrusnetwork/hydrus"
+HOMEPAGE="https://hydrusnetwork.github.io/hydrus/ https://github.com/hydrusnetwork/hydrus"
SRC_URI="https://github.com/hydrusnetwork/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
# hydrus itself is WTFPL
@@ -39,7 +39,7 @@ RDEPEND="
dev-python/service_identity[${PYTHON_MULTI_USEDEP}]
dev-python/six[${PYTHON_MULTI_USEDEP}]
dev-python/twisted[${PYTHON_MULTI_USEDEP}]
- media-libs/opencv[python,${PYTHON_MULTI_USEDEP}]
+ media-libs/opencv[python,png,jpeg,${PYTHON_MULTI_USEDEP}]
>=dev-python/QtPy-1.9.0-r4[pyside2,${PYTHON_MULTI_USEDEP}]
dev-python/beautifulsoup:4[${PYTHON_MULTI_USEDEP}]
@@ -48,12 +48,12 @@ RDEPEND="
ffmpeg? ( media-video/ffmpeg )
lz4? ( dev-python/lz4[${PYTHON_MULTI_USEDEP}] )
mpv? (
- media-video/mpv[libmpv,${PYTHON_MULTI_USEDEP}]
- dev-python/python-mpv[${PYTHON_MULTI_USEDEP}]
+ media-video/mpv[libmpv,${PYTHON_MULTI_USEDEP}]
+ dev-python/python-mpv[${PYTHON_MULTI_USEDEP}]
)
socks? (
- || ( dev-python/requests[socks5,${PYTHON_MULTI_USEDEP}]
- dev-python/PySocks[${PYTHON_MULTI_USEDEP}] )
+ || ( dev-python/requests[socks5,${PYTHON_MULTI_USEDEP}]
+ dev-python/PySocks[${PYTHON_MULTI_USEDEP}] )
)
')
"
@@ -70,26 +70,14 @@ BDEPEND="
"
PATCHES=(
+ "${FILESDIR}/upnpc.patch"
"${FILESDIR}/userpath-in-local-share.patch"
+ "${FILESDIR}/test-exitcode.patch"
)
-# Delete files only needed for testing
-delete_test_files() {
- rm test.py || die
- rm hydrus/hydrus_test.py || die
- rm -r hydrus/test/ || die
- rm -r static/testing/ || die
-}
-
src_prepare() {
default
- # If tests will run, leave the files until tests are run.
- # They will be deleted before installing the package.
- if ! use test; then
- delete_test_files
- fi
-
# Contains pre-built binaries for other systems and a broken swf renderer for linux
rm -r bin/ || die
# Build files used for CI, not actually needed
@@ -107,47 +95,39 @@ src_compile() {
src_test() {
# The tests use unittest, but are run with a custom runner script.
# QT_QPA_PLATFORM is required to make them run without X
- export QT_QPA_PLATFORM=offscreen
+ local -x QT_QPA_PLATFORM=offscreen
"${EPYTHON}" "${S}/test.py" || die "Tests failed"
}
src_install() {
- local DOC="${EPREFIX}/usr/share/doc/${PF}"
+ local doc="${EPREFIX}/usr/share/doc/${PF}"
elog "Hydrus includes an excellent manual, that can either be viewed at"
- elog "${DOC}/html/help/index.html"
+ elog "${doc}/html/help/index.html"
elog "or accessed through the hydrus help menu."
mv "help my client will not boot.txt" "help_my_client_will_not_boot.txt" || die
- DOCS=(COPYING README.md Readme.txt help_my_client_will_not_boot.txt db/)
- HTML_DOCS=("${S}"/help/)
+ local DOCS=(COPYING README.md Readme.txt help_my_client_will_not_boot.txt db/)
+ local HTML_DOCS=("${S}"/help/)
einstalldocs
- if use test; then
- # Delete files only needed for tests now. No need to install them.
- # If the tests didn't run, the files have been deleted already.
- delete_test_files
- fi
+ # Files only needed for testing
+ rm test.py hydrus/hydrus_test.py || die
+ rm -r hydrus/test/ static/testing/ || die
- # These files are copied into DOC
- rm COPYING README.md Readme.txt help_my_client_will_not_boot.txt || die
- rm -r help/ db/ || die
- # The program expects to find documentation here, so add a symlink to DOC
- ln -s "${DOC}/html/help" help || die
+ # These files are copied into doc
+ rm -r "${DOCS[@]}" "${HTML_DOCS[@]}" || die
+ # The program expects to find documentation here, so add a symlink to doc
+ ln -s "${doc}/html/help" help || die
- insopts -m0755
insinto /opt/hydrus
- doins -r "${S}"/*
+ doins -r "${S}"/.
exeinto /usr/bin
+ python_newexe - hydrus-server < <(sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-server")
+ python_newexe - hydrus-client < <(sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-client")
- sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-server" > "${T}/hydrus-server" || die
- sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-client" > "${T}/hydrus-client" || die
-
- python_doexe "${T}/hydrus-server"
- python_doexe "${T}/hydrus-client"
-
- make_desktop_entry "hydrus-client" "Hydrus Client" "/opt/hydrus/static/hydrus_non-transparent.png"\
+ make_desktop_entry "hydrus-client" "Hydrus Client" "/opt/hydrus/static/hydrus_non-transparent.png" \
"AudioVideo;FileTools;Graphics;Network;"
}
diff --git a/media-gfx/hydrus/hydrus-441.ebuild b/media-gfx/hydrus/hydrus-442.ebuild
similarity index 65%
rename from media-gfx/hydrus/hydrus-441.ebuild
rename to media-gfx/hydrus/hydrus-442.ebuild
index 2e6f4152ae7..5ce5c4bdf64 100644
--- a/media-gfx/hydrus/hydrus-441.ebuild
+++ b/media-gfx/hydrus/hydrus-442.ebuild
@@ -9,7 +9,7 @@ PYTHON_REQ_USE="sqlite"
inherit python-single-r1 desktop optfeature
DESCRIPTION="A booru-like media organizer for the desktop"
-HOMEPAGE="http://hydrusnetwork.github.io/hydrus/ https://github.com/hydrusnetwork/hydrus"
+HOMEPAGE="https://hydrusnetwork.github.io/hydrus/ https://github.com/hydrusnetwork/hydrus"
SRC_URI="https://github.com/hydrusnetwork/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
# hydrus itself is WTFPL
@@ -39,7 +39,7 @@ RDEPEND="
dev-python/service_identity[${PYTHON_MULTI_USEDEP}]
dev-python/six[${PYTHON_MULTI_USEDEP}]
dev-python/twisted[${PYTHON_MULTI_USEDEP}]
- media-libs/opencv[python,${PYTHON_MULTI_USEDEP}]
+ media-libs/opencv[python,png,jpeg,${PYTHON_MULTI_USEDEP}]
>=dev-python/QtPy-1.9.0-r4[pyside2,${PYTHON_MULTI_USEDEP}]
dev-python/beautifulsoup:4[${PYTHON_MULTI_USEDEP}]
@@ -48,12 +48,12 @@ RDEPEND="
ffmpeg? ( media-video/ffmpeg )
lz4? ( dev-python/lz4[${PYTHON_MULTI_USEDEP}] )
mpv? (
- media-video/mpv[libmpv,${PYTHON_MULTI_USEDEP}]
- dev-python/python-mpv[${PYTHON_MULTI_USEDEP}]
+ media-video/mpv[libmpv,${PYTHON_MULTI_USEDEP}]
+ dev-python/python-mpv[${PYTHON_MULTI_USEDEP}]
)
socks? (
- || ( dev-python/requests[socks5,${PYTHON_MULTI_USEDEP}]
- dev-python/PySocks[${PYTHON_MULTI_USEDEP}] )
+ || ( dev-python/requests[socks5,${PYTHON_MULTI_USEDEP}]
+ dev-python/PySocks[${PYTHON_MULTI_USEDEP}] )
)
')
"
@@ -70,26 +70,14 @@ BDEPEND="
"
PATCHES=(
+ "${FILESDIR}/upnpc.patch"
"${FILESDIR}/userpath-in-local-share.patch"
+ "${FILESDIR}/test-exitcode.patch"
)
-# Delete files only needed for testing
-delete_test_files() {
- rm test.py || die
- rm hydrus/hydrus_test.py || die
- rm -r hydrus/test/ || die
- rm -r static/testing/ || die
-}
-
src_prepare() {
default
- # If tests will run, leave the files until tests are run.
- # They will be deleted before installing the package.
- if ! use test; then
- delete_test_files
- fi
-
# Contains pre-built binaries for other systems and a broken swf renderer for linux
rm -r bin/ || die
# Build files used for CI, not actually needed
@@ -107,47 +95,39 @@ src_compile() {
src_test() {
# The tests use unittest, but are run with a custom runner script.
# QT_QPA_PLATFORM is required to make them run without X
- export QT_QPA_PLATFORM=offscreen
+ local -x QT_QPA_PLATFORM=offscreen
"${EPYTHON}" "${S}/test.py" || die "Tests failed"
}
src_install() {
- local DOC="${EPREFIX}/usr/share/doc/${PF}"
+ local doc="${EPREFIX}/usr/share/doc/${PF}"
elog "Hydrus includes an excellent manual, that can either be viewed at"
- elog "${DOC}/html/help/index.html"
+ elog "${doc}/html/help/index.html"
elog "or accessed through the hydrus help menu."
mv "help my client will not boot.txt" "help_my_client_will_not_boot.txt" || die
- DOCS=(COPYING README.md Readme.txt help_my_client_will_not_boot.txt db/)
- HTML_DOCS=("${S}"/help/)
+ local DOCS=(COPYING README.md Readme.txt help_my_client_will_not_boot.txt db/)
+ local HTML_DOCS=("${S}"/help/)
einstalldocs
- if use test; then
- # Delete files only needed for tests now. No need to install them.
- # If the tests didn't run, the files have been deleted already.
- delete_test_files
- fi
+ # Files only needed for testing
+ rm test.py hydrus/hydrus_test.py || die
+ rm -r hydrus/test/ static/testing/ || die
- # These files are copied into DOC
- rm COPYING README.md Readme.txt help_my_client_will_not_boot.txt || die
- rm -r help/ db/ || die
- # The program expects to find documentation here, so add a symlink to DOC
- ln -s "${DOC}/html/help" help || die
+ # These files are copied into doc
+ rm -r "${DOCS[@]}" "${HTML_DOCS[@]}" || die
+ # The program expects to find documentation here, so add a symlink to doc
+ ln -s "${doc}/html/help" help || die
- insopts -m0755
insinto /opt/hydrus
- doins -r "${S}"/*
+ doins -r "${S}"/.
exeinto /usr/bin
+ python_newexe - hydrus-server < <(sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-server")
+ python_newexe - hydrus-client < <(sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-client")
- sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-server" > "${T}/hydrus-server" || die
- sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-client" > "${T}/hydrus-client" || die
-
- python_doexe "${T}/hydrus-server"
- python_doexe "${T}/hydrus-client"
-
- make_desktop_entry "hydrus-client" "Hydrus Client" "/opt/hydrus/static/hydrus_non-transparent.png"\
+ make_desktop_entry "hydrus-client" "Hydrus Client" "/opt/hydrus/static/hydrus_non-transparent.png" \
"AudioVideo;FileTools;Graphics;Network;"
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/hydrus/files/, media-gfx/hydrus/
@ 2021-08-02 3:34 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2021-08-02 3:34 UTC (permalink / raw
To: gentoo-commits
commit: 2613862f310dee9c619d8b997a94690cb6e997c2
Author: Ekaterina Vaartis <vaartis <AT> kotobank <DOT> ch>
AuthorDate: Thu Jul 29 19:31:43 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 2 03:34:34 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2613862f
media-gfx/hydrus: Drop 444 and now-unused patches
Signed-off-by: Ekaterina Vaartis <vaartis <AT> kotobank.ch>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/hydrus/Manifest | 1 -
media-gfx/hydrus/files/test-exitcode.patch | 36 --------
media-gfx/hydrus/files/upnpc.patch | 40 --------
media-gfx/hydrus/hydrus-444.ebuild | 143 -----------------------------
4 files changed, 220 deletions(-)
diff --git a/media-gfx/hydrus/Manifest b/media-gfx/hydrus/Manifest
index 27c31937284..4fb07b1be72 100644
--- a/media-gfx/hydrus/Manifest
+++ b/media-gfx/hydrus/Manifest
@@ -1,4 +1,3 @@
-DIST hydrus-444.tar.gz 38817103 BLAKE2B f9eb3dc346a1a7b8d45558ee69b0b9d2a7dbbb7018734680e9953f20ebd56209cc1874213ecf5515835f1022bf571a99543154843f7dc2b9375116db8ba080a0 SHA512 f5bc28e43a5218fce15bc9d197ebcc1f4eb47856a741ad79f59d1da2413a3e7e220381a4d8208fe880fa507e023f9c03050e46ab5214ef310d105df0d85a9682
DIST hydrus-445.tar.gz 38823389 BLAKE2B 3cd07a3e30e60bd8507fd58c027e5c5a96745163bd5982198448a65b957ff8f4308c9bc0ee73b883fa275689c900dff07f497634c07f4b2f7fe579e1e3d6f378 SHA512 6735468bd531786fef9a861a81ee1e34595c362450027a0c011593465ed77dc85a304a314dcb7031e30b2e90548b2497bb4f01932dc1f04e814b7dd5ae70617c
DIST hydrus-446.tar.gz 38830223 BLAKE2B 5ab44f9cfbd15eb10144135eb4cc1d8493c20f2a931db4332a61aa186fddff96cb3a3b29eb2b210f070bb4be8210d552beb2578a7287a169a7364f02363e05f4 SHA512 bdbcd1177c3bf6ee85089e1a653587bae41c524bc2313bb5d481dee074c7da1c533a91957dc3b03d1c0b515e705809887e290ac71b866a51664f2a9a34bbfb6b
DIST hydrus-447.tar.gz 38833157 BLAKE2B 8d7cf37a1419ef40fa7816958a01421ecc335d2a8c975fcf16d3ea5dfbdb76d872e4e597bdbade28eff7727914de5de7fb6ffcc7ecc27a712410031efa8433fe SHA512 85eaab40f192f2414be828545464811af2590b55e1a2fea7bbf64f27e4bb9a8b6c6c86cb25c1f7e9f48449173f079dcd749ea25ed22559bebb11adddce62da94
diff --git a/media-gfx/hydrus/files/test-exitcode.patch b/media-gfx/hydrus/files/test-exitcode.patch
deleted file mode 100644
index d61d341ee1e..00000000000
--- a/media-gfx/hydrus/files/test-exitcode.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff --git a/hydrus/hydrus_test.py b/hydrus/hydrus_test.py
-index 3504c9c..7f95af8 100644
---- a/hydrus/hydrus_test.py
-+++ b/hydrus/hydrus_test.py
-@@ -91,6 +91,9 @@ def boot():
- if sys.stdin.isatty():
-
- input( 'Press any key to exit.' )
-+ else:
-
-+ success = 0 if controller.was_successful else 1
-+ sys.exit(success)
-
-
-diff --git a/hydrus/test/TestController.py b/hydrus/test/TestController.py
-index 0c43440..7e6c5ef 100644
---- a/hydrus/test/TestController.py
-+++ b/hydrus/test/TestController.py
-@@ -168,7 +168,6 @@ only_run = None
- class Controller( object ):
-
- def __init__( self, win, only_run ):
--
- self.app = win
- self.win = win
- self.only_run = only_run
-@@ -827,8 +826,7 @@ class Controller( object ):
- def do_it():
-
- try:
--
-- runner.run( suite )
-+ self.was_successful = runner.run( suite ).wasSuccessful()
-
- finally:
-
diff --git a/media-gfx/hydrus/files/upnpc.patch b/media-gfx/hydrus/files/upnpc.patch
deleted file mode 100644
index ea78f2b70b6..00000000000
--- a/media-gfx/hydrus/files/upnpc.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/hydrus/core/networking/HydrusNATPunch.py b/hydrus/core/networking/HydrusNATPunch.py
-index c959753..6792d89 100644
---- a/hydrus/core/networking/HydrusNATPunch.py
-+++ b/hydrus/core/networking/HydrusNATPunch.py
-@@ -3,6 +3,7 @@ import socket
- import subprocess
- import threading
- import traceback
-+import shutil
-
- from hydrus.core import HydrusConstants as HC
- from hydrus.core import HydrusData
-@@ -18,7 +19,7 @@ if HC.PLATFORM_WINDOWS:
-
- else:
-
-- possible_bin_filenames = [ 'upnpc-static', 'upnpc-shared', 'miniupnpc' ]
-+ possible_bin_filenames = [ 'upnpc', 'upnpc-static', 'upnpc-shared', 'miniupnpc' ]
-
- if HC.PLATFORM_LINUX:
-
-@@ -42,7 +43,17 @@ for filename in possible_bin_filenames:
-
- UPNPC_PATH = possible_path
-
--
-+ break
-+
-+ maybe_in_path = shutil.which( filename )
-+
-+ if maybe_in_path:
-+
-+ UPNPC_PATH = maybe_in_path
-+
-+ break
-+
-+
- EXTERNAL_IP = {}
- EXTERNAL_IP[ 'ip' ] = None
- EXTERNAL_IP[ 'time' ] = 0
diff --git a/media-gfx/hydrus/hydrus-444.ebuild b/media-gfx/hydrus/hydrus-444.ebuild
deleted file mode 100644
index d09faedb63c..00000000000
--- a/media-gfx/hydrus/hydrus-444.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-PYTHON_REQ_USE="sqlite"
-
-inherit python-single-r1 desktop optfeature
-
-DESCRIPTION="A booru-like media organizer for the desktop"
-HOMEPAGE="https://hydrusnetwork.github.io/hydrus/ https://github.com/hydrusnetwork/hydrus"
-
-if [[ "${PV}" == "9999" ]]; then
- inherit git-r3
-
- EGIT_REPO_URI="https://github.com/hydrusnetwork/hydrus.git"
-else
- SRC_URI="https://github.com/hydrusnetwork/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
- KEYWORDS="~amd64"
-fi
-
-# hydrus itself is WTFPL
-# icons included are CC-BY-2.5
-LICENSE="WTFPL-2 CC-BY-2.5"
-SLOT="0"
-IUSE="+mpv +ffmpeg +lz4 socks +cloudscraper charts test"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- ${PYTHON_DEPS}
- $(python_gen_cond_dep '
- dev-python/chardet[${PYTHON_USEDEP}]
- dev-python/html5lib[${PYTHON_USEDEP}]
- dev-python/lxml[${PYTHON_USEDEP}]
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/pillow[${PYTHON_USEDEP}]
- dev-python/psutil[${PYTHON_USEDEP}]
- dev-python/pyopenssl[${PYTHON_USEDEP}]
- dev-python/pyside2[widgets,gui,charts?,${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- dev-python/send2trash[${PYTHON_USEDEP}]
- dev-python/service_identity[${PYTHON_USEDEP}]
- dev-python/six[${PYTHON_USEDEP}]
- dev-python/twisted[${PYTHON_USEDEP}]
- media-libs/opencv[python,png,jpeg,${PYTHON_USEDEP}]
-
- >=dev-python/QtPy-1.9.0-r4[pyside2,${PYTHON_USEDEP}]
- dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
-
- cloudscraper? ( dev-python/cloudscraper[${PYTHON_USEDEP}] )
- ffmpeg? ( media-video/ffmpeg )
- lz4? ( dev-python/lz4[${PYTHON_USEDEP}] )
- mpv? (
- media-video/mpv[libmpv,${PYTHON_USEDEP}]
- dev-python/python-mpv[${PYTHON_USEDEP}]
- )
- socks? (
- || ( dev-python/requests[socks5,${PYTHON_USEDEP}]
- dev-python/PySocks[${PYTHON_USEDEP}] )
- )
- ')
-"
-BDEPEND="
- ${RDEPEND}
- $(python_gen_cond_dep '
- test? (
- dev-python/httmock[${PYTHON_USEDEP}]
- dev-python/mock[${PYTHON_USEDEP}]
- dev-python/nose[${PYTHON_USEDEP}]
- )
- ')
-"
-
-PATCHES=(
- "${FILESDIR}/upnpc.patch"
- "${FILESDIR}/userpath-in-local-share.patch"
- "${FILESDIR}/test-exitcode.patch"
-)
-
-src_prepare() {
- default
-
- # Contains pre-built binaries for other systems and a broken swf renderer for linux
- rm -r bin/ || die
- # Build files used for CI, not actually needed
- rm -r static/build_files || die
- # Duplicate license file, not needed
- rm license.txt || die
- # Python requirements files, not needed
- rm requirements_*.txt || die
-}
-
-src_compile() {
- python_optimize "${S}"
-}
-
-src_test() {
- # The tests use unittest, but are run with a custom runner script.
- # QT_QPA_PLATFORM is required to make them run without X
- local -x QT_QPA_PLATFORM=offscreen
- "${EPYTHON}" "${S}/test.py" || die "Tests failed"
-}
-
-src_install() {
- local doc="${EPREFIX}/usr/share/doc/${PF}"
- elog "Hydrus includes an excellent manual, that can either be viewed at"
- elog "${doc}/html/help/index.html"
- elog "or accessed through the hydrus help menu."
-
- mv "help my client will not boot.txt" "help_my_client_will_not_boot.txt" || die
-
- local DOCS=(COPYING README.md Readme.txt help_my_client_will_not_boot.txt db/)
- local HTML_DOCS=("${S}"/help/)
- einstalldocs
-
- # Files only needed for testing
- rm test.py hydrus/hydrus_test.py || die
- rm -r hydrus/test/ static/testing/ || die
-
- # These files are copied into doc
- rm -r "${DOCS[@]}" "${HTML_DOCS[@]}" || die
- # The program expects to find documentation here, so add a symlink to doc
- ln -s "${doc}/html/help" help || die
-
- insinto /opt/hydrus
- doins -r "${S}"/.
-
- exeinto /usr/bin
- python_newexe - hydrus-server < <(sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-server")
- python_newexe - hydrus-client < <(sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-client")
-
- make_desktop_entry "hydrus-client" "Hydrus Client" "/opt/hydrus/static/hydrus_non-transparent.png" \
- "AudioVideo;FileTools;Graphics;Network;"
-}
-
-pkg_postinst() {
- optfeature "support for automatic port forwarding" "net-libs/miniupnpc"
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/hydrus/files/, media-gfx/hydrus/
@ 2023-05-20 6:28 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-05-20 6:28 UTC (permalink / raw
To: gentoo-commits
commit: 265dd934889a072b01dde94461a4c2c120afe545
Author: Ekaterina Vaartis <vaartis <AT> kotobank <DOT> ch>
AuthorDate: Thu May 18 07:36:44 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 20 06:27:53 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=265dd934
media-gfx/hydrus: Add 528
Signed-off-by: Ekaterina Vaartis <vaartis <AT> kotobank.ch>
Closes: https://github.com/gentoo/gentoo/pull/30890
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/hydrus/Manifest | 1 +
media-gfx/hydrus/files/hydrus-client | 2 +-
media-gfx/hydrus/files/hydrus-server | 2 +-
media-gfx/hydrus/hydrus-528.ebuild | 150 +++++++++++++++++++++++++++++++++++
4 files changed, 153 insertions(+), 2 deletions(-)
diff --git a/media-gfx/hydrus/Manifest b/media-gfx/hydrus/Manifest
index 74a0905424a2..3d788aac622b 100644
--- a/media-gfx/hydrus/Manifest
+++ b/media-gfx/hydrus/Manifest
@@ -1 +1,2 @@
DIST hydrus-526.tar.gz 41182831 BLAKE2B cf41641625d6c8d64aeea78f56f643a39a6bf8030c919e0a83e5b7183ee7f5a03edef5574f67fb023c79e9e4d757e79f536d91d57ca8a097cc7c380075036c0b SHA512 ed8fff59563bbe8f8c3b235a188575be9d56aa5cf7e70cf340215a7af910247ba711061020f257dbdf1032b5d0ebd5e8995411f60ffe6b6ba9061d189b6274cd
+DIST hydrus-528.tar.gz 41492703 BLAKE2B 3e97e64a2bbdd513441c5ae34640779934057ec4bcea9ef806a3bbc053d5849af69eed79edca35b9b9f276bdc53c379c10a613b1efb7bb3e2e69dbcc4b210038 SHA512 b9c9069a92fd82c6c6137aeaf205c5cac2c34d31dce2174308c796e9289fc64b346eabb8ef55e2fef78ac0af73c1b8c14aa507f9d4508759e435ac7eb01400bb
diff --git a/media-gfx/hydrus/files/hydrus-client b/media-gfx/hydrus/files/hydrus-client
index 7a6e42747c5c..7c52292930f8 100644
--- a/media-gfx/hydrus/files/hydrus-client
+++ b/media-gfx/hydrus/files/hydrus-client
@@ -1,3 +1,3 @@
#!/bin/sh
export QT_API="${QT_API:-pyside2}"
-exec /usr/bin/python -OO /opt/hydrus/client.pyw "$@"
+exec /usr/bin/python -OO /opt/hydrus/hydrus_client.pyw "$@"
diff --git a/media-gfx/hydrus/files/hydrus-server b/media-gfx/hydrus/files/hydrus-server
index cecb9adc1a2d..4f560b84f2e9 100644
--- a/media-gfx/hydrus/files/hydrus-server
+++ b/media-gfx/hydrus/files/hydrus-server
@@ -1,2 +1,2 @@
#!/bin/sh
-exec /usr/bin/python -OO /opt/hydrus/server.py "$@"
+exec /usr/bin/python -OO /opt/hydrus/hydrus_server.py "$@"
diff --git a/media-gfx/hydrus/hydrus-528.ebuild b/media-gfx/hydrus/hydrus-528.ebuild
new file mode 100644
index 000000000000..a3502913de33
--- /dev/null
+++ b/media-gfx/hydrus/hydrus-528.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE="sqlite"
+
+DOCS_BUILDER=mkdocs
+DOCS_DEPEND="dev-python/mkdocs-material dev-python/regex"
+
+inherit python-single-r1 desktop docs optfeature
+
+DESCRIPTION="A booru-like media organizer for the desktop"
+HOMEPAGE="https://hydrusnetwork.github.io/hydrus/ https://github.com/hydrusnetwork/hydrus"
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/hydrusnetwork/hydrus.git"
+else
+ SRC_URI="https://github.com/hydrusnetwork/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+ KEYWORDS="~amd64"
+fi
+
+# hydrus itself is WTFPL
+# icons included are CC-BY-2.5
+LICENSE="WTFPL-2 CC-BY-2.5"
+SLOT="0"
+IUSE="test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RESTRICT="!test? ( test )"
+
+# RDEPEND is sorted as such:
+# - No specific requirements
+# - Specific version or slot
+RDEPEND="
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/cbor2[${PYTHON_USEDEP}]
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/cloudscraper[${PYTHON_USEDEP}]
+ dev-python/html5lib[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP},lcms]
+ dev-python/psutil[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/pyside2[widgets,gui,${PYTHON_USEDEP}]
+ dev-python/python-mpv[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/send2trash[${PYTHON_USEDEP}]
+ dev-python/service_identity[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ dev-python/twisted[${PYTHON_USEDEP}]
+ media-libs/opencv[python,png,jpeg,${PYTHON_USEDEP}]
+ media-video/ffmpeg
+
+ >=dev-python/QtPy-1.9.0-r4[pyside2,${PYTHON_USEDEP}]
+ dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+ ')
+"
+BDEPEND="
+ ${RDEPEND}
+ $(python_gen_cond_dep '
+ test? (
+ dev-python/httmock[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+
+ dev-python/pyside2[widgets,gui,multimedia,${PYTHON_USEDEP}]
+ )
+ ')
+"
+
+PATCHES=(
+ "${FILESDIR}/userpath-in-local-share.patch"
+)
+
+src_prepare() {
+ default
+
+ # Contains pre-built binaries for other systems and a broken swf renderer for linux
+ rm -r bin/ || die
+ # Python requirements file, not needed
+ rm requirements.txt || die
+ # Remove unneeded additional scripts
+ rm *.command *.sh *.bat || die
+}
+
+src_compile() {
+ python_optimize "${S}"
+ docs_compile
+}
+
+src_test() {
+ # The tests use unittest, but are run with a custom runner script.
+ # QT_QPA_PLATFORM is required to make them run without X
+ local -x QT_QPA_PLATFORM=offscreen
+ "${EPYTHON}" "${S}/hydrus_test.py" || die "Tests failed"
+}
+
+src_install() {
+ local doc="${EPREFIX}/usr/share/doc/${PF}"
+ elog "Hydrus includes an excellent manual, that can either be viewed at"
+ elog "${doc}/html/help/index.html"
+ elog "or accessed through the hydrus help menu."
+
+ mv "help my client will not boot.txt" "help_my_client_will_not_boot.txt" || die
+
+ local DOCS=(COPYING README.md help_my_client_will_not_boot.txt db/)
+ einstalldocs
+
+ # Files only needed for testing
+ rm hydrus_test.py hydrus/hydrus_test_boot.py || die
+ rm -r hydrus/test/ static/testing/ || die
+ # Build files used for CI and development, not actually needed. Has to be deleted after src_compile.
+ # because it contains documentation
+ rm -r static/build_files static/requirements || die
+
+ # ${DOCS[@]} files are copied into doc
+ # ${S}/docs/ is the markdown source code for documentation
+ # .gitignore/.github files aren't needed for the program to work, same with mkdocs files
+ rm -r "${DOCS[@]}" "${S}/docs/" .gitignore .github/ mkdocs.yml mkdocs-gh-pages.yml || die
+ if use doc; then
+ # ${S}/_build = ${DOCS_OUTDIR}/.. , these have already been copied, remove before installation
+ rm -r "${S}/_build" || die
+ # The program expects to find documentation here, so add a symlink to doc
+ dosym "${doc}/html" /opt/hydrus/help
+ fi
+
+ insinto /opt/hydrus
+ doins -r "${S}"/.
+
+ exeinto /usr/bin
+ python_newexe - hydrus-server < <(sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-server" || die)
+ python_newexe - hydrus-client < <(sed "s/python/${EPYTHON}/" "${FILESDIR}/hydrus-client" || die)
+
+ make_desktop_entry "hydrus-client" "Hydrus Client" "/opt/hydrus/static/hydrus_non-transparent.png" \
+ "AudioVideo;FileTools;Graphics;Network;"
+}
+
+pkg_postinst() {
+ optfeature "automatic port forwarding support" "net-libs/miniupnpc"
+ optfeature "bandwidth charts support" "dev-python/pyside2[charts]"
+ optfeature "memory compression in the client" "dev-python/lz4"
+ optfeature "SOCKS proxy support" "dev-python/requests[socks5]" "dev-python/PySocks"
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-20 6:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-05 12:36 [gentoo-commits] repo/gentoo:master commit in: media-gfx/hydrus/files/, media-gfx/hydrus/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2023-05-20 6:28 Sam James
2021-08-02 3:34 Sam James
2021-05-31 14:11 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox