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.
68 lines
1.6 KiB
68 lines
1.6 KiB
# Copyright 1999-2018 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=6
|
|
|
|
PYTHON_COMPAT=( python3_{6,7,8} )
|
|
|
|
if [[ ${PV} == 9999* ]]; then
|
|
EGIT_REPO_URI="https://github.com/Syncplay/${PN}.git"
|
|
inherit git-r3
|
|
MY_PV=${PV/_rc/-RC}
|
|
S="${WORKDIR}/${PN}-${MY_PV}"
|
|
else
|
|
SRC_URI="https://github.com/Syncplay/syncplay/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86"
|
|
fi
|
|
|
|
inherit python-single-r1
|
|
|
|
DESCRIPTION="Client/server to synchronize media playback"
|
|
HOMEPAGE="https://syncplay.pl"
|
|
|
|
LICENSE="Apache-2.0"
|
|
SLOT="0"
|
|
IUSE="+client qt5 +server ssl"
|
|
REQUIRED_USE="qt5? ( client )
|
|
${PYTHON_REQUIRED_USE}"
|
|
|
|
DEPEND=""
|
|
# TODO: investigate the possibility of enabling PyQt5 gui
|
|
# possible licensing concerns
|
|
RDEPEND="${PYTHON_DEPS}
|
|
$(python_gen_cond_dep '|| (
|
|
>=dev-python/twisted-16.4.0[${PYTHON_MULTI_USEDEP}]
|
|
dev-python/twisted-core[${PYTHON_MULTI_USEDEP}]
|
|
dev-python/certifi[${PYTHON_MULTI_USEDEP}]
|
|
)
|
|
qt5? ( dev-python/pyside2[${PYTHON_SINGLE_USEDEP}] )
|
|
ssl? ( >=dev-python/twisted-16.4.0[${PYTHON_MULTI_USEDEP},crypt] )')"
|
|
|
|
src_prepare() {
|
|
default
|
|
if ! use qt5 ; then
|
|
sed -i 's/"noGui": False,/"noGui": True,/' \
|
|
syncplay/ui/ConfigurationGetter.py \
|
|
|| die "Failed to patch ConfigurationGetter.py"
|
|
fi
|
|
}
|
|
|
|
src_compile() {
|
|
:
|
|
}
|
|
|
|
src_install() {
|
|
local MY_MAKEOPTS=( DESTDIR="${D}" PREFIX=/usr )
|
|
use client && \
|
|
emake "${MY_MAKEOPTS[@]}" install-client
|
|
use server && \
|
|
emake "${MY_MAKEOPTS[@]}" install-server
|
|
}
|
|
|
|
pkg_postinst() {
|
|
if use client; then
|
|
einfo "Syncplay supports the following players:"
|
|
einfo "media-video/mpv, media-video/mplayer2, media-video/vlc"
|
|
fi
|
|
}
|