summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Konotopov <ykonotopov@gnome.org>2019-08-18 11:32:57 +0400
committerCraig Andrews <candrews@gentoo.org>2019-08-26 17:10:21 -0400
commit491cc137ff66c3ffa5c7e166a7111deb7a3a2070 (patch)
tree5f656a64db8e6902b2856bdcbe318ffe757eaced /eclass/libretro-core.eclass
parentlibretro-core.eclass: replace hyphens in default $LIBRETRO_CORE_NAME (diff)
downloadgentoo-491cc137ff66c3ffa5c7e166a7111deb7a3a2070.tar.gz
gentoo-491cc137ff66c3ffa5c7e166a7111deb7a3a2070.tar.bz2
gentoo-491cc137ff66c3ffa5c7e166a7111deb7a3a2070.zip
libretro-core.eclass: make $LIBRETRO_CORE_LIB_FILE variable local
Default $LIBRETRO_CORE_LIB_FILE variable value depends on $S which should be set after "inherit" section according to skel.ebuild. Also this variable is used in libretro-core_src_install function only. Signed-off-by: Yuri Konotopov <ykonotopov@gnome.org> Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'eclass/libretro-core.eclass')
-rw-r--r--eclass/libretro-core.eclass21
1 files changed, 15 insertions, 6 deletions
diff --git a/eclass/libretro-core.eclass b/eclass/libretro-core.eclass
index 0fe522911f0..c8c1933764f 100644
--- a/eclass/libretro-core.eclass
+++ b/eclass/libretro-core.eclass
@@ -76,12 +76,6 @@ else
fi
inherit flag-o-matic
-# @ECLASS-VARIABLE: LIBRETRO_CORE_LIB_FILE
-# @REQUIRED
-# @DESCRIPTION:
-# Absolute path of this Libretro core's shared library.
-: ${LIBRETRO_CORE_LIB_FILE:="${S}/${LIBRETRO_CORE_NAME}_libretro.so"}
-
case "${EAPI:-0}" in
6|7)
EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install
@@ -172,12 +166,27 @@ libretro-core_src_compile() {
$([[ -f Makefile.libretro ]] && echo '-f Makefile.libretro')
}
+# @VARIABLE: LIBRETRO_CORE_LIB_FILE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Absolute path of this Libretro core's shared library.
+# src_install.
+# @CODE
+# src_install() {
+# local LIBRETRO_CORE_LIB_FILE="${S}/somecore_libretro.so"
+#
+# libretro-core_src_install
+# }
+# @CODE
+
# @FUNCTION: libretro-core_src_install
# @DESCRIPTION:
# The libretro-core src_install function which is exported.
#
# This function installs the shared library for this Libretro core.
libretro-core_src_install() {
+ local LIBRETRO_CORE_LIB_FILE=${LIBRETRO_CORE_LIB_FILE:-"${S}/${LIBRETRO_CORE_NAME}_libretro.so"}
+
# Absolute path of the directory containing Libretro shared libraries.
local libretro_lib_dir="/usr/$(get_libdir)/libretro"
# If this core's shared library exists, install that.