Skip to content

Commit

Permalink
media-tv/kodi: Experimental Python 3 support in -9999
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Craig Andrews <[email protected]>
  • Loading branch information
candrews committed Nov 19, 2018
1 parent 23b5e9d commit 2166831
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions media-tv/kodi/kodi-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,23 @@

EAPI=6

# Does not work with py3 here
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="sqlite"
PYTHON_REQ_USE="libressl?,sqlite,ssl"

if [[ ${PV} == *9999 ]] ; then
PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
EGIT_REPO_URI="https://github.com/xbmc/xbmc.git"
inherit git-r3
else
PYTHON_COMPAT=( python2_7 )
MY_PV=${PV/_p/_r}
MY_PV=${MY_PV/_alpha/a}
MY_PV=${MY_PV/_beta/b}
MY_PV=${MY_PV/_rc/rc}
MY_P="${PN}-${MY_PV}"
SRC_URI+=" https://github.com/xbmc/xbmc/archive/${MY_PV}-${CODENAME}.tar.gz -> ${MY_P}.tar.gz"
KEYWORDS="~amd64 ~x86"
S=${WORKDIR}/xbmc-${MY_PV}-${CODENAME}
fi

inherit autotools cmake-utils eutils gnome2-utils linux-info pax-utils python-single-r1 xdg-utils

Expand Down Expand Up @@ -60,6 +74,7 @@ COMMON_DEPEND="${PYTHON_DEPS}
>=dev-libs/lzo-2.04
dev-libs/tinyxml[stl]
dev-python/pillow[${PYTHON_USEDEP}]
dev-python/pycryptodome[${PYTHON_USEDEP}]
>=dev-libs/libcdio-0.94
dev-libs/libfmt
dev-libs/libfstrcmp
Expand Down Expand Up @@ -147,19 +162,6 @@ DEPEND="${COMMON_DEPEND}
virtual/jre
x86? ( dev-lang/nasm )
"
if [[ ${PV} == *9999 ]] ; then
EGIT_REPO_URI="https://github.com/xbmc/xbmc.git"
inherit git-r3
else
MY_PV=${PV/_p/_r}
MY_PV=${MY_PV/_alpha/a}
MY_PV=${MY_PV/_beta/b}
MY_PV=${MY_PV/_rc/rc}
MY_P="${PN}-${MY_PV}"
SRC_URI+=" https://github.com/xbmc/xbmc/archive/${MY_PV}-${CODENAME}.tar.gz -> ${MY_P}.tar.gz"
KEYWORDS="~amd64 ~x86"
S=${WORKDIR}/xbmc-${MY_PV}-${CODENAME}
fi

CONFIG_CHECK="~IP_MULTICAST"
ERROR_IP_MULTICAST="
Expand All @@ -172,6 +174,16 @@ pkg_setup() {
python-single-r1_pkg_setup
}

src_unpack() {
python_is_python3 && EGIT_BRANCH="feature_python3"
ewarn "Using the experimental Python 3 branch!"
ewarn "See https://kodi.wiki/view/Migration_to_Python_3 for more information."
ewarn "To use the non-experimental Python 2 version:"
ewarn "echo '~${CATEGORY}/${P} PYTHON_TARGETS: -* python2_7 PYTHON_SINGLE_TARGET: -* python2_7' >> /etc/portage/package.use"
ewarn "then re-merge using: emerge -a =${CATEGORY}/${P}"
git-r3_src_unpack
}

src_prepare() {
cmake-utils_src_prepare

Expand Down

0 comments on commit 2166831

Please sign in to comment.