summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHunter Sezen <orbea@fredslev.dk>2018-09-09 23:08:28 +0100
committerDavid Spencer <idlemoor@slackbuilds.org>2018-09-09 23:09:40 +0100
commit18ddd4d1b788ccba7ecfbad081f13b7329156a77 (patch)
treed2a0fb4c9e5c789b8fc02de17d1ee77952be52d6
parentf8f265fedadfcb0c882e0f4ce483a39ac77016de (diff)
downloadslackbuilds-18ddd4d1b788ccba7ecfbad081f13b7329156a77.tar.gz
games/RetroArch: Update with new patch.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
-rw-r--r--games/RetroArch/RetroArch.SlackBuild8
-rw-r--r--games/RetroArch/etc.patch119
2 files changed, 25 insertions, 102 deletions
diff --git a/games/RetroArch/RetroArch.SlackBuild b/games/RetroArch/RetroArch.SlackBuild
index 34df41bebf..e0cdfc6947 100644
--- a/games/RetroArch/RetroArch.SlackBuild
+++ b/games/RetroArch/RetroArch.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=RetroArch
VERSION=${VERSION:-1.7.4}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -129,9 +129,9 @@ sed -e "s|# audio_filter_dir =|audio_filter_dir = ${filter_dir}/audio|" \
# https://github.com/libretro/RetroArch/issues/6889
patch -p1 < $CWD/libretro.patch
-# Revert: sort config file variables
-# https://github.com/libretro/RetroArch/commit/62e89974afbb6628344fb084c50712bfab4419de
-# https://github.com/libretro/RetroArch/pull/6998
+# Update config entries pointer to the new beginning of the list after sorting
+# https://github.com/libretro/RetroArch/commit/9da261c6d9a3f276e44c7f1999aef4fc758cbafd
+# https://github.com/libretro/RetroArch/pull/7178
# https://github.com/libretro/RetroArch/issues/7160
patch -p1 < $CWD/etc.patch
diff --git a/games/RetroArch/etc.patch b/games/RetroArch/etc.patch
index f473103775..d2446e73b7 100644
--- a/games/RetroArch/etc.patch
+++ b/games/RetroArch/etc.patch
@@ -1,108 +1,31 @@
-Author: orbea <orbea@fredslev.dk>
-Date: Fri Aug 31 08:25:16 2018 -0700
+From 9da261c6d9a3f276e44c7f1999aef4fc758cbafd Mon Sep 17 00:00:00 2001
+From: Rob Loach <robloach@gmail.com>
+Date: Mon, 3 Sep 2018 13:31:46 -0400
+Subject: [PATCH] Update config entries pointer to the new beginning of the
+ list after sorting
- Revert "sort config file variables"
-
- This reverts commit 62e89974afbb6628344fb084c50712bfab4419de.
-
- Conflicts:
- libretro-common/file/config_file.c
+---
+ libretro-common/file/config_file.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libretro-common/file/config_file.c b/libretro-common/file/config_file.c
-index 9c2b76b170..15ce4336d1 100644
+index 9c2b76b170..0a63e7781a 100644
--- a/libretro-common/file/config_file.c
+++ b/libretro-common/file/config_file.c
-@@ -68,84 +68,6 @@ struct config_include_list
- static config_file_t *config_file_new_internal(
- const char *path, unsigned depth);
-
--static int config_sort_compare_func(struct config_entry_list *a,
-- struct config_entry_list *b)
--{
-- const char *a_key = a ? a->key : NULL;
-- const char *b_key = b ? b->key : NULL;
--
-- if (!a_key || !b_key)
-- return 0;
--
-- return strcasecmp(a_key, b_key);
--}
--
--/* https://stackoverflow.com/questions/7685/merge-sort-a-linked-list */
--static struct config_entry_list* merge_sort_linked_list(struct config_entry_list *list, int (*compare)(struct config_entry_list *one,struct config_entry_list *two))
--{
-- struct config_entry_list
-- *right = list,
-- *temp = list,
-- *last = list,
-- *result = 0,
-- *next = 0,
-- *tail = 0;
--
-- /* Trivial case. */
-- if (!list || !list->next)
-- return list;
--
-- /* Find halfway through the list (by running two pointers, one at twice the speed of the other). */
-- while (temp && temp->next)
-- {
-- last = right;
-- right = right->next;
-- temp = temp->next->next;
-- }
--
-- /* Break the list in two. (prev pointers are broken here, but we fix later) */
-- last->next = 0;
--
-- /* Recurse on the two smaller lists: */
-- list = merge_sort_linked_list(list, compare);
-- right = merge_sort_linked_list(right, compare);
--
-- /* Merge: */
-- while (list || right)
-- {
-- /* Take from empty lists, or compare: */
-- if (!right)
-- {
-- next = list;
-- list = list->next;
-- }
-- else if (!list)
-- {
-- next = right;
-- right = right->next;
-- }
-- else if (compare(list, right) < 0)
-- {
-- next = list;
-- list = list->next;
-- }
-- else
-- {
-- next = right;
-- right = right->next;
-- }
--
-- if (!result)
-- result = next;
-- else
-- tail->next = next;
--
-- tail = next;
-- }
--
-- return result;
--}
--
- static char *strip_comment(char *str)
- {
- /* Remove everything after comment.
-@@ -998,7 +920,7 @@ void config_file_dump(config_file_t *conf, FILE *file)
- includes = includes->next;
+@@ -999,6 +999,7 @@ void config_file_dump(config_file_t *conf, FILE *file)
}
-- list = merge_sort_linked_list((struct config_entry_list*)conf->entries, config_sort_compare_func);
-+ list = (struct config_entry_list*)conf->entries;
+ list = merge_sort_linked_list((struct config_entry_list*)conf->entries, config_sort_compare_func);
++ conf->entries = list;
while (list)
{
+@@ -1092,7 +1093,7 @@ static void test_config_file(void)
+ test_config_file_parse_contains("foo = \"bar\"", "foo", "bar");
+
+ #if 0
+- /* turns out it treats empty as nonexistent -
++ /* turns out it treats empty as nonexistent -
+ * should probably be fixed */
+ test_config_file_parse_contains("foo = \"\"\n", "foo", "");
+ test_config_file_parse_contains("foo = \"\"", "foo", "");