summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2017-01-09 22:13:35 -0500
committerDavid Seifert <soap@gentoo.org>2017-01-10 17:07:22 +0200
commit2e9b30910afbcb83b21a563be618cff2219af229 (patch)
tree4597dbee635862cf1e358a01288f7e0c2fdd17a2 /media-tv/kodi
parentgnome-extra/libgsf: amd64 stable wrt bug #602622 (diff)
downloadgentoo-2e9b30910afbcb83b21a563be618cff2219af229.tar.gz
gentoo-2e9b30910afbcb83b21a563be618cff2219af229.tar.bz2
gentoo-2e9b30910afbcb83b21a563be618cff2219af229.zip
media-tv/kodi: fix building with USE="-java"
Closes: https://github.com/gentoo/gentoo/pull/3410
Diffstat (limited to 'media-tv/kodi')
-rw-r--r--media-tv/kodi/files/kodi-cmake-no-java.patch56
-rw-r--r--media-tv/kodi/kodi-17.0_rc2.ebuild54
-rw-r--r--media-tv/kodi/kodi-9999.ebuild54
3 files changed, 118 insertions, 46 deletions
diff --git a/media-tv/kodi/files/kodi-cmake-no-java.patch b/media-tv/kodi/files/kodi-cmake-no-java.patch
new file mode 100644
index 000000000000..2d965ab351ee
--- /dev/null
+++ b/media-tv/kodi/files/kodi-cmake-no-java.patch
@@ -0,0 +1,56 @@
+diff --git a/xbmc/interfaces/swig/CMakeLists.txt b/xbmc/interfaces/swig/CMakeLists.txt
+index 6e676159eb..d45a2ecbab 100644
+--- a/xbmc/interfaces/swig/CMakeLists.txt
++++ b/xbmc/interfaces/swig/CMakeLists.txt
+@@ -1,43 +1,21 @@
+ function(generate_file file)
+- set(classpath ${GROOVY_DIR}/groovy-all-${GROOVY_VER}.jar
+- ${GROOVY_DIR}/commons-lang-${COMMONS_VER}.jar
+- ${CORE_SOURCE_DIR}/tools/codegenerator
+- ${CMAKE_CURRENT_SOURCE_DIR}/../python)
+- if(NOT CORE_SYSTEM_NAME STREQUAL windows)
+- set(devnull "/dev/null")
+- string(REPLACE ";" ":" classpath "${classpath}")
+- else()
+- set(devnull "nul")
+- endif()
+-
+- set(CPP_FILE ${file}.cpp)
+- add_custom_command(OUTPUT ${CPP_FILE}
+- COMMAND ${SWIG_EXECUTABLE}
+- ARGS -w401 -c++ -o ${file}.xml -xml -I${CORE_SOURCE_DIR}/xbmc -xmllang python ${CMAKE_CURRENT_SOURCE_DIR}/../swig/${file}
+- COMMAND ${Java_JAVA_EXECUTABLE}
+- ARGS -cp "${classpath}" groovy.ui.GroovyMain ${CORE_SOURCE_DIR}/tools/codegenerator/Generator.groovy ${file}.xml ${CMAKE_CURRENT_SOURCE_DIR}/../python/PythonSwig.cpp.template ${file}.cpp > ${devnull}
+- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../swig/${file})
++ set(CPP_FILE ${CORE_SOURCE_DIR}/xbmc/interfaces/python/generated/${file}.cpp)
+ set(SOURCES ${SOURCES} "${CPP_FILE}" PARENT_SCOPE)
+ endfunction()
+
+-find_package(Java COMPONENTS Runtime REQUIRED)
+ find_package(SWIG REQUIRED)
+
+ # The generated bindings
+-set(INPUTS AddonModuleXbmcaddon.i
+- AddonModuleXbmcgui.i
+- AddonModuleXbmc.i
+- AddonModuleXbmcplugin.i
+- AddonModuleXbmcvfs.i
+- AddonModuleXbmcwsgi.i)
+-
+-set(GROOVY_DIR ${CORE_SOURCE_DIR}/tools/codegenerator/groovy)
+-set(GROOVY_VER 2.4.4)
+-set(COMMONS_VER 2.6)
++set(INPUTS AddonModuleXbmcaddon
++ AddonModuleXbmcgui
++ AddonModuleXbmc
++ AddonModuleXbmcplugin
++ AddonModuleXbmcvfs
++ AddonModuleXbmcwsgi)
+
+ foreach(INPUT IN LISTS INPUTS)
+ generate_file(${INPUT})
+- list(APPEND GEN_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${INPUT}.cpp)
++ list(APPEND GEN_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${INPUT}.i.cpp)
+ endforeach()
+
+ add_library(python_binding STATIC ${SOURCES})
diff --git a/media-tv/kodi/kodi-17.0_rc2.ebuild b/media-tv/kodi/kodi-17.0_rc2.ebuild
index 632eaadfdcbd..cf1ad1bb860f 100644
--- a/media-tv/kodi/kodi-17.0_rc2.ebuild
+++ b/media-tv/kodi/kodi-17.0_rc2.ebuild
@@ -17,24 +17,6 @@ CODENAME="Krypton"
SRC_URI="https://github.com/xbmc/libdvdcss/archive/${LIBDVDCSS_COMMIT}.tar.gz -> libdvdcss-${LIBDVDCSS_COMMIT}.tar.gz
https://github.com/xbmc/libdvdread/archive/${LIBDVDREAD_COMMIT}.tar.gz -> libdvdread-${LIBDVDREAD_COMMIT}.tar.gz
https://github.com/xbmc/libdvdnav/archive/${LIBDVDNAV_COMMIT}.tar.gz -> libdvdnav-${LIBDVDNAV_COMMIT}.tar.gz"
-case ${PV} in
-9999)
- EGIT_REPO_URI="git://github.com/xbmc/xbmc.git"
- inherit git-r3
- ;;
-*)
- 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
- !java? ( https://github.com/candrews/gentoo-kodi/raw/master/${MY_P}-generated-addons.tar.xz )"
- KEYWORDS="~amd64 ~x86"
-
- S=${WORKDIR}/xbmc-${MY_PV}-${CODENAME}
- ;;
-esac
DESCRIPTION="Kodi is a free and open source media-player and entertainment hub"
HOMEPAGE="https://kodi.tv/ http://kodi.wiki/"
@@ -44,7 +26,7 @@ SLOT="0"
# use flag is called libusb so that it doesn't fool people in thinking that
# it is _required_ for USB support. Otherwise they'll disable udev and
# that's going to be worse.
-IUSE="airplay alsa bluetooth bluray caps cec +css dbus debug dvd gles java libressl libusb lirc mysql nfs nonfree +opengl +ssl pulseaudio samba sftp test +udev udisks upnp upower vaapi vdpau webserver +X +xslt zeroconf"
+IUSE="airplay alsa bluetooth bluray caps cec +css dbus debug dvd gles libressl libusb lirc mysql nfs nonfree +opengl +ssl pulseaudio samba sftp test +udev udisks upnp upower vaapi vdpau webserver +X +xslt zeroconf"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
|| ( gles opengl )
@@ -127,7 +109,6 @@ DEPEND="${COMMON_DEPEND}
dev-libs/crossguid
dev-util/cmake
dev-util/gperf
- java? ( virtual/jre )
media-libs/giflib
>=media-libs/libjpeg-turbo-1.5.1:=
>=media-libs/libpng-1.6.26:0=
@@ -135,9 +116,33 @@ DEPEND="${COMMON_DEPEND}
virtual/pkgconfig
x86? ( dev-lang/nasm )
"
-# Force java for latest git version to avoid having to hand maintain the
-# generated addons package. #488118
-[[ ${PV} == 9999 ]] && DEPEND+=" virtual/jre"
+case ${PV} in
+9999)
+ EGIT_REPO_URI="git://github.com/xbmc/xbmc.git"
+ inherit git-r3
+ # Force java for latest git version to avoid having to hand maintain the
+ # generated addons package. #488118
+ DEPEND+="
+ virtual/jre
+ "
+ ;;
+*)
+ 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
+ !java? ( https://github.com/candrews/gentoo-kodi/raw/master/${MY_P}-generated-addons.tar.xz )"
+ KEYWORDS="~amd64 ~x86"
+ IUSE+=" java"
+ DEPEND+="
+ java? ( virtual/jre )
+ "
+
+ S=${WORKDIR}/xbmc-${MY_PV}-${CODENAME}
+ ;;
+esac
CONFIG_CHECK="~IP_MULTICAST"
ERROR_IP_MULTICAST="
@@ -153,6 +158,9 @@ pkg_setup() {
}
src_prepare() {
+ if in_iuse java && use !java; then
+ eapply "${FILESDIR}"/${PN}-cmake-no-java.patch
+ fi
cmake-utils_src_prepare
# avoid long delays when powerkit isn't running #348580
diff --git a/media-tv/kodi/kodi-9999.ebuild b/media-tv/kodi/kodi-9999.ebuild
index c79997cefcd8..769a097bae76 100644
--- a/media-tv/kodi/kodi-9999.ebuild
+++ b/media-tv/kodi/kodi-9999.ebuild
@@ -17,24 +17,6 @@ CODENAME="Krypton"
SRC_URI="https://github.com/xbmc/libdvdcss/archive/${LIBDVDCSS_COMMIT}.tar.gz -> libdvdcss-${LIBDVDCSS_COMMIT}.tar.gz
https://github.com/xbmc/libdvdread/archive/${LIBDVDREAD_COMMIT}.tar.gz -> libdvdread-${LIBDVDREAD_COMMIT}.tar.gz
https://github.com/xbmc/libdvdnav/archive/${LIBDVDNAV_COMMIT}.tar.gz -> libdvdnav-${LIBDVDNAV_COMMIT}.tar.gz"
-case ${PV} in
-9999)
- EGIT_REPO_URI="git://github.com/xbmc/xbmc.git"
- inherit git-r3
- ;;
-*)
- 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
- !java? ( https://github.com/candrews/gentoo-kodi/raw/master/${MY_P}-generated-addons.tar.xz )"
- KEYWORDS="~amd64 ~x86"
-
- S=${WORKDIR}/xbmc-${MY_PV}-${CODENAME}
- ;;
-esac
DESCRIPTION="Kodi is a free and open source media-player and entertainment hub"
HOMEPAGE="https://kodi.tv/ http://kodi.wiki/"
@@ -44,7 +26,7 @@ SLOT="0"
# use flag is called libusb so that it doesn't fool people in thinking that
# it is _required_ for USB support. Otherwise they'll disable udev and
# that's going to be worse.
-IUSE="airplay alsa bluetooth bluray caps cec +css dbus debug dvd gles java libressl libusb lirc mysql nfs nonfree +opengl +ssl pulseaudio samba sftp test +udev udisks upnp upower vaapi vdpau webserver +X +xslt zeroconf"
+IUSE="airplay alsa bluetooth bluray caps cec +css dbus debug dvd gles libressl libusb lirc mysql nfs nonfree +opengl +ssl pulseaudio samba sftp test +udev udisks upnp upower vaapi vdpau webserver +X +xslt zeroconf"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
|| ( gles opengl )
@@ -127,7 +109,6 @@ DEPEND="${COMMON_DEPEND}
dev-libs/crossguid
dev-util/cmake
dev-util/gperf
- java? ( virtual/jre )
media-libs/giflib
>=media-libs/libjpeg-turbo-1.5.1:=
>=media-libs/libpng-1.6.26:0=
@@ -135,9 +116,33 @@ DEPEND="${COMMON_DEPEND}
virtual/pkgconfig
x86? ( dev-lang/nasm )
"
-# Force java for latest git version to avoid having to hand maintain the
-# generated addons package. #488118
-[[ ${PV} == 9999 ]] && DEPEND+=" virtual/jre"
+case ${PV} in
+9999)
+ EGIT_REPO_URI="git://github.com/xbmc/xbmc.git"
+ inherit git-r3
+ # Force java for latest git version to avoid having to hand maintain the
+ # generated addons package. #488118
+ DEPEND+="
+ virtual/jre
+ "
+ ;;
+*)
+ 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
+ !java? ( https://github.com/candrews/gentoo-kodi/raw/master/${MY_P}-generated-addons.tar.xz )"
+ KEYWORDS="~amd64 ~x86"
+ IUSE+=" java"
+ DEPEND+="
+ java? ( virtual/jre )
+ "
+
+ S=${WORKDIR}/xbmc-${MY_PV}-${CODENAME}
+ ;;
+esac
CONFIG_CHECK="~IP_MULTICAST"
ERROR_IP_MULTICAST="
@@ -151,6 +156,9 @@ pkg_setup() {
}
src_prepare() {
+ if in_iuse java && use !java; then
+ eapply "${FILESDIR}"/${PN}-cmake-no-java.patch
+ fi
cmake-utils_src_prepare
# avoid long delays when powerkit isn't running #348580