Skip to content

Commit

Permalink
Merge pull request #1 from s09bQ5/updates
Browse files Browse the repository at this point in the history
Add CI build job and update packages
  • Loading branch information
barbeque-squared authored Aug 20, 2024
2 parents 97b88f3 + 67f6a4f commit 335e066
Show file tree
Hide file tree
Showing 25 changed files with 182 additions and 69 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build

on: [push, pull_request]
jobs:
build_i686:
name: Build for 32 bit x86
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install autopoint gperf intltool libtool-bin lzip python3-mako
- name: Checkout Repository
uses: actions/checkout@v4
- name: Extract Source Hashes
run: |
fgrep '(PKG)_CHECKSUM' src/*.mk > hashes.txt
- name: Cache Downloaded Packages
id: cache-pkg
uses: actions/cache@v4
with:
path: pkg
key: pkg-${{hashFiles('hashes.txt')}}
restore-keys: |
pkg-
- name: Cache Object Files
id: cache-ccache
uses: actions/cache@v4
with:
path: .ccache/ccache
key: ccache-${{github.sha}}
restore-keys: |
ccache-
- name: Build
run: |
mkdir /tmp/mxe
sudo mount --bind . /tmp/mxe
cd /tmp/mxe
./build.sh
- name: Collect Artifacts
uses: actions/upload-artifact@v4
with:
name: usdx-dlls-i686
path: DLLs/*
if-no-files-found: error
- name: Cleanup Download Cache
if: ${{ steps.cache-pkg.outputs.cache-hit != 'true' }}
run: |
find pkg -type f -not -anewer settings.mk -print0 | xargs -r -0 rm -v
- name: Cleanup Object File Cache
if: ${{ steps.cache-ccache.outputs.cache-hit != 'true' }}
run: |
find .ccache/ccache -type f -not -anewer settings.mk -not -name ccache.conf -print0 | xargs -r -0 rm
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ if [ "`pwd`" != $MXE ] ; then
fi
touch src/ffmpeg.mk src/dav1d.mk src/freetype-bootstrap.mk src/libjpeg-turbo.mk src/libpng.mk src/portaudio.mk src/sqlite.mk src/lua.mk src/sdl2.mk src/sdl2_image.mk src/zlib.mk src/libwebp.mk src/tiff.mk
export SOURCE_DATE_EPOCH=0
make MXE_TARGETS=i686-w64-mingw32.shared ffmpeg sdl2_image freetype-bootstrap portaudio sqlite lua
make -j 2 JOBS=2 MXE_TARGETS=i686-w64-mingw32.shared ffmpeg sdl2_image freetype-bootstrap portaudio sqlite lua
mkdir -p $MXE/DLLs
for i in avcodec-60 avformat-60 avutil-58 swresample-4 swscale-7 libdav1d libjpeg-8 libpng16-16 libtiff-6 libwebp-7 SDL2 SDL2_image zlib1 lua54:lua5.4 libsqlite3-0:sqlite3 libfreetype-6:freetype6 libportaudio-2:portaudio_x86 ; do
for i in avcodec-61 avformat-61 avutil-59 swresample-5 swscale-8 libdav1d libjpeg-8 libpng16-16 libtiff-6 libwebp-7 SDL2 SDL2_image zlib1 lua54:lua5.4 libsqlite3-0:sqlite3 libfreetype-6:freetype6 libportaudio-2:portaudio_x86 ; do
j=${i##*:}
i=${i%%:*}
$MXE/usr/bin/i686-w64-mingw32.shared-objcopy --only-keep-debug $MXE/usr/i686-w64-mingw32.shared/bin/$i.dll $MXE/DLLs/$j.debug
Expand Down
4 changes: 2 additions & 2 deletions src/dav1d.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ PKG := dav1d
$(PKG)_WEBSITE := https://code.videolan.org/videolan/dav1d/
$(PKG)_DESCR := dav1d
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.2.0
$(PKG)_CHECKSUM := 231bed8bc1bb28a41d88da6b4c2c118de84b92e5f1d67caffa1b7f81aaea8c6e
$(PKG)_VERSION := 1.4.3
$(PKG)_CHECKSUM := 42fe524bcc82ea3a830057178faace22923a79bad3d819a4962d8cfc54c36f19
$(PKG)_SUBDIR := dav1d-$($(PKG)_VERSION)
$(PKG)_FILE := dav1d-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := http://ftp.videolan.org/pub/videolan/dav1d/$($(PKG)_VERSION)/$($(PKG)_FILE)
Expand Down
10 changes: 5 additions & 5 deletions src/ffmpeg-1-fixes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Subject: [PATCH 2/2] avoid warning: cast from pointer to integer of different
when checking opus

diff --git a/configure b/configure
index 1111111..2222222 100755
index 4f5353f84b..492b3c84a0 100755
--- a/configure
+++ b/configure
@@ -1342,7 +1342,7 @@ check_func_headers(){
@@ -1390,7 +1390,7 @@ check_func_headers(){
done
echo "#include <stdint.h>"
for func in $funcs; do
Expand All @@ -23,15 +23,15 @@ index 1111111..2222222 100755
done
echo "int main(void) { int ret = 0;"
# LTO could optimize out the test functions without this
@@ -2256,7 +2256,6 @@ SYSTEM_FUNCS="
@@ -2359,7 +2359,6 @@ SYSTEM_FUNCS="
access
aligned_malloc
arc4random
arc4random_buf
- clock_gettime
closesocket
CommandLineToArgvW
fcntl
@@ -2288,7 +2287,6 @@ SYSTEM_FUNCS="
@@ -2391,7 +2390,6 @@ SYSTEM_FUNCS="
mkstemp
mmap
mprotect
Expand Down
10 changes: 5 additions & 5 deletions src/ffmpeg-2-image-base.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/configure b/configure
index 6ad7529..9d0c329 100755
index 492b3c84a0..dfa7faf6dd 100755
--- a/configure
+++ b/configure
@@ -5605,12 +5605,13 @@ case $target_os in
@@ -5799,12 +5799,13 @@ case $target_os in
SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
SLIB_CREATE_DEF_CMD='EXTERN_PREFIX="$(EXTERN_PREFIX)" AR="$(AR_CMD)" NM="$(NM_CMD)" $(SRC_PATH)/compat/windows/makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)'
Expand All @@ -19,7 +19,7 @@ index 6ad7529..9d0c329 100755
# ld will strip relocations from executables even though we need them
# for dynamicbase (ASLR). Using -pie does retain the reloc section
diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile
index 118daca..4167937 100644
index 21c5e9b0d4..6c3a508150 100644
--- a/libavcodec/x86/Makefile
+++ b/libavcodec/x86/Makefile
@@ -1,3 +1,6 @@
Expand All @@ -30,7 +30,7 @@ index 118daca..4167937 100644

# subsystems
diff --git a/libswresample/x86/Makefile b/libswresample/x86/Makefile
index fa0641f..e354bc4 100644
index fa0641f03f..e354bc491a 100644
--- a/libswresample/x86/Makefile
+++ b/libswresample/x86/Makefile
@@ -1,3 +1,7 @@
Expand All @@ -42,7 +42,7 @@ index fa0641f..e354bc4 100644
x86/rematrix.o\
x86/resample.o\
diff --git a/libswscale/x86/Makefile b/libswscale/x86/Makefile
index 6839149..f2ba7b5 100644
index 68391494be..f2ba7b53fc 100644
--- a/libswscale/x86/Makefile
+++ b/libswscale/x86/Makefile
@@ -1,3 +1,7 @@
Expand Down
4 changes: 2 additions & 2 deletions src/ffmpeg.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
PKG := ffmpeg
$(PKG)_WEBSITE := https://ffmpeg.org/
$(PKG)_IGNORE :=
$(PKG)_VERSION := 6.0
$(PKG)_CHECKSUM := 57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082
$(PKG)_VERSION := 7.0.2
$(PKG)_CHECKSUM := 8646515b638a3ad303e23af6a3587734447cb8fc0a0c064ecdb8e95c4fd8b389
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://ffmpeg.org/releases/$($(PKG)_FILE)
Expand Down
4 changes: 2 additions & 2 deletions src/freetds.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ PKG := freetds
$(PKG)_WEBSITE := https://www.freetds.org/
$(PKG)_DESCR := FreeTDS
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.3.18
$(PKG)_CHECKSUM := 1d8561d57c71991a28f4681343785c23a6a3eb54d5bcd23897d07e3825ff2d56
$(PKG)_VERSION := 1.3.20
$(PKG)_CHECKSUM := 20ae11f3b806e4fbc0fa0b5931fb473bb5748bee9d487f6aa12885083578a5ed
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := https://www.freetds.org/files/stable/$($(PKG)_FILE)
Expand Down
4 changes: 2 additions & 2 deletions src/freetype.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
PKG := freetype
$(PKG)_WEBSITE := https://www.freetype.org/
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.13.0
$(PKG)_CHECKSUM := 5ee23abd047636c24b2d43c6625dcafc66661d1aca64dec9e0d05df29592624c
$(PKG)_VERSION := 2.13.3
$(PKG)_CHECKSUM := 0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289
$(PKG)_SUBDIR := freetype-$($(PKG)_VERSION)
$(PKG)_FILE := freetype-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/freetype/freetype2/$(shell echo '$($(PKG)_VERSION)' | cut -d . -f 1,2,3)/$($(PKG)_FILE)
Expand Down
4 changes: 2 additions & 2 deletions src/gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ PKG := gcc
$(PKG)_WEBSITE := https://gcc.gnu.org/
$(PKG)_DESCR := GCC
$(PKG)_IGNORE :=
$(PKG)_VERSION := 11.3.0
$(PKG)_VERSION := 11.5.0
$(PKG)_RELEASE := $($(PKG)_VERSION)
$(PKG)_CHECKSUM := b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39
$(PKG)_CHECKSUM := a6e21868ead545cf87f0c01f84276e4b5281d672098591c1c896241f09363478
$(PKG)_SUBDIR := gcc-$($(PKG)_VERSION)
$(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://ftp.gnu.org/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)
Expand Down
4 changes: 2 additions & 2 deletions src/gmp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ PKG := gmp
$(PKG)_WEBSITE := https://gmplib.org/
$(PKG)_DESCR := GMP
$(PKG)_IGNORE :=
$(PKG)_VERSION := 6.2.1
$(PKG)_CHECKSUM := fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2
$(PKG)_VERSION := 6.3.0
$(PKG)_CHECKSUM := a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://gmplib.org/download/$(PKG)/$($(PKG)_FILE)
Expand Down
6 changes: 3 additions & 3 deletions src/isl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ PKG := isl
$(PKG)_WEBSITE := https://libisl.sourceforge.io/
$(PKG)_DESCR := Integer Set Library
$(PKG)_IGNORE :=
$(PKG)_VERSION := 0.16.1
$(PKG)_CHECKSUM := 412538bb65c799ac98e17e8cfcdacbb257a57362acfaaff254b0fcae970126d2
$(PKG)_VERSION := 0.26
$(PKG)_CHECKSUM := a0b5cb06d24f9fa9e77b55fabbe9a3c94a336190345c2555f9915bb38e976504
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://libisl.sourceforge.io/$($(PKG)_FILE)
$(PKG)_URL_2 := https://gcc.gnu.org/pub/gcc/infrastructure/$($(PKG)_FILE)
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
Expand Down
12 changes: 12 additions & 0 deletions src/libjpeg-turbo-4-libgcc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt
index aea0b9d..4f338a9 100644
--- a/sharedlib/CMakeLists.txt
+++ b/sharedlib/CMakeLists.txt
@@ -62,6 +62,7 @@ if(MSVC)
# The jsimd_*.c file is built using /MT, so this prevents a linker warning.
set_target_properties(jpeg PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT /NODEFAULTLIB:LIBCMTD")
elseif(MINGW)
+ set_target_properties(jpeg PROPERTIES LINK_FLAGS "-static-libgcc")
set_target_properties(jpeg PROPERTIES SUFFIX -${SO_MAJOR_VERSION}.dll)
endif()

4 changes: 2 additions & 2 deletions src/libpng.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
PKG := libpng
$(PKG)_WEBSITE := http://www.libpng.org/
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.6.39
$(PKG)_CHECKSUM := 1f4696ce70b4ee5f85f1e1623dc1229b210029fa4b7aee573df3e2ba7b036937
$(PKG)_VERSION := 1.6.43
$(PKG)_CHECKSUM := 6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c
$(PKG)_SUBDIR := libpng-$($(PKG)_VERSION)
$(PKG)_FILE := libpng-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/libpng/libpng16/$($(PKG)_VERSION)/$($(PKG)_FILE)
Expand Down
8 changes: 4 additions & 4 deletions src/libwebp-1-deptweaks.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/sharpyuv/Makefile.am b/sharpyuv/Makefile.am
index b6b4675..54692d9 100644
index 1a94d46..9e0ef3e 100644
--- a/sharpyuv/Makefile.am
+++ b/sharpyuv/Makefile.am
@@ -1,9 +1,7 @@
Expand All @@ -14,15 +14,15 @@ index b6b4675..54692d9 100644
noinst_LTLIBRARIES += libsharpyuv_neon.la

diff --git a/src/Makefile.am b/src/Makefile.am
index b2979fb..3bdc523 100644
index 1dafadd..8940228 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -36,7 +36,7 @@ libwebp_la_LIBADD += utils/libwebputils.la
# other than the ones listed on the command line, i.e., after linking, it will
# not have unresolved symbols. Some platforms (Windows among them) require all
# symbols in shared libraries to be resolved at library creation.
-libwebp_la_LDFLAGS = -no-undefined -version-info 8:8:1
+libwebp_la_LDFLAGS = -no-undefined -version-info 8:8:1 -XCClinker -static-libgcc
-libwebp_la_LDFLAGS = -no-undefined -version-info 8:9:1
+libwebp_la_LDFLAGS = -no-undefined -version-info 8:9:1 -XCClinker -static-libgcc
libwebpincludedir = $(includedir)/webp
pkgconfig_DATA = libwebp.pc

4 changes: 2 additions & 2 deletions src/libwebp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
PKG := libwebp
$(PKG)_WEBSITE := https://developers.google.com/speed/webp/
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.3.2
$(PKG)_CHECKSUM := 2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4
$(PKG)_VERSION := 1.4.0
$(PKG)_CHECKSUM := 61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://storage.googleapis.com/downloads.webmproject.org/releases/webp/$($(PKG)_FILE)
Expand Down
4 changes: 2 additions & 2 deletions src/lua.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ PKG := lua
$(PKG)_WEBSITE := https://www.lua.org/
$(PKG)_DESCR := Lua
$(PKG)_IGNORE :=
$(PKG)_VERSION := 5.4.6
$(PKG)_VERSION := 5.4.7
# Shared version and luarocks subdir
$(PKG)_SHORTVER := $(call SHORT_PKG_VERSION,$(PKG))
$(PKG)_DLLVER := $(subst .,,$($(PKG)_SHORTVER))
$(PKG)_CHECKSUM := 7d5ea1b9cb6aa0b59ca3dde1c6adcb57ef83a1ba8e5432c0ecd06bf439b3ad88
$(PKG)_CHECKSUM := 9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30
$(PKG)_SUBDIR := lua-$($(PKG)_VERSION)
$(PKG)_FILE := lua-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://www.lua.org/ftp/$($(PKG)_FILE)
Expand Down
4 changes: 2 additions & 2 deletions src/mingw-w64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ PKG := mingw-w64
$(PKG)_WEBSITE := https://mingw-w64.sourceforge.io/
$(PKG)_DESCR := MinGW-w64 Runtime
$(PKG)_IGNORE :=
$(PKG)_VERSION := 11.0.0
$(PKG)_CHECKSUM := bd0ea1633bd830204cc23a696889335e9d4a32b8619439ee17f22188695fcc5f
$(PKG)_VERSION := 12.0.0
$(PKG)_CHECKSUM := cc41898aac4b6e8dd5cffd7331b9d9515b912df4420a3a612b5ea2955bbeed2f
$(PKG)_SUBDIR := $(PKG)-v$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-v$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(PKG)-release/$($(PKG)_FILE)
Expand Down
4 changes: 2 additions & 2 deletions src/mpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ PKG := mpc
$(PKG)_WEBSITE := http://www.multiprecision.org/
$(PKG)_DESCR := GNU MPC
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.2.1
$(PKG)_CHECKSUM := 17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459
$(PKG)_VERSION := 1.3.1
$(PKG)_CHECKSUM := ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8
$(PKG)_SUBDIR := mpc-$($(PKG)_VERSION)
$(PKG)_FILE := mpc-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://ftp.gnu.org/gnu/mpc/$($(PKG)_FILE)
Expand Down
4 changes: 2 additions & 2 deletions src/mpfr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
PKG := mpfr
$(PKG)_WEBSITE := https://www.mpfr.org/
$(PKG)_IGNORE :=
$(PKG)_VERSION := 4.1.0
$(PKG)_CHECKSUM := 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f
$(PKG)_VERSION := 4.2.1
$(PKG)_CHECKSUM := 277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE)
Expand Down
60 changes: 60 additions & 0 deletions src/sdl2_image-1-no-webp-anim.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
From 8814e3b506b333d6fcd15f5baa815029b90611fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= <[email protected]>
Date: Sun, 18 Aug 2024 21:28:59 +0200
Subject: [PATCH] Remove webp animation support

---
src/IMG_webp.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/src/IMG_webp.c b/src/IMG_webp.c
index 2bf6443..aa920af 100644
--- a/src/IMG_webp.c
+++ b/src/IMG_webp.c
@@ -49,10 +49,12 @@ static struct {
VP8StatusCode (*WebPGetFeaturesInternal) (const uint8_t *data, size_t data_size, WebPBitstreamFeatures* features, int decoder_abi_version);
uint8_t* (*WebPDecodeRGBInto) (const uint8_t* data, size_t data_size, uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
uint8_t* (*WebPDecodeRGBAInto) (const uint8_t* data, size_t data_size, uint8_t* output_buffer, size_t output_buffer_size, int output_stride);
+#if 0
WebPDemuxer* (*WebPDemuxInternal)(const WebPData* data, int allow_partial, WebPDemuxState* state, int version);
int (*WebPDemuxGetFrame)(const WebPDemuxer* dmux, int frame_number, WebPIterator* iter);
uint32_t (*WebPDemuxGetI)(const WebPDemuxer* dmux, WebPFormatFeature feature);
void (*WebPDemuxDelete)(WebPDemuxer* dmux);
+#endif
} lib;

#if defined(LOAD_WEBP_DYNAMIC) && defined(LOAD_WEBPDEMUX_DYNAMIC)
@@ -91,10 +93,12 @@ int IMG_InitWEBP()
FUNCTION_LOADER_LIBWEBP(WebPGetFeaturesInternal, VP8StatusCode (*) (const uint8_t *data, size_t data_size, WebPBitstreamFeatures* features, int decoder_abi_version))
FUNCTION_LOADER_LIBWEBP(WebPDecodeRGBInto, uint8_t * (*) (const uint8_t* data, size_t data_size, uint8_t* output_buffer, size_t output_buffer_size, int output_stride))
FUNCTION_LOADER_LIBWEBP(WebPDecodeRGBAInto, uint8_t * (*) (const uint8_t* data, size_t data_size, uint8_t* output_buffer, size_t output_buffer_size, int output_stride))
+#if 0
FUNCTION_LOADER_LIBWEBPDEMUX(WebPDemuxInternal, WebPDemuxer* (*)(const WebPData*, int, WebPDemuxState*, int))
FUNCTION_LOADER_LIBWEBPDEMUX(WebPDemuxGetFrame, int (*)(const WebPDemuxer* dmux, int frame_number, WebPIterator* iter))
FUNCTION_LOADER_LIBWEBPDEMUX(WebPDemuxGetI, uint32_t (*)(const WebPDemuxer* dmux, WebPFormatFeature feature));
FUNCTION_LOADER_LIBWEBPDEMUX(WebPDemuxDelete, void (*)(WebPDemuxer* dmux))
+#endif
}
++lib.loaded;

@@ -257,6 +261,7 @@ error:

IMG_Animation *IMG_LoadWEBPAnimation_RW(SDL_RWops *src)
{
+#if 0
Sint64 start;
const char *error = NULL;
Uint32 format;
@@ -371,6 +376,9 @@ error:
IMG_SetError("%s", error);
}
SDL_RWseek(src, start, RW_SEEK_SET);
+#else
+ IMG_SetError("WEBP animations are not supported");
+#endif
return NULL;
}

--
2.23.0

Loading

0 comments on commit 335e066

Please sign in to comment.