overlay/net-im/plchat/plchat-1.0.1.ebuild

93 lines
3.0 KiB
Bash
Raw Normal View History

2021-04-22 15:11:50 -05:00
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="A Pleroma Chat client in PyQt5."
PYTHON_COMPAT=( python3_{7..9} )
inherit python-single-r1
HOMEPAGE="https://git.waldn.net/git/knotteye/plchat"
SRC_URI="https://git.waldn.net/git/knotteye/plchat/archive/1.0.1.tar.gz -> plchat-1.0.1.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~arm ~arm64"
IUSE="+system-libs"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
# dev-python/python-magic ${PYTHON_SINGLE_TARGET}
# dev-python/python-dateutil ${PYTHON_SINGLE_TARGET}
# dev-python/websockets ${PYTHON_SINGLE_TARGET}
# dev-python/keyring ${PYTHON_SINGLE_TARGET}
# dev-python/notify-py ${PYTHON_SINGLE_TARGET}
# dev-python/appdirs ${PYTHON_SINGLE_TARGET}
# dev-python/requests ${PYTHON_SINGLE_TARGET}
# dev-python/urllib3 ${PYTHON_SINGLE_TARGET}
RDEPEND="
dev-python/PyQt5 multimedia widgets ${PYTHON_SINGLE_TARGET}
dev-python/PyQt5-sip ${PYTHON_SINGLE_TARGET}
media-plugins/gst-plugins-base
media-plugins/gst-plugins-good
media-plugins/gst-plugins-bad
media-plugins/gst-plugins-ugly
media-plugins/gst-plugins-neon
media-plugins/gst-plugins-soup
media-plugins/gst-plugins-libav
system-libs? (
dev-python/python-magic ${PYTHON_SINGLE_TARGET}
dev-python/python-dateutil ${PYTHON_SINGLE_TARGET}
dev-python/websockets ${PYTHON_SINGLE_TARGET}
dev-python/keyring ${PYTHON_SINGLE_TARGET}
dev-python/notify-py ${PYTHON_SINGLE_TARGET}
dev-python/appdirs ${PYTHON_SINGLE_TARGET}
dev-python/requests ${PYTHON_SINGLE_TARGET}
dev-python/urllib3 ${PYTHON_SINGLE_TARGET}
)
"
BDEPEND="
>=sys-devel/gcc-5.1.0
dev-python/nuitka ${PYTHON_SINGLE_TARGET}
system-libs? (
dev-python/python-magic ${PYTHON_SINGLE_TARGET}
dev-python/python-dateutil ${PYTHON_SINGLE_TARGET}
dev-python/websockets ${PYTHON_SINGLE_TARGET}
dev-python/keyring ${PYTHON_SINGLE_TARGET}
dev-python/notify-py ${PYTHON_SINGLE_TARGET}
dev-python/appdirs ${PYTHON_SINGLE_TARGET}
dev-python/requests ${PYTHON_SINGLE_TARGET}
dev-python/urllib3 ${PYTHON_SINGLE_TARGET}
)
"
#src_configure() {
#}
src_compile() {
if use system-libs; then
"${PYTHON}" -m nuitka --file-reference-choice=runtime --follow-imports --include-module=certifi --include-module=keyring.backends.kwallet --include-module=keyring.backends.chainer --enable-plugin=qt-plugins --include-qt-plugins=all --python-flag=-O -o plchat plchat.py
else
"${PYTHON}" -m nuitka --file-reference-choice=runtime --nofollow-imports --follow-import-to=misc --follow-import-to=monkeypatch --follow-import-to=pleroma --follow-import-to=timeconvert --follow-import-to=videowidget --follow-import-to=audiowidget --python-flag=-O -o plchat plchat.py
fi
}
src_install() {
mkdir -p $(get_libdir)/plchat
install dist/plchat $(get_libdir)/plchat
install dist/fedi.ico $(get_libdir)/plchat
install dist/fedi.svg $(get_libdir)/plchat
install dist/send.svg $(get_libdir)/plchat
install dist/unread.svg $(get_libdir)/plchat
ln -sf $(get_libdir)/plchat/plchat /bin/plchat
}