forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kodi-addon.eclass
38 lines (32 loc) · 867 Bytes
/
kodi-addon.eclass
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: kodi-addon.eclass
# @MAINTAINER:
# @SUPPORTED_EAPIS: 4 5 6 7
# @PROVIDES: cmake cmake-utils
# @BLURB: Helper for correct building and (importantly) installing Kodi addon packages.
# @DESCRIPTION:
# Provides a src_configure function for correct CMake configuration
case "${EAPI:-0}" in
4|5|6)
inherit cmake-utils multilib
;;
7)
inherit cmake
;;
*) die "EAPI=${EAPI} is not supported" ;;
esac
EXPORT_FUNCTIONS src_configure
# @FUNCTION: kodi-addon_src_configure
# @DESCRIPTION:
# Configure handling for Kodi addons
kodi-addon_src_configure() {
mycmakeargs+=(
-DCMAKE_INSTALL_LIBDIR=${EPREFIX%/}/usr/$(get_libdir)/kodi
)
case ${EAPI} in
4|5|6) cmake-utils_src_configure ;;
7) cmake_src_configure ;;
esac
}