libretro-core.eclass: replace hyphens in default $LIBRETRO_CORE_NAME
authorYuri Konotopov <ykonotopov@gnome.org>
Sun, 18 Aug 2019 07:28:56 +0000 (11:28 +0400)
committerCraig Andrews <candrews@gentoo.org>
Mon, 26 Aug 2019 21:10:17 +0000 (17:10 -0400)
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>
eclass/libretro-core.eclass

index 6825ef24ddab661cfe3775bc24370e9800e37c93..0fe522911f06bcfa0a69e8446b115d23ac6fa205 100644 (file)
@@ -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: