summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Konotopov <ykonotopov@gnome.org>2019-08-18 11:28:56 +0400
committerCraig Andrews <candrews@gentoo.org>2019-08-26 17:10:17 -0400
commit01deedebb3c1748fbd31fd16a97824c9b23dad2c (patch)
tree865a74e3614fffc03823bdb0fd343516e840fd47 /eclass/libretro-core.eclass
parentsys-kernel/dracut: sync live ebuild deps (diff)
downloadgentoo-01deedebb3c1748fbd31fd16a97824c9b23dad2c.tar.gz
gentoo-01deedebb3c1748fbd31fd16a97824c9b23dad2c.tar.bz2
gentoo-01deedebb3c1748fbd31fd16a97824c9b23dad2c.zip
libretro-core.eclass: replace hyphens in default $LIBRETRO_CORE_NAME
Libretro cores are named with underscores instead of hyphens. E.g. genesis_plus_gx or vba_next. Signed-off-by: Yuri Konotopov <ykonotopov@gnome.org> Closes: https://github.com/gentoo/gentoo/pull/12738 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'eclass/libretro-core.eclass')
-rw-r--r--eclass/libretro-core.eclass12
1 files changed, 8 insertions, 4 deletions
diff --git a/eclass/libretro-core.eclass b/eclass/libretro-core.eclass
index 6825ef24ddab..0fe522911f06 100644
--- a/eclass/libretro-core.eclass
+++ b/eclass/libretro-core.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: libretro-core.eclass
@@ -44,9 +44,13 @@ IUSE="debug"
# @DESCRIPTION:
# Name of this Libretro core. The libretro-core_src_install() phase function
# will install the shared library "${S}/${LIBRETRO_CORE_NAME}_libretro.so" as a
-# Libretro core. Defaults to the name of the current package excluding the
-# "libretro-" prefix (e.g., "mgba" for the package "libretro-mgba").
-: ${LIBRETRO_CORE_NAME:=${PN#libretro-}}
+# Libretro core. Defaults to the name of the current package with the
+# "libretro-" prefix excluded and hyphens replaced with underscores
+# (e.g. genesis_plus_gx for libretro-genesis-plus-gx)
+if [[ -z "${LIBRETRO_CORE_NAME}" ]]; then
+ LIBRETRO_CORE_NAME=${PN#libretro-}
+ LIBRETRO_CORE_NAME=${LIBRETRO_CORE_NAME//-/_}
+fi
# @ECLASS-VARIABLE: LIBRETRO_COMMIT_SHA
# @DESCRIPTION: