dev-python/josepy: 1.1.0 cleanup
[gentoo.git] / eclass / kodi-addon.eclass
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # @ECLASS: kodi-addon.eclass
5 # @MAINTAINER:
6 # candrews@gentoo.org
7 # @SUPPORTED_EAPIS: 4 5 6 7
8 # @BLURB: Helper for correct building and (importantly) installing Kodi addon packages.
9 # @DESCRIPTION:
10 # Provides a src_configure function for correct CMake configuration
11
12 case "${EAPI:-0}" in
13         4|5|6)
14                 inherit cmake-utils multilib
15                 ;;
16         7)
17                 inherit cmake
18                 ;;
19         *) die "EAPI=${EAPI} is not supported" ;;
20 esac
21
22 EXPORT_FUNCTIONS src_configure
23
24 # @FUNCTION: kodi-addon_src_configure
25 # @DESCRIPTION:
26 # Configure handling for Kodi addons
27 kodi-addon_src_configure() {
28
29         mycmakeargs+=(
30                 -DCMAKE_INSTALL_LIBDIR=${EPREFIX%/}/usr/$(get_libdir)/kodi
31         )
32
33         case ${EAPI} in
34                 4|5|6) cmake-utils_src_configure ;;
35                 7) cmake_src_configure ;;
36         esac
37 }