├── .gitignore ├── pkg-config ├── pkg-config.in └── PKGBUILD ├── wut ├── PKGBUILD └── 0001-coreinit-Fix-OSDynLoad_Error-to-be-a-32bit-value.patch ├── SDL2_gfx └── PKGBUILD ├── wut-tools └── PKGBUILD ├── SDL2 └── PKGBUILD ├── physfs ├── PKGBUILD └── physfs-3.0.2.patch ├── SDL2_mixer ├── SDL2_mixer-2.6.3.patch └── PKGBUILD ├── SDL2_image └── PKGBUILD ├── curl └── PKGBUILD ├── SDL2_ttf └── PKGBUILD └── mbedtls ├── PKGBUILD └── mbedtls-2.28.8.patch /.gitignore: -------------------------------------------------------------------------------- 1 | sources 2 | packages 3 | *.tar.xz 4 | src 5 | pkg 6 | *.pkg.tar.xz* 7 | *.tar.gz 8 | *.tar.bz2 9 | -------------------------------------------------------------------------------- /pkg-config/pkg-config.in: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | command -v pkg-config >/dev/null 2>&1 || { echo >&2 "I require pkg-config but it's not installed. Aborting."; exit 1; } 4 | 5 | # reset pkg-config variables to ensure we're not polluted by host libraries 6 | 7 | export PKG_CONFIG_DIR= 8 | export PKG_CONFIG_PATH= 9 | export PKG_CONFIG_SYSROOT_DIR= 10 | 11 | export PKG_CONFIG_LIBDIR=${DEVKITPRO}/portlibs/wiiu/lib/pkgconfig:${DEVKITPRO}/portlibs/ppc/lib/pkgconfig 12 | 13 | [[ "$1" == '--version' ]] && exec pkg-config --version 14 | exec pkg-config --static "$@" 15 | 16 | -------------------------------------------------------------------------------- /pkg-config/PKGBUILD: -------------------------------------------------------------------------------- 1 | 2 | # Maintainer: Ash Logan 3 | # Maintainer: WinterMute 4 | pkgname=wiiu-pkg-config 5 | pkgver=0.28 6 | pkgrel=4 7 | pkgdesc='pkg-config wrapper (for Nintendo WiiU homebrew development)' 8 | arch=('any') 9 | url='http://devkitpro.org/' 10 | source=('pkg-config.in') 11 | sha256sums=('05c4d7486ad61bf2d99dde140c8650fae6121d1bb7f4c3fbf4725357b25c8158') 12 | groups=('wiiu-dev') 13 | 14 | package() { 15 | install -d "$pkgdir"/opt/devkitpro/portlibs/wiiu/bin 16 | cp "$srcdir"/pkg-config.in "$pkgdir"/opt/devkitpro/portlibs/wiiu/bin/powerpc-eabi-pkg-config 17 | } 18 | -------------------------------------------------------------------------------- /wut/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: WinterMute 2 | 3 | _destdir=/opt/devkitpro/wut 4 | 5 | pkgname=wut 6 | pkgver=1.8.0 7 | pkgrel=1 8 | pkgdesc="Open-source Wii U Libraries" 9 | arch=('any') 10 | url="https://github.com/devkitPro/wut" 11 | license=('zlib') 12 | groups=('wiiu-dev') 13 | 14 | depends=('devkitPPC' 'wut-tools') 15 | 16 | source=( 17 | "wut-${pkgver}.tar.gz::https://github.com/devkitPro/wut/archive/v${pkgver}.tar.gz" 18 | ) 19 | 20 | options=("!strip" "staticlibs") 21 | 22 | build() { 23 | cd wut-${pkgver} 24 | 25 | make 26 | } 27 | 28 | package() { 29 | cd wut-${pkgver} 30 | 31 | make install DESTDIR="$pkgdir" 32 | } 33 | 34 | sha256sums=('802f26b057c3c6d1f2e7938940695b668d4f0df94f818ca08a046b0291671e43') 35 | -------------------------------------------------------------------------------- /wut/0001-coreinit-Fix-OSDynLoad_Error-to-be-a-32bit-value.patch: -------------------------------------------------------------------------------- 1 | From de8d37db42fb4c151d42f4c4b72d73a73be29cd1 Mon Sep 17 00:00:00 2001 2 | From: Maschell 3 | Date: Sat, 18 Feb 2023 09:43:46 +0100 4 | Subject: [PATCH] coreinit: Fix OSDynLoad_Error to be a 32bit value 5 | 6 | --- 7 | include/coreinit/dynload.h | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/include/coreinit/dynload.h b/include/coreinit/dynload.h 11 | index f17631d..e4ae853 100644 12 | --- a/include/coreinit/dynload.h 13 | +++ b/include/coreinit/dynload.h 14 | @@ -33,7 +33,7 @@ typedef enum OSDynLoad_Error 15 | OS_DYNLOAD_INVALID_ALLOCATOR_PTR = 0xBAD10017, 16 | OS_DYNLOAD_OUT_OF_SYSTEM_MEMORY = 0xBAD1002F, 17 | OS_DYNLOAD_TLS_ALLOCATOR_LOCKED = 0xBAD10031, 18 | - OS_DYNLOAD_MODULE_NOT_FOUND = -6, 19 | + OS_DYNLOAD_MODULE_NOT_FOUND = 0xFFFFFFFA, 20 | } OSDynLoad_Error; 21 | 22 | typedef OSDynLoad_Error (*OSDynLoadAllocFn)(int32_t size, int32_t align, void **outAddr); 23 | -- 24 | 2.39.2.windows.1 25 | 26 | -------------------------------------------------------------------------------- /SDL2_gfx/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Dave Murphy 2 | 3 | pkgname=wiiu-sdl2_gfx 4 | pkgver=1.0.4 5 | pkgrel=1 6 | pkgdesc="SDL2 graphics drawing primitives (Nintendo WiiU port)." 7 | arch=('any') 8 | url="https://libsdl.org" 9 | license=("zlib") 10 | options=(!strip libtool staticlibs) 11 | makedepends=('wiiu-pkg-config' 'devkitpro-pkgbuild-helpers') 12 | depends=('wiiu-sdl2') 13 | source=("http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.4.tar.gz") 14 | sha256sums=( 15 | '63e0e01addedc9df2f85b93a248f06e8a04affa014a835c2ea34bfe34e576262' 16 | ) 17 | groups=('wiiu-portlibs' 'wiiu-sdl2-libs') 18 | 19 | build() { 20 | 21 | cd SDL2_gfx-$pkgver 22 | 23 | source /opt/devkitpro/wiiuvars.sh 24 | 25 | ./configure --prefix="${PORTLIBS_PREFIX}" \ 26 | --enable-mmx=no \ 27 | --host=powerpc-eabi \ 28 | --disable-shared --enable-static \ 29 | --with-sdl-prefix=${PORTLIBS_PREFIX} 30 | 31 | make 32 | } 33 | 34 | package() { 35 | cd SDL2_gfx-$pkgver 36 | 37 | source /opt/devkitpro/wiiuvars.sh 38 | 39 | make DESTDIR="$pkgdir" install 40 | 41 | } 42 | -------------------------------------------------------------------------------- /wut-tools/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: WinterMute 2 | pkgname=wut-tools 3 | pkgver=1.3.5 4 | pkgrel=1 5 | pkgdesc='Tools for Nintendo WiiU homebrew development)' 6 | arch=('arm64' 'aarch64' 'x86_64' 'i686' 'ppc') 7 | url="https://github.com/devkitpro/${pkgname}" 8 | license=('GPLv2') 9 | options=(!strip libtool staticlibs) 10 | source=("${url}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz") 11 | sha256sums=( 12 | 'd2ff5860538998bd49138bc3883b163e50dcdab5a1af3eda8cc5e27f4092f502' 13 | ) 14 | groups=('wiiu-dev') 15 | 16 | build() { 17 | 18 | [[ -f $CROSS_BUILD_SH ]] && source $CROSS_BUILD_SH 19 | 20 | cd $pkgname-$pkgver 21 | 22 | ./configure --host=$CHOST --prefix=/opt/devkitpro/tools 23 | 24 | make 25 | 26 | } 27 | 28 | package() { 29 | 30 | [[ -f $CROSS_BUILD_SH ]] && source $CROSS_BUILD_SH 31 | 32 | cd $pkgname-$pkgver 33 | 34 | make DESTDIR="$pkgdir" install-strip 35 | 36 | install -Dm644 LICENSE.md "$pkgdir"/opt/devkitpro/licenses/$pkgname/COPYING 37 | 38 | } 39 | sha256sums=('20f7e17c030e138724e49665b233c6a75d868cc23cdaf8a40cd20b24d900f66e') 40 | -------------------------------------------------------------------------------- /SDL2/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Dave Murphy 2 | 3 | pkgname=wiiu-sdl2 4 | pkgver=2.28.5 5 | pkgrel=2 6 | pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard" 7 | arch=('any') 8 | url="https://libsdl.org" 9 | license=("LGPL") 10 | options=(!strip libtool staticlibs) 11 | makedepends=('wiiu-pkg-config' 'dkp-toolchain-vars') 12 | depends=('wut') 13 | source=("${url}/release/SDL2-${pkgver}.tar.gz" "SDL2-${pkgver}.patch") 14 | groups=('wiiu-portlibs' 'wiiu-sdl2-libs') 15 | 16 | build() { 17 | cd SDL2-$pkgver 18 | patch -p1 -i $srcdir/SDL2-${pkgver}.patch 19 | mkdir build 20 | cd build 21 | /opt/devkitpro/portlibs/wiiu/bin/powerpc-eabi-cmake .. \ 22 | -DCMAKE_BUILD_TYPE="Release" \ 23 | -DCMAKE_INSTALL_PREFIX=/opt/devkitpro/portlibs/wiiu 24 | make 25 | } 26 | 27 | package() { 28 | 29 | cd SDL2-$pkgver/build 30 | make install DESTDIR=$pkgdir 31 | 32 | } 33 | sha256sums=('332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4' 34 | 'bdd7f127de2a4f4d0e543002215ddb22949a5346e076a55cd9b126e20a3bb287') 35 | -------------------------------------------------------------------------------- /physfs/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: TurtleP 2 | 3 | pkgname=wiiu-physfs 4 | pkgver=3.0.2 5 | pkgrel=4 6 | pkgdesc='A library to provide abstract access to various archives.' 7 | arch=('any') 8 | url='https://icculus.org/physfs' 9 | license=('zlib') 10 | options=(!strip libtool staticlibs) 11 | source=("https://icculus.org/physfs/downloads/physfs-${pkgver}.tar.bz2" "physfs-${pkgver}.patch") 12 | makedepends=('devkitPPC' 'dkp-toolchain-vars' 'wiiu-cmake') 13 | sha256sums=( 14 | '304df76206d633df5360e738b138c94e82ccf086e50ba84f456d3f8432f9f863' 15 | '15802af4f03a02dc8892aee595d9ebab8756b685f5dd1ccac38a3047a95587b4' 16 | ) 17 | groups=('wiiu-portlibs') 18 | 19 | build() { 20 | cd physfs-$pkgver 21 | 22 | patch -Np1 -i "$srcdir"/physfs-${pkgver}.patch 23 | 24 | /opt/devkitpro/portlibs/wiiu/bin/powerpc-eabi-cmake -G"Unix Makefiles" \ 25 | -DCMAKE_INSTALL_PREFIX=/opt/devkitpro/portlibs/wiiu \ 26 | -DPHYSFS_BUILD_STATIC=ON -DPHYSFS_BUILD_SHARED=OFF \ 27 | -DPHYSFS_BUILD_TEST=OFF \ 28 | . 29 | 30 | make 31 | } 32 | 33 | package() { 34 | cd physfs-$pkgver 35 | make install DESTDIR="$pkgdir" 36 | } 37 | -------------------------------------------------------------------------------- /SDL2_mixer/SDL2_mixer-2.6.3.patch: -------------------------------------------------------------------------------- 1 | diff --git a/music_ogg.c b/music_ogg.c 2 | index 8323653..270eadf 100644 3 | --- a/music_ogg.c 4 | +++ b/music_ogg.c 5 | @@ -209,7 +209,7 @@ static int OGG_UpdateSection(OGG_music *music) 6 | music->stream = NULL; 7 | } 8 | 9 | - music->stream = SDL_NewAudioStream(AUDIO_S16, vi->channels, (int)vi->rate, 10 | + music->stream = SDL_NewAudioStream(AUDIO_S16SYS, vi->channels, (int)vi->rate, 11 | music_spec.format, music_spec.channels, music_spec.freq); 12 | if (!music->stream) { 13 | return -1; 14 | @@ -343,7 +343,7 @@ static int OGG_GetSome(void *context, void *data, int bytes, SDL_bool *done) 15 | #ifdef OGG_USE_TREMOR 16 | amount = vorbis.ov_read(&music->vf, music->buffer, music->buffer_size, §ion); 17 | #else 18 | - amount = (int)vorbis.ov_read(&music->vf, music->buffer, music->buffer_size, 0, 2, 1, §ion); 19 | + amount = (int)vorbis.ov_read(&music->vf, music->buffer, music->buffer_size, SDL_BYTEORDER == SDL_BIG_ENDIAN, 2, 1, §ion); 20 | #endif 21 | if (amount < 0) { 22 | set_ov_error("ov_read", amount); 23 | -------------------------------------------------------------------------------- /SDL2_image/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Dave Murphy 2 | 3 | pkgname=wiiu-sdl2_image 4 | pkgver=2.6.2 5 | pkgrel=2 6 | pkgdesc="SDL2 image loading library" 7 | arch=('any') 8 | url="https://libsdl.org/projects/SDL_image/" 9 | license=("zlib") 10 | options=(!strip libtool staticlibs) 11 | makedepends=('wiiu-pkg-config' 'dkp-toolchain-vars') 12 | depends=( 13 | 'wiiu-sdl2' 14 | 'ppc-libpng' 15 | 'ppc-libjpeg-turbo' 16 | ) 17 | source=("${url}release/SDL2_image-${pkgver}.tar.gz") 18 | sha256sums=( 19 | '48355fb4d8d00bac639cd1c4f4a7661c4afef2c212af60b340e06b7059814777' 20 | ) 21 | groups=('wiiu-portlibs' 'wiiu-sdl2-libs') 22 | 23 | build() { 24 | cd SDL2_image-$pkgver 25 | 26 | source ${DEVKITPRO}/wiiuvars.sh 27 | 28 | sed '/^noinst_PROGRAMS/d' -i Makefile.in 29 | 30 | ./configure --prefix="${PORTLIBS_PREFIX}" \ 31 | --host=powerpc-eabi --disable-shared --enable-static \ 32 | --disable-sdltest \ 33 | --with-sdl-prefix=${PORTLIBS_PREFIX} 34 | 35 | make 36 | } 37 | 38 | package() { 39 | cd SDL2_image-$pkgver 40 | 41 | source /opt/devkitpro/wiiuvars.sh 42 | 43 | make DESTDIR="$pkgdir" install 44 | 45 | # add our static libs 46 | echo "Requires.private: libpng libjpeg" >> "${pkgdir}/${PORTLIBS_PREFIX}/lib/pkgconfig/SDL2_image.pc" 47 | 48 | # License 49 | install -Dm644 "LICENSE.txt" "${pkgdir}/${PORTLIBS_PREFIX}/licenses/${pkgname}/LICENSE.txt" 50 | } 51 | -------------------------------------------------------------------------------- /curl/PKGBUILD: -------------------------------------------------------------------------------- 1 | pkgname=wiiu-curl 2 | pkgver=8.7.1 3 | pkgrel=2 4 | pkgdesc='Library for transferring data with URLs' 5 | arch=('any') 6 | url='https://curl.se/' 7 | license=('The curl license') 8 | options=(!strip libtool staticlibs) 9 | makedepends=('wiiu-pkg-config' 'dkp-toolchain-vars') 10 | depends=('wut' 'ppc-zlib' 'wiiu-mbedtls') 11 | groups=('wiiu-portlibs') 12 | 13 | source=("${url}/download/curl-${pkgver}.tar.xz") 14 | 15 | build() { 16 | cd curl-$pkgver 17 | 18 | source ${DEVKITPRO}/wiiuvars.sh 19 | 20 | ./configure \ 21 | --prefix=${PORTLIBS_PREFIX} \ 22 | --host=powerpc-eabi \ 23 | --disable-shared \ 24 | --enable-static \ 25 | --disable-ipv6 \ 26 | --disable-unix-sockets \ 27 | --disable-threaded-resolver \ 28 | --disable-manual \ 29 | --disable-pthreads \ 30 | --disable-socketpair \ 31 | --disable-ntlm-wb \ 32 | --with-mbedtls=${PORTLIBS_PREFIX} \ 33 | --with-ca-path=/vol/storage_mlc01/sys/title/0005001b/10054000/content/scerts 34 | 35 | make -C lib 36 | } 37 | 38 | package() { 39 | cd curl-$pkgver 40 | 41 | source ${DEVKITPRO}/wiiuvars.sh 42 | 43 | make DESTDIR="$pkgdir" -C lib install 44 | make DESTDIR="$pkgdir" -C include install 45 | make DESTDIR="$pkgdir" install-binSCRIPTS install-pkgconfigDATA 46 | 47 | install -Dm644 COPYING "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/COPYING 48 | } 49 | 50 | sha256sums=('6fea2aac6a4610fbd0400afb0bcddbe7258a64c63f1f68e5855ebc0c659710cd') 51 | -------------------------------------------------------------------------------- /SDL2_ttf/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Dave Murphy 2 | 3 | pkgname=wiiu-sdl2_ttf 4 | pkgver=2.20.2 5 | pkgrel=1 6 | pkgdesc="SDL2 TrueType font library (Nintendo WiiU port)." 7 | arch=('any') 8 | url="https://libsdl.org/projects/SDL_ttf/" 9 | license=("zlib") 10 | options=(!strip libtool staticlibs) 11 | makedepends=('wiiu-pkg-config' 'dkp-toolchain-vars') 12 | depends=( 13 | 'wiiu-sdl2' 14 | 'ppc-freetype' 15 | 'ppc-harfbuzz' 16 | ) 17 | source=("${url}release/SDL2_ttf-${pkgver}.tar.gz") 18 | sha256sums=( 19 | '9dc71ed93487521b107a2c4a9ca6bf43fb62f6bddd5c26b055e6b91418a22053' 20 | ) 21 | groups=('wiiu-portlibs' 'wiiu-sdl2-libs') 22 | 23 | build() { 24 | cd SDL2_ttf-$pkgver 25 | 26 | source ${DEVKITPRO}/wiiuvars.sh 27 | 28 | # patch out compiling showfont and glfont 29 | sed '/^noinst_PROGRAMS/d' -i Makefile.in 30 | 31 | ./configure --prefix="${PORTLIBS_PREFIX}" \ 32 | --host=powerpc-eabi --disable-shared --enable-static \ 33 | --disable-harfbuzz-builtin \ 34 | --disable-freetype-builtin \ 35 | --disable-sdltest --without-x 36 | 37 | make 38 | } 39 | 40 | package() { 41 | cd SDL2_ttf-$pkgver 42 | 43 | source /opt/devkitpro/wiiuvars.sh 44 | 45 | make DESTDIR="$pkgdir" install 46 | 47 | # add our static lib 48 | echo "Requires.private: freetype2" >> "${pkgdir}/${PORTLIBS_PREFIX}/lib/pkgconfig/SDL2_ttf.pc" 49 | 50 | # License 51 | install -Dm644 "LICENSE.txt" "${pkgdir}/${PORTLIBS_PREFIX}/licenses/${pkgname}/COPYING.txt" 52 | } 53 | -------------------------------------------------------------------------------- /mbedtls/PKGBUILD: -------------------------------------------------------------------------------- 1 | _realname=mbedtls 2 | pkgname=wiiu-${_realname} 3 | pkgver=2.28.8 4 | pkgrel=1 5 | pkgdesc='An open source, portable, easy to use, readable and flexible SSL library' 6 | arch=('any') 7 | url='https://tls.mbed.org' 8 | license=('apache') 9 | options=(!strip libtool staticlibs) 10 | makedepends=('wiiu-cmake' 'wiiu-pkg-config' 'dkp-toolchain-vars') 11 | groups=('wiiu-portlibs') 12 | 13 | source=( 14 | "${_realname}-${pkgver}.tar.gz::https://github.com/ARMmbed/mbedtls/archive/refs/tags/v${pkgver}.tar.gz" 15 | "mbedtls-${pkgver}.patch" 16 | ) 17 | 18 | build() { 19 | cd ${_realname}-${pkgver} 20 | 21 | patch -Np1 -i $srcdir/mbedtls-${pkgver}.patch 22 | 23 | ./scripts/config.pl set MBEDTLS_ENTROPY_HARDWARE_ALT 24 | ./scripts/config.pl set MBEDTLS_NO_PLATFORM_ENTROPY 25 | 26 | ./scripts/config.pl unset MBEDTLS_SELF_TEST 27 | 28 | /opt/devkitpro/portlibs/wiiu/bin/powerpc-eabi-cmake \ 29 | -DCMAKE_INSTALL_PREFIX=/opt/devkitpro/portlibs/wiiu \ 30 | -DCMAKE_BUILD_TYPE=Release \ 31 | -DENABLE_TESTING=Off -DENABLE_PROGRAMS=Off \ 32 | . 33 | 34 | make 35 | } 36 | 37 | package() { 38 | cd ${_realname}-${pkgver} 39 | 40 | source ${DEVKITPRO}/wiiuvars.sh 41 | 42 | make install DESTDIR="$pkgdir" 43 | 44 | install -Dm644 LICENSE "${pkgdir}/${PORTLIBS_PREFIX}/licenses/${pkgname}/LICENSE" 45 | } 46 | 47 | sha256sums=('4fef7de0d8d542510d726d643350acb3cdb9dc76ad45611b59c9aa08372b4213' 48 | 'f70c5f7b74c525ba4a55d477c444bd27f3a040fe73c5d3aa2893ca5e9d0541fb') 49 | -------------------------------------------------------------------------------- /SDL2_mixer/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Dave Murphy 2 | 3 | pkgname=wiiu-sdl2_mixer 4 | pkgver=2.6.3 5 | pkgrel=3 6 | pkgdesc="A sample multi-channel audio mixer library." 7 | arch=('any') 8 | url="https://libsdl.org/projects/SDL_mixer/" 9 | license=("zlib") 10 | options=(!strip libtool staticlibs) 11 | makedepends=('switch-pkg-config' 'dkp-toolchain-vars') 12 | groups=('wiiu-portlibs' 'wiiu-sdl-libs') 13 | depends=( 14 | 'wiiu-sdl2' 15 | 'ppc-libvorbis' 16 | 'ppc-mpg123' 17 | 'ppc-libmodplug' 18 | ) 19 | 20 | source=( 21 | "${url}release/SDL2_mixer-${pkgver}.tar.gz" 22 | ) 23 | 24 | sha256sums=( 25 | '7a6ba86a478648ce617e3a5e9277181bc67f7ce9876605eea6affd4a0d6eea8f' 26 | ) 27 | 28 | groups=('wiiu-portlibs' 'wiiu-sdl2-libs') 29 | 30 | build() { 31 | cd SDL2_mixer-$pkgver 32 | 33 | source ${DEVKITPRO}/wiiuvars.sh 34 | 35 | # patch out compiling playwave and playmus 36 | sed 's|\$(objects)/play.*mus\$(EXE)||' -i Makefile.in 37 | 38 | sed 's|libSDL2_mixer.la|libSDL2_mixer.a|' -i Makefile.in 39 | 40 | 41 | LIBS="-lm" ./configure --prefix="${PORTLIBS_PREFIX}" \ 42 | --host=powerpc-eabi --disable-shared --enable-static \ 43 | --disable-music-cmd \ 44 | --disable-music-ogg-shared \ 45 | --enable-music-mod-modplug \ 46 | --disable-music-mp3-drmp3 --enable-music-mp3-mpg123 \ 47 | --disable-music-flac-drflac --enable-music-flac-libflac 48 | 49 | make 50 | } 51 | 52 | package() { 53 | cd SDL2_mixer-$pkgver 54 | 55 | source /opt/devkitpro/wiiuvars.sh 56 | 57 | make DESTDIR="$pkgdir" install 58 | 59 | # add our static libs 60 | echo "Requires.private: libmodplug libmpg123 vorbisfile" >> "${pkgdir}/${PORTLIBS_PREFIX}/lib/pkgconfig/SDL2_mixer.pc" 61 | 62 | # License 63 | install -Dm644 "LICENSE.txt" "${pkgdir}/${PORTLIBS_PREFIX}/licenses/${pkgname}/LICENSE.txt" 64 | } 65 | -------------------------------------------------------------------------------- /mbedtls/mbedtls-2.28.8.patch: -------------------------------------------------------------------------------- 1 | diff -Baur mbedtls-2.28.8/library/entropy.c mbedtls-2.28.8.new/library/entropy.c 2 | --- mbedtls-2.28.8/library/entropy.c 2024-03-22 17:26:27.000000000 +0000 3 | +++ mbedtls-2.28.8.new/library/entropy.c 2024-05-04 14:06:49.265591995 +0100 4 | @@ -38,6 +38,30 @@ 5 | 6 | #define ENTROPY_MAX_LOOP 256 /**< Maximum amount to loop before error */ 7 | 8 | + 9 | +#ifdef __WIIU__ 10 | + 11 | +#include 12 | +#include 13 | + 14 | +int mbedtls_hardware_poll( void *data, 15 | + unsigned char *output, size_t len, size_t *olen ) 16 | +{ 17 | + size_t i; 18 | + (void)(data); 19 | + 20 | + for (i = 0; i < len; i++) { 21 | + srand(OSGetSystemTick()); 22 | + output[i] = rand() & 0xff; 23 | + } 24 | + 25 | + if(olen) 26 | + *olen = len; 27 | + return 0; 28 | +} 29 | + 30 | +#endif 31 | + 32 | void mbedtls_entropy_init(mbedtls_entropy_context *ctx) 33 | { 34 | ctx->source_count = 0; 35 | diff -Baur mbedtls-2.28.8/library/net_sockets.c mbedtls-2.28.8.new/library/net_sockets.c 36 | --- mbedtls-2.28.8/library/net_sockets.c 2024-03-22 17:26:27.000000000 +0000 37 | +++ mbedtls-2.28.8.new/library/net_sockets.c 2024-05-04 14:28:56.686157831 +0100 38 | @@ -21,7 +21,7 @@ 39 | 40 | #if !defined(unix) && !defined(__unix__) && !defined(__unix) && \ 41 | !defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \ 42 | - !defined(__HAIKU__) && !defined(__midipix__) 43 | + !defined(__HAIKU__) && !defined(__midipix__) && !defined(__WIIU__) 44 | #error "This module only works on Unix and Windows, see MBEDTLS_NET_C in config.h" 45 | #endif 46 | 47 | @@ -330,7 +330,7 @@ 48 | 49 | #if defined(__socklen_t_defined) || defined(_SOCKLEN_T) || \ 50 | defined(_SOCKLEN_T_DECLARED) || defined(__DEFINED_socklen_t) || \ 51 | - defined(socklen_t) || (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) 52 | + defined(socklen_t) || (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) || defined(__WIIU__) 53 | socklen_t n = (socklen_t) sizeof(client_addr); 54 | socklen_t type_len = (socklen_t) sizeof(type); 55 | #else 56 | @@ -411,6 +411,7 @@ 57 | } 58 | 59 | memcpy(client_ip, &addr4->sin_addr.s_addr, *cip_len); 60 | +#ifndef __WIIU__ 61 | } else { 62 | struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *) &client_addr; 63 | *cip_len = sizeof(addr6->sin6_addr.s6_addr); 64 | @@ -420,6 +421,7 @@ 65 | } 66 | 67 | memcpy(client_ip, &addr6->sin6_addr.s6_addr, *cip_len); 68 | +#endif 69 | } 70 | } 71 | 72 | diff -Baur mbedtls-2.28.8/library/timing.c mbedtls-2.28.8.new/library/timing.c 73 | --- mbedtls-2.28.8/library/timing.c 2024-03-22 17:26:27.000000000 +0000 74 | +++ mbedtls-2.28.8.new/library/timing.c 2024-05-04 14:06:49.269592076 +0100 75 | @@ -19,7 +19,7 @@ 76 | 77 | #if !defined(unix) && !defined(__unix__) && !defined(__unix) && \ 78 | !defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \ 79 | - !defined(__HAIKU__) && !defined(__midipix__) 80 | + !defined(__HAIKU__) && !defined(__midipix__) && !defined(__WIIU__) 81 | #error "This module only works on Unix and Windows, see MBEDTLS_TIMING_C in config.h" 82 | #endif 83 | 84 | -------------------------------------------------------------------------------- /physfs/physfs-3.0.2.patch: -------------------------------------------------------------------------------- 1 | diff --git a/CMakeLists.txt b/CMakeLists.txt 2 | index 4a67c27..6a30694 100644 3 | --- a/CMakeLists.txt 4 | +++ b/CMakeLists.txt 5 | @@ -74,6 +74,7 @@ set(PHYSFS_SRCS 6 | src/physfs_platform_posix.c 7 | src/physfs_platform_unix.c 8 | src/physfs_platform_windows.c 9 | + src/physfs_platform_wiiu.c 10 | src/physfs_platform_os2.c 11 | src/physfs_platform_qnx.c 12 | src/physfs_archiver_dir.c 13 | @@ -302,4 +303,3 @@ if(PHYSFS_BUILD_TEST) 14 | endif() 15 | 16 | # end of CMakeLists.txt ... 17 | - 18 | diff --git a/src/physfs_internal.h b/src/physfs_internal.h 19 | index 2912623..ec38622 100644 20 | --- a/src/physfs_internal.h 21 | +++ b/src/physfs_internal.h 22 | @@ -107,6 +107,10 @@ const void *__PHYSFS_winrtCalcBaseDir(void); 23 | const void *__PHYSFS_winrtCalcPrefDir(void); 24 | #endif 25 | 26 | +#ifdef PHYSFS_PLATFORM_WIIU 27 | +char *__PHYSFS_wiiuCalcUserDir(void); 28 | +#endif 29 | + 30 | /* atomic operations. */ 31 | #if defined(_MSC_VER) && (_MSC_VER >= 1500) 32 | #include 33 | @@ -144,7 +148,11 @@ int __PHYSFS_ATOMIC_DECR(int *ptrval); 34 | * NEVER forget to use smallFree: it may not be a pointer from the stack. 35 | * NEVER forget to check for NULL...allocation can fail here, of course! 36 | */ 37 | +#ifdef PHYSFS_PLATFORM_WIIU 38 | +#define __PHYSFS_SMALLALLOCTHRESHOLD 0 39 | +#else 40 | #define __PHYSFS_SMALLALLOCTHRESHOLD 256 41 | +#endif 42 | void *__PHYSFS_initSmallAlloc(void *ptr, const size_t len); 43 | 44 | #define __PHYSFS_smallAlloc(bytes) ( \ 45 | diff --git a/src/physfs_platform_posix.c b/src/physfs_platform_posix.c 46 | index fa2159c..e8c3077 100644 47 | --- a/src/physfs_platform_posix.c 48 | +++ b/src/physfs_platform_posix.c 49 | @@ -25,6 +25,12 @@ 50 | 51 | #include "physfs_internal.h" 52 | 53 | +#ifdef PHYSFS_PLATFORM_WIIU 54 | +#include 55 | +#include 56 | +#include 57 | +#endif 58 | + 59 | 60 | static PHYSFS_ErrorCode errcodeFromErrnoError(const int err) 61 | { 62 | @@ -60,33 +66,41 @@ static inline PHYSFS_ErrorCode errcodeFromErrno(void) 63 | 64 | static char *getUserDirByUID(void) 65 | { 66 | - uid_t uid = getuid(); 67 | - struct passwd *pw; 68 | - char *retval = NULL; 69 | - 70 | - pw = getpwuid(uid); 71 | - if ((pw != NULL) && (pw->pw_dir != NULL) && (*pw->pw_dir != '\0')) 72 | - { 73 | - const size_t dlen = strlen(pw->pw_dir); 74 | - const size_t add_dirsep = (pw->pw_dir[dlen-1] != '/') ? 1 : 0; 75 | - retval = (char *) allocator.Malloc(dlen + 1 + add_dirsep); 76 | - if (retval != NULL) 77 | + #ifdef PHYSFS_PLATFORM_WIIU 78 | + return __PHYSFS_wiiuCalcUserDir(); 79 | + #else 80 | + uid_t uid = getuid(); 81 | + struct passwd *pw; 82 | + char *retval = NULL; 83 | + 84 | + pw = getpwuid(uid); 85 | + if ((pw != NULL) && (pw->pw_dir != NULL) && (*pw->pw_dir != '\0')) 86 | { 87 | - strcpy(retval, pw->pw_dir); 88 | - if (add_dirsep) 89 | + const size_t dlen = strlen(pw->pw_dir); 90 | + const size_t add_dirsep = (pw->pw_dir[dlen-1] != '/') ? 1 : 0; 91 | + retval = (char *) allocator.Malloc(dlen + 1 + add_dirsep); 92 | + if (retval != NULL) 93 | { 94 | - retval[dlen] = '/'; 95 | - retval[dlen+1] = '\0'; 96 | + strcpy(retval, pw->pw_dir); 97 | + if (add_dirsep) 98 | + { 99 | + retval[dlen] = '/'; 100 | + retval[dlen+1] = '\0'; 101 | + } /* if */ 102 | } /* if */ 103 | } /* if */ 104 | - } /* if */ 105 | - 106 | - return retval; 107 | + 108 | + return retval; 109 | + #endif 110 | } /* getUserDirByUID */ 111 | 112 | 113 | char *__PHYSFS_platformCalcUserDir(void) 114 | { 115 | + #ifdef PHYSFS_PLATFORM_WIIU 116 | + return __PHYSFS_wiiuCalcUserDir(); 117 | + #endif 118 | + 119 | char *retval = NULL; 120 | char *envr = getenv("HOME"); 121 | 122 | @@ -299,7 +313,13 @@ int __PHYSFS_platformDelete(const char *path) 123 | int __PHYSFS_platformStat(const char *fname, PHYSFS_Stat *st, const int follow) 124 | { 125 | struct stat statbuf; 126 | - const int rc = follow ? stat(fname, &statbuf) : lstat(fname, &statbuf); 127 | + 128 | + #ifdef PHYSFS_PLATFORM_WIIU 129 | + const int rc = stat(fname, &statbuf); 130 | + #else 131 | + const int rc = follow ? stat(fname, &statbuf) : lstat(fname, &statbuf); 132 | + #endif 133 | + 134 | BAIL_IF(rc == -1, errcodeFromErrno(), 0); 135 | 136 | if (S_ISREG(statbuf.st_mode)) 137 | @@ -330,7 +350,12 @@ int __PHYSFS_platformStat(const char *fname, PHYSFS_Stat *st, const int follow) 138 | st->createtime = statbuf.st_ctime; 139 | st->accesstime = statbuf.st_atime; 140 | 141 | - st->readonly = (access(fname, W_OK) == -1); 142 | + #ifdef PHYSFS_PLATFORM_WIIU /* shortcut */ 143 | + st->readonly = !(statbuf.st_mode & S_IWRITE); 144 | + #else 145 | + st->readonly = (access(fname, W_OK) == -1); 146 | + #endif 147 | + 148 | return 1; 149 | } /* __PHYSFS_platformStat */ 150 | 151 | @@ -345,70 +370,93 @@ typedef struct 152 | 153 | void *__PHYSFS_platformGetThreadID(void) 154 | { 155 | - return ( (void *) ((size_t) pthread_self()) ); 156 | + #ifdef PHYSFS_PLATFORM_WIIU 157 | + return (void*)OSGetCurrentThread(); 158 | + #else 159 | + return ( (void *) ((size_t) pthread_self()) ); 160 | + #endif 161 | } /* __PHYSFS_platformGetThreadID */ 162 | 163 | 164 | void *__PHYSFS_platformCreateMutex(void) 165 | { 166 | - int rc; 167 | - PthreadMutex *m = (PthreadMutex *) allocator.Malloc(sizeof (PthreadMutex)); 168 | - BAIL_IF(!m, PHYSFS_ERR_OUT_OF_MEMORY, NULL); 169 | - rc = pthread_mutex_init(&m->mutex, NULL); 170 | - if (rc != 0) 171 | - { 172 | - allocator.Free(m); 173 | - BAIL(PHYSFS_ERR_OS_ERROR, NULL); 174 | - } /* if */ 175 | + #ifdef PHYSFS_PLATFORM_WIIU 176 | + OSMutex* m = allocator.Malloc(sizeof(OSMutex)); 177 | + BAIL_IF(!m, PHYSFS_ERR_OUT_OF_MEMORY, NULL); 178 | + OSInitMutex(m); 179 | + #else 180 | + int rc; 181 | + PthreadMutex *m = (PthreadMutex *) allocator.Malloc(sizeof (PthreadMutex)); 182 | + BAIL_IF(!m, PHYSFS_ERR_OUT_OF_MEMORY, NULL); 183 | + rc = pthread_mutex_init(&m->mutex, NULL); 184 | + if (rc != 0) 185 | + { 186 | + allocator.Free(m); 187 | + BAIL(PHYSFS_ERR_OS_ERROR, NULL); 188 | + } /* if */ 189 | 190 | - m->count = 0; 191 | - m->owner = (pthread_t) 0xDEADBEEF; 192 | - return ((void *) m); 193 | + m->count = 0; 194 | + m->owner = (pthread_t) 0xDEADBEEF; 195 | + #endif 196 | + return ((void *) m); 197 | } /* __PHYSFS_platformCreateMutex */ 198 | 199 | 200 | void __PHYSFS_platformDestroyMutex(void *mutex) 201 | { 202 | - PthreadMutex *m = (PthreadMutex *) mutex; 203 | + #ifdef PHYSFS_PLATFORM_WIIU 204 | + allocator.Free((OSMutex*)mutex); 205 | + #else 206 | + PthreadMutex *m = (PthreadMutex *) mutex; 207 | 208 | - /* Destroying a locked mutex is a bug, but we'll try to be helpful. */ 209 | - if ((m->owner == pthread_self()) && (m->count > 0)) 210 | - pthread_mutex_unlock(&m->mutex); 211 | + /* Destroying a locked mutex is a bug, but we'll try to be helpful. */ 212 | + if ((m->owner == pthread_self()) && (m->count > 0)) 213 | + pthread_mutex_unlock(&m->mutex); 214 | 215 | - pthread_mutex_destroy(&m->mutex); 216 | - allocator.Free(m); 217 | + pthread_mutex_destroy(&m->mutex); 218 | + allocator.Free(m); 219 | + #endif 220 | } /* __PHYSFS_platformDestroyMutex */ 221 | 222 | 223 | int __PHYSFS_platformGrabMutex(void *mutex) 224 | { 225 | - PthreadMutex *m = (PthreadMutex *) mutex; 226 | - pthread_t tid = pthread_self(); 227 | - if (m->owner != tid) 228 | - { 229 | - if (pthread_mutex_lock(&m->mutex) != 0) 230 | - return 0; 231 | - m->owner = tid; 232 | - } /* if */ 233 | + #ifdef PHYSFS_PLATFORM_WIIU 234 | + OSLockMutex((OSMutex*)mutex); 235 | + #else 236 | + PthreadMutex *m = (PthreadMutex *) mutex; 237 | + pthread_t tid = pthread_self(); 238 | + if (m->owner != tid) 239 | + { 240 | + if (pthread_mutex_lock(&m->mutex) != 0) 241 | + return 0; 242 | + m->owner = tid; 243 | + } /* if */ 244 | + 245 | + m->count++; 246 | + #endif 247 | 248 | - m->count++; 249 | return 1; 250 | } /* __PHYSFS_platformGrabMutex */ 251 | 252 | 253 | void __PHYSFS_platformReleaseMutex(void *mutex) 254 | { 255 | - PthreadMutex *m = (PthreadMutex *) mutex; 256 | - assert(m->owner == pthread_self()); /* catch programming errors. */ 257 | - assert(m->count > 0); /* catch programming errors. */ 258 | - if (m->owner == pthread_self()) 259 | - { 260 | - if (--m->count == 0) 261 | + #ifdef PHYSFS_PLATFORM_WIIU 262 | + OSUnlockMutex((OSMutex*)mutex); 263 | + #else 264 | + PthreadMutex *m = (PthreadMutex *) mutex; 265 | + assert(m->owner == pthread_self()); /* catch programming errors. */ 266 | + assert(m->count > 0); /* catch programming errors. */ 267 | + if (m->owner == pthread_self()) 268 | { 269 | - m->owner = (pthread_t) 0xDEADBEEF; 270 | - pthread_mutex_unlock(&m->mutex); 271 | + if (--m->count == 0) 272 | + { 273 | + m->owner = (pthread_t) 0xDEADBEEF; 274 | + pthread_mutex_unlock(&m->mutex); 275 | + } /* if */ 276 | } /* if */ 277 | - } /* if */ 278 | + #endif 279 | } /* __PHYSFS_platformReleaseMutex */ 280 | 281 | #endif /* PHYSFS_PLATFORM_POSIX */ 282 | diff --git a/src/physfs_platform_wiiu.c b/src/physfs_platform_wiiu.c 283 | new file mode 100644 284 | index 0000000..82df9c1 285 | --- /dev/null 286 | +++ b/src/physfs_platform_wiiu.c 287 | @@ -0,0 +1,100 @@ 288 | +/* 289 | + * Nintendo Wii U support routines for PhysicsFS. 290 | + * 291 | + * Please see the file LICENSE.txt in the source's root directory. 292 | + * 293 | + */ 294 | + 295 | +#define __PHYSICSFS_INTERNAL__ 296 | +#include "physfs_platforms.h" 297 | + 298 | +#ifdef PHYSFS_PLATFORM_WIIU 299 | + 300 | +// for getcwd 301 | +#include 302 | +// for PATH_MAX 303 | +#include 304 | + 305 | +#include "physfs_internal.h" 306 | + 307 | +int __PHYSFS_platformInit(void) 308 | +{ 309 | + return 1; /* always succeed. */ 310 | +} /* __PHYSFS_platformInit */ 311 | + 312 | +void __PHYSFS_platformDeinit(void) 313 | +{ 314 | + /* no-op */ 315 | +} /* __PHYSFS_platformDeinit */ 316 | + 317 | +void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void* data) 318 | +{ 319 | + /* no-op */ 320 | +} 321 | + 322 | +char* __PHYSFS_wiiuCalcUserDir(void) 323 | +{ 324 | + /* Use the jail directory (hopefully) found before. */ 325 | + return __PHYSFS_strdup(PHYSFS_getBaseDir()); 326 | +} 327 | + 328 | +char* __PHYSFS_platformCalcBaseDir(const char* argv0) 329 | +{ 330 | + char* retval = NULL; 331 | + /* As there is no system-specific directory, directly inspect argv0. */ 332 | + if (argv0 == NULL) 333 | + { 334 | + /* User did not provide a path, just use the current working directory. 335 | + * As physfs should be initialized soon after application start, this 336 | + * should give us a useable directory. 337 | + */ 338 | + char fullpath[PATH_MAX]; 339 | + if (getcwd(fullpath, sizeof(fullpath)) != NULL) 340 | + { 341 | + const size_t cwdlen = strlen(fullpath); 342 | + /* getcwd does not provide a trailing slash, add it. */ 343 | + retval = (char*)allocator.Malloc(cwdlen + 2); 344 | + BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); 345 | + strncpy(retval, fullpath, cwdlen); 346 | + retval[cwdlen] = '/'; 347 | + retval[cwdlen + 1] = '\0'; 348 | + } 349 | + } 350 | + else 351 | + { 352 | + /* hbmenu should give us the full path of the application, this may 353 | + * reside in a subfolder. Higher level code will strip away the name 354 | + * and extension. 355 | + */ 356 | + return NULL; 357 | + } 358 | + 359 | + if (!retval) 360 | + /* Last resort: use `/wiiu` directory. */ 361 | + retval = __PHYSFS_strdup("/wiiu/"); 362 | + 363 | + return retval; 364 | +} /* __PHYSFS_platformCalcBaseDir */ 365 | + 366 | +char* __PHYSFS_platformCalcPrefDir(const char* org, const char* app) 367 | +{ 368 | + char* retval = NULL; 369 | + size_t len = 0; 370 | + 371 | + /* Use the jail directory (hopefully) found before. This way we do not 372 | + * need to add an application folder, because it is exclusive. 373 | + */ 374 | + const char* envr = __PHYSFS_getUserDir(); 375 | + BAIL_IF_ERRPASS(!envr, NULL); 376 | + const char* append = ".config/"; 377 | + len = strlen(envr) + strlen(append) + 1; 378 | + retval = (char*)allocator.Malloc(len); 379 | + BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); 380 | + snprintf(retval, len, "%s%s", envr, append); 381 | + 382 | + return retval; 383 | +} /* __PHYSFS_platformCalcPrefDir */ 384 | + 385 | +#endif /* PHYSFS_PLATFORM_WIIU */ 386 | + 387 | +/* end of physfs_platform_wiiu.cpp ... */ 388 | diff --git a/src/physfs_platforms.h b/src/physfs_platforms.h 389 | index d4e4bfd..348bc6d 100644 390 | --- a/src/physfs_platforms.h 391 | +++ b/src/physfs_platforms.h 392 | @@ -72,6 +72,10 @@ 393 | #elif defined(unix) || defined(__unix__) 394 | # define PHYSFS_PLATFORM_UNIX 1 395 | # define PHYSFS_PLATFORM_POSIX 1 396 | +#elif defined(__WIIU__) 397 | +# define PHYSFS_PLATFORM_POSIX 1 398 | +# define PHYSFS_PLATFORM_WIIU 1 399 | +# define PHYSFS_NO_CDROM_SUPPORT 1 400 | #else 401 | # error Unknown platform. 402 | #endif 403 | --------------------------------------------------------------------------------