diff options
author | Hunter Sezen <orbea@fredslev.dk> | 2018-09-01 23:00:47 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-09-08 08:37:38 +0700 |
commit | b06ee4aee8c914c03e51ad792d06ad4156f78d86 (patch) | |
tree | 6183b67e95f26631c642078f5e7de7aa62e00ab6 | |
parent | 8d08ee6e1986f769413b667fe237bd8b10724eff (diff) | |
download | slackbuilds-b06ee4aee8c914c03e51ad792d06ad4156f78d86.tar.gz |
games/RetroArch: Updated for version 1.7.4.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
-rw-r--r-- | games/RetroArch/README | 5 | ||||
-rw-r--r-- | games/RetroArch/RetroArch.SlackBuild | 42 | ||||
-rw-r--r-- | games/RetroArch/RetroArch.info | 6 | ||||
-rw-r--r-- | games/RetroArch/calloc.patch.gz | bin | 506 -> 0 bytes | |||
-rw-r--r-- | games/RetroArch/etc.patch | 108 | ||||
-rw-r--r-- | games/RetroArch/libretro.patch | 71 | ||||
-rw-r--r-- | games/RetroArch/no_content.patch.gz | bin | 633 -> 0 bytes | |||
-rw-r--r-- | games/RetroArch/qt.patch.gz | bin | 595 -> 0 bytes | |||
-rw-r--r-- | games/RetroArch/savestates.patch | 206 |
9 files changed, 416 insertions, 22 deletions
diff --git a/games/RetroArch/README b/games/RetroArch/README index 07a01d187c..e2c154b6f3 100644 --- a/games/RetroArch/README +++ b/games/RetroArch/README @@ -25,9 +25,12 @@ If building debugging symbols asan can also be built: DEBUG=yes ASAN=yes ./RetroArch.SlackBuild Optional dependencies: - ffmpeg jack-audio-connection-kit libxkbcommon miniupnpc + ffmpeg jack-audio-connection-kit libsixel libxkbcommon miniupnpc nvidia-cg-toolkit OpenAL python3 qt5 SDL2 vulkansdk wayland +Discord integration can be enabled with: + DISCORD=yes + Python3 support for shaders will need to be enabled with: PYTHON=yes ./RetroArch.SlackBuild diff --git a/games/RetroArch/RetroArch.SlackBuild b/games/RetroArch/RetroArch.SlackBuild index 3c46c57a4e..34df41bebf 100644 --- a/games/RetroArch/RetroArch.SlackBuild +++ b/games/RetroArch/RetroArch.SlackBuild @@ -23,8 +23,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=RetroArch -VERSION=${VERSION:-1.7.3} -BUILD=${BUILD:-3} +VERSION=${VERSION:-1.7.4} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -81,6 +81,8 @@ fi lib= +[ "${DISCORD:-0}" = 0 ] && lib="${lib} --disable-discord" + if [ "${GLES:-0}" != 0 ]; then lib="${lib} --enable-opengles" elif [ "${GLES3:-0}" != 0 ]; then @@ -88,6 +90,7 @@ elif [ "${GLES3:-0}" != 0 ]; then fi pkg-config --exists flac && lib="${lib} --disable-builtinflac" +pkg-config --exists libsixel && lib="${lib} --enable-sixel" [ -d /usr/include/miniupnpc ] && lib="${lib} --disable-builtinminiupnpc" @@ -114,27 +117,30 @@ fi filter_dir="/usr/lib${LIBDIRSUFFIX}/retroarch/filters" -# Set the default filter directories to be consistent with the installation. +# Set the default directories to be consistent with the installation. sed -e "s|# audio_filter_dir =|audio_filter_dir = ${filter_dir}/audio|" \ -e "s|# video_filter_dir =|video_filter_dir = ${filter_dir}/video|" \ -e "$SED_CORE;$SED_INFO;$SED_MENU" \ -i retroarch.cfg -# Qt: only check for pending events of the main thread -# https://github.com/libretro/RetroArch/commit/c2ad8d47d382c7460bb54c8a7116573d95648f95 -# https://github.com/libretro/RetroArch/issues/6726 -zcat $CWD/qt.patch.gz | patch -p1 - -# Fix a calloc(0) which led to uninitialized data being used later on. -# https://github.com/libretro/RetroArch/commit/8cd8e7d3ae07aa772f0d8c09df7ee10290259c65 -# https://github.com/libretro/RetroArch/pull/6835 -zcat $CWD/calloc.patch.gz | patch -p1 - -# Fixed bug that let Retroarch proceed to retro_run without loading content -# https://github.com/libretro/RetroArch/commit/0e34c12d5c8ea2f861dc29df240c1dc68657d2cf -# https://github.com/libretro/RetroArch/pull/7090 -# https://github.com/libretro/RetroArch/issues/7082 -zcat $CWD/no_content.patch.gz | patch -p1 +# Update libretro-common +# https://github.com/libretro/RetroArch/commit/7c22f265b8928aca6e5706ab3a8bab2de0e24b8c +# https://github.com/libretro/libretro-common/pull/84 +# 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 +# https://github.com/libretro/RetroArch/issues/7160 +patch -p1 < $CWD/etc.patch + +# revert #7156 +# https://github.com/libretro/RetroArch/commit/64459bda3a8add5c5e679b3fa4d1fd4cd7796233 +# https://github.com/libretro/RetroArch/commit/dd9db4140304c480745f7f344ff67041bdd2c9ad +# https://github.com/libretro/RetroArch/pull/7162 +# https://github.com/libretro/RetroArch/pull/7163 +patch -p1 < $CWD/savestates.patch # Set $lib to a portable array eval "set -- $lib" diff --git a/games/RetroArch/RetroArch.info b/games/RetroArch/RetroArch.info index ba14eff1c4..e157330043 100644 --- a/games/RetroArch/RetroArch.info +++ b/games/RetroArch/RetroArch.info @@ -1,8 +1,8 @@ PRGNAM="RetroArch" -VERSION="1.7.3" +VERSION="1.7.4" HOMEPAGE="https://www.libretro.com/" -DOWNLOAD="https://github.com/libretro/RetroArch/releases/download/v1.7.3/RetroArch-1.7.3.tar.xz" -MD5SUM="9ae133fec4c2f787a12aacdf50e61e9e" +DOWNLOAD="https://github.com/libretro/RetroArch/releases/download/v1.7.4/RetroArch-1.7.4.tar.xz" +MD5SUM="b5e1ce8a3abe7a2aee5f0ebe09b9d914" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/games/RetroArch/calloc.patch.gz b/games/RetroArch/calloc.patch.gz Binary files differdeleted file mode 100644 index cd2fd8abfb..0000000000 --- a/games/RetroArch/calloc.patch.gz +++ /dev/null diff --git a/games/RetroArch/etc.patch b/games/RetroArch/etc.patch new file mode 100644 index 0000000000..f473103775 --- /dev/null +++ b/games/RetroArch/etc.patch @@ -0,0 +1,108 @@ +Author: orbea <orbea@fredslev.dk> +Date: Fri Aug 31 08:25:16 2018 -0700 + + Revert "sort config file variables" + + This reverts commit 62e89974afbb6628344fb084c50712bfab4419de. + + Conflicts: + libretro-common/file/config_file.c + +diff --git a/libretro-common/file/config_file.c b/libretro-common/file/config_file.c +index 9c2b76b170..15ce4336d1 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; + } + +- list = merge_sort_linked_list((struct config_entry_list*)conf->entries, config_sort_compare_func); ++ list = (struct config_entry_list*)conf->entries; + + while (list) + { diff --git a/games/RetroArch/libretro.patch b/games/RetroArch/libretro.patch new file mode 100644 index 0000000000..244be47300 --- /dev/null +++ b/games/RetroArch/libretro.patch @@ -0,0 +1,71 @@ +From 7c22f265b8928aca6e5706ab3a8bab2de0e24b8c Mon Sep 17 00:00:00 2001 +From: twinaphex <libretro@gmail.com> +Date: Fri, 31 Aug 2018 02:28:20 +0200 +Subject: [PATCH] Update libretro-common + +--- + libretro-common/audio/dsp_filters/reverb.c | 18 +++++------------- + 1 file changed, 5 insertions(+), 13 deletions(-) + +diff --git a/libretro-common/audio/dsp_filters/reverb.c b/libretro-common/audio/dsp_filters/reverb.c +index e9bc8170e1..d1a770fd34 100644 +--- a/libretro-common/audio/dsp_filters/reverb.c ++++ b/libretro-common/audio/dsp_filters/reverb.c +@@ -96,8 +96,8 @@ struct revmodel + struct comb combL[numcombs]; + struct allpass allpassL[numallpasses]; + +- float **bufcomb; +- float **bufallpass; ++ float *bufcomb[numcombs]; ++ float *bufallpass[numallpasses]; + + float gain; + float roomsize, roomsize1; +@@ -194,27 +194,23 @@ static void revmodel_init(struct revmodel *rev,int srate) + double r = srate * (1 / 44100.0); + unsigned c; + +- rev->bufcomb=malloc(numcombs*sizeof(float*)); + for (c = 0; c < numcombs; ++c) + { + rev->bufcomb[c] = malloc(r*comb_lengths[c]*sizeof(float)); + rev->combL[c].buffer = rev->bufcomb[c]; ++ memset(rev->combL[c].buffer,0,r*comb_lengths[c]*sizeof(float)); + rev->combL[c].bufsize=r*comb_lengths[c]; + } + +- rev->bufallpass=malloc(numallpasses*sizeof(float*)); + for (c = 0; c < numallpasses; ++c) + { + rev->bufallpass[c] = malloc(r*allpass_lengths[c]*sizeof(float)); + rev->allpassL[c].buffer = rev->bufallpass[c]; ++ memset(rev->allpassL[c].buffer,0,r*allpass_lengths[c]*sizeof(float)); + rev->allpassL[c].bufsize=r*allpass_lengths[c]; ++ rev->allpassL[c].feedback = 0.5f; + } + +- rev->allpassL[0].feedback = 0.5f; +- rev->allpassL[1].feedback = 0.5f; +- rev->allpassL[2].feedback = 0.5f; +- rev->allpassL[3].feedback = 0.5f; +- + revmodel_setwet(rev, initialwet); + revmodel_setroomsize(rev, initialroom); + revmodel_setdry(rev, initialdry); +@@ -237,15 +233,11 @@ static void reverb_free(void *data) + free(rev->left.bufcomb[i]); + free(rev->right.bufcomb[i]); + } +- free(rev->left.bufcomb); +- free(rev->right.bufcomb); + + for (i = 0; i < numallpasses; i++) { + free(rev->left.bufallpass[i]); + free(rev->right.bufallpass[i]); + } +- free(rev->left.bufallpass); +- free(rev->right.bufallpass); + free(data); + } + diff --git a/games/RetroArch/no_content.patch.gz b/games/RetroArch/no_content.patch.gz Binary files differdeleted file mode 100644 index 27dcc4f7bf..0000000000 --- a/games/RetroArch/no_content.patch.gz +++ /dev/null diff --git a/games/RetroArch/qt.patch.gz b/games/RetroArch/qt.patch.gz Binary files differdeleted file mode 100644 index d1563c3d58..0000000000 --- a/games/RetroArch/qt.patch.gz +++ /dev/null diff --git a/games/RetroArch/savestates.patch b/games/RetroArch/savestates.patch new file mode 100644 index 0000000000..932783783b --- /dev/null +++ b/games/RetroArch/savestates.patch @@ -0,0 +1,206 @@ +From 64459bda3a8add5c5e679b3fa4d1fd4cd7796233 Mon Sep 17 00:00:00 2001 +From: Tatsuya79 <jeanpascalmeunier@hotmail.com> +Date: Sat, 1 Sep 2018 01:41:21 +0200 +Subject: [PATCH] revert #7156 + +revert https://github.com/libretro/RetroArch/pull/7156 +--- + tasks/task_save.c | 142 ++++++++++++++++++++-------------------------- + 1 file changed, 62 insertions(+), 80 deletions(-) + +diff --git a/tasks/task_save.c b/tasks/task_save.c +index fb08c229b7..1b5d93be4e 100644 +--- a/tasks/task_save.c ++++ b/tasks/task_save.c +@@ -555,33 +555,6 @@ static void task_save_handler_finished(retro_task_t *task, + free(state); + } + +-void* get_serialized_data(const char *path, size_t serial_size) +-{ +- retro_ctx_serialize_info_t serial_info; +- bool ret = false; +- void *data = NULL; +- +- data = malloc(serial_size); +- +- if (!data) +- return NULL; +- +- RARCH_LOG("%s: %d %s.\n", +- msg_hash_to_str(MSG_STATE_SIZE), +- (int)serial_size, +- msg_hash_to_str(MSG_BYTES)); +- +- serial_info.data = data; +- serial_info.size = serial_size; +- ret = core_serialize(&serial_info); +- if ( !ret ) +- { +- free(data) ; +- return NULL ; +- } +- return data ; +-} +- + /** + * task_save_handler: + * @task : the task being worked on +@@ -603,22 +576,9 @@ static void task_save_handler(retro_task_t *task) + return; + } + +- if (!state->data) +- { +- state->data = get_serialized_data(state->path, state->size) ; +- } +- + remaining = MIN(state->size - state->written, SAVE_STATE_CHUNK); +- +- if ( state->data ) +- { +- written = (int)intfstream_write(state->file, +- (uint8_t*)state->data + state->written, remaining); +- } +- else +- { +- written = 0 ; +- } ++ written = (int)intfstream_write(state->file, ++ (uint8_t*)state->data + state->written, remaining); + + state->written += written; + +@@ -1174,7 +1134,6 @@ error: + free(task); + } + +- + /** + * content_save_state: + * @path : path of saved state that shall be written to. +@@ -1185,62 +1144,85 @@ error: + **/ + bool content_save_state(const char *path, bool save_to_disk, bool autosave) + { +- //retro_ctx_serialize_info_t serial_info; ++ retro_ctx_serialize_info_t serial_info; + retro_ctx_size_info_t info; + bool ret = false; + void *data = NULL; + + core_serialize_size(&info); + +- if (save_to_disk) ++ RARCH_LOG("%s: \"%s\".\n", ++ msg_hash_to_str(MSG_SAVING_STATE), ++ path); ++ ++ if (info.size == 0) ++ return false; ++ ++ data = malloc(info.size); ++ ++ if (!data) ++ return false; ++ ++ RARCH_LOG("%s: %d %s.\n", ++ msg_hash_to_str(MSG_STATE_SIZE), ++ (int)info.size, ++ msg_hash_to_str(MSG_BYTES)); ++ ++ serial_info.data = data; ++ serial_info.size = info.size; ++ ret = core_serialize(&serial_info); ++ ++ if (ret) + { +- if (filestream_exists(path) && !autosave) ++ if (save_to_disk) + { +- /* Before overwritting the savestate file, load it into a buffer +- to allow undo_save_state() to work */ +- /* TODO/FIXME - Use msg_hash_to_str here */ +- RARCH_LOG("%s ...\n", +- msg_hash_to_str(MSG_FILE_ALREADY_EXISTS_SAVING_TO_BACKUP_BUFFER)); ++ if (filestream_exists(path) && !autosave) ++ { ++ /* Before overwritting the savestate file, load it into a buffer ++ to allow undo_save_state() to work */ ++ /* TODO/FIXME - Use msg_hash_to_str here */ ++ RARCH_LOG("%s ...\n", ++ msg_hash_to_str(MSG_FILE_ALREADY_EXISTS_SAVING_TO_BACKUP_BUFFER)); + +- task_push_load_and_save_state(path, data, info.size, true, autosave); ++ task_push_load_and_save_state(path, data, info.size, true, autosave); ++ } ++ else ++ task_push_save_state(path, data, info.size, autosave); + } + else +- task_push_save_state(path, data, info.size, autosave); +- } +- else +- { +- data = get_serialized_data(path, info.size) ; +- if ( data == NULL ) + { +- RARCH_ERR("%s \"%s\".\n", +- msg_hash_to_str(MSG_FAILED_TO_SAVE_STATE_TO), +- path); +- return false ; +- } +- /* save_to_disk is false, which means we are saving the state +- in undo_load_buf to allow content_undo_load_state() to restore it */ ++ /* save_to_disk is false, which means we are saving the state ++ in undo_load_buf to allow content_undo_load_state() to restore it */ + +- /* If we were holding onto an old state already, clean it up first */ +- if (undo_load_buf.data) +- { +- free(undo_load_buf.data); +- undo_load_buf.data = NULL; +- } ++ /* If we were holding onto an old state already, clean it up first */ ++ if (undo_load_buf.data) ++ { ++ free(undo_load_buf.data); ++ undo_load_buf.data = NULL; ++ } + +- undo_load_buf.data = malloc(info.size); +- if (!undo_load_buf.data) +- { ++ undo_load_buf.data = malloc(info.size); ++ if (!undo_load_buf.data) ++ { ++ free(data); ++ return false; ++ } ++ ++ memcpy(undo_load_buf.data, data, info.size); + free(data); +- return false; ++ undo_load_buf.size = info.size; ++ strlcpy(undo_load_buf.path, path, sizeof(undo_load_buf.path)); + } +- +- memcpy(undo_load_buf.data, data, info.size); ++ } ++ else ++ { + free(data); +- undo_load_buf.size = info.size; +- strlcpy(undo_load_buf.path, path, sizeof(undo_load_buf.path)); ++ RARCH_ERR("%s \"%s\".\n", ++ msg_hash_to_str(MSG_FAILED_TO_SAVE_STATE_TO), ++ path); + } + +- return true; ++ return ret; + } + + /** +-- +2.18.0 |