summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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 6825ef24dda..0fe522911f0 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: