From 0992c149b5f9df2518f84693de19c68a357dcd56 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Thu, 24 Jul 2025 20:26:53 +0100 Subject: [PATCH] Move library versions to lib-versions.sh --- misc/lib-versions.sh | 8 ++++++++ misc/update-libs.sh | 26 ++++++++++++++++++-------- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/misc/lib-versions.sh b/misc/lib-versions.sh index 02425192..40e9d656 100644 --- a/misc/lib-versions.sh +++ b/misc/lib-versions.sh @@ -1 +1,9 @@ SDL_VERSION=2.32.8 +OGG_VERSION=1.3.6 +VORBIS_VERSION=1.3.7 +OPUS_VERSION=1.5.2 +OPUSFILE_VERSION=0.12 +ZLIB_VERSION=1.3.1 +JPEG_VERSION=9f +CURL_VERSION=8.15.0 +OPENAL_VERSION=1.24.3 diff --git a/misc/update-libs.sh b/misc/update-libs.sh index 6c6d9d6b..6552cb9b 100755 --- a/misc/update-libs.sh +++ b/misc/update-libs.sh @@ -3,6 +3,9 @@ set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +. ${SCRIPT_DIR}/lib-versions.sh + ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)" CODE="${ROOT}/code" @@ -21,20 +24,27 @@ prepare() curl -sL "${URL}" | tar -xvz -C "${CODE}" | tee "${EXTRACT_LOG}" local DIR=$(head -n1 "${EXTRACT_LOG}") + echo $DIR + if [ ! -d "${CODE}/${DIR}" ]; then + DIR=$(dirname "$DIR") + fi + echo $DIR + ( cd ${CODE}/${DIR} [[ -n "$COMMAND" ]] && eval "$COMMAND" find . -type f -not -regex ${INCLUDE_PATTERN} -delete find . -type f -regex ${EXCLUDE_PATTERN} -delete find . -type d -empty -delete + find . -xtype l -delete ) } -prepare "https://downloads.xiph.org/releases/ogg/libogg-1.3.6.tar.gz" "./configure" "\./\(include\|src\)/.*\.[ch]" -prepare "https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.gz" "./configure" "\./\(include\|lib\)/.*\.[ch]" -prepare "https://downloads.xiph.org/releases/opus/opus-1.5.2.tar.gz" "./configure" "\./\(celt\|include\|silk\|src\)/.*\.[ch]" -prepare "https://downloads.xiph.org/releases/opus/opusfile-0.12.tar.gz" "./configure" "\./\(include\|src\)/.*\.[ch]" -prepare "https://zlib.net/zlib-1.3.1.tar.gz" "./configure" "\./[^/]*\.[ch]" "\./gz.*\.[c]" -prepare "https://www.ijg.org/files/jpegsrc.v9f.tar.gz" "./configure" "\./\(j.*\.c\|.*\.h\)" "\./\(jmem\(ansi\|dos\|mac\|name\)\|jpegtran\)\.c" -prepare "https://curl.se/download/curl-8.15.0.tar.gz" "./configure --with-openssl" "\.*/include/.*\.h" -prepare "https://github.com/kcat/openal-soft/archive/refs/tags/1.24.3.tar.gz" "" "\./include/AL/.*\.h" +prepare "https://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz" "./configure" "\./\(include\|src\)/.*\.[ch]" +prepare "https://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz" "./configure" "\./\(include\|lib\)/.*\.[ch]" +prepare "https://downloads.xiph.org/releases/opus/opus-${OPUS_VERSION}.tar.gz" "./configure" "\./\(celt\|include\|silk\|src\)/.*\.[ch]" +prepare "https://downloads.xiph.org/releases/opus/opusfile-${OPUSFILE_VERSION}.tar.gz" "./configure" "\./\(include\|src\)/.*\.[ch]" +prepare "https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz" "./configure" "\./[^/]*\.[ch]" "\./gz.*\.[c]" +prepare "https://www.ijg.org/files/jpegsrc.v${JPEG_VERSION}.tar.gz" "./configure" "\./\(j.*\.c\|.*\.h\)" "\./\(jmem\(ansi\|dos\|mac\|name\)\|jpegtran\)\.c" +prepare "https://curl.se/download/curl-${CURL_VERSION}.tar.gz" "./configure --with-openssl" "\.*/include/.*\.h" +prepare "https://github.com/kcat/openal-soft/archive/refs/tags/${OPENAL_VERSION}.tar.gz" "" "\./include/AL/.*\.h"