Personal gentoo overlay
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
overlay/net-im/plchat/plchat-1.0.3.ebuild

101 lines
3.5 KiB

# 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.3.tar.gz -> plchat-1.0.3.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_gen_useflags 'python3*')
# dev-python/python-dateutil $(python_gen_useflags 'python3*')
# dev-python/websockets $(python_gen_useflags 'python3*')
# dev-python/keyring $(python_gen_useflags 'python3*')
# dev-python/notify-py $(python_gen_useflags 'python3*')
# dev-python/appdirs $(python_gen_useflags 'python3*')
# dev-python/requests $(python_gen_useflags 'python3*')
# dev-python/urllib3 $(python_gen_useflags 'python3*')
DEPEND="
$(python_gen_impl_dep)
"
RDEPEND="
$(python_gen_cond_dep 'dev-python/PyQt5[widgets,multimedia,${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/PyQt5-sip[${PYTHON_USEDEP}]')
media-libs/gst-plugins-base
media-libs/gst-plugins-good
media-libs/gst-plugins-bad
media-libs/gst-plugins-ugly
media-plugins/gst-plugins-neon
media-plugins/gst-plugins-soup
media-plugins/gst-plugins-libav
system-libs? (
$(python_gen_cond_dep 'dev-python/python-magic[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/python-dateutil[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/websockets[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/keyring[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/notify-py[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/appdirs[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/requests[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/urllib3[${PYTHON_USEDEP}]')
)
"
BDEPEND="
>=sys-devel/gcc-5.1.0
$(python_gen_cond_dep 'dev-python/nuitka[${PYTHON_USEDEP}]')
!system-libs? (
$(python_gen_cond_dep 'dev-python/python-magic[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/python-dateutil[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/websockets[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/keyring[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/notify-py[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/appdirs[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/requests[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/urllib3[${PYTHON_USEDEP}]')
)
"
src_unpack() {
unpack 'plchat-1.0.3.tar.gz'
mv 'plchat' 'plchat-1.0.3'
}
src_compile() {
if use system-libs; then
"${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
else
"${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
fi
}
src_install() {
insinto /$(get_libdir)/plchat/bin
into /$(get_libdir)/plchat
doins fedi.ico
doins fedi.svg
doins send.svg
doins unread.svg
doins notif.wav
doins fedi_color.svg
dobin plchat
dosym /$(get_libdir)/plchat/bin/plchat /usr/bin/plchat
}