-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PKG: optimize v2
libretro-scummvm
and strip obj. on all (#151)
* PKG: strip `lr-scummvm` & `lr-scummvm-legacy` * PKG: optimize `libretro-scummvm` by removing heavy engines (leave only lesser ones by shared obj plugin size)
- Loading branch information
Showing
6 changed files
with
176 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 0 additions & 94 deletions
94
...etroarch/libretro-scummvm/0003-LIBRETRO-Makefile-optimize-by-reducing-engines-count.patch
This file was deleted.
Oops, something went wrong.
113 changes: 113 additions & 0 deletions
113
...iyoo/retroarch/libretro-scummvm/0003-LIBRETRO-disable-large-engines-with-HEAVY-flag.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
From 8902a8a1afb00339bb66b72710c0887a8d0ca449 Mon Sep 17 00:00:00 2001 | ||
From: Apaczer <[email protected]> | ||
Date: Wed, 12 Feb 2025 22:11:13 +0100 | ||
Subject: [PATCH 3/5] LIBRETRO: disable large engines with HEAVY flag | ||
|
||
0 - default | ||
1 - enable | ||
2 - disable | ||
--- | ||
backends/platform/libretro/Makefile.common | 3 ++- | ||
backends/platform/libretro/heavy_engines.list | 22 +++++++++++++++++++ | ||
.../libretro/scripts/configure_engines.sh | 16 +++++++++++++- | ||
3 files changed, 39 insertions(+), 2 deletions(-) | ||
create mode 100644 backends/platform/libretro/heavy_engines.list | ||
|
||
diff --git a/backends/platform/libretro/Makefile.common b/backends/platform/libretro/Makefile.common | ||
index 01f2ef19ec2..8e179c48c05 100644 | ||
--- a/backends/platform/libretro/Makefile.common | ||
+++ b/backends/platform/libretro/Makefile.common | ||
@@ -29,6 +29,7 @@ ENABLE_VKEYBD = 1 | ||
HAVE_GCC3 = 1 | ||
STATIC_LINKING ?= 0 | ||
LITE ?= 0 | ||
+HEAVY ?= 0 | ||
NO_WIP ?= 1 | ||
USE_LIBCO ?= 1 | ||
USE_MT32EMU ?= 1 | ||
@@ -212,7 +213,7 @@ endif | ||
|
||
ifeq (,$(filter clean datafiles coreinfo,$(MAKECMDGOALS))) | ||
$(info Configuring ScummVM engines...) | ||
-ifneq ($(shell cd $(SCRIPTS_PATH); ./configure_engines.sh $(ROOT_PATH) $(SCUMMVM_PATH) $(NO_WIP) $(STATIC_LINKING) $(LITE) $(UNAVAILABLE_DEPS)),0) | ||
+ifneq ($(shell cd $(SCRIPTS_PATH); ./configure_engines.sh $(ROOT_PATH) $(SCUMMVM_PATH) $(NO_WIP) $(STATIC_LINKING) $(LITE) $(HEAVY) $(UNAVAILABLE_DEPS)),0) | ||
$(error Configuring ScummVM engines failed) | ||
else | ||
-include $(SCUMMVM_PATH)/config.mk.engines | ||
diff --git a/backends/platform/libretro/heavy_engines.list b/backends/platform/libretro/heavy_engines.list | ||
new file mode 100644 | ||
index 00000000000..85606b3fa9c | ||
--- /dev/null | ||
+++ b/backends/platform/libretro/heavy_engines.list | ||
@@ -0,0 +1,22 @@ | ||
+ags | ||
+ | ||
+glk | ||
+ | ||
+kyra | ||
+lol | ||
+eob | ||
+ | ||
+mads | ||
+madsv2 | ||
+ | ||
+mm | ||
+mm1 | ||
+xeen | ||
+ | ||
+tsage | ||
+ | ||
+ultima | ||
+ultima1 | ||
+ultima4 | ||
+ultima6 | ||
+ultima8 | ||
diff --git a/backends/platform/libretro/scripts/configure_engines.sh b/backends/platform/libretro/scripts/configure_engines.sh | ||
index 43a355bd395..3e1ccecf993 100755 | ||
--- a/backends/platform/libretro/scripts/configure_engines.sh | ||
+++ b/backends/platform/libretro/scripts/configure_engines.sh | ||
@@ -22,12 +22,13 @@ | ||
# $3 [REQ] NO_WIP [0,1] | ||
# $4 [REQ] STATIC_LINKING [0,1] | ||
# $5 [REQ] LITE [0,1,2] | ||
+# $6 [REQ] HEAVY [0,1,2] | ||
# $[...] [OPT] Engines dependencies not available | ||
|
||
set -e | ||
|
||
# Exit if in parameters are not provided | ||
-if [ -z $1 ] || [ -z $2 ] || [ -z $3 ] || [ -z $4 ] || [ -z $5 ] ; then | ||
+if [ -z $1 ] || [ -z $2 ] || [ -z $3 ] || [ -z $4 ] || [ -z $5 ] || [ -z $6 ]; then | ||
exit 1 | ||
fi | ||
|
||
@@ -42,6 +43,8 @@ STATIC_LINKING=$1 | ||
shift | ||
LITE=$1 | ||
shift | ||
+HEAVY=$1 | ||
+shift | ||
no_deps=$@ | ||
|
||
cd "${SCUMMVM_PATH}" | ||
@@ -60,6 +63,17 @@ tot_deps="" | ||
# Test LITE | ||
[ $LITE -ne 0 ] && engine_disable_all | ||
|
||
+# Test HEAVY | ||
+if [ $HEAVY -eq 1 ] ; then | ||
+ for eng in $(cat "${BUILD_PATH}"/heavy_engines.list) ; do | ||
+ engine_enable "$eng" | ||
+ done | ||
+elif [ $HEAVY -eq 2 ] ; then | ||
+ for eng in $(cat "${BUILD_PATH}"/heavy_engines.list) ; do | ||
+ engine_disable "$eng" | ||
+ done | ||
+fi | ||
+ | ||
if [ $LITE -eq 1 ] ; then | ||
for eng in $(cat "${BUILD_PATH}"/lite_engines.list) ; do | ||
engine_enable "$eng" | ||
-- | ||
2.45.2.windows.1 | ||
|
34 changes: 34 additions & 0 deletions
34
package/miyoo/retroarch/libretro-scummvm/0005-LR-Makefile-use-TREMOR-explicitly.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From 67682387370edddb2205ff9c1b0fc80b41be23c6 Mon Sep 17 00:00:00 2001 | ||
From: Apaczer <[email protected]> | ||
Date: Tue, 11 Feb 2025 22:22:49 +0100 | ||
Subject: [PATCH 5/5] LR-Makefile: use TREMOR explicitly | ||
|
||
thus disable Fluidsynth from build | ||
also use -fno-PIC | ||
--- | ||
backends/platform/libretro/Makefile | 5 +++-- | ||
1 file changed, 3 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/backends/platform/libretro/Makefile b/backends/platform/libretro/Makefile | ||
index 4a3cdc99236..a7508996a64 100644 | ||
--- a/backends/platform/libretro/Makefile | ||
+++ b/backends/platform/libretro/Makefile | ||
@@ -280,12 +280,13 @@ else ifeq ($(platform), miyoo) | ||
LD = /opt/miyoo/usr/bin/arm-linux-g++ | ||
AR = /opt/miyoo/usr/bin/arm-linux-ar cru | ||
RANLIB = /opt/miyoo/usr/bin/arm-linux-ranlib | ||
- DEFINES += -DDINGUX -fomit-frame-pointer -ffast-math -march=armv5te -mtune=arm926ej-s -fPIC | ||
+ DEFINES += -DDINGUX -fomit-frame-pointer -ffast-math -march=armv5te -mtune=arm926ej-s -fno-PIC | ||
DEFINES += -ffunction-sections -fdata-sections -DDEFAULT_PERF_TUNER -DREDUCE_MEMORY_USAGE -DUNCACHED_PLUGINS | ||
- LDFLAGS += -shared -Wl,--gc-sections -Wl,--version-script=$(ROOT_PATH)/link.T -fPIC | ||
+ LDFLAGS += -shared -Wl,--gc-sections -Wl,--version-script=$(ROOT_PATH)/link.T -fno-PIC | ||
USE_VORBIS = 0 | ||
USE_THEORADEC = 0 | ||
USE_TREMOR = 1 | ||
+ USE_FLUIDSYNTH = 0 | ||
USE_LIBCO = 0 | ||
USE_CURL = 0 | ||
USE_MT32EMU = 0 | ||
-- | ||
2.45.2.windows.1 | ||
|
26 changes: 26 additions & 0 deletions
26
...retroarch/libretro-scummvm/0006-LIBRETRO-force-disable-all-unstable-eng-if-NO_WIP-1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 3e4f8c0f3f3a97cdf9a5e298e8018536029a0c24 Mon Sep 17 00:00:00 2001 | ||
From: Apaczer <[email protected]> | ||
Date: Fri, 14 Feb 2025 14:54:36 +0100 | ||
Subject: [PATCH 6/6] LIBRETRO: force "disable all unstable eng" if NO_WIP=1 | ||
|
||
--- | ||
backends/platform/libretro/scripts/configure_engines.sh | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/backends/platform/libretro/scripts/configure_engines.sh b/backends/platform/libretro/scripts/configure_engines.sh | ||
index 3e1ccecf993..cf69709655e 100755 | ||
--- a/backends/platform/libretro/scripts/configure_engines.sh | ||
+++ b/backends/platform/libretro/scripts/configure_engines.sh | ||
@@ -80,6 +80,9 @@ if [ $LITE -eq 1 ] ; then | ||
done | ||
fi | ||
|
||
+# Test NO_WIP #2 | ||
+[ $NO_WIP -eq 1 ] && engine_disable_all_unstable | ||
+ | ||
# Define engines list | ||
for a in $_engines ; do | ||
# Collect all default engines dependencies and force to yes | ||
-- | ||
2.45.2.windows.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters