Showing preview only (3,485K chars total). Download the full file or copy to clipboard to get everything.
Repository: devkitPro/pacman-packages
Branch: master
Commit: e7929f400848
Files: 478
Total size: 3.2 MB
Directory structure:
gitextract_utdhukg8/
├── .gitattributes
├── .gitignore
├── 3ds/
│ ├── SDL/
│ │ ├── PKGBUILD
│ │ └── SDL-1.2.15.patch
│ ├── SDL_gfx/
│ │ └── PKGBUILD
│ ├── SDL_image/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── SDL_mixer/
│ │ └── PKGBUILD
│ ├── SDL_ttf/
│ │ └── PKGBUILD
│ ├── TinyXML2/
│ │ └── PKGBUILD
│ ├── WildMidi/
│ │ ├── PKGBUILD
│ │ └── wildmidi-0.4.3.patch
│ ├── box2d/
│ │ └── PKGBUILD
│ ├── bulletphysics/
│ │ ├── PKGBUILD
│ │ └── bulletphysics.patch
│ ├── bzip2/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── curl/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── curl-8.4.0.patch
│ ├── flac/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── flac-1.3.4.patch
│ ├── flite/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── freetype/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── giflib/
│ │ └── PKGBUILD
│ ├── jansson/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libarchive/
│ │ ├── PKGBUILD
│ │ └── libarchive-3.7.4.patch
│ ├── libconfig/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── libconfig.patch
│ ├── libfribidi/
│ │ └── PKGBUILD
│ ├── libiconv/
│ │ ├── PKGBUILD
│ │ └── libiconv-1.17.patch
│ ├── libid3tag/
│ │ └── PKGBUILD
│ ├── libjpeg-turbo/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libjson-c/
│ │ ├── PKGBUILD
│ │ └── json-c-0.16.patch
│ ├── liblzma/
│ │ └── PKGBUILD
│ ├── libmad/
│ │ └── PKGBUILD
│ ├── libmodplug/
│ │ ├── PKGBUILD
│ │ └── libmodplug-0.8.9.0.patch
│ ├── libogg/
│ │ └── PKGBUILD
│ ├── libopus/
│ │ └── PKGBUILD
│ ├── libpng/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libsidplay/
│ │ ├── PKGBUILD
│ │ └── libsidplay-1.36.60.patch
│ ├── libtheora/
│ │ ├── PKGBUILD
│ │ └── libtheora-1.2.0.patch
│ ├── libvorbisidec/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libxmp/
│ │ └── PKGBUILD
│ ├── libzstd/
│ │ ├── PKGBUILD
│ │ └── zstd-1.5.5.patch
│ ├── lua51/
│ │ └── PKGBUILD
│ ├── lz4/
│ │ └── PKGBUILD
│ ├── mbedtls/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── mbedtls-2.28.8.patch
│ ├── mikmod/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── mpg123/
│ │ ├── PKGBUILD
│ │ └── mpg123-1.31.3.patch
│ ├── opusfile/
│ │ └── PKGBUILD
│ ├── physfs/
│ │ ├── PKGBUILD
│ │ └── physfs-3.2.0.patch
│ ├── pkg-config/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── pkg-config.in
│ ├── wslay/
│ │ └── PKGBUILD
│ ├── yaml_cpp/
│ │ └── PKGBUILD
│ └── zlib/
│ ├── .gitignore
│ └── PKGBUILD
├── 3ds-examples/
│ └── PKGBUILD
├── README.md
├── armv4t/
│ ├── bzip2/
│ │ └── PKGBUILD
│ ├── flac/
│ │ ├── PKGBUILD
│ │ └── flac-1.3.2.patch
│ ├── flite/
│ │ └── PKGBUILD
│ ├── freetype/
│ │ └── PKGBUILD
│ ├── libconfig/
│ │ ├── PKGBUILD
│ │ └── libconfig.patch
│ ├── libexpat/
│ │ └── PKGBUILD
│ ├── libid3tag/
│ │ └── PKGBUILD
│ ├── liblzma/
│ │ └── PKGBUILD
│ ├── libmad/
│ │ ├── PKGBUILD
│ │ └── libmad-0.15.1b.patch
│ ├── libogg/
│ │ └── PKGBUILD
│ ├── libpng/
│ │ └── PKGBUILD
│ ├── libtheora/
│ │ ├── PKGBUILD
│ │ └── libtheora-1.2.0.patch
│ ├── libvorbisidec/
│ │ └── PKGBUILD
│ ├── libxmp/
│ │ ├── PKGBUILD
│ │ └── libxmp.patch
│ ├── mikmod/
│ │ └── PKGBUILD
│ ├── mpg123/
│ │ ├── PKGBUILD
│ │ ├── mpg123-1.25.10.patch
│ │ └── mpg123-1.31.3.patch
│ ├── pkg-config/
│ │ ├── PKGBUILD
│ │ └── pkg-config.in
│ └── zlib/
│ └── PKGBUILD
├── calico/
│ └── PKGBUILD
├── citro2d/
│ └── PKGBUILD
├── citro3d/
│ └── PKGBUILD
├── cmake/
│ ├── 3ds/
│ │ ├── 3DS.cmake
│ │ ├── Nintendo3DS.cmake
│ │ ├── PKGBUILD
│ │ └── arm-none-eabi-cmake
│ ├── catnip/
│ │ └── PKGBUILD
│ ├── common-utils/
│ │ ├── Generic-dkP.cmake
│ │ ├── PKGBUILD
│ │ ├── dkp-asset-folder.cmake
│ │ ├── dkp-custom-target.cmake
│ │ ├── dkp-embedded-binary.cmake
│ │ ├── dkp-impl-helpers.cmake
│ │ ├── dkp-initialize-path.cmake
│ │ ├── dkp-linker-utils.cmake
│ │ ├── dkp-rule-overrides.cmake
│ │ └── dkp-toolchain-common.cmake
│ ├── devkita64/
│ │ ├── PKGBUILD
│ │ ├── aarch64-none-elf-cmake
│ │ └── devkitA64.cmake
│ ├── devkitarm/
│ │ ├── PKGBUILD
│ │ ├── arm-none-eabi-cmake
│ │ ├── devkitARM.cmake
│ │ ├── dkp-arm-mode-wrapper
│ │ ├── dkp-gba-ds-common.cmake
│ │ └── dkp-gba-ds-utils.cmake
│ ├── devkitppc/
│ │ ├── PKGBUILD
│ │ ├── devkitPPC.cmake
│ │ └── powerpc-eabi-cmake
│ ├── gamecube/
│ │ ├── GameCube.cmake
│ │ ├── NintendoGameCube.cmake
│ │ ├── PKGBUILD
│ │ └── powerpc-eabi-cmake
│ ├── gba/
│ │ ├── GBA.cmake
│ │ ├── NintendoGBA.cmake
│ │ ├── PKGBUILD
│ │ └── arm-none-eabi-cmake
│ ├── nds/
│ │ ├── NDS.cmake
│ │ ├── NintendoDS.cmake
│ │ ├── PKGBUILD
│ │ └── arm-none-eabi-cmake
│ ├── ogc/
│ │ ├── PKGBUILD
│ │ ├── libogc.cmake
│ │ └── ogc-common.cmake
│ ├── switch/
│ │ ├── NintendoSwitch.cmake
│ │ ├── PKGBUILD
│ │ ├── Switch.cmake
│ │ └── aarch64-none-elf-cmake
│ ├── wii/
│ │ ├── NintendoWii.cmake
│ │ ├── PKGBUILD
│ │ ├── Wii.cmake
│ │ └── powerpc-eabi-cmake
│ └── wiiu/
│ ├── CafeOS.cmake
│ ├── PKGBUILD
│ ├── WiiU.cmake
│ └── powerpc-eabi-cmake
├── default-arm7/
│ └── PKGBUILD
├── deko3d/
│ └── PKGBUILD
├── devkita64/
│ ├── devkitA64/
│ │ └── PKGBUILD
│ ├── devkita64-rules/
│ │ └── PKGBUILD
│ └── newlib/
│ └── PKGBUILD
├── devkitarm/
│ ├── devkitARM/
│ │ └── PKGBUILD
│ ├── devkitarm-crtls/
│ │ └── PKGBUILD
│ ├── devkitarm-rules/
│ │ └── PKGBUILD
│ └── newlib/
│ └── PKGBUILD
├── devkitppc/
│ ├── devkitPPC/
│ │ └── PKGBUILD
│ ├── devkitppc-crtls/
│ │ └── PKGBUILD
│ ├── devkitppc-rules/
│ │ └── PKGBUILD
│ └── newlib/
│ └── PKGBUILD
├── dkp-meson-scripts/
│ ├── PKGBUILD
│ ├── meson-cross.sh
│ └── meson-toolchain.sh
├── dkp-toolchain-vars/
│ ├── 3dsvars.sh
│ ├── PKGBUILD
│ ├── armv4tvars.sh
│ ├── cubevars.sh
│ ├── devkita64.sh
│ ├── devkitarm.sh
│ ├── devkitppc.sh
│ ├── ndsvars.sh
│ ├── portlibs_prefix.sh
│ ├── ppcvars.sh
│ ├── switchvars.sh
│ ├── wiiuvars.sh
│ └── wiivars.sh
├── dswifi/
│ └── PKGBUILD
├── gamecube/
│ ├── SDL/
│ │ ├── PKGBUILD
│ │ ├── SDL-1.2.15.patch
│ │ └── config.site
│ ├── SDL2/
│ │ ├── PKGBUILD
│ │ └── SDL2-2.28.5.patch
│ ├── SDL2_gfx/
│ │ └── PKGBUILD
│ ├── SDL2_image/
│ │ ├── Makefile.in.patch
│ │ └── PKGBUILD
│ ├── SDL2_mixer/
│ │ ├── PKGBUILD
│ │ └── sdl2_mixer-config.cmake.in.patch
│ ├── SDL2_ttf/
│ │ └── PKGBUILD
│ ├── SDL_gfx/
│ │ ├── PKGBUILD
│ │ └── SDL_gfx-2.0.25.patch
│ ├── SDL_image/
│ │ └── PKGBUILD
│ ├── SDL_mixer/
│ │ ├── PKGBUILD
│ │ └── SDL_mixer-1.2.12.patch
│ ├── SDL_ttf/
│ │ ├── PKGBUILD
│ │ └── SDL_ttf-2.0.11.patch
│ ├── freeglut/
│ │ ├── PKGBUILD
│ │ └── freeglut-3.6.0.patch
│ ├── glu/
│ │ ├── LICENSE
│ │ └── PKGBUILD
│ ├── opengx/
│ │ └── PKGBUILD
│ ├── physfs/
│ │ ├── PKGBUILD
│ │ └── physfs-3.2.0.patch
│ └── pkg-config/
│ ├── PKGBUILD
│ └── pkg-config.in
├── gamecube-examples/
│ └── PKGBUILD
├── gba/
│ └── pkg-config/
│ ├── PKGBUILD
│ └── pkg-config.in
├── gba-examples/
│ └── PKGBUILD
├── gp2x/
│ ├── gp2x-core/
│ │ └── PKGBUILD
│ ├── gp2x-examples/
│ │ └── PKGBUILD
│ ├── libfat/
│ │ └── PKGBUILD
│ ├── liborcus/
│ │ └── PKGBUILD
│ └── pkg-config/
│ ├── PKGBUILD
│ └── pkg-config.in
├── gp32-examples/
│ └── PKGBUILD
├── libctru/
│ └── PKGBUILD
├── libfat/
│ └── PKGBUILD
├── libfilesystem/
│ └── PKGBUILD
├── libgba/
│ └── PKGBUILD
├── libgxflux/
│ ├── PKGBUILD
│ └── libgxflux-destdir.patch
├── libmirko/
│ └── PKGBUILD
├── libnds/
│ ├── 0001-fix-within-comment.patch
│ └── PKGBUILD
├── libnx/
│ └── PKGBUILD
├── libogc/
│ └── PKGBUILD
├── libtonc/
│ └── PKGBUILD
├── maxmod/
│ └── PKGBUILD
├── nds/
│ ├── bzip2/
│ │ └── PKGBUILD
│ ├── freetype/
│ │ └── PKGBUILD
│ ├── libexpat/
│ │ └── PKGBUILD
│ ├── libmad/
│ │ ├── PKGBUILD
│ │ └── libmad-0.15.1b.patch
│ ├── libpng/
│ │ └── PKGBUILD
│ ├── pkg-config/
│ │ ├── PKGBUILD
│ │ └── pkg-config.in
│ └── zlib/
│ └── PKGBUILD
├── nds-examples/
│ └── PKGBUILD
├── pkgbuild-scripts/
│ ├── .gitignore
│ ├── PKGBUILD
│ └── pkgbuild-scripts.install
├── ppc/
│ ├── TinyXML2/
│ │ └── PKGBUILD
│ ├── box2d/
│ │ └── PKGBUILD
│ ├── brotli/
│ │ ├── PKGBUILD
│ │ └── brotli-1.2.0.patch
│ ├── bzip2/
│ │ └── PKGBUILD
│ ├── faad2/
│ │ └── PKGBUILD
│ ├── flac/
│ │ └── PKGBUILD
│ ├── freetype/
│ │ └── PKGBUILD
│ ├── giflib/
│ │ └── PKGBUILD
│ ├── glm/
│ │ ├── PKGBUILD
│ │ └── glm-1.0.2-ppc.patch
│ ├── harfbuzz/
│ │ └── PKGBUILD
│ ├── jansson/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── json-cpp/
│ │ └── PKGBUILD
│ ├── libconfig/
│ │ └── PKGBUILD
│ ├── libexpat/
│ │ └── PKGBUILD
│ ├── libfribidi/
│ │ └── PKGBUILD
│ ├── libgd/
│ │ ├── PKGBUILD
│ │ └── libgd-2.3.3.patch
│ ├── libjpeg-turbo/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── liblzma/
│ │ └── PKGBUILD
│ ├── libmad/
│ │ ├── PKGBUILD
│ │ ├── frame_length.patch
│ │ ├── optimise.diff
│ │ └── pkg-config.patch
│ ├── libmodplug/
│ │ └── PKGBUILD
│ ├── libogg/
│ │ └── PKGBUILD
│ ├── libopus/
│ │ └── PKGBUILD
│ ├── libpng/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libtheora/
│ │ ├── PKGBUILD
│ │ ├── config.guess
│ │ └── config.sub
│ ├── libvorbis/
│ │ └── PKGBUILD
│ ├── libvorbisidec/
│ │ └── PKGBUILD
│ ├── libwebp/
│ │ └── PKGBUILD
│ ├── libzip/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── lua51/
│ │ └── PKGBUILD
│ ├── lz4/
│ │ └── PKGBUILD
│ ├── mpg123/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── mxml/
│ │ └── PKGBUILD
│ ├── ode/
│ │ └── PKGBUILD
│ ├── opusfile/
│ │ └── PKGBUILD
│ ├── pkg-config/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── pkg-config.in
│ ├── yaml_cpp/
│ │ └── PKGBUILD
│ ├── zlib/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ └── zstd/
│ ├── PKGBUILD
│ └── zstd-1.5.7.patch
├── switch/
│ ├── SDL2/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── SDL2-2.28.5.patch
│ ├── SDL2_gfx/
│ │ ├── PKGBUILD
│ │ ├── config.guess
│ │ └── config.sub
│ ├── SDL2_image/
│ │ ├── Makefile.in.patch
│ │ └── PKGBUILD
│ ├── SDL2_mixer/
│ │ └── PKGBUILD
│ ├── SDL2_net/
│ │ └── PKGBUILD
│ ├── SDL2_ttf/
│ │ └── PKGBUILD
│ ├── TinyXML2/
│ │ └── PKGBUILD
│ ├── box2d/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── bulletphysics/
│ │ ├── PKGBUILD
│ │ └── bulletphysics.patch
│ ├── bzip2/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── curl/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── switch-curl.patch
│ ├── dav1d/
│ │ ├── PKGBUILD
│ │ └── dav1d.patch
│ ├── enet/
│ │ └── PKGBUILD
│ ├── ffmpeg/
│ │ ├── PKGBUILD
│ │ ├── ffmpeg-7.1.patch
│ │ └── tls.patch
│ ├── flac/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── flac-1.3.2.patch
│ ├── freetype/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── giflib/
│ │ └── PKGBUILD
│ ├── glad/
│ │ └── PKGBUILD
│ ├── glfw/
│ │ ├── PKGBUILD
│ │ └── switch-glfw-3.3.4.patch
│ ├── glm/
│ │ └── PKGBUILD
│ ├── glu/
│ │ ├── LICENSE
│ │ ├── PKGBUILD
│ │ └── glu-9.0.3-meson-enable-egl-arg.patch
│ ├── harfbuzz/
│ │ └── PKGBUILD
│ ├── jansson/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libarchive/
│ │ ├── PKGBUILD
│ │ └── libarchive-3.7.2.patch
│ ├── libass/
│ │ └── PKGBUILD
│ ├── libavif/
│ │ ├── CMakeLists.txt.patch
│ │ └── PKGBUILD
│ ├── libconfig/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── libconfig.patch
│ ├── libdrm_nouveau/
│ │ └── PKGBUILD
│ ├── libexpat/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libfribidi/
│ │ └── PKGBUILD
│ ├── libgd/
│ │ ├── PKGBUILD
│ │ └── libgd-2.2.5-nosyslog.patch
│ ├── libjpeg-turbo/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── libjpeg-turbo.patch
│ ├── libjson-c/
│ │ ├── PKGBUILD
│ │ └── json-c-0.16.patch
│ ├── liblzma/
│ │ └── PKGBUILD
│ ├── liblzo2/
│ │ └── PKGBUILD
│ ├── libmad/
│ │ └── PKGBUILD
│ ├── libmikmod/
│ │ ├── PKGBUILD
│ │ └── libmikmod-switch-support.patch
│ ├── libmodplug/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── libmodplug-0.8.9.0.patch
│ ├── libmpeg2/
│ │ └── PKGBUILD
│ ├── libmpv/
│ │ ├── PKGBUILD
│ │ └── mpv.patch
│ ├── libogg/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libopus/
│ │ └── PKGBUILD
│ ├── libpcre2/
│ │ └── PKGBUILD
│ ├── libplacebo/
│ │ └── PKGBUILD
│ ├── libpng/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libsamplerate/
│ │ ├── PKGBUILD
│ │ └── libsamplerate-0.1.9.patch
│ ├── libsodium/
│ │ └── PKGBUILD
│ ├── libssh2/
│ │ ├── PKGBUILD
│ │ └── disable-tests.patch
│ ├── libtheora/
│ │ ├── PKGBUILD
│ │ ├── config.guess
│ │ └── config.sub
│ ├── libtimidity/
│ │ └── PKGBUILD
│ ├── libvorbis/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libvorbisidec/
│ │ └── PKGBUILD
│ ├── libvpx/
│ │ ├── PKGBUILD
│ │ └── libvpx.patch
│ ├── libwebp/
│ │ └── PKGBUILD
│ ├── libxml2/
│ │ └── PKGBUILD
│ ├── libzstd/
│ │ └── PKGBUILD
│ ├── lua51/
│ │ └── PKGBUILD
│ ├── lwext4/
│ │ ├── PKGBUILD
│ │ └── lwext4-1.0.0.patch
│ ├── lz4/
│ │ └── PKGBUILD
│ ├── mbedtls/
│ │ ├── PKGBUILD
│ │ └── mbedtls-2.28.10.patch
│ ├── mesa/
│ │ ├── OpenGLConfig.cmake
│ │ ├── PKGBUILD
│ │ ├── glX_XML.py.patch
│ │ ├── gl_XML.py.patch
│ │ └── switch-mesa-20.1.0-5.patch
│ ├── miniupnpc/
│ │ ├── PKGBUILD
│ │ └── miniupnpc.patch
│ ├── mpg123/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── mpg123-1.31.3.patch
│ ├── mupdf/
│ │ ├── PKGBUILD
│ │ └── mupdf.patch
│ ├── ntfs-3g/
│ │ ├── PKGBUILD
│ │ └── ntfs-3g-2022.10.3.patch
│ ├── ode/
│ │ └── PKGBUILD
│ ├── oniguruma/
│ │ └── PKGBUILD
│ ├── openal-soft/
│ │ ├── PKGBUILD
│ │ └── avoid-readlink.patch
│ ├── opusfile/
│ │ └── PKGBUILD
│ ├── physfs/
│ │ ├── PKGBUILD
│ │ └── physfs-3.2.0.patch
│ ├── pkg-config/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── pkg-config.in
│ ├── smpeg2/
│ │ ├── PKGBUILD
│ │ ├── config.guess
│ │ ├── config.sub
│ │ └── smpeg2-2.0.0.patch
│ ├── wslay/
│ │ └── PKGBUILD
│ ├── xxhash/
│ │ └── PKGBUILD
│ ├── zlib/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ └── zziplib/
│ ├── PKGBUILD
│ └── zziplib-0.13.78.patch
├── switch-examples/
│ └── PKGBUILD
├── wii/
│ ├── SDL/
│ │ ├── PKGBUILD
│ │ ├── SDL-1.2.15.patch
│ │ └── config.site
│ ├── SDL2/
│ │ ├── PKGBUILD
│ │ └── SDL2-2.28.5.patch
│ ├── SDL2_gfx/
│ │ └── PKGBUILD
│ ├── SDL2_image/
│ │ ├── Makefile.in.patch
│ │ └── PKGBUILD
│ ├── SDL2_mixer/
│ │ ├── PKGBUILD
│ │ └── sdl2_mixer-config.cmake.in.patch
│ ├── SDL2_ttf/
│ │ └── PKGBUILD
│ ├── SDL_gfx/
│ │ └── PKGBUILD
│ ├── SDL_image/
│ │ └── PKGBUILD
│ ├── SDL_mixer/
│ │ ├── PKGBUILD
│ │ └── SDL_mixer-1.2.12.patch
│ ├── SDL_ttf/
│ │ ├── PKGBUILD
│ │ └── SDL_ttf-2.0.11.patch
│ ├── freeglut/
│ │ ├── PKGBUILD
│ │ └── freeglut-3.6.0.patch
│ ├── glu/
│ │ ├── LICENSE
│ │ └── PKGBUILD
│ ├── opengx/
│ │ └── PKGBUILD
│ ├── physfs/
│ │ ├── PKGBUILD
│ │ └── physfs-3.2.0.patch
│ └── pkg-config/
│ ├── PKGBUILD
│ └── pkg-config.in
└── wii-examples/
└── PKGBUILD
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
* text=lf
================================================
FILE: .gitignore
================================================
sources
packages
*.tar.xz
src
pkg
*.pkg.tar.xz*
*.tar.gz
*.tar.bz2
*.tar.zst
*~
================================================
FILE: 3ds/SDL/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=3ds-sdl
pkgver=1.2.15
pkgrel=19
pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Nintendo 3DS port)"
arch=('any')
url="https://libsdl.org"
license=("LGPL")
options=(!strip libtool staticlibs)
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
source=("${url}/release/SDL-${pkgver}.tar.gz" "SDL-1.2.15.patch")
groups=('3ds-portlibs' '3ds-sdl-libs')
prepare() {
cd SDL-$pkgver
source /opt/devkitpro/3dsvars.sh
patch -p1 -i $srcdir/SDL-1.2.15.patch
./autogen.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static --enable-n3ds
}
build() {
cd SDL-$pkgver
source /opt/devkitpro/3dsvars.sh
make
}
package() {
cd SDL-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
# remove useless stuff
rm -r "$pkgdir"${PORTLIBS_PREFIX}/share
}
sha256sums=('d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00'
'83941419c8fc87a280b1d45db595b720fe190959a0094c727a566d2b9de20804')
================================================
FILE: 3ds/SDL/SDL-1.2.15.patch
================================================
diff --git a/build-scripts/makedep.sh b/build-scripts/makedep.sh
index 3b3863b4c2..f24b851b2f 100755
--- a/build-scripts/makedep.sh
+++ b/build-scripts/makedep.sh
@@ -42,13 +42,38 @@ for src in $SOURCES
do echo "Generating dependencies for $src"
ext=`echo $src | sed 's|.*\.\(.*\)|\1|'`
obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.lo|g"`
- echo "\$(objects)/$obj: $src \\" >>${output}.new
-
+ if test x"$ext" != x"pica"; then
+ echo "\$(objects)/$obj: $src \\" >>${output}.new
+ else
+ stem=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1|g"`
+ obj=$stem.shbin.o
+ hdr=${stem}_shbin.h
+ shbin=$stem.shbin
+ cat >>${output}.new <<__EOF__
+\$(objects)/$stem.shbin.lo: \$(objects)/$obj
+ @echo "# $stem.shbin.lo - a libtool object file" > \$@
+ @echo "# Generated by ltmain.sh (GNU libtool) 2.2.6" >> \$@
+ @echo "pic_object=none" >> \$@
+ @echo "non_pic_object='$stem.shbin.o'" >> \$@
+
+\$(objects)/$obj \$(objects)/$hdr: \$(objects)/$shbin
+ @echo "extern const u8 ${stem}_shbin[];" > \$(objects)/$hdr
+ @echo "extern const u8 ${stem}_shbin_end[];" >> \$(objects)/$hdr
+ @echo "extern const u32 ${stem}_shbin_size;" >> \$(objects)/$hdr
+ @bin2s \$(objects)/$shbin | \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -x assembler-with-cpp -c - -o \$(objects)/$obj
+
+
+\$(objects)/$shbin: $src
+ picasso -o \$@ \$<
+__EOF__
+ fi
# No search to be done with Windows resource files
if test x"$ext" != x"rc"; then
search_deps $src | sort | uniq >>${output}.new
fi
case $ext in
+ pica)
+ ;;
c) cat >>${output}.new <<__EOF__
\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
@@ -89,5 +114,7 @@ __EOF__
esac
echo "" >>${output}.new
done
+echo "\$(objects)/SDL_n3dsvideo.lo : \$(objects)/vshader_shbin.h" >>${output}.new
+
mv ${output}.new ${output}
rm -f ${cache_prefix}*
diff --git a/configure.in b/configure.in
index 08c8e1e97c..7192c31af5 100644
--- a/configure.in
+++ b/configure.in
@@ -62,7 +62,7 @@ AC_PROG_MAKE_SET
AC_CHECK_TOOL(WINDRES, [windres], [:])
dnl Set up the compiler and linker flags
-INCLUDE="-I$srcdir/include"
+INCLUDE="-I$srcdir/include -I\$(objects)"
if test x$srcdir != x.; then
# Remove SDL_config.h from the source directory, since it's the
# default one, and we want to include the one that we generate.
@@ -925,6 +925,41 @@ AC_HELP_STRING([--enable-ipod], [configure SDL to work with iPodLinux [[default=
fi
}
+Checkn3ds()
+{
+ AC_ARG_ENABLE(n3ds,
+ AC_HELP_STRING([--enable-n3ds], [configure SDL to work with n3ds [[default=no]]]),, enable_n3ds=no)
+
+ if test x$enable_n3ds = xyes; then
+ ARCH=n3ds
+ N3DS_CFLAGS="-ffunction-sections -fdata-sections -march=armv6k \
+ -mtune=mpcore -mfloat-abi=hard -mword-relocations \
+ -I$DEVKITPRO/libctru/include -D__3DS__"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $N3DS_CFLAGS"
+ CFLAGS="$CFLAGS $N3DS_CFLAGS"
+ SDL_CFLAGS="$SDL_CFLAGS $N3DS_CFLAGS"
+ SDL_LIBS="-march=armv6k -mfloat-abi=hard \
+ -L${DEVKITPRO}/portlibs/3ds $SDL_LIBS \
+ -L${DEVKITPRO}/libctru/lib -lcitro3d -lctru"
+ AC_DEFINE(SDL_TIMER_N3DS)
+ SOURCES="$SOURCES $srcdir/src/timer/n3ds/*.c"
+ have_timers=yes
+ AC_DEFINE(SDL_AUDIO_DRIVER_N3DS)
+ SOURCES="$SOURCES $srcdir/src/audio/n3ds/*.c"
+ have_audio=yes
+ AC_DEFINE(SDL_JOYSTICK_N3DS)
+ SOURCES="$SOURCES $srcdir/src/joystick/n3ds/*.c"
+ have_joystick=yes
+ AC_DEFINE(SDL_THREAD_N3DS)
+ SOURCES="$SOURCES $srcdir/src/thread/n3ds/*.c"
+ have_threads=yes
+ AC_DEFINE(SDL_VIDEO_DRIVER_N3DS)
+ SOURCES="$SOURCES $srcdir/src/video/n3ds/vshader.pica"
+ SOURCES="$SOURCES $srcdir/src/video/n3ds/*.c"
+ have_video=yes
+ fi
+}
+
dnl Find the nanox include and library directories
CheckNANOX()
{
@@ -2314,6 +2349,9 @@ AC_HELP_STRING([--enable-rpath], [use an rpath when linking SDL [[default=yes]]]
dnl Set up the configuration based on the host platform!
case "$host" in
+ *arm-none-eabi*)
+ Checkn3ds
+ ;;
arm-*-elf*) # FIXME: Can we get more specific for iPodLinux?
ARCH=linux
CheckDummyVideo
@@ -2885,6 +2923,7 @@ OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.lo,g'`
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.S,$(objects)/\1.lo,g'`
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.lo,g'`
+OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.pica,$(objects)/\1.shbin.lo,g'`
SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.lo,g'`
SDLMAIN_OBJECTS=`echo $SDLMAIN_OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.lo,g'`
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index 8bb1773c0e..d6f349499c 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -185,6 +185,7 @@
#undef SDL_AUDIO_DRIVER_SNDMGR
#undef SDL_AUDIO_DRIVER_SUNAUDIO
#undef SDL_AUDIO_DRIVER_WAVEOUT
+#undef SDL_AUDIO_DRIVER_N3DS
/* Enable various cdrom drivers */
#undef SDL_CDROM_AIX
@@ -218,6 +219,7 @@
#undef SDL_JOYSTICK_WINMM
#undef SDL_JOYSTICK_USBHID
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
+#undef SDL_JOYSTICK_N3DS
/* Enable various shared object loading systems */
#undef SDL_LOADSO_BEOS
@@ -239,6 +241,7 @@
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
#undef SDL_THREAD_SPROC
#undef SDL_THREAD_WIN32
+#undef SDL_THREAD_N3DS
/* Enable various timer systems */
#undef SDL_TIMER_BEOS
@@ -251,6 +254,7 @@
#undef SDL_TIMER_UNIX
#undef SDL_TIMER_WIN32
#undef SDL_TIMER_WINCE
+#undef SDL_TIMER_N3DS
/* Enable various video drivers */
#undef SDL_VIDEO_DRIVER_AALIB
@@ -293,6 +297,7 @@
#undef SDL_VIDEO_DRIVER_X11_XRANDR
#undef SDL_VIDEO_DRIVER_X11_XV
#undef SDL_VIDEO_DRIVER_XBIOS
+#undef SDL_VIDEO_DRIVER_N3DS
/* Enable OpenGL support */
#undef SDL_VIDEO_OPENGL
diff --git a/include/SDL_keyboard.h b/include/SDL_keyboard.h
index 9d7129c526..b03422411e 100644
--- a/include/SDL_keyboard.h
+++ b/include/SDL_keyboard.h
@@ -125,7 +125,6 @@ extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate);
*/
extern DECLSPEC char * SDLCALL SDL_GetKeyName(SDLKey key);
-
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h
index 35a4fdde59..5d8b620459 100644
--- a/include/SDL_stdinc.h
+++ b/include/SDL_stdinc.h
@@ -147,7 +147,7 @@ typedef enum {
DUMMY_ENUM_VALUE
} SDL_DUMMY_ENUM;
-#ifndef __NDS__
+#if !defined(__NDS__) && !defined(__3DS__)
SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
#endif
/*@}*/
diff --git a/include/SDL_video.h b/include/SDL_video.h
index f9c4e07025..b2d0642843 100644
--- a/include/SDL_video.h
+++ b/include/SDL_video.h
@@ -142,7 +142,16 @@ typedef struct SDL_Surface {
#define SDL_OPENGL 0x00000002 /**< Create an OpenGL rendering context */
#define SDL_OPENGLBLIT 0x0000000A /**< Create an OpenGL rendering context and use it for blitting */
#define SDL_RESIZABLE 0x00000010 /**< This video mode may be resized */
-#define SDL_NOFRAME 0x00000020 /**< No window caption or edge frame */
+#define SDL_NOFRAME 0x00000020 /**< No window caption or edge frame */
+#ifdef __3DS__
+#define SDL_TOPSCR 0x00100000 /**< 3DS Top Screen mode */
+#define SDL_BOTTOMSCR 0x00200000 /**< 3DS Bottom Screen mode */
+#define SDL_DUALSCR 0x00300000 /**< 3DS Top+Bottom Screen mode */
+#define SDL_FITWIDTH 0x00400000 /**> Render a resized surface to fit systen screen width */
+#define SDL_FITHEIGHT 0x00800000 /**> Render a resized surface to fit systen screen height */
+#define SDL_CONSOLETOP 0x00040000 /**> Enale console output on Top screen */
+#define SDL_CONSOLEBOTTOM 0x00080000 /**> Enale console output on Bottom screen */
+#endif
/*@}*/
/** Used internally (read-only) */
diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index beb26e0b4d..4fd548c70c 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -104,6 +104,9 @@ static AudioBootStrap *bootstrap[] = {
#if SDL_AUDIO_DRIVER_NDS
&NDSAUD_bootstrap,
#endif
+#if SDL_AUDIO_DRIVER_N3DS
+ &N3DSAUD_bootstrap,
+#endif
#if SDL_AUDIO_DRIVER_MMEAUDIO
&MMEAUDIO_bootstrap,
#endif
diff --git a/src/audio/SDL_sysaudio.h b/src/audio/SDL_sysaudio.h
index 74ac21df04..2cba86dae5 100644
--- a/src/audio/SDL_sysaudio.h
+++ b/src/audio/SDL_sysaudio.h
@@ -170,6 +170,9 @@ extern AudioBootStrap DCAUD_bootstrap;
#if SDL_AUDIO_DRIVER_NDS
extern AudioBootStrap NDSAUD_bootstrap;
#endif
+#if SDL_AUDIO_DRIVER_N3DS
+extern AudioBootStrap N3DSAUD_bootstrap;
+#endif
#if SDL_AUDIO_DRIVER_MMEAUDIO
extern AudioBootStrap MMEAUDIO_bootstrap;
#endif
diff --git a/src/audio/n3ds/SDL_n3dsaudio.c b/src/audio/n3ds/SDL_n3dsaudio.c
new file mode 100644
index 0000000000..019f205bab
--- /dev/null
+++ b/src/audio/n3ds/SDL_n3dsaudio.c
@@ -0,0 +1,339 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2012 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+
+ This file written by Ryan C. Gordon (icculus@icculus.org)
+*/
+#include "SDL_config.h"
+
+/* Output audio to nowhere... */
+
+#include "SDL_rwops.h"
+#include "SDL_timer.h"
+#include "SDL_audio.h"
+#include "../SDL_audiomem.h"
+#include "../SDL_audio_c.h"
+#include "../SDL_audiodev_c.h"
+#include "SDL_n3dsaudio.h"
+
+#include <3ds.h>
+#include <assert.h>
+
+/* The tag name used by N3DS audio */
+#define N3DSAUD_DRIVER_NAME "n3ds"
+
+static dspHookCookie g_dspHook;
+static SDL_AudioDevice *g_audDev;
+
+/* Audio driver functions */
+static int N3DSAUD_OpenAudio(_THIS, SDL_AudioSpec *spec);
+static void N3DSAUD_WaitAudio(_THIS);
+static void N3DSAUD_PlayAudio(_THIS);
+static Uint8 *N3DSAUD_GetAudioBuf(_THIS);
+static void N3DSAUD_CloseAudio(_THIS);
+
+/* Audio driver bootstrap functions */
+static int N3DSAUD_Available(void)
+{
+ return(1);
+}
+
+static inline void contextLock(_THIS)
+{
+ LightLock_Lock(&this->hidden->lock);
+}
+
+static inline void contextUnlock(_THIS)
+{
+ LightLock_Unlock(&this->hidden->lock);
+}
+
+static void N3DSAUD_LockAudio(_THIS)
+{
+ SDL_mutexP(this->mixer_lock);
+}
+
+static void N3DSAUD_UnlockAudio(_THIS)
+{
+ SDL_mutexV(this->mixer_lock);
+}
+
+static void N3DSAUD_DeleteDevice(SDL_AudioDevice *device)
+{
+ if ( device->hidden->mixbuf != NULL ) {
+ SDL_FreeAudioMem(device->hidden->mixbuf);
+ device->hidden->mixbuf = NULL;
+ }
+ if ( device->hidden->waveBuf[0].data_vaddr!= NULL ) {
+ linearFree((void*)device->hidden->waveBuf[0].data_vaddr);
+ device->hidden->waveBuf[0].data_vaddr = NULL;
+ }
+
+ ndspExit();
+
+ SDL_free(device->hidden);
+ SDL_free(device);
+}
+
+static SDL_AudioDevice *N3DSAUD_CreateDevice(int devindex)
+{
+ SDL_AudioDevice *this;
+
+ /* Initialize all variables that we clean on shutdown */
+ this = (SDL_AudioDevice *)SDL_malloc(sizeof(SDL_AudioDevice));
+ if ( this ) {
+ SDL_memset(this, 0, (sizeof *this));
+ this->hidden = (struct SDL_PrivateAudioData *)
+ SDL_malloc((sizeof *this->hidden));
+ }
+ if ( (this == NULL) || (this->hidden == NULL) ) {
+ SDL_OutOfMemory();
+ if ( this ) {
+ SDL_free(this);
+ }
+ return(0);
+ }
+
+ //start 3ds DSP init
+ Result rc = ndspInit();
+ if (R_FAILED(rc)) {
+ SDL_free(this);
+ if ((R_SUMMARY(rc) == RS_NOTFOUND) && (R_MODULE(rc) == RM_DSP))
+ SDL_SetError("DSP init failed: dspfirm.cdc missing!");
+ else
+ SDL_SetError("DSP init failed. Error code: 0x%X", rc);
+ return(0);
+ }
+
+ /* Initialize internal state */
+ SDL_memset(this->hidden, 0, (sizeof *this->hidden));
+ LightLock_Init(&this->hidden->lock);
+ CondVar_Init(&this->hidden->cv);
+
+ /* Set the function pointers */
+ this->OpenAudio = N3DSAUD_OpenAudio;
+ this->WaitAudio = N3DSAUD_WaitAudio;
+ this->PlayAudio = N3DSAUD_PlayAudio;
+ this->GetAudioBuf = N3DSAUD_GetAudioBuf;
+ this->CloseAudio = N3DSAUD_CloseAudio;
+ this->LockAudio = N3DSAUD_LockAudio;
+ this->UnlockAudio = N3DSAUD_UnlockAudio;
+ this->free = N3DSAUD_DeleteDevice;
+
+ return this;
+}
+
+AudioBootStrap N3DSAUD_bootstrap = {
+ N3DSAUD_DRIVER_NAME, "SDL N3DS audio driver",
+ N3DSAUD_Available, N3DSAUD_CreateDevice
+};
+
+/* called by ndsp thread on each audio frame */
+static void audioFrameFinished(void *context)
+{
+ SDL_AudioDevice *this = (SDL_AudioDevice *) context;
+
+ contextLock(this);
+
+ bool shouldBroadcast = false;
+ unsigned i;
+ for (i = 0; i < NUM_BUFFERS; i ++) {
+ if (this->hidden->waveBuf[i].status == NDSP_WBUF_DONE) {
+ this->hidden->waveBuf[i].status = NDSP_WBUF_FREE;
+ shouldBroadcast = true;
+ }
+ }
+
+ if (shouldBroadcast)
+ CondVar_Broadcast(&this->hidden->cv);
+
+ contextUnlock(this);
+}
+
+/* This function blocks until it is possible to write a full sound buffer */
+static void N3DSAUD_WaitAudio(_THIS)
+{
+ contextLock(this);
+ while (!this->hidden->isCancelled && this->hidden->waveBuf[this->hidden->nextbuf].status != NDSP_WBUF_FREE) {
+ CondVar_Wait(&this->hidden->cv, &this->hidden->lock);
+ }
+ contextUnlock(this);
+}
+
+static void N3DSAUD_DspHook(DSP_HookType hook)
+{
+ if (hook == DSPHOOK_ONCANCEL)
+ {
+ contextLock(g_audDev);
+ g_audDev->hidden->isCancelled = true;
+ g_audDev->enabled = false;
+ CondVar_Broadcast(&g_audDev->hidden->cv);
+ contextUnlock(g_audDev);
+ }
+}
+
+static void N3DSAUD_PlayAudio(_THIS)
+{
+ contextLock(this);
+
+ size_t nextbuf = this->hidden->nextbuf;
+ size_t sampleLen = this->hidden->mixlen;
+
+ if (this->hidden->isCancelled || this->hidden->waveBuf[nextbuf].status != NDSP_WBUF_FREE)
+ {
+ contextUnlock(this);
+ return;
+ }
+
+ this->hidden->nextbuf = (nextbuf + 1) % NUM_BUFFERS;
+
+ contextUnlock(this);
+
+ memcpy((void*)this->hidden->waveBuf[nextbuf].data_vaddr,this->hidden->mixbuf,sampleLen);
+ DSP_FlushDataCache(this->hidden->waveBuf[nextbuf].data_vaddr,sampleLen);
+
+ ndspChnWaveBufAdd(0, &this->hidden->waveBuf[nextbuf]);
+}
+
+static Uint8 *N3DSAUD_GetAudioBuf(_THIS)
+{
+ return(this->hidden->mixbuf);
+}
+
+static void N3DSAUD_CloseAudio(_THIS)
+{
+ contextLock(this);
+
+ dspUnhook(&g_dspHook);
+ ndspSetCallback(NULL, NULL);
+ if (!this->hidden->isCancelled)
+ ndspChnReset(0);
+
+ if ( this->hidden->mixbuf != NULL ) {
+ SDL_FreeAudioMem(this->hidden->mixbuf);
+ this->hidden->mixbuf = NULL;
+ }
+ if ( this->hidden->waveBuf[0].data_vaddr!= NULL ) {
+ linearFree((void*)this->hidden->waveBuf[0].data_vaddr);
+ this->hidden->waveBuf[0].data_vaddr = NULL;
+ }
+
+ if (!this->hidden->isCancelled) {
+ memset(this->hidden->waveBuf,0,sizeof(ndspWaveBuf)*NUM_BUFFERS);
+ CondVar_Broadcast(&this->hidden->cv);
+ }
+
+ contextUnlock(this);
+}
+
+static int N3DSAUD_OpenAudio(_THIS, SDL_AudioSpec *spec)
+{
+ if (this->hidden->isCancelled) {
+ SDL_SetError("DSP is in cancelled state");
+ return (-1);
+ }
+
+ if(spec->channels > 2)
+ spec->channels = 2;
+
+ Uint16 test_format = SDL_FirstAudioFormat(spec->format);
+ int valid_datatype = 0;
+ while ((!valid_datatype) && (test_format)) {
+ spec->format = test_format;
+ switch (test_format) {
+ case AUDIO_S8:
+ /* Signed 8-bit audio supported */
+ this->hidden->format=(spec->channels==2)?NDSP_FORMAT_STEREO_PCM8:NDSP_FORMAT_MONO_PCM8;
+ this->hidden->isSigned=1;
+ this->hidden->bytePerSample = (spec->channels);
+ valid_datatype = 1;
+ break;
+ case AUDIO_S16:
+ /* Signed 16-bit audio supported */
+ this->hidden->format=(spec->channels==2)?NDSP_FORMAT_STEREO_PCM16:NDSP_FORMAT_MONO_PCM16;
+ this->hidden->isSigned=1;
+ this->hidden->bytePerSample = (spec->channels) * 2;
+ valid_datatype = 1;
+ break;
+ default:
+ test_format = SDL_NextAudioFormat();
+ break;
+ }
+ }
+
+ if (!valid_datatype) { /* shouldn't happen, but just in case... */
+ SDL_SetError("Unsupported audio format");
+ return (-1);
+ }
+
+ /* Update the fragment size as size in bytes */
+ SDL_CalculateAudioSpec(spec);
+
+ /* Allocate mixing buffer */
+ if (spec->size >= UINT32_MAX/2)
+ return(-1);
+ this->hidden->mixlen = spec->size;
+ this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(spec->size);
+ if ( this->hidden->mixbuf == NULL ) {
+ return(-1);
+ }
+ SDL_memset(this->hidden->mixbuf, spec->silence, spec->size);
+
+ Uint8 * temp = (Uint8 *) linearAlloc(this->hidden->mixlen*NUM_BUFFERS);
+ if (temp == NULL ) {
+ SDL_free(this->hidden->mixbuf);
+ return(-1);
+ }
+ memset(temp,0,this->hidden->mixlen*NUM_BUFFERS);
+ DSP_FlushDataCache(temp,this->hidden->mixlen*NUM_BUFFERS);
+
+ this->hidden->nextbuf = 0;
+ this->hidden->channels = spec->channels;
+ this->hidden->samplerate = spec->freq;
+
+ ndspChnReset(0);
+
+ ndspChnSetInterp(0, NDSP_INTERP_LINEAR);
+ ndspChnSetRate(0, spec->freq);
+ ndspChnSetFormat(0, this->hidden->format);
+
+ float mix[12];
+ memset(mix, 0, sizeof(mix));
+ mix[0] = 1.0;
+ mix[1] = 1.0;
+ ndspChnSetMix(0, mix);
+
+ memset(this->hidden->waveBuf,0,sizeof(ndspWaveBuf)*NUM_BUFFERS);
+
+ unsigned i;
+ for (i = 0; i < NUM_BUFFERS; i ++) {
+ this->hidden->waveBuf[i].data_vaddr = temp;
+ this->hidden->waveBuf[i].nsamples = this->hidden->mixlen / this->hidden->bytePerSample;
+ temp += this->hidden->mixlen;
+ }
+
+ /* Setup callback */
+ g_audDev = this;
+ ndspSetCallback(audioFrameFinished, this);
+ dspHook(&g_dspHook, N3DSAUD_DspHook);
+
+ /* We're ready to rock and roll. :-) */
+ return(0);
+}
diff --git a/src/audio/n3ds/SDL_n3dsaudio.h b/src/audio/n3ds/SDL_n3dsaudio.h
new file mode 100644
index 0000000000..c51c850b94
--- /dev/null
+++ b/src/audio/n3ds/SDL_n3dsaudio.h
@@ -0,0 +1,50 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2012 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+#include <3ds.h>
+#include "SDL_config.h"
+
+#ifndef _SDL_n3dsaudio_h
+#define _SDL_n3dsaudio_h
+
+#include "../SDL_sysaudio.h"
+
+#define _THIS SDL_AudioDevice *this
+
+#define NUM_BUFFERS 2 /* -- Don't lower this! */
+
+struct SDL_PrivateAudioData {
+ /* The file descriptor for the audio device */
+ Uint8 *mixbuf;
+ Uint32 mixlen;
+ Uint32 format;
+ Uint32 samplerate;
+ Uint32 channels;
+ Uint8 bytePerSample;
+ Uint32 isSigned;
+ Uint32 nextbuf;
+ ndspWaveBuf waveBuf[NUM_BUFFERS];
+ LightLock lock;
+ CondVar cv;
+ bool isCancelled;
+};
+
+#endif /* _SDL_n3dsaudio_h */
diff --git a/src/joystick/n3ds/SDL_sysjoystick.c b/src/joystick/n3ds/SDL_sysjoystick.c
new file mode 100644
index 0000000000..c41e7a2455
--- /dev/null
+++ b/src/joystick/n3ds/SDL_sysjoystick.c
@@ -0,0 +1,183 @@
+#include "SDL_config.h"
+
+#include <3ds.h>
+
+#include "SDL_error.h"
+#include "SDL_events.h"
+#include "SDL_joystick.h"
+#include "../SDL_sysjoystick.h"
+#include "../SDL_joystick_c.h"
+
+#include "../../video/n3ds/SDL_n3dsvideo.h"
+
+int old_x = 0, old_y = 0;
+int old_cs_x = 0, old_cs_y = 0;
+u32 key_press, key_release = 0;
+int old_dpad_state = 0;
+
+int SDL_SYS_JoystickInit (void) {
+ SDL_numjoysticks = 1;
+
+ return 1;
+}
+
+const char *SDL_SYS_JoystickName (int index) {
+ if(!index)
+ return "3DS builtin joypad";
+
+ SDL_SetError ("No joystick available with that index");
+
+ return (NULL);
+}
+
+int SDL_SYS_JoystickOpen(SDL_Joystick *joystick) {
+ joystick->nbuttons = 10;
+ joystick->nhats = 1;
+ joystick->nballs = 0;
+ joystick->naxes = 4;
+
+ return 0;
+}
+
+void SDL_SYS_JoystickUpdate (SDL_Joystick *joystick) {
+
+ if (!aptIsActive()) {
+ // Avoid pumping events if we are not in the foreground.
+ return;
+ }
+
+ circlePosition circlePad;
+ hidCircleRead(&circlePad);
+ int x,y;
+ x = circlePad.dx;
+ y = circlePad.dy;
+ if (x > 156) x= 156;
+ if (x < -156) x= -156;
+ if (y > 156) y= 156;
+ if (y < -156) y= -156;
+ if (old_x != x) {
+ old_x = x;
+ SDL_PrivateJoystickAxis (joystick, 0, x * 210);
+ }
+ if (old_y != y) {
+ old_y = y;
+ SDL_PrivateJoystickAxis (joystick, 1, - y * 210);
+ }
+
+ circlePosition circleStick = {0};
+ irrstCstickRead(&circleStick);
+ x = circleStick.dx;
+ y = circleStick.dy;
+ if (x > 156) x= 156;
+ if (x < -156) x= -156;
+ if (y > 156) y= 156;
+ if (y < -156) y= -156;
+ if (old_cs_x != x) {
+ old_cs_x = x;
+ SDL_PrivateJoystickAxis (joystick, 2, x * 210);
+ }
+ if (old_cs_y != y) {
+ old_cs_y = y;
+ SDL_PrivateJoystickAxis (joystick, 3, - y * 210);
+ }
+
+ key_press = hidKeysDown ();
+ int dpad_state = old_dpad_state;
+ if ((key_press & KEY_A)) {
+ SDL_PrivateJoystickButton (joystick, 1, SDL_PRESSED);
+ }
+ if ((key_press & KEY_B)) {
+ SDL_PrivateJoystickButton (joystick, 2, SDL_PRESSED);
+ }
+ if ((key_press & KEY_X)) {
+ SDL_PrivateJoystickButton (joystick, 3, SDL_PRESSED);
+ }
+ if ((key_press & KEY_Y)) {
+ SDL_PrivateJoystickButton (joystick, 4, SDL_PRESSED);
+ }
+ if ((key_press & KEY_SELECT)) {
+ SDL_PrivateJoystickButton (joystick, 7, SDL_PRESSED);
+ }
+ if ((key_press & KEY_START)) {
+ SDL_PrivateJoystickButton (joystick, 0, SDL_PRESSED);
+ }
+ if ((key_press & KEY_L)) {
+ SDL_PrivateJoystickButton (joystick, 5, SDL_PRESSED);
+ }
+ if ((key_press & KEY_R)) {
+ SDL_PrivateJoystickButton (joystick, 6, SDL_PRESSED);
+ }
+ if ((key_press & KEY_DDOWN)) {
+ dpad_state |= SDL_HAT_DOWN;
+ }
+ if ((key_press & KEY_DLEFT)) {
+ dpad_state |= SDL_HAT_LEFT;
+ }
+ if ((key_press & KEY_DUP)) {
+ dpad_state |= SDL_HAT_UP;
+ }
+ if ((key_press & KEY_DRIGHT)) {
+ dpad_state |= SDL_HAT_RIGHT;
+ }
+ if ((key_press & KEY_ZL)) {
+ SDL_PrivateJoystickButton (joystick, 8, SDL_PRESSED);
+ }
+ if ((key_press & KEY_ZR)) {
+ SDL_PrivateJoystickButton (joystick, 9, SDL_PRESSED);
+ }
+
+ key_release = hidKeysUp ();
+ if ((key_release & KEY_A)) {
+ SDL_PrivateJoystickButton (joystick, 1, SDL_RELEASED);
+ }
+ if ((key_release & KEY_B)) {
+ SDL_PrivateJoystickButton (joystick, 2, SDL_RELEASED);
+ }
+ if ((key_release & KEY_X)) {
+ SDL_PrivateJoystickButton (joystick, 3, SDL_RELEASED);
+ }
+ if ((key_release & KEY_Y)) {
+ SDL_PrivateJoystickButton (joystick, 4, SDL_RELEASED);
+ }
+ if ((key_release & KEY_SELECT)) {
+ SDL_PrivateJoystickButton (joystick, 7, SDL_RELEASED);
+ }
+ if ((key_release & KEY_START)) {
+ SDL_PrivateJoystickButton (joystick, 0, SDL_RELEASED);
+ }
+ if ((key_release & KEY_L)) {
+ SDL_PrivateJoystickButton (joystick, 5, SDL_RELEASED);
+ }
+ if ((key_release & KEY_R)) {
+ SDL_PrivateJoystickButton (joystick, 6, SDL_RELEASED);
+ }
+ if ((key_release & KEY_DDOWN)) {
+ dpad_state &= ~SDL_HAT_DOWN;
+ }
+ if ((key_release & KEY_DLEFT)) {
+ dpad_state &= ~SDL_HAT_LEFT;
+ }
+ if ((key_release & KEY_DUP)) {
+ dpad_state &= ~SDL_HAT_UP;
+ }
+ if ((key_release & KEY_DRIGHT)) {
+ dpad_state &= ~SDL_HAT_RIGHT;
+ }
+ if ((key_release & KEY_ZL)) {
+ SDL_PrivateJoystickButton (joystick, 8, SDL_RELEASED);
+ }
+ if ((key_release & KEY_ZR)) {
+ SDL_PrivateJoystickButton (joystick, 9, SDL_RELEASED);
+ }
+
+ if (dpad_state != old_dpad_state) {
+ old_dpad_state = dpad_state;
+ SDL_PrivateJoystickHat (joystick, 0, dpad_state);
+ }
+}
+
+void SDL_SYS_JoystickClose (SDL_Joystick *joystick) {
+}
+
+void SDL_SYS_JoystickQuit (void) {
+}
diff --git a/src/thread/SDL_thread_c.h b/src/thread/SDL_thread_c.h
index 8af6e52f41..c48803ff2a 100644
--- a/src/thread/SDL_thread_c.h
+++ b/src/thread/SDL_thread_c.h
@@ -43,6 +43,8 @@
#include "win32/SDL_systhread_c.h"
#elif SDL_THREAD_SYMBIAN
#include "symbian/SDL_systhread_c.h"
+#elif SDL_THREAD_N3DS
+#include "n3ds/SDL_systhread_c.h"
#else
#error Need thread implementation for this platform
#include "generic/SDL_systhread_c.h"
diff --git a/src/thread/n3ds/SDL_syscond.c b/src/thread/n3ds/SDL_syscond.c
new file mode 100644
index 0000000000..df20c52e58
--- /dev/null
+++ b/src/thread/n3ds/SDL_syscond.c
@@ -0,0 +1,137 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+*/
+//#include "../../SDL_internal.h"
+
+#include "SDL_config.h"
+
+#include "SDL_sysmutex_c.h"
+
+struct SDL_cond
+{
+ CondVar cv;
+};
+
+/* Create a condition variable */
+SDL_cond *
+SDL_CreateCond(void)
+{
+ SDL_cond *cond;
+
+ cond = (SDL_cond *) SDL_malloc(sizeof(SDL_cond));
+ if (cond) {
+ CondVar_Init(&cond->cv);
+ } else {
+ SDL_OutOfMemory();
+ }
+ return (cond);
+}
+
+/* Destroy a condition variable */
+void
+SDL_DestroyCond(SDL_cond * cond)
+{
+ if (cond) {
+ SDL_free(cond);
+ }
+}
+
+/* Restart one of the threads that are waiting on the condition variable */
+int
+SDL_CondSignal(SDL_cond * cond)
+{
+ if (!cond) {
+ SDL_SetError("Passed a NULL condition variable");
+ return -1;
+ }
+
+ CondVar_Signal(&cond->cv);
+ return 0;
+}
+
+/* Restart all threads that are waiting on the condition variable */
+int
+SDL_CondBroadcast(SDL_cond * cond)
+{
+ if (!cond) {
+ SDL_SetError("Passed a NULL condition variable");
+ return -1;
+ }
+
+ CondVar_Broadcast(&cond->cv);
+ return 0;
+}
+
+/* Wait on the condition variable for at most 'ms' milliseconds.
+ The mutex must be locked before entering this function!
+ The mutex is unlocked during the wait, and locked again after the wait.
+
+Typical use:
+
+Thread A:
+ SDL_LockMutex(lock);
+ while ( ! condition ) {
+ SDL_CondWait(cond, lock);
+ }
+ SDL_UnlockMutex(lock);
+
+Thread B:
+ SDL_LockMutex(lock);
+ ...
+ condition = true;
+ ...
+ SDL_CondSignal(cond);
+ SDL_UnlockMutex(lock);
+ */
+int
+SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms)
+{
+ if (!cond) {
+ SDL_SetError("Passed a NULL condition variable");
+ return -1;
+ }
+
+ if (!mutex) {
+ SDL_SetError("Passed a NULL mutex");
+ return -1;
+ }
+
+ RecursiveLock rl_backup = mutex->rl;
+ mutex->rl.thread_tag = 0;
+ mutex->rl.counter = 0;
+
+ Result res = 0;
+ if (ms == SDL_MUTEX_MAXWAIT)
+ CondVar_Wait(&cond->cv, &mutex->rl.lock);
+ else
+ res = CondVar_WaitTimeout(&cond->cv, &mutex->rl.lock, (s64)ms * 1000000LL);
+
+ mutex->rl.thread_tag = rl_backup.thread_tag;
+ mutex->rl.counter = rl_backup.counter;
+
+ return R_SUCCEEDED(res) ? 0 : SDL_MUTEX_TIMEDOUT;
+}
+
+/* Wait on the condition variable forever */
+int
+SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex)
+{
+ return SDL_CondWaitTimeout(cond, mutex, SDL_MUTEX_MAXWAIT);
+}
diff --git a/src/thread/n3ds/SDL_sysmutex.c b/src/thread/n3ds/SDL_sysmutex.c
new file mode 100644
index 0000000000..9a84e761ce
--- /dev/null
+++ b/src/thread/n3ds/SDL_sysmutex.c
@@ -0,0 +1,85 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+*/
+//#include "../../SDL_internal.h"
+
+#include "SDL_config.h"
+
+#include "SDL_sysmutex_c.h"
+
+/* Create a mutex */
+SDL_mutex *
+SDL_CreateMutex(void)
+{
+ SDL_mutex *mutex;
+
+ /* Allocate mutex memory */
+ mutex = (SDL_mutex *) SDL_malloc(sizeof(*mutex));
+ if (mutex) {
+ /* Initialize the inner recursive lock */
+ RecursiveLock_Init(&mutex->rl);
+ } else {
+ SDL_OutOfMemory();
+ }
+ return mutex;
+}
+
+/* Free the mutex */
+void
+SDL_DestroyMutex(SDL_mutex * mutex)
+{
+ if (mutex) {
+ SDL_free(mutex);
+ }
+}
+
+/* Lock the semaphore */
+int
+SDL_mutexP(SDL_mutex * mutex)
+{
+#if SDL_THREADS_DISABLED
+ return 0;
+#else
+ if (mutex == NULL) {
+ SDL_SetError("Passed a NULL mutex");
+ return -1;
+ }
+
+ RecursiveLock_Lock(&mutex->rl);
+ return 0;
+#endif /* SDL_THREADS_DISABLED */
+}
+
+/* Unlock the mutex */
+int
+SDL_mutexV(SDL_mutex * mutex)
+{
+#if SDL_THREADS_DISABLED
+ return 0;
+#else
+ if (mutex == NULL) {
+ SDL_SetError("Passed a NULL mutex");
+ return -1;
+ }
+
+ RecursiveLock_Unlock(&mutex->rl);
+ return 0;
+#endif /* SDL_THREADS_DISABLED */
+}
diff --git a/src/thread/n3ds/SDL_sysmutex_c.h b/src/thread/n3ds/SDL_sysmutex_c.h
new file mode 100644
index 0000000000..4f123f78cd
--- /dev/null
+++ b/src/thread/n3ds/SDL_sysmutex_c.h
@@ -0,0 +1,31 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+*/
+#include "SDL_config.h"
+
+#include "SDL_thread.h"
+#include "SDL_systhread_c.h"
+
+struct SDL_mutex
+{
+ RecursiveLock rl;
+};
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/thread/n3ds/SDL_syssem.c b/src/thread/n3ds/SDL_syssem.c
new file mode 100644
index 0000000000..eefbd95faf
--- /dev/null
+++ b/src/thread/n3ds/SDL_syssem.c
@@ -0,0 +1,103 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+*/
+//#include "../../SDL_internal.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "SDL_config.h"
+
+#include "SDL_error.h"
+#include "SDL_thread.h"
+
+#include <3ds.h>
+
+struct SDL_semaphore {
+ LightSemaphore sem;
+};
+
+
+/* Create a semaphore */
+SDL_sem *SDL_CreateSemaphore(Uint32 initial_value)
+{
+ SDL_sem *sem;
+
+ sem = (SDL_sem *) malloc(sizeof(*sem));
+ if (sem != NULL) {
+ LightSemaphore_Init(&sem->sem, initial_value, 255);
+ } else {
+ SDL_OutOfMemory();
+ }
+
+ return sem;
+}
+
+/* Free the semaphore */
+void SDL_DestroySemaphore(SDL_sem *sem)
+{
+ if (sem != NULL) {
+ free(sem);
+ }
+}
+
+/* Waits on a semaphore */
+int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
+{
+ if (sem == NULL) {
+ SDL_SetError("Passed a NULL sem");
+ return -1;
+ }
+
+ if (timeout == SDL_MUTEX_MAXWAIT) {
+ LightSemaphore_Acquire(&sem->sem, 1);
+ return 0;
+ }
+ else if (timeout == 0) {
+ int rc = LightSemaphore_TryAcquire(&sem->sem, 1);
+ return rc != 0 ? SDL_MUTEX_TIMEDOUT : 0;
+ }
+ else {
+ SDL_SetError("Non-trivial semaphore wait timeout values not supported");
+ return -1;
+ }
+}
+
+int SDL_SemTryWait(SDL_sem *sem)
+{
+ return SDL_SemWaitTimeout(sem, 0);
+}
+
+int SDL_SemWait(SDL_sem *sem)
+{
+ return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT);
+}
+
+/* Returns the current count of the semaphore */
+Uint32 SDL_SemValue(SDL_sem *sem)
+{
+ return sem->sem.current_count;
+}
+
+int SDL_SemPost(SDL_sem *sem)
+{
+ LightSemaphore_Release(&sem->sem, 1);
+ return 0;
+}
diff --git a/src/thread/n3ds/SDL_systhread.c b/src/thread/n3ds/SDL_systhread.c
new file mode 100644
index 0000000000..aace52a72b
--- /dev/null
+++ b/src/thread/n3ds/SDL_systhread.c
@@ -0,0 +1,93 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <malloc.h>
+
+#include "SDL_config.h"
+
+#include "SDL_error.h"
+#include "SDL_thread.h"
+#include "../SDL_systhread.h"
+#include "../SDL_thread_c.h"
+#include <3ds.h>
+
+#define STACKSIZE (128 * 1024)
+
+void ThreadEntry(void *arg)
+{
+ SDL_RunThread(arg);
+}
+
+int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
+{
+// s32 priority = 0x2F;
+ s32 priority = 0x30;
+
+ /* Set priority of new thread higher than the current thread */
+ svcGetThreadPriority(&priority, CUR_THREAD_HANDLE);
+ if(priority>0x19) priority--;
+ else priority = 0x19; //priority 0x18 is for video thread that is activated by a signal and than must run at maximum priority to avoid flickering
+ if(priority>0x2F) priority = 0x2F;
+
+ thread->handle = threadCreate(ThreadEntry, args,
+ STACKSIZE, priority, -2, false);
+
+ thread->threadid = (int) thread->handle;
+ if (!thread->threadid)
+ {
+ SDL_SetError("Create Thread failed");
+ return(-1);
+ }
+
+ return 0;
+}
+
+void SDL_SYS_SetupThread(void)
+{
+ //Nothing, probably
+}
+
+Uint32 SDL_ThreadID(void)
+{
+ //Incompatible with SDL API, this function will NOT return
+ //a valid thread ID when called from the main thread.
+ u32 threadID=0;
+ Thread current = threadGetCurrent();
+ if (current) {
+ Handle handle = threadGetHandle(current);
+ svcGetThreadId(&threadID, handle);
+ }
+
+ return threadID;
+}
+
+void SDL_SYS_WaitThread(SDL_Thread *thread)
+{
+ threadJoin(thread->handle, U64_MAX);
+}
+
+void SDL_SYS_KillThread(SDL_Thread *thread)
+{
+ threadFree(thread->handle);
+}
+
diff --git a/src/thread/n3ds/SDL_systhread_c.h b/src/thread/n3ds/SDL_systhread_c.h
new file mode 100644
index 0000000000..1baf0d7210
--- /dev/null
+++ b/src/thread/n3ds/SDL_systhread_c.h
@@ -0,0 +1,24 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include <3ds.h>
+
+typedef Thread SYS_ThreadHandle;
diff --git a/src/timer/n3ds/SDL_systimer.c b/src/timer/n3ds/SDL_systimer.c
new file mode 100644
index 0000000000..d921cdc0eb
--- /dev/null
+++ b/src/timer/n3ds/SDL_systimer.c
@@ -0,0 +1,42 @@
+#include "SDL_config.h"
+
+#include <sys/time.h>
+#include <3ds.h>
+#include <sys/select.h>
+
+
+#include "SDL_thread.h"
+#include "SDL_timer.h"
+#include "SDL_error.h"
+#include "../SDL_timer_c.h"
+
+static u64 g_startTicks;
+
+void SDL_StartTicks (void) {
+ g_startTicks = svcGetSystemTick();
+}
+
+Uint32 SDL_GetTicks (void) {
+ u64 elapsed = svcGetSystemTick() - g_startTicks;
+ return elapsed * 1000 / SYSCLOCK_ARM11;
+}
+
+void SDL_Delay (Uint32 ms) {
+ svcSleepThread((u64)ms * 1000000ULL);
+}
+
+int SDL_SYS_TimerInit (void) {
+ return 0;
+}
+
+void SDL_SYS_TimerQuit (void) {
+}
+
+int SDL_SYS_StartTimer (void) {
+ SDL_SetError ("Timers not implemented on 3DS");
+
+ return -1;
+}
+
+void SDL_SYS_StopTimer (void) {
+}
diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h
index 436450e330..50735f4476 100644
--- a/src/video/SDL_sysvideo.h
+++ b/src/video/SDL_sysvideo.h
@@ -398,6 +398,9 @@ extern VideoBootStrap DC_bootstrap;
#if SDL_VIDEO_DRIVER_NDS
extern VideoBootStrap NDS_bootstrap;
#endif
+#if SDL_VIDEO_DRIVER_N3DS
+extern VideoBootStrap N3DS_bootstrap;
+#endif
#if SDL_VIDEO_DRIVER_RISCOS
extern VideoBootStrap RISCOS_bootstrap;
#endif
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 46285c990e..94620ad04e 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -114,6 +114,9 @@ static VideoBootStrap *bootstrap[] = {
#if SDL_VIDEO_DRIVER_NDS
&NDS_bootstrap,
#endif
+#if SDL_VIDEO_DRIVER_N3DS
+ &N3DS_bootstrap,
+#endif
#if SDL_VIDEO_DRIVER_RISCOS
&RISCOS_bootstrap,
#endif
diff --git a/src/video/dummy/SDL_nullvideo.c b/src/video/dummy/SDL_nullvideo.c
index 7e096e2f7f..23af477cca 100644
--- a/src/video/dummy/SDL_nullvideo.c
+++ b/src/video/dummy/SDL_nullvideo.c
@@ -68,12 +68,15 @@ static void DUMMY_UpdateRects(_THIS, int numrects, SDL_Rect *rects);
static int DUMMY_Available(void)
{
+ return(1);
+/*
const char *envr = SDL_getenv("SDL_VIDEODRIVER");
if ((envr) && (SDL_strcmp(envr, DUMMYVID_DRIVER_NAME) == 0)) {
return(1);
}
return(0);
+*/
}
static void DUMMY_DeleteDevice(SDL_VideoDevice *device)
diff --git a/src/video/n3ds/SDL_n3dsevents.c b/src/video/n3ds/SDL_n3dsevents.c
new file mode 100644
index 0000000000..42dda2f289
--- /dev/null
+++ b/src/video/n3ds/SDL_n3dsevents.c
@@ -0,0 +1,89 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2012 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+#include "SDL_config.h"
+
+/* Being a null driver, there's no event stream. We just define stubs for
+ most of the API. */
+
+#include <3ds.h>
+
+#include "SDL.h"
+#include "../../events/SDL_sysevents.h"
+#include "../../events/SDL_events_c.h"
+
+#include "SDL_n3dsvideo.h"
+#include "SDL_n3dsevents_c.h"
+
+void N3DS_PumpEvents(_THIS)
+{
+ svcSleepThread(100000); // 0.1 ms
+
+ if (!aptMainLoop())
+ {
+ static bool pushedQuit = false;
+ if (!pushedQuit) {
+ SDL_Event sdlevent;
+ sdlevent.type = SDL_QUIT;
+ SDL_PushEvent(&sdlevent);
+ pushedQuit = true;
+ }
+ return;
+ }
+
+ hidScanInput();
+
+ if (hidKeysHeld() & KEY_TOUCH) {
+ touchPosition touch;
+
+ hidTouchRead (&touch);
+
+// TO DO: handle fit screen on x and y.Y and Y to be considered separately
+
+ if(this->hidden->screens&SDL_TOPSCR && this->hidden->screens&SDL_BOTTOMSCR) {
+ if (touch.px != 0 || touch.py != 0) {
+ SDL_PrivateMouseMotion (0, 0,
+ touch.px + (this->hidden->w1 - 320)/2,
+ this->hidden->y2 + touch.py + (this->hidden->h2 - 240)/2);
+ if (!SDL_GetMouseState (NULL, NULL))
+ SDL_PrivateMouseButton (SDL_PRESSED, 1, 0, 0);
+ }
+ } else {
+ if (touch.px != 0 || touch.py != 0) {
+ SDL_PrivateMouseMotion (0, 0, (touch.px * this->hidden->w1) / 320, (touch.py * this->hidden->h1) / 240);
+ if (!SDL_GetMouseState (NULL, NULL))
+ SDL_PrivateMouseButton (SDL_PRESSED, 1, 0, 0);
+ }
+ }
+ } else {
+ if (SDL_GetMouseState (NULL, NULL))
+ SDL_PrivateMouseButton (SDL_RELEASED, 1, 0, 0);
+ }
+}
+
+void N3DS_InitOSKeymap(_THIS)
+{
+ // Do nothing
+}
+
+
+/* end of SDL_nullevents.c ... */
+
diff --git a/src/video/n3ds/SDL_n3dsevents_c.h b/src/video/n3ds/SDL_n3dsevents_c.h
new file mode 100644
index 0000000000..af9957168d
--- /dev/null
+++ b/src/video/n3ds/SDL_n3dsevents_c.h
@@ -0,0 +1,34 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2012 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#include "SDL_config.h"
+
+#include "SDL_n3dsvideo.h"
+
+/* Variables and functions exported by SDL_sysevents.c to other parts
+ of the native video subsystem (SDL_sysvideo.c)
+*/
+extern void N3DS_InitOSKeymap(_THIS);
+extern void N3DS_PumpEvents(_THIS);
+
+/* end of SDL_nullevents_c.h ... */
+
diff --git a/src/video/n3ds/SDL_n3dsmouse.c b/src/video/n3ds/SDL_n3dsmouse.c
new file mode 100644
index 0000000000..1da84a4e6d
--- /dev/null
+++ b/src/video/n3ds/SDL_n3dsmouse.c
@@ -0,0 +1,33 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2012 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+#include "SDL_config.h"
+
+#include "SDL_mouse.h"
+#include "../../events/SDL_events_c.h"
+
+#include "SDL_n3dsmouse_c.h"
+
+
+/* The implementation dependent data for the window manager cursor */
+struct WMcursor {
+ int unused;
+};
diff --git a/src/video/n3ds/SDL_n3dsmouse_c.h b/src/video/n3ds/SDL_n3dsmouse_c.h
new file mode 100644
index 0000000000..cdbdd17ce5
--- /dev/null
+++ b/src/video/n3ds/SDL_n3dsmouse_c.h
@@ -0,0 +1,26 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2012 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+#include "SDL_config.h"
+
+#include "SDL_n3dsvideo.h"
+
+/* Functions to be exported */
diff --git a/src/video/n3ds/SDL_n3dsvideo.c b/src/video/n3ds/SDL_n3dsvideo.c
new file mode 100644
index 0000000000..2fbb8ee820
--- /dev/null
+++ b/src/video/n3ds/SDL_n3dsvideo.c
@@ -0,0 +1,766 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2012 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+#include "SDL_config.h"
+
+#include "SDL_video.h"
+#include "SDL_mouse.h"
+#include "../SDL_sysvideo.h"
+#include "../SDL_pixels_c.h"
+#include "../../events/SDL_events_c.h"
+
+#include "SDL_thread.h"
+#include "SDL_timer.h"
+
+#include <3ds.h>
+#include <citro3d.h>
+
+#include "SDL_n3dsvideo.h"
+#include "SDL_n3dsevents_c.h"
+#include "SDL_n3dsmouse_c.h"
+
+#define N3DSVID_DRIVER_NAME "n3ds"
+
+/* Low level N3ds */
+
+// This header is generated by the build process
+#include "vshader_shbin.h"
+
+#define STACKSIZE (32 * 1024)
+
+#define TEX_MIN_SIZE 32
+#define CLEAR_COLOR0 0x000000FF
+#define CLEAR_COLOR1 0x000000
+#define CLEAR_COLOR2 0x000000
+#define CLEAR_COLOR3 0x000001
+
+// Used to transfer the final rendered display to the framebuffer
+#define DISPLAY_TRANSFER_FLAGS0 \
+ (GX_TRANSFER_FLIP_VERT(0) | GX_TRANSFER_OUT_TILED(0) | GX_TRANSFER_RAW_COPY(0) | \
+ GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGBA8) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB8))
+#define DISPLAY_TRANSFER_FLAGS1 \
+ (GX_TRANSFER_FLIP_VERT(0) | GX_TRANSFER_OUT_TILED(0) | GX_TRANSFER_RAW_COPY(0) | \
+ GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGB8) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB8))
+#define DISPLAY_TRANSFER_FLAGS2 \
+ (GX_TRANSFER_FLIP_VERT(0) | GX_TRANSFER_OUT_TILED(0) | GX_TRANSFER_RAW_COPY(0) | \
+ GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGB5A1) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB565))
+#define DISPLAY_TRANSFER_FLAGS3 \
+ (GX_TRANSFER_FLIP_VERT(0) | GX_TRANSFER_OUT_TILED(0) | GX_TRANSFER_RAW_COPY(0) | \
+ GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGB5A1) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB565))
+
+// Used to convert textures to 3DS tiled format
+// Note: vertical flip flag set so 0,0 is top left of texture
+#define TEXTURE_TRANSFER_FLAGS0 \
+ (GX_TRANSFER_FLIP_VERT(1) | GX_TRANSFER_OUT_TILED(1) | GX_TRANSFER_RAW_COPY(0) | \
+ GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGBA8) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGBA8) | \
+ GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO))
+#define TEXTURE_TRANSFER_FLAGS1 \
+ (GX_TRANSFER_FLIP_VERT(1) | GX_TRANSFER_OUT_TILED(1) | GX_TRANSFER_RAW_COPY(0) | \
+ GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGB8) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB8) | \
+ GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO))
+#define TEXTURE_TRANSFER_FLAGS2 \
+ (GX_TRANSFER_FLIP_VERT(1) | GX_TRANSFER_OUT_TILED(1) | GX_TRANSFER_RAW_COPY(0) | \
+ GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGB565) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB5A1) | \
+ GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO))
+#define TEXTURE_TRANSFER_FLAGS3 \
+ (GX_TRANSFER_FLIP_VERT(1) | GX_TRANSFER_OUT_TILED(1) | GX_TRANSFER_RAW_COPY(0) | \
+ GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGB5A1) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB5A1) | \
+ GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO))
+
+static DVLB_s* vshader_dvlb;
+static shaderProgram_s program;
+static int uLoc_projection;
+static C3D_Mtx projection;
+static C3D_Mtx projection2;
+
+C3D_RenderTarget *VideoSurface1;
+C3D_RenderTarget *VideoSurface2;
+static C3D_Tex spritesheet_tex;
+
+static int textureTranferFlags[4] = { TEXTURE_TRANSFER_FLAGS0, TEXTURE_TRANSFER_FLAGS1, TEXTURE_TRANSFER_FLAGS2, TEXTURE_TRANSFER_FLAGS3};
+static int displayTranferFlags[4] = { DISPLAY_TRANSFER_FLAGS0, DISPLAY_TRANSFER_FLAGS1, DISPLAY_TRANSFER_FLAGS2, DISPLAY_TRANSFER_FLAGS3};
+static unsigned int clearcolors[4] = { CLEAR_COLOR0, CLEAR_COLOR1, CLEAR_COLOR2, CLEAR_COLOR3};
+
+static void sceneInit(GSPGPU_FramebufferFormat mode, bool scale);
+static void sceneExit(void);
+void drawTexture( int x, int y, int width, int height, float left, float right, float top, float bottom);
+
+// video thread variables and functions
+volatile bool runThread = false;
+LightEvent privateVideoThreadEvent;
+Thread privateVideoThreadHandle = NULL;
+static void videoThread(void* data);
+
+/* Initialization/Query functions */
+static int N3DS_VideoInit(_THIS, SDL_PixelFormat *vformat);
+static SDL_Rect **N3DS_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags);
+static SDL_Surface *N3DS_SetVideoMode(_THIS, SDL_Surface *current, int width, int height, int bpp, Uint32 flags);
+static int N3DS_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors);
+static void N3DS_UpdateRects(_THIS, int numrects, SDL_Rect *rects);
+static void N3DS_VideoQuit(_THIS);
+
+/* Hardware surface functions */
+static int N3DS_AllocHWSurface(_THIS, SDL_Surface *surface);
+static int N3DS_LockHWSurface(_THIS, SDL_Surface *surface);
+static void N3DS_UnlockHWSurface(_THIS, SDL_Surface *surface);
+static void N3DS_FreeHWSurface(_THIS, SDL_Surface *surface);
+static int N3DS_FlipHWSurface (_THIS, SDL_Surface *surface);
+
+int N3DS_ToggleFullScreen(_THIS, int on);
+
+
+//Copied from sf2dlib that grabbed it from: http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
+unsigned int next_pow2(unsigned int v)
+{
+ v--;
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ v++;
+ return v >= TEX_MIN_SIZE ? v : TEX_MIN_SIZE;
+}
+
+static int N3DS_Available(void)
+{
+ return(1); //what else?
+}
+
+static void N3DS_DeleteDevice(SDL_VideoDevice *device)
+{
+ if (device->hidden) SDL_free(device->hidden);
+ if (device) SDL_free(device);
+ device=NULL;
+}
+
+static SDL_VideoDevice *N3DS_CreateDevice(int devindex)
+{
+ SDL_VideoDevice *device;
+
+ /* Initialize all variables that we clean on shutdown */
+ device = (SDL_VideoDevice *)SDL_malloc(sizeof(SDL_VideoDevice));
+ if ( device ) {
+ SDL_memset(device, 0, (sizeof *device));
+ device->hidden = (struct SDL_PrivateVideoData *)
+ SDL_malloc((sizeof *device->hidden));
+ }
+ if ( (device == NULL) || (device->hidden == NULL) ) {
+ SDL_OutOfMemory();
+ if ( device ) {
+ SDL_free(device);
+ }
+ return(0);
+ }
+
+ SDL_memset(device->hidden, 0, (sizeof *device->hidden));
+
+ /* Set the function pointers */
+ device->VideoInit = N3DS_VideoInit;
+ device->ListModes = N3DS_ListModes;
+ device->SetVideoMode = N3DS_SetVideoMode;
+ device->CreateYUVOverlay = NULL;
+ device->SetColors = N3DS_SetColors;
+ device->UpdateRects = N3DS_UpdateRects;
+ device->VideoQuit = N3DS_VideoQuit;
+ device->AllocHWSurface = N3DS_AllocHWSurface;
+ device->CheckHWBlit = NULL;
+ device->FillHWRect = NULL;
+ device->SetHWColorKey = NULL;
+ device->SetHWAlpha = NULL;
+ device->LockHWSurface = N3DS_LockHWSurface;
+ device->UnlockHWSurface = N3DS_UnlockHWSurface;
+ device->FlipHWSurface = N3DS_FlipHWSurface;
+ device->FreeHWSurface = N3DS_FreeHWSurface;
+ device->SetCaption = NULL;
+ device->SetIcon = NULL;
+ device->IconifyWindow = NULL;
+ device->GrabInput = NULL;
+ device->GetWMInfo = NULL;
+ device->InitOSKeymap = N3DS_InitOSKeymap;
+ device->PumpEvents = N3DS_PumpEvents;
+// device->info.blit_hw = 1;
+
+ device->ToggleFullScreen = N3DS_ToggleFullScreen;
+
+ device->free = N3DS_DeleteDevice;
+
+ return device;
+}
+
+VideoBootStrap N3DS_bootstrap = {
+ N3DSVID_DRIVER_NAME, "N3ds video driver",
+ N3DS_Available, N3DS_CreateDevice
+};
+
+
+int N3DS_VideoInit(_THIS, SDL_PixelFormat *vformat)
+{
+ // Initialize graphics
+ gfxInitDefault();
+ gfxSet3D(false);
+ C3D_Init(C3D_DEFAULT_CMDBUF_SIZE);
+
+ vformat->BitsPerPixel = 32;
+ vformat->BytesPerPixel = 4;
+ vformat->Rmask = 0xff000000;
+ vformat->Gmask = 0x00ff0000;
+ vformat->Bmask = 0x0000ff00;
+ vformat->Amask = 0x000000ff;
+
+ /* We're done! */
+ return(0);
+}
+
+SDL_Rect **N3DS_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags)
+{
+ return (SDL_Rect **) -1;
+}
+
+void N3DS_SetScaling(_THIS)
+{
+ if(this->hidden->flags & SDL_FULLSCREEN)
+// flags |= (SDL_FITWIDTH | SDL_FITHEIGHT);
+ this->hidden->fitscreen = (SDL_FITWIDTH | SDL_FITHEIGHT);
+ else
+ this->hidden->fitscreen = this->hidden->flags & (SDL_FITWIDTH | SDL_FITHEIGHT);
+
+ if((this->hidden->fitscreen & SDL_FITWIDTH)&&(this->hidden->fitscreen & SDL_FITHEIGHT)) {
+ this->hidden->scalex= 400.0/(float)this->hidden->w1;
+ this->hidden->scaley= 240.0/(float)this->hidden->h1;
+ } else if(this->hidden->fitscreen & SDL_FITWIDTH) {
+ this->hidden->scalex= 400.0/(float)this->hidden->w1;
+ this->hidden->scaley= this->hidden->scalex;//1.0f;
+ } else if(this->hidden->fitscreen & SDL_FITHEIGHT) {
+ this->hidden->scaley= 240.0/(float)this->hidden->h1;
+ this->hidden->scalex= this->hidden->scaley;//1.0f;
+ } else {
+ this->hidden->scalex= 1.0f;
+ this->hidden->scaley= 1.0f;
+ }
+}
+
+int N3DS_ToggleFullScreen(_THIS, int on){
+ if ((this->hidden->flags & SDL_FITWIDTH) && (this->hidden->flags & SDL_FITHEIGHT))
+ return -1;
+
+ if ( this->hidden->flags & SDL_FULLSCREEN )
+ this->hidden->flags &= ~SDL_FULLSCREEN;
+ else
+ this->hidden->flags |= SDL_FULLSCREEN;
+
+ N3DS_SetScaling(this);
+ return 1;
+}
+
+Uint32 setVideoModecount = 0;
+
+SDL_Surface *N3DS_SetVideoMode(_THIS, SDL_Surface *current,
+ int width, int height, int bpp, Uint32 flags)
+{
+
+ Uint32 Rmask, Gmask, Bmask, Amask;
+ int hw = next_pow2(width);
+ int hh= next_pow2(height);
+
+ setVideoModecount++;
+
+ this->hidden->screens = flags & (SDL_DUALSCR); // SDL_DUALSCR = SDL_TOPSCR | SDL_BOTTOMSCR
+ if(this->hidden->screens==0) this->hidden->screens = SDL_TOPSCR; //Default
+ flags &= ~SDL_DUALSCR;
+ flags |= this->hidden->screens;
+
+ this->hidden->flags = flags;
+
+ switch(bpp) {
+ case 0:
+ bpp = 32;
+ case 32:
+ Rmask = 0xff000000;
+ Gmask = 0x00ff0000;
+ Bmask = 0x0000ff00;
+ Amask = 0x000000ff;
+ this->hidden->mode=GSP_RGBA8_OES;
+ this->hidden->byteperpixel=4;
+ this->hidden->bpp = 32;
+ break;
+ case 24:
+ Rmask = 0xff0000;
+ Gmask = 0x00ff00;
+ Bmask = 0x0000ff;
+ Amask = 0x0;
+ this->hidden->mode=GSP_BGR8_OES;
+ this->hidden->byteperpixel=3;
+ this->hidden->bpp = 24;
+ break;
+ case 16:
+ Rmask = 0xF800;
+ Gmask = 0x07E0;
+ Bmask = 0x001F;
+ Amask = 0x0000;
+ this->hidden->mode=GSP_RGB565_OES;
+ this->hidden->byteperpixel=2;
+ this->hidden->bpp = 16;
+ break;
+ case 15:
+ bpp = 16;
+ Rmask = 0xF800;
+ Gmask = 0x07C0;
+ Bmask = 0x003E;
+ Amask = 0x0001;
+ this->hidden->mode=GSP_RGB5_A1_OES;
+ this->hidden->byteperpixel=2;
+ this->hidden->bpp = 16;
+ break;
+ case 8:
+ Rmask = 0;
+ Gmask = 0;
+ Bmask = 0;
+ Amask = 0;
+ this->hidden->mode=GSP_RGBA8_OES;
+ this->hidden->byteperpixel=4;
+ this->hidden->bpp = 8;
+ break;
+ default:
+ return NULL;
+ break;
+ }
+
+
+// if there is a video thread running, stop and free it
+ if (privateVideoThreadHandle) {
+ runThread = false;
+ LightEvent_Signal(&privateVideoThreadEvent);
+ threadJoin(privateVideoThreadHandle, U64_MAX);
+ privateVideoThreadHandle = NULL;
+ }
+
+ if ( this->hidden->buffer ) {
+ linearFree( this->hidden->buffer );
+ this->hidden->buffer = NULL;
+ }
+ if ( this->hidden->palettedbuffer ) {
+ free( this->hidden->palettedbuffer );
+ this->hidden->palettedbuffer = NULL;
+ }
+
+ this->hidden->buffer = (u8*) linearAlloc(hw * hh * this->hidden->byteperpixel);
+ if ( ! this->hidden->buffer ) {
+ SDL_SetError("Couldn't allocate buffer for requested mode");
+ return(NULL);
+ }
+
+ SDL_memset(this->hidden->buffer, 0, hw * hh * this->hidden->byteperpixel);
+
+ if(bpp==8) {
+ this->hidden->palettedbuffer = malloc(width * height);
+ if ( ! this->hidden->palettedbuffer ) {
+ SDL_SetError("Couldn't allocate buffer for requested mode");
+ linearFree(this->hidden->buffer);
+ return(NULL);
+ }
+ SDL_memset(this->hidden->palettedbuffer, 0, width * height);
+ }
+
+ /* Allocate the new pixel format for the screen */
+ if ( ! SDL_ReallocFormat(current, bpp, Rmask, Gmask, Bmask, Amask) ) {
+ linearFree(this->hidden->buffer);
+ this->hidden->buffer = NULL;
+ SDL_SetError("Couldn't allocate new pixel format for requested mode");
+ return(NULL);
+ }
+
+ if(setVideoModecount>1) sceneExit(); // unload rendertarget and the shader
+
+ //setup the screens mode
+ sceneInit(this->hidden->mode, (this->hidden->fitscreen & (SDL_FITWIDTH | SDL_FITHEIGHT)) ? false:true);
+
+ if((flags & SDL_CONSOLETOP) && !(this->hidden->screens & SDL_TOPSCR)) {
+ consoleInit(GFX_TOP, NULL);
+ this->hidden->console = SDL_CONSOLETOP;
+ flags &= ~SDL_CONSOLEBOTTOM;
+ // todo here: setup bottom video for graphics;
+ } else if((flags & SDL_CONSOLEBOTTOM) && !(this->hidden->screens & SDL_BOTTOMSCR)) {
+ consoleInit(GFX_BOTTOM, NULL);
+ this->hidden->console = SDL_CONSOLEBOTTOM;
+ }
+ /* Set up the new mode framebuffer */
+ current->flags = SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_HWPALETTE;
+ this->hidden->w = hw;
+ this->hidden->h = hh;
+
+ this->hidden->x1 = 0;
+ this->hidden->y1 = 0;
+ this->hidden->x2 = 0;
+ this->hidden->y2 = 0;
+ if((this->hidden->screens & SDL_TOPSCR) && (this->hidden->screens & SDL_BOTTOMSCR)){
+ this->hidden->w1 = width;
+ this->hidden->h1 = height/2;
+ this->hidden->w2 = width;
+ this->hidden->h2 = height/2;
+ this->hidden->y2 = height/2;
+ } else {
+ this->hidden->w1 = width;
+ this->hidden->h1 = height;
+ this->hidden->w2 = width;
+ this->hidden->h2 = height;
+ }
+
+ this->hidden->l1 = 0.0f;
+ this->hidden->t1 = 0.0f;
+ this->hidden->r1 = (float)this->hidden->w1/(float)this->hidden->w;
+ this->hidden->b1 = (float)this->hidden->h1/(float)this->hidden->h;
+ this->hidden->l2 = 0.0f;
+ this->hidden->t2 = (float)this->hidden->y2/(float)this->hidden->h;
+ this->hidden->r2 = (float)this->hidden->w2/(float)this->hidden->w;
+ this->hidden->b2 = ((float)this->hidden->y2+(float)this->hidden->h2)/(float)this->hidden->h;
+
+//Set scaling
+
+ N3DS_SetScaling(this);
+
+ this->info.current_w = current->w = width;
+ this->info.current_h = current->h = height;
+ if(bpp>8) {
+ current->pixels = this->hidden->buffer;
+ current->pitch = hw * this->hidden->byteperpixel;
+ } else {
+ current->pixels = this->hidden->palettedbuffer;
+ current->pitch = width;
+ }
+
+// NOTE: the following is a dirty hack to make work mode 2. Passing a RGB565 buffer to a RGB656 texture and rendering it to a RGB656 display results in some colors being transparent.
+// To fix this we are transfering a RGB656 buffer to a RGB5A1 texure and then rendering it to a RGB656 display. We lose 1 bit of Green color depth, but at least it works
+ int mode = this->hidden->mode;
+ if (mode==2) mode = 3;
+
+ // Setup the textures
+ if(setVideoModecount>1)
+ C3D_TexDelete(&spritesheet_tex); // delete in case it was initialized before
+ C3D_TexInit(&spritesheet_tex, hw, hh, this->hidden->mode);
+ C3D_TexSetFilter(&spritesheet_tex, this->hidden->fitscreen ? GPU_LINEAR : GPU_NEAREST , GPU_NEAREST);
+// C3D_TexBind(0, &spritesheet_tex);
+
+ runThread = true;
+ LightEvent_Init(&privateVideoThreadEvent, RESET_ONESHOT);
+ // libctru sys threads uses 0x18, so we use a lower priority, but higher than any other SDL thread
+ privateVideoThreadHandle = threadCreate(videoThread, (void *) this, STACKSIZE, 0x19, -2, true);
+ this->hidden->currentVideoSurface = current;
+ /* We're done */
+
+ return(current);
+}
+
+/* We don't actually allow hardware surfaces other than the main one */
+static int N3DS_AllocHWSurface(_THIS, SDL_Surface *surface)
+{
+ return(-1);
+}
+static void N3DS_FreeHWSurface(_THIS, SDL_Surface *surface)
+{
+ return;
+}
+
+/* We need to wait for vertical retrace on page flipped displays */
+static int N3DS_LockHWSurface(_THIS, SDL_Surface *surface)
+{
+ return(0);
+}
+
+static void N3DS_UnlockHWSurface(_THIS, SDL_Surface *surface)
+{
+ return;
+}
+
+static unsigned int RenderClearColor;
+
+static void videoThread(void* data)
+{
+ _THIS = (SDL_VideoDevice *) data;
+
+ while (runThread) {
+ LightEvent_Wait(&privateVideoThreadEvent);
+
+ if (!runThread)
+ break;
+
+ if(gspHasGpuRight()) {
+ if (C3D_FrameBegin(C3D_FRAME_SYNCDRAW)){
+// if (C3D_FrameBegin(C3D_FRAME_NONBLOCK)){
+ if (this->hidden->screens & SDL_TOPSCR) {
+ C3D_RenderTargetClear(VideoSurface1, C3D_CLEAR_ALL, RenderClearColor, 0);
+ C3D_FrameDrawOn(VideoSurface1);
+ C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, uLoc_projection, &projection);
+ drawTexture((400-this->hidden->w1*this->hidden->scalex)/2,(240-this->hidden->h1*this->hidden->scaley)/2, this->hidden->w1*this->hidden->scalex, this->hidden->h1*this->hidden->scaley, this->hidden->l1, this->hidden->r1, this->hidden->t1, this->hidden->b1);
+ }
+ if (this->hidden->screens & SDL_BOTTOMSCR) {
+ C3D_RenderTargetClear(VideoSurface2, C3D_CLEAR_ALL, RenderClearColor, 0);
+ C3D_FrameDrawOn(VideoSurface2);
+ C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, uLoc_projection, &projection2);
+ if (this->hidden->fitscreen & SDL_FITWIDTH)
+ drawTexture(0,(240-this->hidden->h2*this->hidden->scaley)/2, this->hidden->w2*this->hidden->scalex, this->hidden->h2*this->hidden->scaley, this->hidden->l2, this->hidden->r2, this->hidden->t2, this->hidden->b2);
+ else
+ drawTexture((400-this->hidden->w2*this->hidden->scalex*1.25)/2,(240-this->hidden->h2*this->hidden->scaley)/2, this->hidden->w2*this->hidden->scalex*1.25, this->hidden->h2*this->hidden->scaley, this->hidden->l2, this->hidden->r2, this->hidden->t2, this->hidden->b2);
+ }
+ C3D_FrameEnd(0);
+ }
+ }
+ }
+}
+
+static void drawBuffers(_THIS)
+{
+ if(this->hidden->buffer) {
+
+ if(!gspHasGpuRight()) return; // Blocking video output if the application is closing
+
+ GSPGPU_FlushDataCache(this->hidden->buffer, this->hidden->w*this->hidden->h*this->hidden->byteperpixel);
+
+ C3D_SyncDisplayTransfer ((u32*)this->hidden->buffer, GX_BUFFER_DIM(this->hidden->w, this->hidden->h), (u32*)spritesheet_tex.data, GX_BUFFER_DIM(this->hidden->w, this->hidden->h), textureTranferFlags[this->hidden->mode]);
+
+ GSPGPU_FlushDataCache(spritesheet_tex.data, this->hidden->w*this->hidden->h*this->hidden->byteperpixel);
+
+ C3D_TexBind(0, &spritesheet_tex);
+ // Configure the first fragment shading substage to just pass through the texture color
+ // See https://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml for more insight
+ C3D_TexEnv* env = C3D_GetTexEnv(0);
+ C3D_TexEnvInit(env);
+ C3D_TexEnvSrc(env, C3D_Both, GPU_TEXTURE0, 0, 0);
+
+ C3D_TexEnvFunc(env, C3D_Both, GPU_REPLACE);
+
+// gspWaitForVBlank();
+ LightEvent_Signal(&privateVideoThreadEvent);
+ }
+}
+
+static void N3DS_UpdateRects(_THIS, int numrects, SDL_Rect *rects)
+{
+ if(!gspHasGpuRight()) return; //Block video output on quitting
+
+ if( this->hidden->bpp == 8) {
+/*
+ // update only changed rects
+ int i;
+ for(i=0; i< numrects; i++) {
+ SDL_Rect *rect = &rects[i];
+ Uint8 *src_addr, *dst_addr, *src_baseaddr, *dst_baseaddr;
+ Uint32 *palette;
+ int cols, rows;
+ int x,y;
+ palette = this->hidden->palette;
+ src_baseaddr = this->hidden->palettedbuffer;
+ dst_baseaddr = this->hidden->buffer;
+ cols = (rect->x + rect->w > this->info.current_w) ? this->info.current_w - rect->x : rect->w;
+ rows = (rect->y + rect->h > this->info.current_h) ? this->info.current_h - rect->y : rect->h;
+ for(y=0;y<rows;y++) {
+ x = 0;
+ src_addr = src_baseaddr + rect->x + x + (rect->y + y) * this->info.current_w;
+ dst_addr = dst_baseaddr + (rect->x + x + (rect->y + y) * this->hidden->w) * 4;
+ for(;x<cols;x++) {
+ *(u32*)dst_addr=palette[*(Uint8 *)src_addr];
+ src_addr++;
+ dst_addr += 4;
+}
+ }
+ }
+*/
+ // update whole screen
+ Uint8 *src_addr;
+ Uint32 *palette, *dst_baseaddr, *dst_addr;
+ palette = this->hidden->palette;
+ src_addr = this->hidden->palettedbuffer;
+ dst_baseaddr = this->hidden->buffer;
+
+ int x, y;
+ for(y = 0; y < this->info.current_h; y++) {
+ dst_addr = dst_baseaddr + y * this->hidden->w;
+ for(x = 0; x < this->info.current_w; x++) {
+ *dst_addr++ = palette[*src_addr++];
+ }
+ }
+ }
+
+ drawBuffers(this);
+}
+
+#define N3DS_MAP_RGB(r, g, b) ((Uint32)r << 24 | (Uint32)g << 16 | (Uint32)b << 8 | 0xff)
+
+static int N3DS_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors)
+{
+ int i;
+ Uint32* palette = this->hidden->palette;
+
+ for (i = firstcolor; i < firstcolor + ncolors; i++)
+ {
+ int colorIndex = i - firstcolor;
+ palette[i] = N3DS_MAP_RGB(colors[colorIndex].r, colors[colorIndex].g, colors[colorIndex].b);
+ }
+
+ return(1);
+}
+
+static int N3DS_FlipHWSurface (_THIS, SDL_Surface *surface) {
+
+ if(!gspHasGpuRight()) return(0); //Block video output on quitting
+
+ if(this->hidden->bpp == 8) {
+ Uint8 *src_addr;
+ Uint32 *palette, *dst_baseaddr, *dst_addr;
+ palette = this->hidden->palette;
+ src_addr = this->hidden->palettedbuffer;
+ dst_baseaddr = this->hidden->buffer;
+
+ int x, y;
+ for(y = 0; y < this->info.current_h; y++) {
+ dst_addr = dst_baseaddr + y * this->hidden->w;
+ for(x = 0; x < this->info.current_w; x++) {
+ *dst_addr++ = palette[*src_addr++];
+ }
+ }
+ }
+
+ drawBuffers(this);
+
+ return (0);
+}
+
+/* Note: If we are terminated, this could be called in the middle of
+ another SDL video routine -- notably UpdateRects.
+*/
+void N3DS_VideoQuit(_THIS)
+{
+ if (privateVideoThreadHandle) {
+ runThread = false;
+ LightEvent_Signal(&privateVideoThreadEvent);
+ threadJoin(privateVideoThreadHandle, U64_MAX);
+ privateVideoThreadHandle = NULL;
+ }
+ if (this->hidden->buffer)
+ {
+ linearFree(this->hidden->buffer);
+ this->hidden->buffer = NULL;
+ }
+ if (this->hidden->palettedbuffer)
+ {
+ free(this->hidden->palettedbuffer);
+ this->hidden->palettedbuffer = NULL;
+ }
+ this->hidden->currentVideoSurface->pixels = NULL; // set to buffer or to palettedbuffer, so now pointing to not allocated memory
+
+ sceneExit();
+ C3D_Fini();
+ gfxExit();
+}
+
+
+//---------------------------------------------------------------------------------
+static void sceneInit(GSPGPU_FramebufferFormat mode, bool scale) {
+//---------------------------------------------------------------------------------
+ // Load the vertex shader, create a shader program and bind it
+ vshader_dvlb = DVLB_ParseFile((u32*)vshader_shbin, vshader_shbin_size);
+ shaderProgramInit(&program);
+ shaderProgramSetVsh(&program, &vshader_dvlb->DVLE[0]);
+ C3D_BindProgram(&program);
+
+ // Get the location of the uniforms
+ uLoc_projection = shaderInstanceGetUniformLocation(program.vertexShader, "projection");
+
+ // Configure attributes for use with the vertex shader
+ // Attribute format and element count are ignored in immediate mode
+ C3D_AttrInfo* attrInfo = C3D_GetAttrInfo();
+ AttrInfo_Init(attrInfo);
+ AttrInfo_AddLoader(attrInfo, 0, GPU_FLOAT, 3); // v0=position
+ AttrInfo_AddLoader(attrInfo, 1, GPU_FLOAT, 2); // v2=texcoord
+
+ // Compute the projection matrix
+ // Note: we're setting top to 240 here so origin is at top left.
+ Mtx_OrthoTilt(&projection, 0.0, 400.0, 240.0, 0.0, 0.0, 1.0, true);
+ Mtx_OrthoTilt(&projection2, 0.0, 400.0, 240.0, 0.0, 0.0, 1.0, true);
+
+ // Configure buffers
+ C3D_BufInfo* bufInfo = C3D_GetBufInfo();
+ BufInfo_Init(bufInfo);
+
+ if (mode<=1) {
+ gfxSetScreenFormat(GFX_TOP, GSP_BGR8_OES);
+ gfxSetScreenFormat(GFX_BOTTOM, GSP_BGR8_OES);
+ } else {
+ gfxSetScreenFormat(GFX_TOP, GSP_RGB565_OES);
+ gfxSetScreenFormat(GFX_BOTTOM, GSP_RGB565_OES);
+ }
+
+ RenderClearColor = clearcolors[mode];
+
+ // Initialize the top screen render target
+ if (scale)
+ VideoSurface1 = C3D_RenderTargetCreate(240*2, 400*2, mode, GPU_RB_DEPTH24_STENCIL8);
+ else
+ VideoSurface1 = C3D_RenderTargetCreate(240, 400, mode, GPU_RB_DEPTH24_STENCIL8);
+ if(scale)
+ C3D_RenderTargetSetOutput(VideoSurface1, GFX_TOP, GFX_LEFT, displayTranferFlags[mode] | GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_XY));
+ else
+ C3D_RenderTargetSetOutput(VideoSurface1, GFX_TOP, GFX_LEFT, displayTranferFlags[mode] | GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO));
+
+ // Initialize the bottom screen render target
+ if (scale)
+ VideoSurface2 = C3D_RenderTargetCreate(240*2, 320*2, mode, GPU_RB_DEPTH24_STENCIL8);
+ else
+ VideoSurface2 = C3D_RenderTargetCreate(240, 320, mode, GPU_RB_DEPTH24_STENCIL8);
+ if (scale)
+ C3D_RenderTargetSetOutput(VideoSurface2, GFX_BOTTOM, GFX_LEFT, displayTranferFlags[mode] | GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_XY));
+ else
+ C3D_RenderTargetSetOutput(VideoSurface2, GFX_BOTTOM, GFX_LEFT, displayTranferFlags[mode] | GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO));
+
+ // Configure depth test to overwrite pixels with the same depth (needed to draw overlapping sprites)
+// C3D_DepthTest(true, GPU_GEQUAL, GPU_WRITE_ALL);
+}
+
+//---------------------------------------------------------------------------------
+static void sceneExit(void) {
+//---------------------------------------------------------------------------------
+
+ if(VideoSurface1) C3D_RenderTargetDelete(VideoSurface1);
+ if (VideoSurface2) C3D_RenderTargetDelete(VideoSurface2);
+ // Free the shader program
+ shaderProgramFree(&program);
+ DVLB_Free(vshader_dvlb);
+}
+
+//---------------------------------------------------------------------------------
+void drawTexture( int x, int y, int width, int height, float left, float right, float top, float bottom) {
+//---------------------------------------------------------------------------------
+
+ // Draw a textured quad directly
+ C3D_ImmDrawBegin(GPU_TRIANGLE_STRIP);
+ C3D_ImmSendAttrib(x, y, 0.5f, 0.0f); // v0=position
+ C3D_ImmSendAttrib( left, top, 0.0f, 0.0f);
+
+ C3D_ImmSendAttrib(x, y+height, 0.5f, 0.0f);
+ C3D_ImmSendAttrib( left, bottom, 0.0f, 0.0f);
+
+ C3D_ImmSendAttrib(x+width, y, 0.5f, 0.0f);
+ C3D_ImmSendAttrib( right, top, 0.0f, 0.0f);
+
+ C3D_ImmSendAttrib(x+width, y+height, 0.5f, 0.0f);
+ C3D_ImmSendAttrib( right, bottom, 0.0f, 0.0f);
+ C3D_ImmDrawEnd();
+}
diff --git a/src/video/n3ds/SDL_n3dsvideo.h b/src/video/n3ds/SDL_n3dsvideo.h
new file mode 100644
index 0000000000..4b204224a3
--- /dev/null
+++ b/src/video/n3ds/SDL_n3dsvideo.h
@@ -0,0 +1,63 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2012 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+#include "SDL_config.h"
+
+#ifndef _SDL_n3dsvideo_h
+#define _SDL_n3dsvideo_h
+
+#include "../SDL_sysvideo.h"
+
+#include <3ds.h>
+
+/* Hidden "this" pointer for the video functions */
+#define _THIS SDL_VideoDevice *this
+
+/* Private display data */
+
+struct SDL_PrivateVideoData {
+//GPU drawing specific
+ int x1,y1,w1,h1; // drawing window for top screen; width and height of top screen part of the video buffer
+ int x2,y2,w2,h2; // drawing window for bottom screen; width and height of bottom part of the video buffer
+ float l1,r1,t1,b1; // GPU source window for the top part of the video buffer
+ float l2,r2,t2,b2; // GPU source window for the bottom part of the video buffer
+ float scalex,scaley; // scaling factors
+ float scalex2,scaley2; // scaling factors
+
+// framebuffer data
+ int w, h; // width and height of the video buffer
+ void *buffer;
+ Uint8 *palettedbuffer;
+ Uint32 palette[256];
+ GSPGPU_FramebufferFormat mode;
+ unsigned int flags; // backup of create device flags
+ unsigned int screens; // SDL_TOPSCR, SDL_BOTTOMSCR, SDL_DUALSCR
+ unsigned int console; // SDL_CONSOLETOP, SDL_CONSOLEBOTTOM
+ unsigned int fitscreen; // SDL_TRIMBOTTOMSCR, SDL_FITWIDTH, SDL_FITHEIGHT (SDL_FULLSCREEN sets both SDL_FITWIDTH and SDL_FITHEIGHT)
+ int byteperpixel;
+ int bpp;
+// video surface
+ SDL_Surface* currentVideoSurface;
+// Video process flags
+ bool blockVideo; // block video output and events handlings on SDL_QUIT
+};
+
+#endif /* _SDL_n3dsvideo_h */
diff --git a/src/video/n3ds/vshader.pica b/src/video/n3ds/vshader.pica
new file mode 100644
index 0000000000..9f51b4a4dc
--- /dev/null
+++ b/src/video/n3ds/vshader.pica
@@ -0,0 +1,34 @@
+; Example PICA200 vertex shader
+
+; Uniforms
+.fvec projection[4]
+
+; Constants
+.constf myconst(0.0, 1.0, -1.0, 0.1)
+.constf myconst2(0.3, 0.0, 0.0, 0.0)
+.alias zeros myconst.xxxx ; Vector full of zeros
+.alias ones myconst.yyyy ; Vector full of ones
+
+; Outputs
+.out outpos position
+.out outtc0 texcoord0
+
+; Inputs
+.in inpos v0
+.in intex v1
+
+.proc main
+ ; Force the w component of inpos to be 1.0
+ mov r0.xyz, inpos
+ mov r0.w, ones
+
+ ; outpos = projectionMatrix * inpos
+ dp4 outpos.x, projection[0], r0
+ dp4 outpos.y, projection[1], r0
+ dp4 outpos.z, projection[2], r0
+ dp4 outpos.w, projection[3], r0
+
+ mov outtc0, intex
+
+ end
+.end
================================================
FILE: 3ds/SDL_gfx/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=3ds-sdl_gfx
pkgver=2.0.25
pkgrel=2
pkgdesc="Graphics drawing primitives and other support functions wrapped up in an add-on, C-based library for the Simple Direct Media (SDL) cross-platform API layer"
arch=('any')
url="http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/"
license=("LGPL")
options=(!strip libtool staticlibs)
depends=(
'3ds-sdl'
)
makedepends=(
'3ds-pkg-config'
'dkp-toolchain-vars'
)
source=("https://sourceforge.net/projects/sdlgfx/files/SDL_gfx-${pkgver}.tar.gz")
groups=('3ds-portlibs' '3ds-sdl-libs')
sha256sums=(
'556eedc06b6cf29eb495b6d27f2dcc51bf909ad82389ba2fa7bdc4dec89059c0'
)
build() {
cd SDL_gfx-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static \
--disable-mmx
make
}
package() {
cd SDL_gfx-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
}
================================================
FILE: 3ds/SDL_image/.gitignore
================================================
3ds-sdl_image
================================================
FILE: 3ds/SDL_image/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=3ds-sdl_image
pkgver=1.2.12
pkgrel=3
pkgdesc="A simple library to load images of various formats as SDL surfaces (Nintendo 3DS port)"
arch=('any')
url="https://libsdl.org"
license=("LGPL")
options=(!strip libtool staticlibs)
depends=(
'3ds-sdl'
'3ds-libpng'
'3ds-libjpeg-turbo'
)
makedepends=(
'3ds-pkg-config'
'dkp-toolchain-vars'
)
groups=('3ds-portlibs' '3ds-sdl-libs')
source=("${url}/projects/SDL_image/release/SDL_image-${pkgver}.tar.gz")
sha256sums=(
'0b90722984561004de84847744d566809dbb9daf732a9e503b91a1b5a84e5699'
)
build() {
cd SDL_image-$pkgver
sed -i 's,showimage\$(EXEEXT),,g' Makefile.in
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd SDL_image-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
# add our static libs
echo "Requires.private: libpng libturbojpeg" >> "${pkgdir}/${PORTLIBS_PREFIX}/lib/pkgconfig/SDL_image.pc"
}
================================================
FILE: 3ds/SDL_mixer/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=3ds-sdl_mixer
pkgver=1.2.12
pkgrel=9
pkgdesc="A simple multi-channel audio mixer library (Nintendo 3DS port)"
arch=('any')
url="https://libsdl.org"
license=("LGPL")
options=(!strip libtool staticlibs)
depends=(
'3ds-sdl'
'3ds-libvorbisidec'
'3ds-mikmod'
'3ds-libogg'
'3ds-libmad'
)
makedepends=(
'3ds-pkg-config'
'dkp-toolchain-vars'
)
source=("${url}/projects/SDL_mixer/release/SDL_mixer-${pkgver}.tar.gz")
sha256sums=(
'1644308279a975799049e4826af2cfc787cad2abb11aa14562e402521f86992a'
)
groups=('3ds-portlibs' '3ds-sdl-libs')
build() {
cd SDL_mixer-$pkgver
source /opt/devkitpro/3dsvars.sh
sed -i 's,\$(objects)/playwave\$(EXE) \$(objects)/playmus\$(EXE),,g' Makefile.in
LIBS="-logg" ./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static \
--enable-music-ogg-tremor \
--disable-music-cmd \
--enable-music-mp3-mad-gpl
make
}
package() {
cd SDL_mixer-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
# add our static libs
echo "Requires.private: vorbisidec ogg libmikmod" >> "${pkgdir}/${PORTLIBS_PREFIX}/lib/pkgconfig/SDL_mixer.pc"
sed -i 's,-lSDL_mixer,-lSDL_mixer -lmad,' "${pkgdir}/${PORTLIBS_PREFIX}/lib/pkgconfig/SDL_mixer.pc"
}
================================================
FILE: 3ds/SDL_ttf/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=3ds-sdl_ttf
pkgver=2.0.11
pkgrel=2
pkgdesc="A sample library which allows you to use TrueType fonts in your SDL applications (Nintendo 3DS port)"
arch=('any')
url="https://libsdl.org"
license=("LGPL")
options=(!strip libtool staticlibs)
depends=(
'3ds-freetype'
'3ds-sdl'
)
makedepends=(
'3ds-pkg-config'
'dkp-toolchain-vars'
)
source=("${url}/projects/SDL_ttf/release/SDL_ttf-${pkgver}.tar.gz")
groups=('3ds-portlibs' '3ds-sdl-libs')
sha256sums=(
'724cd895ecf4da319a3ef164892b72078bd92632a5d812111261cde248ebcdb7'
)
build() {
cd SDL_ttf-$pkgver
source /opt/devkitpro/3dsvars.sh
sed '/^noinst_PROGRAMS/d' -i Makefile.in
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd SDL_ttf-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
}
================================================
FILE: 3ds/TinyXML2/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
pkgname=3ds-tinyxml2
pkgver=6.0.0
pkgrel=2
pkgdesc='A simple, small, efficient, C++ XML parser that can be easily integrated into other programs (for Nintendo 3DS homebrew development)'
arch=('any')
url='http://leethomason.github.io/tinyxml2/'
license=('apache')
options=(!strip libtool staticlibs)
source=( "https://github.com/leethomason/tinyxml2/archive/${pkgver}.tar.gz" )
makedepends=('dkp-toolchain-vars')
sha256sums=('9444ba6322267110b4aca61cbe37d5dcab040344b5c97d0b36c119aa61319b0f')
groups=('3ds-portlibs')
build() {
cd tinyxml2-$pkgver
source /opt/devkitpro/3dsvars.sh
cmake -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/3ds.cmake \
-DCMAKE_INSTALL_PREFIX=$PORTLIBS_PREFIX \
-DCMAKE_C_FLAGS="$CFLAGS $CPPFLAGS" \
-DCMAKE_CXX_FLAGS="$CFLAGS -fno-exceptions -fno-rtti" \
-DCMAKE_AR="$DEVKITARM/bin/arm-none-eabi-gcc-ar" \
-DBUILD_TESTS:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON \
-G"Unix Makefiles" \
.
make
}
package() {
cd tinyxml2-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
make install DESTDIR="$pkgdir"
}
================================================
FILE: 3ds/WildMidi/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
# Contributor: oreo639 <oreo6391@gmail.com>
pkgname=3ds-wildmidi
pkgver=0.4.3
pkgrel=2
pkgdesc='Core softsynth library that can be used with other applications.'
arch=('any')
url='https://www.mindwerks.net/projects/wildmidi/'
license=('LGPL')
options=(!strip libtool staticlibs)
source=( "https://github.com/Mindwerks/wildmidi/archive/wildmidi-${pkgver}.tar.gz" "wildmidi-0.4.3.patch")
groups=('3ds-portlibs')
makedepends=('dkp-toolchain-vars')
sha256sums=(
'498e5a96455bb4b91b37188ad6dcb070824e92c44f5ed452b90adbaec8eef3c5'
'2ff10193fe06e908b0658f9035711576a2781314e3f0cfe7969dde590f18b813')
build() {
cd wildmidi-wildmidi-$pkgver
source /opt/devkitpro/3dsvars.sh
patch -p1 -i $srcdir/wildmidi-0.4.3.patch
cmake . -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/3ds.cmake \
-DCMAKE_INSTALL_PREFIX=$PORTLIBS_PREFIX \
-DCMAKE_C_FLAGS="$CFLAGS $CPPFLAGS" \
-DWANT_PLAYER=OFF -DWANT_STATIC=ON \
-DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-G"Unix Makefiles"
make
}
package() {
cd wildmidi-wildmidi-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
}
================================================
FILE: 3ds/WildMidi/wildmidi-0.4.3.patch
================================================
diff -Naur wildmidi-wildmidi-0.4.2-orig/src/CMakeLists.txt wildmidi-wildmidi-0.4.2/src/CMakeLists.txt
--- wildmidi-wildmidi-0.4.2-orig/src/CMakeLists.txt 2018-02-23 21:47:25.644089430 +0100
+++ wildmidi-wildmidi-0.4.2/src/CMakeLists.txt 2018-02-23 21:47:50.067439452 +0100
@@ -248,7 +248,6 @@
CONFIGURE_FILE("wildmidi.pc.in" "${CMAKE_BINARY_DIR}/wildmidi.pc" @ONLY)
# install target (*nix OSes)
-IF (UNIX AND NOT APPLE)
# install our libraries
IF (WANT_STATIC)
INSTALL(TARGETS libwildmidi_static DESTINATION ${WILDMIDILIB_INSTALLDIR})
@@ -274,8 +273,6 @@
# install supporting man pages and headers
INSTALL(FILES ${CMAKE_SOURCE_DIR}/include/wildmidi_lib.h DESTINATION include)
- INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/docs/man/ DESTINATION share/man)
-ENDIF (UNIX AND NOT APPLE)
# install target (Windows: MinGW or MinGW-w64)
IF (WIN32 AND CMAKE_COMPILER_IS_MINGW)
--- a/CMakeLists.txt 2018-10-04 06:56:52.000000000 -0700
+++ b/CMakeLists.txt 2018-11-14 16:40:18.567465492 -0800
@@ -56,14 +56,12 @@
# Platform specific defines
-IF (UNIX)
# allow 'large' files in 32 bit builds
ADD_DEFINITIONS(
-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-D_LARGE_FILES
)
-ENDIF (UNIX)
# Usage of RPATH for macOS is enabled by default; this just suppresses the CMP0042 warning
# when building libwildmidi_dynamic.
================================================
FILE: 3ds/box2d/PKGBUILD
================================================
# Maintainer: TurtleP <jpostelnek@outlook.com>
pkgbasename=box2d
pkgname=3ds-$pkgbasename
pkgver=2.4.1
pkgrel=1
pkgdesc='Box2D is a 2D physics engine for games.'
arch=('any')
url='https://github.com/erincatto/box2d'
license=(MIT)
options=(!strip libtool staticlibs)
source=("${url}/archive/refs/tags/v${pkgver}.zip")
sha256sums=('0cb512dfa5be79ca227cd881b279adee61249c85c8b51caf5aa036b71e943002')
makedepends=('dkp-toolchain-vars' '3ds-cmake')
groups=('3ds-portlibs')
build() {
cd ${pkgbasename}-${pkgver}
source /opt/devkitpro/3dsvars.sh
arm-none-eabi-cmake \
-DCMAKE_INSTALL_PREFIX=$PORTLIBS_PREFIX \
-DBOX2D_BUILD_DOCS=OFF -DBOX2D_BUILD_UNIT_TESTS=OFF -DBOX2D_BUILD_TESTBED=OFF \
make
}
package() {
cd ${pkgbasename}-${pkgver}
make install DESTDIR="$pkgdir"
}
================================================
FILE: 3ds/bulletphysics/PKGBUILD
================================================
# Maintainer: fincs <fincs.alt1@gmail.com>
pkgname=3ds-bulletphysics
pkgver=2.87
pkgrel=5
pkgdesc='Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc. (for Nintendo 3DS homebrew development)'
arch=('any')
url='http://bulletphysics.org/'
license=('apache')
options=(!strip libtool staticlibs)
source=( "https://github.com/bulletphysics/bullet3/archive/${pkgver}.tar.gz" "bulletphysics.patch")
makedepends=('devkitARM' 'dkp-toolchain-vars' '3ds-cmake')
sha256sums=(
'438c151c48840fe3f902ec260d9496f8beb26dba4b17769a4a53212903935f95'
'ab9b5c35c7eb98336f685595a2c3c6da11ac1b2935cbef2b699ebe597827ed91'
)
groups=('3ds-portlibs')
build() {
cd bullet3-$pkgver
source /opt/devkitpro/3dsvars.sh
patch -Np1 -i "$srcdir"/bulletphysics.patch
arm-none-eabi-cmake -G"Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=$PORTLIBS_PREFIX \
-DCMAKE_C_FLAGS="$CFLAGS $CPPFLAGS" \
-DCMAKE_CXX_FLAGS="$CFLAGS -fno-exceptions -fno-rtti" \
-DCMAKE_AR="$DEVKITARM/bin/arm-none-eabi-gcc-ar" \
-DBUILD_CPU_DEMOS:BOOL=OFF -DBUILD_BULLET3:BOOL=OFF -DBUILD_OPENGL3_DEMOS:BOOL=OFF -DBUILD_BULLET2_DEMOS:BOOL=OFF -DBUILD_EXTRAS:BOOL=OFF -DBUILD_UNIT_TESTS:BOOL=OFF \
.
make
}
package() {
cd bullet3-$pkgver
source /opt/devkitpro/3dsvars.sh
make install DESTDIR="$pkgdir"
install -Dm644 "LICENSE.txt" "${pkgdir}${PORTLIBS_PREFIX}/licenses/${pkgname}/LICENSE.txt"
}
================================================
FILE: 3ds/bulletphysics/bulletphysics.patch
================================================
--- bullet3-2.87/CMakeLists.txt 2017-09-30 00:20:39.000000000 +0100
+++ bullet3-2.87-3ds/CMakeLists.txt 2018-11-20 01:14:42.028362942 +0000
@@ -282,15 +282,17 @@
# This is the shortcut to finding GLU, GLUT and OpenGL if they are properly installed on your system
# This should be the case.
-FIND_PACKAGE(OpenGL)
-IF (OPENGL_FOUND)
+IF(NOT NINTENDO_3DS)
+ FIND_PACKAGE(OpenGL)
+ IF (OPENGL_FOUND)
MESSAGE("OPENGL FOUND")
MESSAGE(${OPENGL_LIBRARIES})
-ELSE (OPENGL_FOUND)
+ ELSE (OPENGL_FOUND)
MESSAGE("OPENGL NOT FOUND")
SET(OPENGL_gl_LIBRARY opengl32)
SET(OPENGL_glu_LIBRARY glu32)
-ENDIF (OPENGL_FOUND)
+ ENDIF (OPENGL_FOUND)
+ENDIF(NOT NINTENDO_3DS)
#FIND_PACKAGE(GLU)
@@ -303,6 +305,7 @@
OPTION(BUILD_BULLET3 "Set when you want to build Bullet 3" ON)
# Optional Python configuration
# builds pybullet automatically if all the requirements are met
+IF(NOT NINTENDO_3DS)
SET(PYTHON_VERSION_PYBULLET "" CACHE STRING "Python version pybullet will use.")
SET(Python_ADDITIONAL_VERSIONS 3 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.7.12 2.7.10 2.7.3 )
SET_PROPERTY(CACHE PYTHON_VERSION_PYBULLET PROPERTY STRINGS ${Python_ADDITIONAL_VERSIONS})
@@ -320,6 +323,7 @@
SET(DEFAULT_BUILD_PYBULLET ON)
ENDIF(PYTHONLIBS_FOUND)
OPTION(BUILD_PYBULLET "Set when you want to build pybullet (Python bindings for Bullet)" ${DEFAULT_BUILD_PYBULLET})
+ENDIF(NOT NINTENDO_3DS)
OPTION(BUILD_ENET "Set when you want to build apps with enet UDP networking support" ON)
OPTION(BUILD_CLSOCKET "Set when you want to build apps with enet TCP networking support" ON)
================================================
FILE: 3ds/bzip2/.gitignore
================================================
3ds-bzip2
================================================
FILE: 3ds/bzip2/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=('3ds-bzip2')
pkgver=1.0.8
pkgrel=1
pkgdesc="A high-quality data compression program"
arch=('any')
license=('custom')
url="https://sourceware.org/bzip2/"
options=(!strip libtool staticlibs)
source=(https://sourceware.org/pub/bzip2/bzip2-${pkgver}.tar.gz)
sha256sums=(
'ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269'
)
makedepends=('devkitARM' 'devkitarm-rules' 'devkitarm-crtls' '3ds-pkg-config' 'dkp-toolchain-vars')
groups=('3ds-portlibs')
build() {
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
make -C "$srcdir/bzip2-$pkgver" \
CC=arm-none-eabi-gcc \
AR=arm-none-eabi-ar \
RANLIB=arm-none-eabi-ranlib \
CPPFLAGS="${CPPFLAGS}" \
CFLAGS="-D_FILE_OFFSET_BITS=64 -Winline ${CFLAGS}" libbz2.a
}
package() {
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
install -Dm 644 "$srcdir/bzip2-$pkgver"/LICENSE -t "${pkgdir}/${PORTLIBS_PREFIX}/licenses/${pkgname}"
install -Dm 644 "$srcdir/bzip2-$pkgver"/bzlib.h -t "${pkgdir}/${PORTLIBS_PREFIX}/include/"
install -Dm 644 "$srcdir/bzip2-$pkgver"/libbz2.a -t "${pkgdir}/${PORTLIBS_PREFIX}/lib"
}
================================================
FILE: 3ds/curl/.gitignore
================================================
3ds-curl
================================================
FILE: 3ds/curl/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
# Contributor: Elouan Martinet <exa@elou.world>
pkgname=3ds-curl
pkgver=8.4.0
pkgrel=1
pkgdesc='Library for transferring data with URLs. (for Nintendo 3DS homebrew development)'
arch=('any')
url='https://curl.haxx.se'
license=('MIT')
options=(!strip libtool staticlibs)
depends=('3ds-zlib' '3ds-mbedtls')
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
source=("https://curl.haxx.se/download/curl-${pkgver}.tar.xz"
"curl-${pkgver}.patch"
)
sha256sums=('03c7d5e6697f7b7e40ada1b2256e565a555657398e6c1fcfa4cb251ccd819d4f'
'fd18f93838addd62776b30c699ab9ea472e1d7f31f3d19d28c92728830a06413')
groups=('3ds-portlibs')
build() {
cd curl-$pkgver
source /opt/devkitpro/3dsvars.sh
patch -Np1 -i $srcdir/curl-${pkgver}.patch
./configure CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LIBS="-lctru" \
--prefix=${PORTLIBS_PREFIX} \
--host=arm-none-eabi \
--disable-shared \
--enable-static \
--disable-ipv6 \
--disable-unix-sockets \
--disable-threaded-resolver \
--disable-manual \
--disable-pthreads \
--disable-socketpair \
--disable-ntlm-wb \
--with-mbedtls=${PORTLIBS_PREFIX} \
--with-ca-bundle=sdmc:/config/ssl/cacert.pem
make -C lib
}
package() {
cd curl-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" -C lib install
make DESTDIR="$pkgdir" -C include install
make DESTDIR="$pkgdir" install-binSCRIPTS install-pkgconfigDATA
mkdir -p "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname
install -m644 COPYING "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/COPYING
}
sha256sums=('16c62a9c4af0f703d28bda6d7bbf37ba47055ad3414d70dec63e2e6336f2a82d'
'e41d19d24631f3dce4a0e1c5f9fd92c36f4ddd803d07a943507dab525813ecbe')
================================================
FILE: 3ds/curl/curl-8.4.0.patch
================================================
diff --git a/lib/cf-socket.c b/lib/cf-socket.c
index ce3f9e943..62d1ed4a3 100644
--- a/lib/cf-socket.c
+++ b/lib/cf-socket.c
@@ -161,6 +161,7 @@ static void
tcpkeepalive(struct Curl_easy *data,
curl_socket_t sockfd)
{
+#ifndef __3DS__
int optval = data->set.tcp_keepalive?1:0;
/* only set IDLE and INTVL if setting KEEPALIVE is successful */
@@ -211,6 +212,7 @@ tcpkeepalive(struct Curl_easy *data,
#endif
#endif
}
+#endif
}
/**
@@ -658,6 +660,7 @@ static CURLcode bindlocal(struct Curl_easy *data, struct connectdata *conn,
static bool verifyconnect(curl_socket_t sockfd, int *error)
{
bool rc = TRUE;
+#ifndef __3DS__
#ifdef SO_ERROR
int err = 0;
curl_socklen_t errSize = sizeof(err);
@@ -715,6 +718,7 @@ static bool verifyconnect(curl_socket_t sockfd, int *error)
(void)sockfd;
if(error)
*error = SOCKERRNO;
+#endif
#endif
return rc;
}
diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c
index f9211d3f5..4d9054257 100644
--- a/lib/curl_addrinfo.c
+++ b/lib/curl_addrinfo.c
@@ -141,9 +141,11 @@ Curl_getaddrinfo_ex(const char *nodename,
if(!ai->ai_addr || !(ai->ai_addrlen > 0))
continue;
+#if 0 // 3DS socu returns ai_addrlen = 8
/* ignore elements with bogus address size */
if((size_t)ai->ai_addrlen < ss_size)
continue;
+#endif
ca = malloc(sizeof(struct Curl_addrinfo) + ss_size + namelen);
if(!ca) {
================================================
FILE: 3ds/flac/.gitignore
================================================
3ds-flac
================================================
FILE: 3ds/flac/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
# Contributor: cpasjuste <cpasjuste@gmail.com>
# Contributor: oreo639 <oreo6391@gmail.com>
pkgname=3ds-flac
pkgver=1.3.4
pkgrel=1
pkgdesc='Open source Free Lossless Audio Codec'
arch=('any')
url='https://xiph.org/flac/'
license=(Xiph.org)
options=(!strip libtool staticlibs)
depends=("3ds-libogg")
makedepends=('dkp-toolchain-vars')
groups=('3ds-portlibs')
source=(
"https://ftp.osuosl.org/pub/xiph/releases/flac/flac-$pkgver.tar.xz"
"flac-${pkgver}.patch"
)
sha256sums=(
'8ff0607e75a322dd7cd6ec48f4f225471404ae2730d0ea945127b1355155e737'
'ad264b37cd1e36f418f9ada7fc117f13b18659187d947600d4de05ce4eca4a25'
)
build() {
cd flac-$pkgver
source /opt/devkitpro/3dsvars.sh
patch -Np1 -i "$srcdir/flac-${pkgver}.patch"
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static --disable-examples \
--disable-xmms-plugin --disable-doxygen-docs \
--disable-sse --disable-oggtest --disable-thorough-tests
make -C src/libFLAC
}
package() {
cd flac-$pkgver
make DESTDIR="$pkgdir" install
}
================================================
FILE: 3ds/flac/flac-1.3.4.patch
================================================
diff -Naur flac-1.3.4.orig/include/share/compat.h flac-1.3.4/include/share/compat.h
--- flac-1.3.4.orig/include/share/compat.h 2021-07-09 13:24:42.168553000 -0700
+++ flac-1.3.4/include/share/compat.h 2022-04-10 14:46:25.896436562 -0700
@@ -163,17 +163,27 @@
#define flac_vfprintf vfprintf
#define flac_fopen fopen
-#define flac_chmod chmod
#define flac_unlink unlink
#define flac_rename rename
#define flac_stat stat
+#ifdef __3DS__
+#define flac_chmod(a, b) printf("flac_chmod: not implemented\n")
+#define chown(a, b, c) printf("flac_chown: not implemented\n")
+#else
+ #define flac_chmod chmod
+#endif
+
+#ifdef __3DS__
+#define flac_utime(a, b) printf("flac_utime: not implemented\n")
+#else
#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L)
#define flac_utime(a, b) utimensat (AT_FDCWD, a, *b, 0)
#else
#define flac_utime utime
#endif
#endif
+#endif
#ifdef _WIN32
#define flac_stat_s __stat64 /* stat struct */
diff -Naur flac-1.3.4.orig/Makefile.in flac-1.3.4/Makefile.in
--- flac-1.3.4.orig/Makefile.in 2022-02-20 10:55:03.025219000 -0800
+++ flac-1.3.4/Makefile.in 2022-04-10 15:03:22.399528198 -0700
@@ -403,7 +403,7 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = doc include m4 man src test build microbench oss-fuzz \
+SUBDIRS = include m4 src test build microbench oss-fuzz \
$(am__append_1)
EXTRA_DIST = \
CMakeLists.txt \
diff -Naur flac-1.3.4.orig/src/Makefile.in flac-1.3.4/src/Makefile.in
--- flac-1.3.4.orig/src/Makefile.in 2022-02-20 10:55:03.619219000 -0800
+++ flac-1.3.4/src/Makefile.in 2022-04-10 15:03:34.442552908 -0700
@@ -371,8 +371,6 @@
SUBDIRS = \
libFLAC \
share \
- flac \
- metaflac \
$(XMMS_DIRS) \
test_grabbag \
test_libs_common \
================================================
FILE: 3ds/flite/.gitignore
================================================
3ds-flite
================================================
FILE: 3ds/flite/PKGBUILD
================================================
pkgname=3ds-flite
pkgver=2.1
pkgrel=2
pkgdesc='A small fast portable speech synthesis system'
arch=('any')
url='http://festvox.org/flite/'
license=('MIT')
options=(!strip libtool staticlibs)
depends=()
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
groups=('3ds-portlibs')
source=("http://festvox.org/flite/packed/flite-${pkgver}/flite-${pkgver}-release.tar.bz2")
sha256sums=('c73c3f6a2ea764977d6eaf0a287722d1e2066b4697088c552e342c790f3d2b85')
build() {
cd flite-$pkgver-release
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
./configure --prefix=$PORTLIBS_PREFIX --host=arm-none-eabi --disable-shared \
CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LIBS="${LIBS}"
make -C src
make -C lang
}
package() {
cd flite-$pkgver-release
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
mkdir -p $pkgdir$PORTLIBS_PREFIX/lib
cp -a build/arm-eabi/lib/. $pkgdir$PORTLIBS_PREFIX/lib/
mkdir -p $pkgdir$PORTLIBS_PREFIX/include/flite/
install -m 644 include/*.h $pkgdir$PORTLIBS_PREFIX/include/flite/
install -Dm644 COPYING $pkgdir$PORTLIBS_PREFIX/licenses/$pkgname/COPYING
}
================================================
FILE: 3ds/freetype/.gitignore
================================================
3ds-freetype
================================================
FILE: 3ds/freetype/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname="3ds-freetype"
pkgver=2.14.1
pkgrel=1
pkgdesc="TrueType font rendering library (mingw-w64)"
arch=('any')
url="https://www.freetype.org/"
license=(GPL2+ custom:FreeType)
depends=("3ds-bzip2"
"3ds-libpng"
"3ds-zlib")
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
options=('!strip' '!libtool' 'staticlibs')
source=(https://downloads.sourceforge.net/sourceforge/freetype/freetype-${pkgver}.tar.xz)
groups=('3ds-portlibs')
build() {
source /opt/devkitpro/3dsvars.sh
cd freetype-${pkgver}
./configure \
--enable-freetype-config \
--host=arm-none-eabi \
--target=arm-none-eabi \
--prefix=${PORTLIBS_PREFIX} \
--enable-static \
--disable-shared \
--with-zlib \
--with-bzip2 \
--without-harfbuzz \
--with-png
make
}
package () {
source /opt/devkitpro/3dsvars.sh
cd freetype-${pkgver}
make DESTDIR="${pkgdir}" install
# patch the config script to always output static libraries when not relying on pkg-config
sed 's/\$show_static/yes/' -i "${pkgdir}/${PORTLIBS_PREFIX}/bin/freetype-config"
# Licenses
install -Dm644 "LICENSE.TXT" "${pkgdir}${PORTLIBS_PREFIX}/licenses/${pkgname}/LICENSE.TXT"
install -Dm644 "docs/GPLv2.TXT" "${pkgdir}${PORTLIBS_PREFIX}/licenses/${pkgname}/GPLv2.TXT"
install -Dm644 "docs/FTL.TXT" "${pkgdir}${PORTLIBS_PREFIX}/licenses/${pkgname}/FTL.TXT"
}
sha256sums=('32427e8c471ac095853212a37aef816c60b42052d4d9e48230bab3bdf2936ccc')
================================================
FILE: 3ds/giflib/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
# Contributor: Colin969 <colinb969@gmail.com>
pkgname=3ds-giflib
pkgver=5.1.4
pkgrel=3
pkgdesc='A library for reading and writing gif images'
arch=('any')
url='http://sourceforge.net/projects/giflib'
license=('MIT')
options=(!strip libtool staticlibs)
source=("http://downloads.sourceforge.net/sourceforge/giflib/giflib-${pkgver}.tar.bz2")
sha256sums=('df27ec3ff24671f80b29e6ab1c4971059c14ac3db95406884fc26574631ba8d5')
makedepends=('dkp-toolchain-vars')
groups=('3ds-portlibs')
build() {
source /opt/devkitpro/3dsvars.sh
cd giflib-$pkgver
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi
make
}
package() {
cd giflib-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="${pkgdir}" install
# MIT License
install -Dm644 COPYING "${pkgdir}/${PORTLIBS_PREFIX}/licenses/${pkgname}/COPYING"
rm -fr "${pkgdir}/${PORTLIBS_PREFIX}/bin"
}
================================================
FILE: 3ds/jansson/.gitignore
================================================
3ds-jansson
================================================
FILE: 3ds/jansson/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
# Contributor: Cpasjuste <cpasjuste@gmail.com>
pkgname=3ds-jansson
pkgver=2.13
pkgrel=1
pkgdesc='A C library for encoding, decoding and manipulating JSON data.'
arch=('any')
url='http://www.digip.org/jansson/'
license=('custom')
options=(!strip libtool staticlibs)
makedepends=('dkp-toolchain-vars')
source=("http://www.digip.org/jansson/releases/jansson-$pkgver.tar.gz")
groups=('3ds-portlibs')
sha256sums=('02c31bc16e702b30feb06d18bbfe086c0d8c938e906950980af7adcdb324541b')
build() {
cd jansson-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd jansson-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
# license
install -Dm644 LICENSE "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/LICENSE
}
================================================
FILE: 3ds/libarchive/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=3ds-libarchive
pkgver=3.7.4
pkgrel=1
pkgdesc='library that can create and read several streaming archive format (for Nintendo 3DS homebrew development)'
arch=('any')
url="https://www.libarchive.org"
license=('Simplified BSD')
options=(!strip libtool staticlibs)
source=(
"http://www.libarchive.org/downloads/libarchive-${pkgver}.tar.gz"
"libarchive-${pkgver}.patch"
)
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
depends=('3ds-bzip2' '3ds-zlib' '3ds-liblzma' '3ds-libzstd')
groups=('3ds-portlibs')
build() {
cd libarchive-$pkgver
source /opt/devkitpro/3dsvars.sh
patch -Np1 -i "$srcdir"/libarchive-${pkgver}.patch
arm-none-eabi-cmake -B _3ds -S . -GNinja \
-DENABLE_TAR=OFF \
-DENABLE_TEST=OFF \
-DENABLE_CAT=OFF \
-DENABLE_CPIO=OFF \
-DENABLE_UNZIP=OFF
cmake --build _3ds
}
package() {
cd libarchive-$pkgver
source /opt/devkitpro/3dsvars.sh
DESTDIR="$pkgdir" cmake --install _3ds
# license
install -Dm644 "$srcdir"/libarchive-${pkgver}/COPYING "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/COPYING
# remove useless stuff
rm -fr "$pkgdir"${PORTLIBS_PREFIX}/share
}
sha256sums=('7875d49596286055b52439ed42f044bd8ad426aa4cc5aabd96bfe7abb971d5e8'
'b08920a298b3142e2075379542d85e6471baac634034b25009d6b5c5d30d56e1')
================================================
FILE: 3ds/libarchive/libarchive-3.7.4.patch
================================================
diff --git a/libarchive/archive_read_disk_posix.c b/libarchive/archive_read_disk_posix.c
index 76a4fa44..efd192ec 100644
--- a/libarchive/archive_read_disk_posix.c
+++ b/libarchive/archive_read_disk_posix.c
@@ -98,8 +98,10 @@
#include "archive_read_disk_private.h"
#ifndef HAVE_FCHDIR
+#ifndef __3DS__
#error fchdir function required.
#endif
+#endif
#ifndef O_BINARY
#define O_BINARY 0
#endif
diff --git a/libarchive/archive_read_support_filter_program.c b/libarchive/archive_read_support_filter_program.c
index 0482c57c..87b8fa76 100644
--- a/libarchive/archive_read_support_filter_program.c
+++ b/libarchive/archive_read_support_filter_program.c
@@ -57,6 +57,13 @@
#include "archive_read_private.h"
#include "filter_fork.h"
+#ifdef __3DS__
+int
+__archive_read_program(struct archive_read_filter *self, const char *cmd) {
+ return (ARCHIVE_OK);
+}
+#else
+
#if ARCHIVE_VERSION_NUMBER < 4000000
/* Deprecated; remove in libarchive 4.0 */
@@ -493,3 +500,6 @@ program_filter_close(struct archive_read_filter *self)
return (e);
}
+
+#endif
+
diff --git a/libarchive/archive_write_set_format_iso9660.c b/libarchive/archive_write_set_format_iso9660.c
index 2a3ae07f..56627bc0 100644
--- a/libarchive/archive_write_set_format_iso9660.c
+++ b/libarchive/archive_write_set_format_iso9660.c
@@ -2178,9 +2178,11 @@ get_system_identitier(char *system_id, size_t size)
strncpy(system_id, "Windows", size-1);
system_id[size-1] = '\0';
#else
+#ifndef __3DS__
strncpy(system_id, "Unknown", size-1);
system_id[size-1] = '\0';
#endif
+#endif
}
static void
@@ -2506,7 +2508,7 @@ get_gmoffset(struct tm *tm)
#if defined(HAVE__GET_TIMEZONE)
_get_timezone(&offset);
-#elif defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
+#elif defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__) || defined(__3DS__)
offset = _timezone;
#else
offset = timezone;
diff --git a/libarchive/archive_xxhash.h b/libarchive/archive_xxhash.h
index 1c7131ca..b665b65c 100644
--- a/libarchive/archive_xxhash.h
+++ b/libarchive/archive_xxhash.h
@@ -31,16 +31,33 @@
#error This header is only to be used internally to libarchive.
#endif
+/***************************************
+** Basic Types
+****************************************/
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
+# include <stdint.h>
+ typedef uint8_t BYTE;
+ typedef uint16_t U16;
+ typedef uint32_t U32;
+ typedef int32_t S32;
+ typedef uint64_t U64;
+#else
+ typedef unsigned char BYTE;
+ typedef unsigned short U16;
+ typedef unsigned int U32;
+ typedef signed int S32;
+ typedef unsigned long long U64;
+#endif
typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode;
struct archive_xxhash {
- unsigned int (*XXH32)(const void* input, unsigned int len,
- unsigned int seed);
- void* (*XXH32_init)(unsigned int seed);
+ U32 (*XXH32)(const void* input, unsigned int len,
+ U32 seed);
+ void* (*XXH32_init)(U32 seed);
XXH_errorcode (*XXH32_update)(void* state, const void* input,
unsigned int len);
- unsigned int (*XXH32_digest)(void* state);
+ U32 (*XXH32_digest)(void* state);
};
extern const struct archive_xxhash __archive_xxhash;
diff --git a/libarchive/xxhash.c b/libarchive/xxhash.c
index beacd239..06b44ff4 100644
--- a/libarchive/xxhash.c
+++ b/libarchive/xxhash.c
@@ -93,33 +93,15 @@ You can contact the author at :
#define XXH_memcpy memcpy
-static unsigned int XXH32 (const void*, unsigned int, unsigned int);
-static void* XXH32_init (unsigned int);
-static XXH_errorcode XXH32_update (void*, const void*, unsigned int);
-static unsigned int XXH32_digest (void*);
-/*static int XXH32_sizeofState(void);*/
-static XXH_errorcode XXH32_resetState(void*, unsigned int);
+static U32 XXH32 (const void*, unsigned int, U32);
+static void* XXH32_init (U32);
+static XXH_errorcode XXH32_update (void*, const void*, unsigned int);
+static U32 XXH32_digest (void*);
+/*static int XXH32_sizeofState(void);*/
+static XXH_errorcode XXH32_resetState(void*, U32);
#define XXH32_SIZEOFSTATE 48
typedef struct { long long ll[(XXH32_SIZEOFSTATE+(sizeof(long long)-1))/sizeof(long long)]; } XXH32_stateSpace_t;
-static unsigned int XXH32_intermediateDigest (void*);
-
-/***************************************
-** Basic Types
-****************************************/
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
-# include <stdint.h>
- typedef uint8_t BYTE;
- typedef uint16_t U16;
- typedef uint32_t U32;
- typedef int32_t S32;
- typedef uint64_t U64;
-#else
- typedef unsigned char BYTE;
- typedef unsigned short U16;
- typedef unsigned int U32;
- typedef signed int S32;
- typedef unsigned long long U64;
-#endif
+static U32 XXH32_intermediateDigest (void*);
#if defined(__GNUC__) && !defined(XXH_USE_UNALIGNED_ACCESS)
# define _PACKED __attribute__ ((packed))
diff --git a/libarchive_fe/passphrase.c b/libarchive_fe/passphrase.c
index 90fef32d..a74f3f05 100644
--- a/libarchive_fe/passphrase.c
+++ b/libarchive_fe/passphrase.c
@@ -129,9 +129,12 @@ readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags)
#endif
#include <signal.h>
#include <string.h>
+#ifndef __3DS__
#include <termios.h>
+#endif
#include <unistd.h>
+#ifndef __3DS__
#ifndef _PATH_TTY
#define _PATH_TTY "/dev/tty"
#endif
@@ -316,7 +319,12 @@ restart:
}
#endif /* _WIN32 && !__CYGWIN__ */
#endif /* HAVE_READPASSPHRASE */
-
+#else
+static char* readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags)
+{
+ return NULL;
+}
+#endif /* __3DS__ */
char *
lafe_readpassphrase(const char *prompt, char *buf, size_t bufsiz)
{
================================================
FILE: 3ds/libconfig/.gitignore
================================================
3ds-libconfig
================================================
FILE: 3ds/libconfig/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=3ds-libconfig
pkgver=1.7.2
pkgrel=3
pkgdesc='C/C++ Configuration File Library (for Nintendo 3DS homebrew development)'
arch=('any')
url="https://www.hyperrealm.com/libconfig/libconfig.html"
license=('LGPL')
options=(!strip libtool staticlibs)
source=("https://hyperrealm.github.io/libconfig/dist/libconfig-${pkgver}.tar.gz" "libconfig.patch")
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
sha256sums=(
'7c3c7a9c73ff3302084386e96f903eb62ce06953bb1666235fac74363a16fad9'
'474c17940200d4aa286e486568a0ecaba2130a758f108e2a0b86c6fed5915d1f'
)
groups=('3ds-portlibs')
build() {
cd libconfig-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
patch -Np1 -i "$srcdir"/libconfig.patch
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static \
--disable-examples
make
}
package() {
cd libconfig-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
# license
install -Dm644 COPYING.LIB "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/COPYING.LIB
# remove useless stuff
rm -r "$pkgdir"${PORTLIBS_PREFIX}/share
}
================================================
FILE: 3ds/libconfig/libconfig.patch
================================================
diff -Naur libconfig-1.7.2-ori/lib/libconfig.c libconfig-1.7.2-new/lib/libconfig.c
--- libconfig-1.7.2-ori/lib/libconfig.c 2017-12-02 19:12:14.000000000 +0100
+++ libconfig-1.7.2-new/lib/libconfig.c 2020-05-24 15:17:00.850073719 +0200
@@ -78,48 +78,12 @@
static void __config_locale_override(void)
{
-#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) \
- && ! defined(__MINGW32__)
-
- _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
- setlocale(LC_NUMERIC, "C");
-
-#elif defined(__APPLE__)
-
- locale_t loc = newlocale(LC_NUMERIC_MASK, "C", NULL);
- uselocale(loc);
-
-#elif ((defined HAVE_NEWLOCALE) && (defined HAVE_USELOCALE))
-
- locale_t loc = newlocale(LC_NUMERIC, "C", NULL);
- uselocale(loc);
-
-#else
-
-#warning "No way to modify calling thread's locale!"
-
-#endif
}
/* ------------------------------------------------------------------------- */
static void __config_locale_restore(void)
{
-#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) \
- && ! defined(__MINGW32__)
-
- _configthreadlocale(_DISABLE_PER_THREAD_LOCALE);
-
-#elif ((defined HAVE_USELOCALE) && (defined HAVE_FREELOCALE))
-
- locale_t loc = uselocale(LC_GLOBAL_LOCALE);
- freelocale(loc);
-
-#else
-
-#warning "No way to modify calling thread's locale!"
-
-#endif
}
/* ------------------------------------------------------------------------- */
================================================
FILE: 3ds/libfribidi/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
# Contributor: carstene1ns <dev f4ke de>
pkgname=3ds-libfribidi
pkgver=1.0.12
pkgrel=1
pkgdesc='Free Implementation of the Unicode Bidirectional Algorithm (Nintendo 3DS port)'
arch=('any')
url="https://github.com/fribidi/fribidi"
license=('LGPL2.1')
options=(!strip staticlibs)
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
source=("https://github.com/fribidi/fribidi/releases/download/v$pkgver/fribidi-$pkgver.tar.xz")
sha256sums=('0cd233f97fc8c67bb3ac27ce8440def5d3ffacf516765b91c2cc654498293495')
groups=('3ds-portlibs')
prepare() {
cd fribidi-$pkgver
# patch out binaries, as they conflict with getopt and do not work anyway
sed '/^SUBDIRS/ s/bin //' -i Makefile.am
./autogen.sh
}
build() {
cd fribidi-$pkgver
source /opt/devkitpro/3dsvars.sh
./configure --prefix="$PORTLIBS_PREFIX" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd fribidi-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
# remove documentation
rm -fr "$pkgdir"${PORTLIBS_PREFIX}/share
}
================================================
FILE: 3ds/libiconv/PKGBUILD
================================================
pkgname=3ds-libiconv
pkgver=1.17
pkgrel=1
pkgdesc=''
arch=('any')
url='https://www.gnu.org/software/libiconv/'
license=('LGPL')
options=(!strip libtool staticlibs)
depends=()
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
groups=('3ds-portlibs')
source=(
"https://ftp.gnu.org/pub/gnu/libiconv/libiconv-${pkgver}.tar.gz"
libiconv-${pkgver}.patch
)
build() {
cd libiconv-$pkgver
patch -p0 -i ${srcdir}/libiconv-${pkgver}.patch
source /opt/devkitpro/3dsvars.sh
./configure --prefix=$PORTLIBS_PREFIX --host=arm-none-eabi --disable-shared \
CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LIBS="${LIBS}"
make
}
package() {
cd libiconv-$pkgver
source /opt/devkitpro/3dsvars.sh
make install-lib includedir=${pkgdir}/${PORTLIBS_PREFIX}/include libdir=${pkgdir}/${PORTLIBS_PREFIX}/lib
}
sha256sums=('8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313'
'50b1331b9bf8aa115846db958ebb8e73d80bb5a224ffc892041edce9a4af88b3')
================================================
FILE: 3ds/libiconv/libiconv-1.17.patch
================================================
--- Makefile.in~ 2023-06-12 18:17:08
+++ Makefile.in 2023-06-12 18:20:01
@@ -31,11 +31,6 @@
all : lib/localcharset.h force
cd lib && $(MAKE) all
- cd srclib && $(MAKE) all
- cd src && $(MAKE) all
- cd po && $(MAKE) all
- cd man && $(MAKE) all
- if test -d tests; then cd tests && $(MAKE) all; fi
lib/localcharset.h :
builddir="`pwd`"; cd libcharset && $(MAKE) all && $(MAKE) install-lib libdir="$$builddir/lib" includedir="$$builddir/lib"
================================================
FILE: 3ds/libid3tag/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
pkgname=3ds-libid3tag
pkgver=0.15.1b
pkgrel=2
pkgdesc='A library for reading and (eventually) writing ID3 tags, both ID3v1 and the various versions of ID3v2. (for Nintendo 3DS homebrew development)'
arch=('any')
url='https://www.underbit.com'
license=('GPL')
options=(!strip libtool staticlibs)
source=("https://sourceforge.net/projects/mad/files/libid3tag/0.15.1b/libid3tag-${pkgver}.tar.gz")
groups=('3ds-portlibs')
sha256sums=('63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151')
depends=('3ds-zlib')
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
build() {
cd libid3tag-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
CPPFLAGS="${CFLAGS} ${CPPFLAGS}" ./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi --disable-shared --enable-static
make
}
package() {
cd libid3tag-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
}
================================================
FILE: 3ds/libjpeg-turbo/.gitignore
================================================
3ds-libjpeg-turbo
================================================
FILE: 3ds/libjpeg-turbo/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
_libname=libjpeg-turbo
pkgname=3ds-${_libname}
pkgver=3.1.3
pkgrel=1
pkgdesc='libjpeg derivative with accelerated baseline JPEG compression and decompression'
arch=('any')
url='https://github.com/libjpeg-turbo/libjpeg-turbo'
license=('IJG')
options=(!strip libtool staticlibs)
source=(
"${_libname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz"
)
sha256sums=('3a13a5ba767dc8264bc40b185e41368a80d5d5f945944d1dbaa4b2fb0099f4e5')
makedepends=('3ds-cmake' '3ds-pkg-config' 'dkp-toolchain-vars')
groups=('3ds-portlibs')
build() {
cd libjpeg-turbo-$pkgver
source /opt/devkitpro/3dsvars.sh
arm-none-eabi-cmake -DENABLE_SHARED:BOOLEAN=false -DCMAKE_INSTALL_PREFIX=$PORTLIBS_PREFIX .
make
}
package() {
cd libjpeg-turbo-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
# license
install -d "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname
cp -v LICENSE.md "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/
# remove useless stuff
rm -r "$pkgdir"${PORTLIBS_PREFIX}/share
rm -r "$pkgdir"${PORTLIBS_PREFIX}/bin
}
================================================
FILE: 3ds/libjson-c/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
# Contributor: Pablo Curiel <pabloacurielz@gmail.com>
pkgname=3ds-libjson-c
pkgver=0.16
pkgrel=1
pkgdesc='A JSON implementation in C.'
arch=('any')
url='https://github.com/json-c/json-c/'
license=('MIT')
options=(!strip libtool staticlibs)
source=(
"https://s3.amazonaws.com/json-c_releases/releases/json-c-${pkgver}.tar.gz"
"json-c-${pkgver}.patch"
)
sha256sums=(
'8e45ac8f96ec7791eaf3bb7ee50e9c2100bbbc87b8d0f1d030c5ba8a0288d96b'
'b4936c9cba4e80f3c7c12148d4f511ed3472bd94c7aebb13e0ea9679435d1399'
)
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
groups=('3ds-portlibs')
build() {
cd json-c-$pkgver
patch -p0 -i ${srcdir}/json-c-${pkgver}.patch
source /opt/devkitpro/3dsvars.sh
arm-none-eabi-cmake \
-DCMAKE_INSTALL_PREFIX=$PORTLIBS_PREFIX \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_STATIC_LIBS=ON \
-DDISABLE_THREAD_LOCAL_STORAGE=TRUE \
-DCMAKE_BUILD_TYPE=Release \
.
make
}
package() {
cd json-c-$pkgver
make DESTDIR="$pkgdir" install
}
================================================
FILE: 3ds/libjson-c/json-c-0.16.patch
================================================
--- CMakeLists.txt.orig 2023-03-06 22:27:27.653258333 +0000
+++ CMakeLists.txt 2023-03-06 22:29:07.183682590 +0000
@@ -105,7 +105,7 @@
option(DISABLE_JSON_POINTER "Disable JSON pointer (RFC6901) support." OFF)
-if (UNIX OR MINGW OR CYGWIN)
+if (UNIX OR MINGW OR CYGWIN OR NINTENDO_3DS)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
endif()
@@ -164,7 +164,7 @@
check_symbol_exists(_isnan "float.h" HAVE_DECL__ISNAN)
check_symbol_exists(_finite "float.h" HAVE_DECL__FINITE)
-if ((MSVC AND NOT (MSVC_VERSION LESS 1800)) OR MINGW OR CYGWIN OR UNIX)
+if ((MSVC AND NOT (MSVC_VERSION LESS 1800)) OR MINGW OR CYGWIN OR UNIX OR NINTENDO_3DS)
check_symbol_exists(INFINITY "math.h" HAVE_DECL_INFINITY)
check_symbol_exists(isinf "math.h" HAVE_DECL_ISINF)
check_symbol_exists(isnan "math.h" HAVE_DECL_ISNAN)
@@ -172,7 +172,7 @@
endif()
check_symbol_exists(_doprnt "stdio.h" HAVE_DOPRNT)
-if (UNIX OR MINGW OR CYGWIN)
+if (UNIX OR MINGW OR CYGWIN OR NINTENDO_3DS)
check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)
endif()
check_symbol_exists(vasprintf "stdio.h" HAVE_VASPRINTF)
================================================
FILE: 3ds/liblzma/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
pkgname=3ds-liblzma
pkgver=5.8.2
pkgrel=1
pkgdesc='A compression library with an API similar to that of zlib. (for Nintendo 3DS homebrew development)'
arch=('any')
url='https://tukaani.org'
license=('GPL')
options=(!strip libtool staticlibs)
source=("https://tukaani.org/xz/xz-${pkgver}.tar.xz")
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
groups=('3ds-portlibs')
build() {
cd xz-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
./configure --prefix=${PORTLIBS_PREFIX} --host=arm-none-eabi \
--enable-static --disable-shared --disable-threads \
--disable-lzma-links --disable-xz --disable-xzdec \
--disable-lzmadec --disable-lzmainfo --disable-nls \
--disable-scripts --disable-doc
make
}
package() {
cd xz-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
rm -fr "$pkgdir"${PORTLIBS_PREFIX}/bin
}
sha256sums=('890966ec3f5d5cc151077879e157c0593500a522f413ac50ba26d22a9a145214')
================================================
FILE: 3ds/libmad/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
pkgname=3ds-libmad
pkgver=0.15.1b
pkgrel=2
pkgdesc='A high-quality MPEG audio decoder. (for Nintendo 3DS homebrew development)'
arch=('any')
url='https://www.underbit.com'
license=('GPL')
options=(!strip libtool staticlibs)
source=("https://sourceforge.net/projects/mad/files/libmad/${pkgver}/libmad-${pkgver}.tar.gz")
sha256sums=('bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690')
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
groups=('3ds-portlibs')
prepare() {
sed -i 's,optimize="$optimize -fforce-mem",#optimize="$optimize -fforce-mem",' ${srcdir}/libmad-${pkgver}/configure
}
build() {
cd libmad-$pkgver
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi --disable-shared --enable-static
make
}
package() {
cd libmad-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
}
================================================
FILE: 3ds/libmodplug/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
# Contributor: TurtleP <jpostelnek@outlook.com>
pkgname=3ds-libmodplug
pkgver=0.8.9.0
pkgrel=1
pkgdesc='Play various .mod formats'
arch=('any')
url='http://modplug-xmms.sourceforge.net/'
license=(public domain)
options=(!strip libtool staticlibs)
depends=("3ds-zlib")
groups=('3ds-portlibs')
source=(
"https://sourceforge.net/projects/modplug-xmms/files/libmodplug/$pkgver/libmodplug-$pkgver.tar.gz"
"libmodplug-${pkgver}.patch"
)
sha256sums=(
'457ca5a6c179656d66c01505c0d95fafaead4329b9dbaa0f997d00a3508ad9de'
'21b02fafbde542e969fc41514bca7e544794110678d874fae49ce9e21cd4b342'
)
build() {
cd libmodplug-$pkgver
source /opt/devkitpro/3dsvars.sh
patch -Np1 -i "$srcdir/libmodplug-${pkgver}.patch"
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd libmodplug-$pkgver
make DESTDIR="$pkgdir" install
}
================================================
FILE: 3ds/libmodplug/libmodplug-0.8.9.0.patch
================================================
diff -Naur libmodplug-0.8.9.0.old/src/load_abc.cpp libmodplug-0.8.9.0/src/load_abc.cpp
--- libmodplug-0.8.9.0.old/src/load_abc.cpp 2020-10-08 22:58:42.530000706 +0200
+++ libmodplug-0.8.9.0/src/load_abc.cpp 2020-10-08 22:59:20.744998238 +0200
@@ -3597,8 +3597,10 @@
mm.mm = (char *)lpStream;
mm.sz = dwMemLength;
mm.pos = 0;
+#ifndef __3DS__
while( avoid_reentry ) sleep(1);
avoid_reentry = 1;
+#endif
pat_resetsmp();
pat_init_patnames();
m_nDefaultTempo = 0;
diff -Naur libmodplug-0.8.9.0.old/src/load_mid.cpp libmodplug-0.8.9.0/src/load_mid.cpp
--- libmodplug-0.8.9.0.old/src/load_mid.cpp 2020-10-08 22:58:42.530000706 +0200
+++ libmodplug-0.8.9.0/src/load_mid.cpp 2020-10-08 22:59:30.568997604 +0200
@@ -1170,8 +1170,10 @@
BYTE midibyte[2];
long metalen, delta;
BYTE *p;
+#ifndef __3DS__
while( avoid_reentry ) sleep(1);
avoid_reentry = 1;
+#endif
if( !TestMID(lpStream, dwMemLength) ) {
avoid_reentry = 0;
return FALSE;
diff -Naur libmodplug-0.8.9.0.old/src/load_pat.cpp libmodplug-0.8.9.0/src/load_pat.cpp
--- libmodplug-0.8.9.0.old/src/load_pat.cpp 2020-10-08 22:58:42.531000706 +0200
+++ libmodplug-0.8.9.0/src/load_pat.cpp 2020-10-08 22:59:26.472997869 +0200
@@ -1149,8 +1149,10 @@
mm.sz = dwMemLength;
mm.pos = 0;
mm.error = 0;
+#ifndef __3DS__
while( avoid_reentry ) sleep(1);
avoid_reentry = 1;
+#endif
pat_read_patname(h, mmfile);
h->samples = pat_read_numsmp(mmfile);
if( strlen(h->patname) )
================================================
FILE: 3ds/libogg/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=3ds-libogg
pkgver=1.3.6
pkgrel=1
pkgdesc='The Ogg transport bitstream is designed to provide framing, error protection and seeking structure for higher-level codec streams that consist of raw, unencapsulated data packets, such as the Opus, Vorbis and FLAC audio codecs or the Theora and Dirac video codecs.'
arch=('any')
url='https://wiki.xiph.org/Ogg'
license=(Xiph.org)
options=(!strip libtool staticlibs)
source=("https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-$pkgver.tar.gz")
sha256sums=('83e6704730683d004d20e21b8f7f55dcb3383cdf84c0daedf30bde175f774638')
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
groups=('3ds-portlibs')
build() {
cd libogg-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd libogg-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
install -Dm644 COPYING "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/COPYING
# remove useless documentation
rm -r "$pkgdir"${PORTLIBS_PREFIX}/share/doc
}
================================================
FILE: 3ds/libopus/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=3ds-libopus
pkgver=1.4
pkgrel=1
pkgdesc='Reference implementation of the lossy audio codec, Opus'
arch=('any')
url='https://opus-codec.org/'
license=(BSD)
options=(!strip libtool staticlibs)
source=("https://downloads.xiph.org/releases/opus/opus-$pkgver.tar.gz")
sha256sums=('c9b32b4253be5ae63d1ff16eea06b94b5f0f2951b7a02aceef58e3a3ce49c51f')
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
groups=('3ds-portlibs')
build() {
cd opus-$pkgver
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd opus-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
}
================================================
FILE: 3ds/libpng/.gitignore
================================================
3ds-libpng
================================================
FILE: 3ds/libpng/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
# Contributor: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
# Contributor: Aaron Lindsay <aaron@aaronlindsay.com>
pkgname=3ds-libpng
pkgver=1.6.53
pkgrel=1
pkgdesc='PNG format graphic files library'
arch=('any')
url='http://www.libpng.org'
license=('custom')
options=(!strip libtool staticlibs)
depends=('3ds-zlib')
groups=('3ds-portlibs')
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
source=("https://download.sourceforge.net/libpng/libpng-$pkgver.tar.xz")
build() {
cd libpng-$pkgver
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-tools --disable-shared --enable-static
make
}
package() {
cd libpng-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
make LN_S=cp DESTDIR="$pkgdir" install
# license
install -Dm644 LICENSE "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/LICENSE
# remove useless stuff
rm -r "$pkgdir"${PORTLIBS_PREFIX}/share
}
sha256sums=('1d3fb8ccc2932d04aa3663e22ef5ef490244370f4e568d7850165068778d98d4')
================================================
FILE: 3ds/libsidplay/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
# Contributor: badda71 <me@badda.de>
pkgname=3ds-libsidplay
pkgver=1.36.60
pkgrel=1
pkgdesc="SID chip music module playing library"
arch=('any')
url="http://web.archive.org/web/20061202103201/http://www.geocities.com/SiliconValley/Lakes/5147/sidplay/"
license=('GPLv2')
options=(!strip libtool staticlibs)
source=(
"http://ftp.jaist.ac.jp/pub/Linux/Momonga/development/source/SOURCES/libsidplay-${pkgver}.tar.bz2"
"libsidplay-${pkgver}.patch"
)
sha256sums=('1729beb5b54e7486e0b2b83dc0e02130e753a8dcd6fe03677217dbe358941396'
'd47be6d24f3f26ab4f91b6f207a81e7ab419e1d98995ca0103109aaa47d44d2c')
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
groups=('3ds-portlibs')
build() {
cd libsidplay-$pkgver
patch -p0 -i ../libsidplay-${pkgver}.patch
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi --disable-shared --enable-static
make
}
package() {
cd libsidplay-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
}
================================================
FILE: 3ds/libsidplay/libsidplay-1.36.60.patch
================================================
--- src/samples.cpp Wed May 22 18:38:18 2002
+++ src/samples.cpp Mon Mar 04 13:21:58 2019
@@ -75,7 +75,7 @@
sampleChannel ch4, ch5;
-const sbyte galwayNoiseTab1[16] =
+const ubyte galwayNoiseTab1[16] =
{
0x80,0x91,0xa2,0xb3,0xc4,0xd5,0xe6,0xf7,
0x08,0x19,0x2a,0x3b,0x4c,0x5d,0x6e,0x7f
@@ -84,7 +84,7 @@
ubyte galwayNoiseVolTab[16];
sbyte galwayNoiseSamTab[16];
-const sbyte sampleConvertTab[16] =
+const ubyte sampleConvertTab[16] =
{
// 0x81,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff,
// 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x7f
--- scripts/config.sub Fri Aug 20 12:49:08 2010
+++ scripts/config.sub Mon Mar 04 21:48:01 2019
@@ -1293,7 +1293,7 @@
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
================================================
FILE: 3ds/libtheora/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
# Contributor: oreo639 <oreo6391@gmail.com>
pkgname=3ds-libtheora
pkgver=1.2.0alpha1
pkgrel=2
pkgdesc='Free and open video compression codec from the Xiph.org Foundation'
arch=('any')
url='https://www.theora.org/'
license=(Xiph.org)
options=(!strip libtool staticlibs)
source=(
"https://ftp.osuosl.org/pub/xiph/releases/theora/libtheora-${pkgver}.tar.gz"
"libtheora-1.2.0.patch"
)
sha256sums=(
'538305e6efa484ba740616b521f0d8c4428a0a995193c5e6af9b20f488f3c497'
'b508af29ae3b290e0c2cb0565937826024b0acd6d8c9fb47d2abff6dd04de89a'
)
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
depends=('3ds-libogg')
groups=('3ds-portlibs')
build() {
cd libtheora-${pkgver}
patch -Np1 -i "$srcdir/libtheora-1.2.0.patch"
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static --disable-encode \
--disable-examples --disable-vorbistest
make
}
package() {
cd libtheora-${pkgver}
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
install -Dm644 COPYING "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/COPYING
# remove useless documentation
rm -r "$pkgdir"${PORTLIBS_PREFIX}/share/doc
}
================================================
FILE: 3ds/libtheora/libtheora-1.2.0.patch
================================================
diff -Naur libtheora-1.2.0alpha1.orig/lib/arm/armcpu.c libtheora-1.2.0alpha1/lib/arm/armcpu.c
--- libtheora-1.2.0alpha1.orig/lib/arm/armcpu.c 2010-09-23 13:21:44.000000000 -0700
+++ libtheora-1.2.0alpha1/lib/arm/armcpu.c 2021-03-18 15:13:29.976897091 -0700
@@ -107,6 +107,22 @@
return flags;
}
+#elif defined(_3DS)
+
+ogg_uint32_t oc_cpu_flags_get(void){
+ ogg_uint32_t flags;
+ flags=0;
+
+#if defined(OC_ARM_ASM_EDSP)
+ flags|=OC_CPU_ARM_EDSP;
+#endif
+#if defined(OC_ARM_ASM_MEDIA)
+ flags|=OC_ARM_ASM_MEDIA;
+#endif
+
+ return flags;
+}
+
#else
/*The feature registers which can tell us what the processor supports are
accessible in priveleged modes only, so we can't have a general user-space
================================================
FILE: 3ds/libvorbisidec/.gitignore
================================================
3ds-libvorbisidec
================================================
FILE: 3ds/libvorbisidec/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=3ds-libvorbisidec
pkgver=1.2.1
pkgrel=3
pkgdesc='Fixed-point version of the Ogg Vorbis decoder (for Nintendo 3DS homebrew development)'
arch=('any')
url="http://xiph.org"
license=('LGPL')
options=(!strip libtool staticlibs)
source=("https://downloads.devkitpro.org/packages/sources/libvorbisidec-${pkgver}.tar.xz")
sha256sums=('6ae33489ed40b54ab4a1cd0cf349e9b3b1d5c68d722485704d951f4bf80c64c6')
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
depends=('3ds-libogg')
groups=('3ds-portlibs')
build() {
cd libvorbisidec-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi
make
}
package() {
cd libvorbisidec-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
# license
install -Dm644 COPYING "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/COPYING
}
================================================
FILE: 3ds/libxmp/PKGBUILD
================================================
# Maintainer: Chromaryu <knight.ryu12@gmail.com>
pkgname=3ds-libxmp
pkgver=4.6.0
pkgrel=1
pkgdesc="Library that supports over 90 module formats"
arch=('any')
url="http://xmp.sourceforge.net/"
license=('GPL')
options=(!strip libtool staticlibs)
source=("http://download.sourceforge.net/project/xmp/libxmp/$pkgver/libxmp-$pkgver.tar.gz")
sha256sums=('2d3c45fe523b50907e89e60f9a3b7f4cc9aab83ec9dbba7743eaffbcdcb35ea6')
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
groups=('3ds-portlibs')
build() {
cd "libxmp-$pkgver"
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd "libxmp-$pkgver"
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir/" install
}
================================================
FILE: 3ds/libzstd/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
pkgname=3ds-libzstd
pkgver=1.5.5
pkgrel=2
pkgdesc='Zstd, short for Zstandard, is a fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level compression ratio (for Nintendo Switch homebrew development)'
arch=('any')
url='https://zstd.net'
license=('BSD and GPLv2')
options=(!strip libtool staticlibs)
source=(
"https://github.com/facebook/zstd/releases/download/v$pkgver/zstd-${pkgver}.tar.gz"
zstd-${pkgver}.patch
)
sha256sums=('59ef70ebb757ffe74a7b3fe9c305e2ba3350021a918d168a046c6300aeea9315')
makedepends=('dkp-toolchain-vars')
groups=('3ds-portlibs')
prepare() {
cd zstd-${pkgver}
patch -Np1 -i ${srcdir}/zstd-${pkgver}.patch
}
build() {
source /opt/devkitpro/3dsvars.sh
cd zstd-${pkgver}/lib
make CC=${TOOL_PREFIX}gcc PREFIX=${PORTLIBS_PREFIX} libzstd.a libzstd.pc
}
package() {
source /opt/devkitpro/3dsvars.sh
cd zstd-${pkgver}/lib
make DESTDIR="${pkgdir}" PREFIX=${PORTLIBS_PREFIX} install-pc install-static install-includes
install -d "${pkgdir}"/opt/devkitpro/portlibs/3ds/licenses/${pkgname}
install ../COPYING "${pkgdir}"/opt/devkitpro/portlibs/3ds/licenses/${pkgname}/COPYING
install ../LICENSE "${pkgdir}"/opt/devkitpro/portlibs/3ds/licenses/${pkgname}/LICENSE
}
sha256sums=('9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4')
sha256sums=('9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4'
'dd4980ee49323cbaa3b5b83271fa033eb1c0e911437127d70d84c4ac05619eb1')
================================================
FILE: 3ds/libzstd/zstd-1.5.5.patch
================================================
From d5e53f90cbd1ae0e999ec66e4113558c024c904e Mon Sep 17 00:00:00 2001
From: Dave Murphy <davem@devkitpro.org>
Date: Fri, 22 Dec 2023 11:04:00 +0000
Subject: [PATCH] fix mismatched function signatures
---
lib/legacy/zstd_v06.c | 10 +++++-----
lib/legacy/zstd_v07.c | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/legacy/zstd_v06.c b/lib/legacy/zstd_v06.c
index 175f7cc4..81ea07e8 100644
--- a/lib/legacy/zstd_v06.c
+++ b/lib/legacy/zstd_v06.c
@@ -789,7 +789,7 @@ typedef enum { BITv06_DStream_unfinished = 0,
/* 1,2,4,8 would be better for bitmap combinations, but slows down performance a bit ... :( */
MEM_STATIC size_t BITv06_initDStream(BITv06_DStream_t* bitD, const void* srcBuffer, size_t srcSize);
-MEM_STATIC size_t BITv06_readBits(BITv06_DStream_t* bitD, unsigned nbBits);
+MEM_STATIC size_t BITv06_readBits(BITv06_DStream_t* bitD, U32 nbBits);
MEM_STATIC BITv06_DStream_status BITv06_reloadDStream(BITv06_DStream_t* bitD);
MEM_STATIC unsigned BITv06_endOfDStream(const BITv06_DStream_t* bitD);
@@ -798,7 +798,7 @@ MEM_STATIC unsigned BITv06_endOfDStream(const BITv06_DStream_t* bitD);
/*-****************************************
* unsafe API
******************************************/
-MEM_STATIC size_t BITv06_readBitsFast(BITv06_DStream_t* bitD, unsigned nbBits);
+MEM_STATIC size_t BITv06_readBitsFast(BITv06_DStream_t* bitD, U32 nbBits);
/* faster, but works only if nbBits >= 1 */
@@ -1770,10 +1770,10 @@ HUFv06_decompress() does the following:
3. decode 1 or 4 segments in parallel using HUFv06_decompressSXn_usingDTable
*/
size_t HUFv06_readDTableX2 (unsigned short* DTable, const void* src, size_t srcSize);
-size_t HUFv06_readDTableX4 (unsigned* DTable, const void* src, size_t srcSize);
+size_t HUFv06_readDTableX4 (U32* DTable, const void* src, size_t srcSize);
size_t HUFv06_decompress4X2_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const unsigned short* DTable);
-size_t HUFv06_decompress4X4_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const unsigned* DTable);
+size_t HUFv06_decompress4X4_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const U32* DTable);
/* single stream variants */
@@ -1781,7 +1781,7 @@ size_t HUFv06_decompress1X2 (void* dst, size_t dstSize, const void* cSrc, size_t
size_t HUFv06_decompress1X4 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize); /* double-symbol decoder */
size_t HUFv06_decompress1X2_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const unsigned short* DTable);
-size_t HUFv06_decompress1X4_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const unsigned* DTable);
+size_t HUFv06_decompress1X4_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const U32* DTable);
diff --git a/lib/legacy/zstd_v07.c b/lib/legacy/zstd_v07.c
index 15dc3ef7..100f6cf3 100644
--- a/lib/legacy/zstd_v07.c
+++ b/lib/legacy/zstd_v07.c
@@ -460,7 +460,7 @@ typedef enum { BITv07_DStream_unfinished = 0,
/* 1,2,4,8 would be better for bitmap combinations, but slows down performance a bit ... :( */
MEM_STATIC size_t BITv07_initDStream(BITv07_DStream_t* bitD, const void* srcBuffer, size_t srcSize);
-MEM_STATIC size_t BITv07_readBits(BITv07_DStream_t* bitD, unsigned nbBits);
+MEM_STATIC size_t BITv07_readBits(BITv07_DStream_t* bitD, U32 nbBits);
MEM_STATIC BITv07_DStream_status BITv07_reloadDStream(BITv07_DStream_t* bitD);
MEM_STATIC unsigned BITv07_endOfDStream(const BITv07_DStream_t* bitD);
@@ -469,7 +469,7 @@ MEM_STATIC unsigned BITv07_endOfDStream(const BITv07_DStream_t* bitD);
/*-****************************************
* unsafe API
******************************************/
-MEM_STATIC size_t BITv07_readBitsFast(BITv07_DStream_t* bitD, unsigned nbBits);
+MEM_STATIC size_t BITv07_readBitsFast(BITv07_DStream_t* bitD, U32 nbBits);
/* faster, but works only if nbBits >= 1 */
--
2.30.2
================================================
FILE: 3ds/lua51/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgsuffix=51
pkgname=("3ds-liblua${pkgsuffix}")
pkgvermaj=5.1
pkgver=${pkgvermaj}.5
pkgrel=1
pkgdesc="Powerful lightweight programming language designed for extending applications"
arch=('any')
license=('MIT')
url="https://www.lua.org/"
options=(!strip libtool staticlibs)
source=(${url}/ftp//lua-${pkgver}.tar.gz)
makedepends=('devkitARM' '3ds-pkg-config' 'dkp-toolchain-vars')
groups=('3ds-portlibs')
build() {
source /opt/devkitpro/3dsvars.sh
make -C "${srcdir}/lua-${pkgver}" \
CC=arm-none-eabi-gcc \
AR="arm-none-eabi-ar rcu" \
RANLIB=arm-none-eabi-ranlib \
LUA_A=liblua${pkgvermaj}.a \
ALL_T=liblua${pkgvermaj}.a \
CPPFLAGS="${CPPFLAGS} ${CFLAGS}" \
PLAT=generic
}
package() {
source /opt/devkitpro/3dsvars.sh
cd ${srcdir}/lua-${pkgver}
echo $pkgdir
echo $PORTLIBS_PREFIX
install -dm 755 ${pkgdir}/${PORTLIBS_PREFIX}/include/lua${pkgvermaj}
install -m 644 src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h ${pkgdir}/${PORTLIBS_PREFIX}/include/lua${pkgvermaj}
sed -i "s,prefix= /usr/local,prefix= ${PORTLIBS_PREFIX}," etc/lua.pc
sed -i "s,includedir=\${prefix}/include,includedir=\${prefix}/include/lua${pkgvermaj}," etc/lua.pc
sed -i "s,-llua,-llua${pkgvermaj}," etc/lua.pc
install -dm 755 ${pkgdir}/${PORTLIBS_PREFIX}/lib/pkgconfig
install -m 644 etc/lua.pc ${pkgdir}/${PORTLIBS_PREFIX}/lib/pkgconfig/lua${pkgsuffix}.pc
install -m 644 src/liblua${pkgvermaj}.a ${pkgdir}/${PORTLIBS_PREFIX}/lib
}
sha256sums=('2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333')
================================================
FILE: 3ds/lz4/PKGBUILD
================================================
# Maintainer: TurtleP <jpostelnek@outlook.com>
pkgname=3ds-lz4
pkgver=1.9.3
pkgrel=1
pkgdesc="Very fast lossless compression algorithm"
arch=("any")
url="https://lz4.github.io/lz4/"
license=("BSD" "GPL2")
options=("staticlibs" "!strip")
source=("https://github.com/lz4/lz4/archive/refs/tags/v${pkgver}.zip")
sha256sums=("4ec935d99aa4950eadfefbd49c9fad863185ac24c32001162c44a683ef61b580")
makedepends=("dkp-toolchain-vars")
groups=("3ds-portlibs")
package() {
source /opt/devkitpro/3dsvars.sh
cd lz4-${pkgver}/lib
make BUILD_SHARED=no \
PREFIX=${PORTLIBS_PREFIX} \
DESTDIR=${pkgdir} \
install
}
================================================
FILE: 3ds/mbedtls/.gitignore
================================================
3ds-mbedtls
*.tgz
================================================
FILE: 3ds/mbedtls/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
# Contributor: Elouan Martinet <exa@elou.world>
_realname=mbedtls
pkgname=3ds-${_realname}
pkgver=2.28.8
pkgrel=1
pkgdesc='An open source, portable, easy to use, readable and flexible SSL library (for Nintendo 3DS homebrew development)'
arch=('any')
url='https://tls.mbed.org/'
license=('apache')
options=(!strip libtool staticlibs)
depends=(3ds-zlib)
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
source=( "${_realname}-${pkgver}.tar.gz::https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v${pkgver}.tar.gz"
"mbedtls-${pkgver}.patch" )
groups=('3ds-portlibs')
sha256sums=('bdf7c5bbdc338da3edad89b2885d4f8668f9a6fffeba6ec17a60333e36dade6f'
'a3332c2b65f69f9224e799ac6f05db4555faf76fcfaa720411068252c848b0ee')
build() {
cd mbedtls-$pkgver
patch -Np1 -i $srcdir/mbedtls-${pkgver}.patch
./scripts/config.pl set MBEDTLS_ENTROPY_HARDWARE_ALT
./scripts/config.pl set MBEDTLS_NO_PLATFORM_ENTROPY
./scripts/config.pl set MBEDTLS_CMAC_C
./scripts/config.pl unset MBEDTLS_SELF_TEST
./scripts/config.pl unset MBEDTLS_TIMING_C
source /opt/devkitpro/3dsvars.sh
arm-none-eabi-cmake \
-DCMAKE_INSTALL_PREFIX=$PORTLIBS_PREFIX \
-DCMAKE_C_FLAGS="$CFLAGS $CPPFLAGS" \
-DCMAKE_CXX_FLAGS="CFLAGS -fno-exceptions -fno-rtti" \
-DZLIB_ROOT="$PORTLIBS_PREFIX" \
-DENABLE_ZLIB_SUPPORT=TRUE -DENABLE_TESTING=FALSE -DENABLE_PROGRAMS=FALSE \
.
make
}
package() {
cd mbedtls-$pkgver
source /opt/devkitpro/3dsvars.sh
make install DESTDIR="$pkgdir"
install -d "$pkgdir"$PORTLIBS_PREFIX/licenses/$pkgname
cp -v LICENSE "$pkgdir"$PORTLIBS_PREFIX/licenses/$pkgname
}
sha256sums=('4fef7de0d8d542510d726d643350acb3cdb9dc76ad45611b59c9aa08372b4213'
'84892ec63ab68804a582364d8c4bd6c8dfd0d697ed175bddcd5b7339cce35563')
================================================
FILE: 3ds/mbedtls/mbedtls-2.28.8.patch
================================================
diff --git a/library/entropy.c b/library/entropy.c
index e9a7ae63d..b572edd2f 100644
--- a/library/entropy.c
+++ b/library/entropy.c
@@ -107,6 +107,19 @@ void mbedtls_entropy_init(mbedtls_entropy_context *ctx)
#endif /* MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES */
}
+#ifdef __3DS__
+ #include <3ds.h>
+ int mbedtls_hardware_poll( void *data,
+ unsigned char *output, size_t len, size_t *olen )
+ {
+ (void)(data);
+ sslcGenerateRandomData(output, len);
+ if(olen)
+ *olen = len;
+ return 0;
+ }
+#endif
+
void mbedtls_entropy_free(mbedtls_entropy_context *ctx)
{
/* If the context was already free, don't call free() again.
diff --git a/library/net_sockets.c b/library/net_sockets.c
index 2c2a876b0..bf2925c97 100644
--- a/library/net_sockets.c
+++ b/library/net_sockets.c
@@ -33,7 +33,7 @@
#if !defined(unix) && !defined(__unix__) && !defined(__unix) && \
!defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \
- !defined(__HAIKU__) && !defined(__midipix__)
+ !defined(__HAIKU__) && !defined(__midipix__) && !defined(__3DS__)
#error "This module only works on Unix and Windows, see MBEDTLS_NET_C in config.h"
#endif
@@ -411,6 +411,7 @@
}
memcpy(client_ip, &addr4->sin_addr.s_addr, *cip_len);
+#ifndef __3DS__
} else {
struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *) &client_addr;
*cip_len = sizeof(addr6->sin6_addr.s6_addr);
@@ -420,6 +421,7 @@
}
memcpy(client_ip, &addr6->sin6_addr.s6_addr, *cip_len);
+#endif
}
}
================================================
FILE: 3ds/mikmod/.gitignore
================================================
3ds-mikmod
================================================
FILE: 3ds/mikmod/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=3ds-mikmod
pkgver=3.3.13
pkgrel=1
pkgdesc="Module player and library supporting many formats, including mod, s3m, it, and xm (Nintendo 3DS port)"
arch=('any')
url="http://mikmod.sourceforge.net/"
license=("LGPL")
options=(!strip libtool staticlibs)
makedepends=(
'3ds-pkg-config'
'dkp-toolchain-vars'
)
source=("https://sourceforge.net/projects/mikmod/files/libmikmod/$pkgver/libmikmod-$pkgver.tar.gz")
sha256sums=('9fc1799f7ea6a95c7c5882de98be85fc7d20ba0a4a6fcacae11c8c6b382bb207')
groups=('3ds-portlibs')
build() {
cd libmikmod-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd libmikmod-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
rm -fr "$pkgdir"${PORTLIBS_PREFIX}/share
}
================================================
FILE: 3ds/mpg123/PKGBUILD
================================================
# Maintainer: Gabriel Kind <gabriel-dkp mastergk de>
pkgname=3ds-mpg123
pkgver=1.31.3
pkgrel=3
pkgdesc="A real time MPEG audio decoder for layer 1, 2 and 3"
arch=('any')
url="http://sourceforge.net/projects/mpg123"
license=('LGPL2.1')
options=(!strip libtool staticlibs)
groups=("3ds-portlibs")
source=(
"https://downloads.sourceforge.net/sourceforge/mpg123/mpg123-${pkgver}.tar.bz2"
"mpg123-${pkgver}.patch"
)
sha256sums=('1ca77d3a69a5ff845b7a0536f783fee554e1041139a6b978f6afe14f5814ad1a'
'9af6c4c39d4cc58c5b81bf6e26a95fe9bf8322f583a98ec73f0362214a3c3b89'
)
makedepends=('dkp-toolchain-vars' '3ds-pkg-config')
build() {
cd mpg123-$pkgver
source /opt/devkitpro/3dsvars.sh
patch -Np1 -i "$srcdir"/mpg123-${pkgver}.patch
autoreconf -fi
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static --enable-fifo=no \
--enable-ipv6=no --enable-network=no --enable-int-quality=no \
--with-cpu=generic --with-default-audio=dummy
make
}
package() {
source /opt/devkitpro/3dsvars.sh
cd mpg123-$pkgver
make DESTDIR="$pkgdir" install
# remove useless stuff
rm -rf "$pkgdir"${PORTLIBS_PREFIX}/bin "$pkgdir"${PORTLIBS_PREFIX}/share
}
================================================
FILE: 3ds/mpg123/mpg123-1.31.3.patch
================================================
diff -NBaur mpg123-1.31.3.orig/configure.ac mpg123-1.31.3/configure.ac
--- mpg123-1.31.3.orig/configure.ac 2023-03-17 17:10:06.000000000 +0000
+++ mpg123-1.31.3/configure.ac 2023-04-11 18:10:11.322818703 +0100
@@ -1350,6 +1350,20 @@
# Optionally use platform macros for byte swapping.
AC_CHECK_HEADERS([byteswap.h])
+if test x"$ac_cv_header_sys_signal_h" = xyes; then
+ AC_CHECK_FUNCS( sigemptyset sigaddset sigprocmask sigaction )
+ if test x"$ac_cv_func_sigemptyset" = xno ||
+ test x"$ac_cv_func_sigaddset" = xno ||
+ test x"$ac_cv_func_sigprocmask" = xno ||
+ test x"$ac_cv_func_sigaction" = xno; then
+ AC_DEFINE(DONT_CATCH_SIGNALS, 1, [ Signal handling is not supported on this platform ])
+ fi
+else
+ AC_DEFINE(DONT_CATCH_SIGNALS, 1, [ Signal handling is not supported on this platform ])
+fi
+
+AC_CHECK_FUNCS( sleep, [ have_sleep=yes ], [ have_sleep=no ] )
+
dnl ############## Choose compiler flags and CPU
# do not assume gcc here, so no flags by default
diff -NBaur mpg123-1.31.3.orig/libmpg123.pc.in mpg123-1.31.3/libmpg123.pc.in
--- mpg123-1.31.3.orig/libmpg123.pc.in 2023-03-15 08:02:58.000000000 +0000
+++ mpg123-1.31.3/libmpg123.pc.in 2023-04-11 18:11:17.209838741 +0100
@@ -7,6 +7,6 @@
Description: An optimised MPEG Audio decoder
Requires:
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lmpg123
+Libs: -L${libdir} -lmpg123 -lm
Libs.private: @LIBMPG123_LIBS@
Cflags: -I${includedir}
diff -NBaur mpg123-1.31.3.orig/libout123.pc.in mpg123-1.31.3/libout123.pc.in
--- mpg123-1.31.3.orig/libout123.pc.in 2023-03-15 08:02:58.000000000 +0000
+++ mpg123-1.31.3/libout123.pc.in 2023-04-11 18:11:53.141671612 +0100
@@ -7,6 +7,6 @@
Description: A streaming audio output API derived from mpg123
Requires:
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lout123
+Libs: -L${libdir} -lout123 -lm
Libs.private: @LIBOUT123_LIBS@ @LIBDL@
Cflags: -I${includedir}
diff -NBaur mpg123-1.31.3.orig/src/control_generic.c mpg123-1.31.3/src/control_generic.c
--- mpg123-1.31.3.orig/src/control_generic.c 2023-03-15 08:20:01.000000000 +0000
+++ mpg123-1.31.3/src/control_generic.c 2023-04-11 18:10:11.326822156 +0100
@@ -28,8 +28,10 @@
#include <ctype.h>
#if !defined (_WIN32) || defined (__CYGWIN__)
#include <sys/wait.h>
+#ifdef NETWORK
#include <sys/socket.h>
#endif
+#endif
#include <errno.h>
#include <string.h>
diff -NBaur mpg123-1.31.3.orig/src/mpg123.c mpg123-1.31.3/src/mpg123.c
--- mpg123-1.31.3.orig/src/mpg123.c 2023-03-15 08:02:57.000000000 +0000
+++ mpg123-1.31.3/src/mpg123.c 2023-04-11 18:10:11.326822156 +0100
@@ -1334,6 +1334,8 @@
if(param.verbose > 2) fprintf(stderr, "Note: pausing %i seconds before next track.\n", param.delay);
#ifdef WIN32
Sleep(param.delay*1000);
+#elif !defined(HAVE_SLEEP)
+ fprintf(stderr, "sleep not supported on this platform\n");
#else
sleep(param.delay);
#endif
================================================
FILE: 3ds/opusfile/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=3ds-opusfile
pkgver=0.11
pkgrel=1
pkgdesc='Library for opening, seeking, and decoding .opus files'
arch=('any')
url='https://opus-codec.org/'
license=(BSD)
options=(!strip libtool staticlibs)
source=("https://downloads.xiph.org/releases/opus/opusfile-$pkgver.tar.gz")
sha256sums=('74ce9b6cf4da103133e7b5c95df810ceb7195471e1162ed57af415fabf5603bf')
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
depends=('3ds-libogg' '3ds-libopus')
groups=('3ds-portlibs')
build() {
cd opusfile-$pkgver
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd opusfile-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
}
================================================
FILE: 3ds/physfs/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
_realname=physfs
pkgname=3ds-${_realname}
pkgver=3.2.0
pkgrel=2
pkgdesc='A library to provide abstract access to various archives.'
arch=('any')
url='https://icculus.org/physfs/'
license=('zlib')
options=(!strip libtool staticlibs)
source=( "${_realname}-${pkgver}.tar.gz::https://github.com/icculus/physfs/archive/refs/tags/release-${pkgver}.tar.gz"
"physfs-${pkgver}.patch")
makedepends=('devkitARM' 'dkp-toolchain-vars' '3ds-cmake')
sha256sums=(
'1991500eaeb8d5325e3a8361847ff3bf8e03ec89252b7915e1f25b3f8ab5d560'
'97bdab0dc338921fe43d67b28225363fc3552c89b11fb28f3ff5889da5ab9d1c'
)
groups=('3ds-portlibs')
build() {
cd physfs-release-$pkgver
patch -Np1 -i "$srcdir"/physfs-${pkgver}.patch
source ${DEVKITPRO}/3dsvars.sh
arm-none-eabi-cmake -G"Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=/opt/devkitpro/portlibs/3ds \
-DPHYSFS_BUILD_STATIC=ON -DPHYSFS_BUILD_SHARED=OFF \
-DPHYSFS_BUILD_TEST=OFF \
.
make
}
package() {
cd physfs-release-$pkgver
make install DESTDIR="$pkgdir"
}
================================================
FILE: 3ds/physfs/physfs-3.2.0.patch
================================================
diff -NBaur physfs-release-3.2.0/CMakeLists.txt physfs-release-3.2.0-new/CMakeLists.txt
--- physfs-release-3.2.0/CMakeLists.txt 2022-09-30 21:13:07.000000000 +0100
+++ physfs-release-3.2.0-new/CMakeLists.txt 2023-03-26 16:19:44.629038704 +0100
@@ -77,6 +77,7 @@
src/physfs.c
src/physfs_byteorder.c
src/physfs_unicode.c
+ src/physfs_platform_3ds.c
src/physfs_platform_posix.c
src/physfs_platform_unix.c
src/physfs_platform_windows.c
diff -NBaur physfs-release-3.2.0/src/physfs_internal.h physfs-release-3.2.0-new/src/physfs_internal.h
--- physfs-release-3.2.0/src/physfs_internal.h 2022-09-30 21:13:07.000000000 +0100
+++ physfs-release-3.2.0-new/src/physfs_internal.h 2023-03-26 16:16:59.634275766 +0100
@@ -108,6 +108,10 @@
const void *__PHYSFS_winrtCalcPrefDir(void);
#endif
+#ifdef PHYSFS_PLATFORM_3DS
+char *__PHYSFS_3DSCalcUserDir(void);
+#endif
+
/* atomic operations. */
/* increment/decrement operations return the final incremented/decremented value. */
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
diff -NBaur physfs-release-3.2.0/src/physfs_platform_3ds.c physfs-release-3.2.0-new/src/physfs_platform_3ds.c
--- physfs-release-3.2.0/src/physfs_platform_3ds.c 1970-01-01 01:00:00.000000000 +0100
+++ physfs-release-3.2.0-new/src/physfs_platform_3ds.c 2023-03-26 16:16:59.634275766 +0100
@@ -0,0 +1,106 @@
+/*
+ * Nintendo 3DS support routines for PhysicsFS.
+ *
+ * Please see the file LICENSE.txt in the source's root directory.
+ *
+ */
+
+
+#define __PHYSICSFS_INTERNAL__
+#include "physfs_platforms.h"
+
+#ifdef PHYSFS_PLATFORM_3DS
+
+#include <3ds.h>
+
+// for getcwd
+#include <unistd.h>
+// for PATH_MAX
+#include <limits.h>
+
+#include "physfs_internal.h"
+
+int __PHYSFS_platformInit(void)
+{
+ return 1; /* always succeed. */
+} /* __PHYSFS_platformInit */
+
+
+void __PHYSFS_platformDeinit(void)
+{
+ /* no-op */
+} /* __PHYSFS_platformDeinit */
+
+
+void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data)
+{
+ /* no-op */
+}
+
+char *__PHYSFS_3DSCalcUserDir(void)
+{
+ /* Use the jail directory (hopefully) found before. */
+ return __PHYSFS_strdup(PHYSFS_getBaseDir());
+}
+
+char *__PHYSFS_platformCalcBaseDir(const char *argv0)
+{
+ char *retval = NULL;
+ /* As there is no system-specific directory, directly inspect argv0. */
+ if (argv0 == NULL)
+ {
+ /* User did not provide a path, just use the current working directory.
+ * As physfs should be initialized soon after application start, this
+ * should give us a useable directory.
+ */
+ char fullpath[PATH_MAX];
+ if (getcwd(fullpath, sizeof(fullpath)) != NULL)
+ {
+ const size_t cwdlen = strlen(fullpath);
+ /* getcwd does not provide a trailing slash, add it. */
+ retval = (char*) allocator.Malloc(cwdlen + 2);
+ BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+ strncpy(retval, fullpath, cwdlen);
+ retval[cwdlen] = '/';
+ retval[cwdlen + 1] = '\0';
+ }
+ }
+ else
+ {
+ /* hbmenu should give us the full path of the application, this may
+ * reside in a subfolder. Higher level code will strip away the name
+ * and extension.
+ */
+ return NULL;
+ }
+
+ if (!retval)
+ /* Last resort: use `/3ds` directory. */
+ retval = __PHYSFS_strdup("/3ds/");
+
+ return retval;
+} /* __PHYSFS_platformCalcBaseDir */
+
+char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app)
+{
+ char *retval = NULL;
+ size_t len = 0;
+
+ /* Use the jail directory (hopefully) found before. This way we do not
+ * need to add an application folder, because it is exclusive.
+ */
+ const char *envr = __PHYSFS_getUserDir();
+ BAIL_IF_ERRPASS(!envr, NULL);
+ const char *append = ".config/";
+ len = strlen(envr) + strlen(append) + 1;
+ retval = (char *) allocator.Malloc(len);
+ BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+ snprintf(retval, len, "%s%s", envr, append);
+
+ return retval;
+} /* __PHYSFS_platformCalcPrefDir */
+
+
+#endif /* PHYSFS_PLATFORM_3DS */
+
+/* end of physfs_platform_3ds.c ... */
diff -NBaur physfs-release-3.2.0/src/physfs_platform_posix.c physfs-release-3.2.0-new/src/physfs_platform_posix.c
--- physfs-release-3.2.0/src/physfs_platform_posix.c 2022-09-30 21:13:07.000000000 +0100
+++ physfs-release-3.2.0-new/src/physfs_platform_posix.c 2023-03-26 16:16:59.634275766 +0100
@@ -23,6 +23,10 @@
#include "physfs_internal.h"
+#ifdef PHYSFS_PLATFORM_3DS
+#include <3ds/synchronization.h>
+#include <3ds/thread.h>
+#endif
static PHYSFS_ErrorCode errcodeFromErrnoError(const int err)
{
@@ -58,6 +62,9 @@
static char *getUserDirByUID(void)
{
+#ifdef PHYSFS_PLATFORM_3DS
+ return __PHYSFS_3DSCalcUserDir();
+#else
uid_t uid = getuid();
struct passwd *pw;
char *retval = NULL;
@@ -78,13 +85,16 @@
} /* if */
} /* if */
} /* if */
-
return retval;
+#endif
} /* getUserDirByUID */
char *__PHYSFS_platformCalcUserDir(void)
{
+#ifdef PHYSFS_PLATFORM_3DS
+ return __PHYSFS_3DSCalcUserDir();
+#endif
char *retval = NULL;
char *envr = getenv("HOME");
@@ -362,27 +372,43 @@
st->createtime = statbuf.st_ctime;
st->accesstime = statbuf.st_atime;
- st->readonly = (access(fname, W_OK) == -1);
+#ifdef PHYSFS_PLATFORM_3DS
+ /* shortcut */
+ st->readonly = !(statbuf.st_mode & S_IWRITE);
+#else
+ st->readonly = (access(fname, W_OK) == -1);
+#endif
return 1;
} /* __PHYSFS_platformStat */
+#ifdef PHYSFS_PLATFORM_3DS
+#else
typedef struct
{
pthread_mutex_t mutex;
pthread_t owner;
PHYSFS_uint32 count;
} PthreadMutex;
-
+#endif
void *__PHYSFS_platformGetThreadID(void)
{
+#ifdef PHYSFS_PLATFORM_3DS
+ return (void*)threadGetCurrent();
+#else
return ( (void *) ((size_t) pthread_self()) );
+#endif
} /* __PHYSFS_platformGetThreadID */
void *__PHYSFS_platformCreateMutex(void)
{
+#ifdef PHYSFS_PLATFORM_3DS
+ RecursiveLock *m = allocator.Malloc(sizeof(RecursiveLock));
+ BAIL_IF(!m, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+ RecursiveLock_Init(m);
+#else
int rc;
PthreadMutex *m = (PthreadMutex *) allocator.Malloc(sizeof (PthreadMutex));
BAIL_IF(!m, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
@@ -395,12 +421,16 @@
m->count = 0;
m->owner = (pthread_t) 0xDEADBEEF;
+#endif
return ((void *) m);
} /* __PHYSFS_platformCreateMutex */
void __PHYSFS_platformDestroyMutex(void *mutex)
{
+#ifdef PHYSFS_PLATFORM_3DS
+ allocator.Free((RecursiveLock *)mutex);
+#else
PthreadMutex *m = (PthreadMutex *) mutex;
/* Destroying a locked mutex is a bug, but we'll try to be helpful. */
@@ -409,11 +439,15 @@
pthread_mutex_destroy(&m->mutex);
allocator.Free(m);
+#endif
} /* __PHYSFS_platformDestroyMutex */
int __PHYSFS_platformGrabMutex(void *mutex)
{
+#ifdef PHYSFS_PLATFORM_3DS
+ RecursiveLock_Lock((RecursiveLock *)mutex);
+#else
PthreadMutex *m = (PthreadMutex *) mutex;
pthread_t tid = pthread_self();
if (m->owner != tid)
@@ -424,12 +458,16 @@
} /* if */
m->count++;
+#endif
return 1;
} /* __PHYSFS_platformGrabMutex */
void __PHYSFS_platformReleaseMutex(void *mutex)
{
+#ifdef PHYSFS_PLATFORM_3DS
+ RecursiveLock_Unlock((RecursiveLock *)mutex);
+#else
PthreadMutex *m = (PthreadMutex *) mutex;
assert(m->owner == pthread_self()); /* catch programming errors. */
assert(m->count > 0); /* catch programming errors. */
@@ -441,6 +479,7 @@
pthread_mutex_unlock(&m->mutex);
} /* if */
} /* if */
+#endif
} /* __PHYSFS_platformReleaseMutex */
#endif /* PHYSFS_PLATFORM_POSIX */
diff -NBaur physfs-release-3.2.0/src/physfs_platforms.h physfs-release-3.2.0-new/src/physfs_platforms.h
--- physfs-release-3.2.0/src/physfs_platforms.h 2022-09-30 21:13:07.000000000 +0100
+++ physfs-release-3.2.0-new/src/physfs_platforms.h 2023-03-26 16:16:59.634275766 +0100
@@ -69,6 +69,10 @@
#elif defined(__QNX__)
# define PHYSFS_PLATFORM_QNX 1
# define PHYSFS_PLATFORM_POSIX 1
+#elif defined(__3DS__)
+# define PHYSFS_PLATFORM_POSIX 1
+# define PHYSFS_PLATFORM_3DS 1
+# define PHYSFS_NO_CDROM_SUPPORT 1
#elif defined(unix) || defined(__unix__)
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1
================================================
FILE: 3ds/pkg-config/.gitignore
================================================
3ds-pkg-config
================================================
FILE: 3ds/pkg-config/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
pkgname=3ds-pkg-config
pkgver=0.28
pkgrel=5
pkgdesc='pkg-config wrapper (for Nintendo 3DS homebrew development)'
arch=('any')
url='http://devkitpro.org/'
source=('pkg-config.in')
sha256sums=('0478950b8d4b6b08c8cd678237d99563b50752bfc8680d0ce797601c6677fe57')
groups=('3ds-dev')
package() {
install -d "$pkgdir"/opt/devkitpro/portlibs/3ds/bin
cp "$srcdir"/pkg-config.in "$pkgdir"/opt/devkitpro/portlibs/3ds/bin/arm-none-eabi-pkg-config
}
================================================
FILE: 3ds/pkg-config/pkg-config.in
================================================
#!/usr/bin/env bash
command -v pkg-config >/dev/null 2>&1 || { echo >&2 "I require pkg-config but it's not installed. Aborting."; exit 1; }
# reset pkg-config variables to ensure we're not polluted by host libraries
export PKG_CONFIG_DIR=
export PKG_CONFIG_PATH=
export PKG_CONFIG_SYSROOT_DIR=
export PKG_CONFIG_LIBDIR=${DEVKITPRO}/portlibs/3ds/lib/pkgconfig:${DEVKITPRO}/portlibs/armv6k/lib/pkgconfig
[[ "$1" == '--version' ]] && exec pkg-config --version
exec pkg-config --static "$@"
================================================
FILE: 3ds/wslay/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=3ds-wslay
pkgver=1.1.1
pkgrel=1
pkgdesc='Wslay is a WebSocket library written in C.'
arch=('any')
url='https://github.com/tatsuhiro-t/wslay'
license=('MIT')
options=(!strip libtool staticlibs)
groups=('3ds-portlibs')
makedepends=('3ds-pkg-config' 'dkp-toolchain-vars')
source=("https://github.com/tatsuhiro-t/wslay/releases/download/release-${pkgver}/wslay-${pkgver}.tar.gz")
sha256sums=('90CE68C6DFD614722D44FBB14563A3F6DACC68B548B20AE382AC4F4952C55268')
build() {
cd wslay-$pkgver
source /opt/devkitpro/3dsvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd wslay-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
# license
install -Dm644 COPYING "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/COPYING
# remove useless stuff
rm -r "$pkgdir"${PORTLIBS_PREFIX}/share
}
================================================
FILE: 3ds/yaml_cpp/PKGBUILD
================================================
_realname=yaml_cpp
pkgname=3ds-${_realname}
pkgver=0.8.0
pkgrel=1
pkgdesc='A YAML parser and emitter in C++ matching the YAML 1.2 spec.'
arch=('any')
url='https://github.com/jbeder/yaml-cpp'
license=('MIT')
options=(!strip libtool staticlibs)
source=( ${_realname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz)
makedepends=('devkitARM' '3ds-cmake')
groups=('3ds-portlibs')
build() {
cd yaml-cpp-${pkgver}
/opt/devkitpro/portlibs/3ds/bin/arm-none-eabi-cmake -B _build -S . -DCMAKE_INSTALL_PREFIX=/opt/devkitpro/portlibs/3ds -DYAML_CPP_BUILD_TOOLS=OFF -GNinja
cmake --build _build --parallel
}
package() {
cd yaml-cpp-${pkgver}
DESTDIR="${pkgdir}" cmake --install _build
}
sha256sums=('fbe74bbdcee21d656715688706da3c8becfd946d92cd44705cc6098bb23b3a16')
================================================
FILE: 3ds/zlib/.gitignore
================================================
3ds-zlib
================================================
FILE: 3ds/zlib/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
pkgname=3ds-zlib
pkgver=1.3.1
pkgrel=1
pkgdesc='Deflate compression method library'
arch=('any')
url='http://www.zlib.net'
license=('zlib')
options=(!strip libtool staticlibs)
source=("${url}/zlib-$pkgver.tar.xz")
makedepends=('dkp-toolchain-vars')
groups=('3ds-portlibs')
build() {
cd zlib-$pkgver
source /opt/devkitpro/3dsvars.sh
CHOST=arm-none-eabi \
./configure --prefix="${PORTLIBS_PREFIX}" --static
make libz.a # only build library, no programs
# libminizip
cd contrib/minizip
autoreconf --force --verbose --install
CFLAGS="${CFLAGS} -DUSE_FILE32API"
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd zlib-$pkgver
source /opt/devkitpro/3dsvars.sh
make DESTDIR="$pkgdir" install
# license
install -d "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname
tail -n 31 README > "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/LICENSE
# remove useless stuff
rm -r "$pkgdir"${PORTLIBS_PREFIX}/share
# libminizip
cd contrib/minizip
make DESTDIR="$pkgdir" install
}
sha256sums=('38ef96b8dfe510d42707d9c781877914792541133e1870841463bfa73f883e32')
================================================
FILE: 3ds-examples/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=('3ds-examples')
pkgver=20240917
pkgrel=1
pkgdesc="Nintendo 3DS example code."
arch=('any')
license=('custom')
url="http://github.com/devkitpro/3ds-examples"
options=(!strip libtool staticlibs)
source=(${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz)
makedepends=('devkitARM')
groups=('3ds-dev')
package() {
mkdir -p "$pkgdir"/opt/devkitpro/examples/3ds
cp -R $srcdir/${pkgname}-${pkgver}/* "$pkgdir"/opt/devkitpro/examples/3ds
}
sha256sums=('38ef002fe43d20852a0c9e539c33d8fcd8580bf5ee04331ed48860cb3283eb47')
================================================
FILE: README.md
================================================
# devkitPro portlibs
All the libraries here are installable through [devkitPro pacman](https://devkitpro.org/wiki/devkitPro_pacman)
================================================
FILE: armv4t/bzip2/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=('armv4t-bzip2')
pkgver=1.0.8
pkgrel=1
pkgdesc="A high-quality data compression program"
arch=('any')
license=('custom')
url="https://sourceware.org/bzip2/"
options=(!strip libtool staticlibs)
source=(https://sourceware.org/pub/bzip2/bzip2-${pkgver}.tar.gz)
sha256sums=(
'ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269'
)
makedepends=('armv4t-pkg-config' 'dkp-toolchain-vars')
groups=('armv4t-portlibs')
build() {
source /opt/devkitpro/armv4tvars.sh
make -C "$srcdir/bzip2-$pkgver" \
CC=${TOOL_PREFIX}gcc \
AR=${TOOL_PREFIX}ar \
RANLIB=${TOOL_PREFIX}ranlib \
CPPFLAGS="${CPPFLAGS}" \
CFLAGS="-D_FILE_OFFSET_BITS=64 -Winline ${CFLAGS}" libbz2.a
}
package() {
source /opt/devkitpro/armv4tvars.sh
install -Dm 644 "$srcdir/bzip2-$pkgver"/LICENSE -t "${pkgdir}/${PORTLIBS_PREFIX}/licenses/${pkgname}"
install -Dm 644 "$srcdir/bzip2-$pkgver"/bzlib.h -t "${pkgdir}/${PORTLIBS_PREFIX}/include/"
install -Dm 644 "$srcdir/bzip2-$pkgver"/libbz2.a -t "${pkgdir}/${PORTLIBS_PREFIX}/lib"
}
================================================
FILE: armv4t/flac/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
# Contributor: cpasjuste <cpasjuste@gmail.com>
# Contributor: oreo639 <oreo6391@gmail.com>
pkgname=armv4t-flac
pkgver=1.3.2
pkgrel=1
pkgdesc='Open source Free Lossless Audio Codec'
arch=('any')
url='https://xiph.org/flac/'
license=(Xiph.org)
options=(!strip libtool staticlibs)
depends=("armv4t-libogg")
makedepends=('dkp-toolchain-vars')
groups=('armv4t-portlibs')
source=(
"https://ftp.osuosl.org/pub/xiph/releases/flac/flac-$pkgver.tar.xz"
"flac-${pkgver}.patch"
)
sha256sums=(
'91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f'
'33032574b3a148daab60a5500be1811e64862b39851c6c326a0ee0a90b081edd'
)
build() {
cd flac-$pkgver
source /opt/devkitpro/armv4tvars.sh
patch -Np1 -i "$srcdir/flac-${pkgver}.patch"
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static --disable-examples \
--disable-xmms-plugin --disable-doxygen-docs \
--disable-sse
make -C src/libFLAC
}
package() {
cd flac-$pkgver
make DESTDIR="$pkgdir" install
}
================================================
FILE: armv4t/flac/flac-1.3.2.patch
================================================
diff -ur srcpure/include/share/compat.h srcpatched/include/share/compat.h
--- srcpure/include/share/compat.h 2016-12-07 20:10:26.218454157 +0000
+++ srcpatched/include/share/compat.h 2020-08-23 13:10:05.619975022 +0100
@@ -167,8 +167,9 @@
#define flac_vfprintf vfprintf
#define flac_fopen fopen
-#define flac_chmod chmod
-#define flac_utime utime
+#define flac_chmod(a, b) printf("flac_chmod: not implemented\n")
+#define flac_utime(a, b) printf("flac_utime: not implemented\n")
+#define chown(a, b, c) printf("flac_chown: not implemented\n")
#define flac_unlink unlink
#define flac_rename rename
#define flac_stat stat
Only in srcpatched/include/share: compat.h~
diff -ur srcpure/Makefile.in srcpatched/Makefile.in
--- srcpure/Makefile.in 2017-01-01 03:46:48.833726273 +0000
+++ srcpatched/Makefile.in 2020-08-23 13:09:00.589975823 +0100
@@ -397,7 +397,7 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = doc include m4 man src examples test build objs microbench
+SUBDIRS = include m4 src build objs
EXTRA_DIST = \
COPYING.FDL \
COPYING.GPL \
diff -ur srcpure/src/Makefile.in srcpatched/src/Makefile.in
--- srcpure/src/Makefile.in 2017-01-01 03:46:49.385728167 +0000
+++ srcpatched/src/Makefile.in 2020-08-23 13:09:00.589975823 +0100
@@ -363,19 +363,11 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@FLaC__HAS_XMMS_TRUE@XMMS_DIRS = plugin_common plugin_xmms
-@FLaC__WITH_CPPLIBS_TRUE@CPPLIBS_DIRS = libFLAC++ test_libFLAC++
+@FLaC__WITH_CPPLIBS_TRUE@CPPLIBS_DIRS = libFLAC++
SUBDIRS = \
libFLAC \
share \
- flac \
- metaflac \
$(XMMS_DIRS) \
- test_grabbag \
- test_libs_common \
- test_libFLAC \
- test_seeking \
- test_streams \
- utils \
$(CPPLIBS_DIRS)
EXTRA_DIST = \
================================================
FILE: armv4t/flite/PKGBUILD
================================================
pkgname=armv4t-flite
pkgver=2.1
pkgrel=2
pkgdesc='A small fast portable speech synthesis system'
arch=('any')
url='http://festvox.org/flite/'
license=('MIT')
options=(!strip libtool staticlibs)
depends=()
makedepends=('dkp-toolchain-vars')
groups=('armv4t-portlibs')
source=("http://festvox.org/flite/packed/flite-${pkgver}/flite-${pkgver}-release.tar.bz2")
sha256sums=('c73c3f6a2ea764977d6eaf0a287722d1e2066b4697088c552e342c790f3d2b85')
build() {
cd flite-$pkgver-release
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/armv4tvars.sh
./configure --prefix=$PORTLIBS_PREFIX --host=arm-none-eabi --disable-shared \
CFLAGS="${CFLAGS} -DCST_NO_SOCKETS=true" CPPFLAGS="${CPPFLAGS}" LIBS="${LIBS}"
make -C src
make -C lang
}
package() {
cd flite-$pkgver-release
source /opt/devkitpro/armv4tvars.sh
mkdir -p $pkgdir$PORTLIBS_PREFIX/lib
cp -a build/arm-eabi/lib/. $pkgdir$PORTLIBS_PREFIX/lib/
mkdir -p $pkgdir$PORTLIBS_PREFIX/include/flite/
install -m 644 include/*.h $pkgdir$PORTLIBS_PREFIX/include/flite/
install -Dm644 COPYING $pkgdir$PORTLIBS_PREFIX/licenses/$pkgname/COPYING
}
================================================
FILE: armv4t/freetype/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=armv4t-freetype
pkgver=2.13.0
pkgrel=1
pkgdesc='FreeType is a freely available software library to render fonts.'
arch=('any')
url='https://www.freetype.org/'
license=(GPL2+ custom:FreeType)
options=(!strip libtool staticlibs)
depends=("armv4t-bzip2"
"armv4t-libpng"
"armv4t-zlib"
)
makedepends=('dkp-toolchain-vars')
source=("http://download.savannah.gnu.org/releases/freetype/freetype-$pkgver.tar.xz")
sha256sums=(
'5ee23abd047636c24b2d43c6625dcafc66661d1aca64dec9e0d05df29592624c'
)
groups=("armv4t-portlibs")
build() {
cd freetype-$pkgver
source /opt/devkitpro/armv4tvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--enable-freetype-config \
--disable-shared --enable-static \
--with-zlib \
--with-bzip2 \
--with-png
make
}
package() {
cd freetype-$pkgver
source /opt/devkitpro/armv4tvars.sh
make DESTDIR="$pkgdir" install
# patch the config script to always output static libraries when not relying on pkg-config
sed 's/\$show_static/yes/' -i "${pkgdir}/${PORTLIBS_PREFIX}/bin/freetype-config"
# patch the config script to always output static libraries when not relying on pkg-config
sed 's/\$show_static/yes/' -i "${pkgdir}/${PORTLIBS_PREFIX}/bin/freetype-config"
# Licenses
install -Dm644 "LICENSE.TXT" "${pkgdir}/${PORTLIBS_PREFIX}/licenses/${pkgname}/LICENSE.TXT"
install -Dm644 "docs/GPLv2.TXT" "${pkgdir}/${PORTLIBS_PREFIX}/licenses/${pkgname}/GPLv2.TXT"
install -Dm644 "docs/FTL.TXT" "${pkgdir}/${PORTLIBS_PREFIX}/licenses/${pkgname}/FTL.TXT"
# remove useless stuff
rm -r "${pkgdir}/${PORTLIBS_PREFIX}/share"
}
================================================
FILE: armv4t/libconfig/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=armv4t-libconfig
pkgver=1.7.2
pkgrel=1
pkgdesc='C/C++ Configuration File Library (for armv4t homebrew development)'
arch=('any')
url="https://www.hyperrealm.com/libconfig/libconfig.html"
license=('LGPL')
options=(!strip libtool staticlibs)
source=("https://hyperrealm.github.io/libconfig/dist/libconfig-${pkgver}.tar.gz" "libconfig.patch")
makedepends=('dkp-toolchain-vars')
sha256sums=(
'7c3c7a9c73ff3302084386e96f903eb62ce06953bb1666235fac74363a16fad9'
'474c17940200d4aa286e486568a0ecaba2130a758f108e2a0b86c6fed5915d1f'
)
groups=('armv4t-portlibs')
build() {
cd libconfig-$pkgver
source /opt/devkitpro/armv4tvars.sh
patch -Np1 -i "$srcdir"/libconfig.patch
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static \
--disable-examples
make
}
package() {
cd libconfig-$pkgver
source /opt/devkitpro/armv4tvars.sh
make DESTDIR="$pkgdir" install
# license
install -Dm644 COPYING.LIB "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/COPYING.LIB
# remove useless stuff
rm -r "$pkgdir"${PORTLIBS_PREFIX}/share
}
================================================
FILE: armv4t/libconfig/libconfig.patch
================================================
diff -Naur libconfig-1.7.2-ori/lib/libconfig.c libconfig-1.7.2-new/lib/libconfig.c
--- libconfig-1.7.2-ori/lib/libconfig.c 2017-12-02 19:12:14.000000000 +0100
+++ libconfig-1.7.2-new/lib/libconfig.c 2020-05-24 15:17:00.850073719 +0200
@@ -78,48 +78,12 @@
static void __config_locale_override(void)
{
-#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) \
- && ! defined(__MINGW32__)
-
- _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
- setlocale(LC_NUMERIC, "C");
-
-#elif defined(__APPLE__)
-
- locale_t loc = newlocale(LC_NUMERIC_MASK, "C", NULL);
- uselocale(loc);
-
-#elif ((defined HAVE_NEWLOCALE) && (defined HAVE_USELOCALE))
-
- locale_t loc = newlocale(LC_NUMERIC, "C", NULL);
- uselocale(loc);
-
-#else
-
-#warning "No way to modify calling thread's locale!"
-
-#endif
}
/* ------------------------------------------------------------------------- */
static void __config_locale_restore(void)
{
-#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) \
- && ! defined(__MINGW32__)
-
- _configthreadlocale(_DISABLE_PER_THREAD_LOCALE);
-
-#elif ((defined HAVE_USELOCALE) && (defined HAVE_FREELOCALE))
-
- locale_t loc = uselocale(LC_GLOBAL_LOCALE);
- freelocale(loc);
-
-#else
-
-#warning "No way to modify calling thread's locale!"
-
-#endif
}
/* ------------------------------------------------------------------------- */
================================================
FILE: armv4t/libexpat/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=armv4t-libexpat
pkgver=2.2.5
pkgrel=1
pkgdesc='Expat, a stream-oriented XML parser library written in C.'
arch=('any')
url='https://libexpat.github.io/'
license=(MIT/X)
options=(!strip libtool staticlibs)
source=("https://github.com/libexpat/libexpat/releases/download/R_2_2_5/expat-$pkgver.tar.bz2")
sha256sums=('d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6')
makedepends=('dkp-toolchain-vars')
groups=('armv4t-portlibs')
build() {
cd expat-$pkgver
source /opt/devkitpro/armv4tvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd expat-$pkgver
make DESTDIR="$pkgdir" install
}
================================================
FILE: armv4t/libid3tag/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
pkgname=armv4t-libid3tag
pkgver=0.15.1b
pkgrel=1
pkgdesc='A library for reading and (eventually) writing ID3 tags, both ID3v1 and the various versions of ID3v2. (for armv4t homebrew development)'
arch=('any')
url='https://www.underbit.com'
license=('GPL')
options=(!strip libtool staticlibs)
source=("https://sourceforge.net/projects/mad/files/libid3tag/0.15.1b/libid3tag-${pkgver}.tar.gz")
groups=('armv4t-portlibs')
sha256sums=('63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151')
depends=('armv4t-zlib')
makedepends=('dkp-toolchain-vars')
build() {
cd libid3tag-$pkgver
source /opt/devkitpro/armv4tvars.sh
CPPFLAGS="${CFLAGS} ${CPPFLAGS}" ./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi --disable-shared --enable-static
make
}
package() {
cd libid3tag-$pkgver
source /opt/devkitpro/armv4tvars.sh
make DESTDIR="$pkgdir" install
}
================================================
FILE: armv4t/liblzma/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
pkgname=armv4t-liblzma
pkgver=5.8.2
pkgrel=1
pkgdesc='A compression library with an API similar to that of zlib. (for armv4t homebrew development)'
arch=('any')
url='https://tukaani.org'
license=('GPL')
options=(!strip libtool staticlibs)
source=("https://tukaani.org/xz/xz-${pkgver}.tar.xz")
makedepends=('dkp-toolchain-vars')
groups=('armv4t-portlibs')
build() {
cd xz-$pkgver
source /opt/devkitpro/armv4tvars.sh
./configure --prefix=${PORTLIBS_PREFIX} --host=arm-none-eabi \
--enable-static --disable-shared --disable-threads \
--disable-lzma-links --disable-xz --disable-xzdec \
--disable-lzmadec --disable-lzmainfo --disable-nls \
--disable-scripts --disable-doc
make
}
package() {
cd xz-$pkgver
source /opt/devkitpro/armv4tvars.sh
make DESTDIR="$pkgdir" install
rm -fr "$pkgdir"${PORTLIBS_PREFIX}/bin
}
sha256sums=('890966ec3f5d5cc151077879e157c0593500a522f413ac50ba26d22a9a145214')
================================================
FILE: armv4t/libmad/PKGBUILD
================================================
# Maintainer: WinterMute <davem@devkitpro.org>
pkgname=armv4t-libmad
pkgver=0.15.1b
pkgrel=1
pkgdesc='A high-quality MPEG audio decoder. (for armv4t homebrew development)'
arch=('any')
url='https://www.underbit.com'
license=('GPL')
options=(!strip libtool staticlibs)
source=(
"https://sourceforge.net/projects/mad/files/libmad/${pkgver}/libmad-${pkgver}.tar.gz"
"libmad-0.15.1b.patch"
)
sha256sums=(
'bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690'
'b8fd4477d793c1081bd1a4c5c6870fc088b593516c153d3d40bf5d22e7f38a7f'
)
makedepends=('dkp-toolchain-vars')
groups=('armv4t-portlibs')
build() {
cd libmad-$pkgver
patch -Np1 -i "$srcdir/libmad-0.15.1b.patch"
source /opt/devkitpro/armv4tvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi --disable-shared --enable-static \
--enable-fpm=arm --enable-speed
make
}
package() {
cd libmad-$pkgver
source /opt/devkitpro/devkitarm.sh
source /opt/devkitpro/armv4tvars.sh
make DESTDIR="$pkgdir" install
}
================================================
FILE: armv4t/libmad/libmad-0.15.1b.patch
================================================
diff -ur libmad-0.15.1b/configure libmad-0.15.1b-patched/configure
--- libmad-0.15.1b/configure 2004-02-05 09:34:07.000000000 +0000
+++ libmad-0.15.1b-patched/configure 2020-08-12 11:51:55.049809336 +0100
@@ -19099,7 +19099,7 @@
case "$optimize" in
-O|"-O "*)
optimize="-O"
- optimize="$optimize -fforce-mem"
+ optimize="$optimize"
optimize="$optimize -fforce-addr"
: #x optimize="$optimize -finline-functions"
: #- optimize="$optimize -fstrength-reduce"
Only in libmad-0.15.1b-patched/: configure~
diff -ur libmad-0.15.1b/configure.ac libmad-0.15.1b-patched/configure.ac
--- libmad-0.15.1b/configure.ac 2004-01-23 09:41:32.000000000 +0000
+++ libmad-0.15.1b-patched/configure.ac 2020-08-12 11:51:45.776476110 +0100
@@ -140,7 +140,7 @@
case "$optimize" in
-O|"-O "*)
optimize="-O"
- optimize="$optimize -fforce-mem"
+ optimize="$optimize"
optimize="$optimize -fforce-addr"
: #x optimize="$optimize -finline-functions"
: #- optimize="$optimize -fstrength-reduce"
Only in libmad-0.15.1b-patched/: configure.ac~
================================================
FILE: armv4t/libogg/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=armv4t-libogg
pkgver=1.3.4
pkgrel=1
pkgdesc='The Ogg transport bitstream is designed to provide framing, error protection and seeking structure for higher-level codec streams that consist of raw, unencapsulated data packets, such as the Opus, Vorbis and FLAC audio codecs or the Theora and Dirac video codecs.'
arch=('any')
url='https://wiki.xiph.org/Ogg'
license=(Xiph.org)
options=(!strip libtool staticlibs)
source=("https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-$pkgver.tar.gz")
sha256sums=('fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e')
makedepends=('dkp-toolchain-vars')
groups=('armv4t-portlibs')
build() {
cd libogg-$pkgver
source /opt/devkitpro/armv4tvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd libogg-$pkgver
source /opt/devkitpro/armv4tvars.sh
make DESTDIR="$pkgdir" install
install -Dm644 COPYING "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/COPYING
# remove useless documentation
rm -r "$pkgdir"${PORTLIBS_PREFIX}/share/doc
}
================================================
FILE: armv4t/libpng/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=armv4t-libpng
pkgver=1.6.48
pkgrel=1
pkgdesc='PNG format graphic files library'
arch=('any')
url='http://www.libpng.org'
license=('custom')
options=(!strip libtool staticlibs)
depends=('armv4t-zlib')
groups=('armv4t-portlibs')
makedepends=('dkp-toolchain-vars')
source=("https://download.sourceforge.net/libpng/libpng-$pkgver.tar.xz")
build() {
cd libpng-$pkgver
source /opt/devkitpro/armv4tvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-tools --disable-shared --enable-static
make
}
package() {
cd libpng-$pkgver
source /opt/devkitpro/armv4tvars.sh
make LN_S=cp DESTDIR="$pkgdir" install
# license
install -Dm644 LICENSE "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/LICENSE
# remove useless stuff
rm -r "$pkgdir"${PORTLIBS_PREFIX}/share
}
sha256sums=('46fd06ff37db1db64c0dc288d78a3f5efd23ad9ac41561193f983e20937ece03')
================================================
FILE: armv4t/libtheora/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
# Contributor: oreo639 <oreo6391@gmail.com>
pkgname=armv4t-libtheora
pkgver=1.2.0alpha1
pkgrel=1
pkgdesc='Free and open video compression codec from the Xiph.org Foundation'
arch=('any')
url='https://www.theora.org/'
license=(Xiph.org)
options=(!strip libtool staticlibs)
source=(
"https://ftp.osuosl.org/pub/xiph/releases/theora/libtheora-${pkgver}.tar.gz"
"libtheora-1.2.0.patch"
)
sha256sums=(
'538305e6efa484ba740616b521f0d8c4428a0a995193c5e6af9b20f488f3c497'
'45c9601eda3425699530edd66da0cf70658844f4cae04f4b1910d1f7f6cb2aa1'
)
makedepends=('dkp-toolchain-vars')
depends=('armv4t-libogg')
groups=('armv4t-portlibs')
build() {
cd libtheora-${pkgver}
patch -Np1 -i "$srcdir/libtheora-1.2.0.patch"
source /opt/devkitpro/armv4tvars.sh
HAVE_ARM_ASM_EDSP=0 ./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static --disable-encode \
--disable-examples --disable-vorbistest \
--disable-asflag-probe --disable-float
CFLAGS="-march=armv4t" make
}
package() {
cd libtheora-${pkgver}
source /opt/devkitpro/armv4tvars.sh
make DESTDIR="$pkgdir" install
install -Dm644 COPYING "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/COPYING
# remove useless documentation
rm -r "$pkgdir"${PORTLIBS_PREFIX}/share/doc
}
================================================
FILE: armv4t/libtheora/libtheora-1.2.0.patch
================================================
diff -Naur libtheora-1.2.0alpha1.orig/lib/arm/armcpu.c libtheora-1.2.0alpha1/lib/arm/armcpu.c
--- libtheora-1.2.0alpha1.orig/lib/arm/armcpu.c 2020-05-06 15:19:58.912792332 -0700
+++ libtheora-1.2.0alpha1/lib/arm/armcpu.c 2020-05-06 15:17:05.241797764 -0700
@@ -111,6 +111,20 @@
/*The feature registers which can tell us what the processor supports are
accessible in priveleged modes only, so we can't have a general user-space
detection method like on x86.*/
-# error "Configured to use ARM asm but no CPU detection method available for " \
- "your platform. Reconfigure with --disable-asm (or send patches)."
+
+ogg_uint32_t oc_cpu_flags_get(void){
+ ogg_uint32_t flags;
+ flags=0;
+
+#if defined(OC_ARM_ASM_EDSP)
+ flags|=OC_CPU_ARM_EDSP;
+#elif defined(OC_ARM_ASM_MEDIA)
+ flags|=OC_ARM_ASM_MEDIA;
+#elif defined(OC_ARM_ASM_NEON)
+ flags|=OC_ARM_ASM_NEON;
+#endif
+
+ return flags;
+}
+
#endif
================================================
FILE: armv4t/libvorbisidec/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=armv4t-libvorbisidec
pkgver=1.2.1
pkgrel=1
pkgdesc='Fixed-point version of the Ogg Vorbis decoder (for armv4t homebrew development)'
arch=('any')
url="http://xiph.org"
license=('LGPL')
options=(!strip libtool staticlibs)
source=("https://downloads.devkitpro.org/packages/sources/libvorbisidec-${pkgver}.tar.xz")
sha256sums=('6ae33489ed40b54ab4a1cd0cf349e9b3b1d5c68d722485704d951f4bf80c64c6')
makedepends=('dkp-toolchain-vars' 'armv4t-pkg-config')
depends=('armv4t-libogg')
groups=('armv4t-portlibs')
build() {
cd libvorbisidec-$pkgver
source /opt/devkitpro/armv4tvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi
make
}
package() {
cd libvorbisidec-$pkgver
source /opt/devkitpro/armv4tvars.sh
make DESTDIR="$pkgdir" install
# license
install -Dm644 COPYING "$pkgdir"${PORTLIBS_PREFIX}/licenses/$pkgname/COPYING
}
================================================
FILE: armv4t/libxmp/PKGBUILD
================================================
pkgname=armv4t-libxmp
pkgver=4.4.1
pkgrel=1
pkgdesc="Library that supports over 90 module formats"
arch=('any')
url="http://xmp.sourceforge.net/"
license=('GPL')
options=(!strip libtool staticlibs)
source=("http://download.sourceforge.net/project/xmp/libxmp/$pkgver/libxmp-$pkgver.tar.gz" "libxmp.patch")
sha256sums=('353535cc84c8cddae8decec4e65fa4c51fc64f22eb0891bc3dae6eaf25f9cccf' 'f63e0e3aa4197423d82c0cff42a400ca5182a4a56b62bd087e32e7913ed7f42d')
makedepends=('dkp-toolchain-vars')
groups=("armv4t-portlibs")
build() {
cd "libxmp-$pkgver"
patch -Np1 -i $srcdir/libxmp.patch
source /opt/devkitpro/armv4tvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd "libxmp-$pkgver"
source /opt/devkitpro/armv4tvars.sh
make DESTDIR="$pkgdir/" install
}
================================================
FILE: armv4t/libxmp/libxmp.patch
================================================
diff -NBaur libxmp-4.4.1-old/src/load.c libxmp-4.4.1-new/src/load.c
--- libxmp-4.4.1-old/src/load.c 2016-10-12 11:30:03.000000000 +0100
+++ libxmp-4.4.1-new/src/load.c 2019-09-22 21:13:57.155910284 +0100
@@ -82,6 +82,7 @@
static int execute_command(char *cmd, char *filename, FILE *t)
{
+#if defined(HAVE_POPEN) || defined(WIN32)
char line[1024], buf[BUFLEN];
FILE *p;
int n;
@@ -111,7 +112,7 @@
}
pclose (p);
-
+#endif
return 0;
}
@@ -171,7 +172,7 @@
return 0;
}
-#if defined __ANDROID__ || defined __native_client__
+#if defined __ANDROID__ || defined __native_client__ || !defined(HAVE_POPEN)
/* Don't use external helpers in android */
if (cmd) {
return 0;
================================================
FILE: armv4t/mikmod/PKGBUILD
================================================
# Maintainer: Dave Murphy <davem@devkitpro.org>
pkgname=armv4t-mikmod
pkgver=3.3.11.1
pkgrel=1
pkgdesc="Amodule player and library supporting many formats, including mod, s3m, it, and xm (armv4t port)"
arch=('any')
url="http://mikmod.sourceforge.net/"
license=("LGPL")
options=(!strip libtool staticlibs)
makedepends=(
'dkp-toolchain-vars'
)
source=("https://sourceforge.net/projects/mikmod/files/libmikmod/$pkgver/libmikmod-$pkgver.tar.gz")
sha256sums=(
'ad9d64dfc8f83684876419ea7cd4ff4a41d8bcd8c23ef37ecb3a200a16b46d19'
)
groups=("armv4t-portlibs")
build() {
cd libmikmod-$pkgver
source /opt/devkitpro/armv4tvars.sh
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --enable-static
make
}
package() {
cd libmikmod-$pkgver
source /opt/devkitpro/armv4tvars.sh
make DESTDIR="$pkgdir" install
rm -fr "$pkgdir"${PORTLIBS_PREFIX}/share
}
================================================
FILE: armv4t/mpg123/PKGBUILD
================================================
# Maintainer: Gabriel Kind <gabriel-dkp mastergk de>
pkgname=armv4t-mpg123
pkgver=1.31.3
pkgrel=2
pkgdesc="A real time MPEG audio decoder for layer 1, 2 and 3"
arch=('any')
url="http://sourceforge.net/projects/mpg123"
license=('LGPL2.1')
options=(!strip libtool staticlibs)
groups=("armv4t-portlibs")
source=(
"https://downloads.sourceforge.net/sourceforge/mpg123/mpg123-${pkgver}.tar.bz2"
"mpg123-${pkgver}.patch"
)
makedepends=('dkp-toolchain-vars')
build() {
cd mpg123-$pkgver
source /opt/devkitpro/armv4tvars.sh
patch -Np1 -i "$srcdir"/mpg123-${pkgver}.patch
autoreconf -fi
./configure --prefix="${PORTLIBS_PREFIX}" --host=arm-none-eabi \
--disable-shared --e
gitextract_utdhukg8/
├── .gitattributes
├── .gitignore
├── 3ds/
│ ├── SDL/
│ │ ├── PKGBUILD
│ │ └── SDL-1.2.15.patch
│ ├── SDL_gfx/
│ │ └── PKGBUILD
│ ├── SDL_image/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── SDL_mixer/
│ │ └── PKGBUILD
│ ├── SDL_ttf/
│ │ └── PKGBUILD
│ ├── TinyXML2/
│ │ └── PKGBUILD
│ ├── WildMidi/
│ │ ├── PKGBUILD
│ │ └── wildmidi-0.4.3.patch
│ ├── box2d/
│ │ └── PKGBUILD
│ ├── bulletphysics/
│ │ ├── PKGBUILD
│ │ └── bulletphysics.patch
│ ├── bzip2/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── curl/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── curl-8.4.0.patch
│ ├── flac/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── flac-1.3.4.patch
│ ├── flite/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── freetype/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── giflib/
│ │ └── PKGBUILD
│ ├── jansson/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libarchive/
│ │ ├── PKGBUILD
│ │ └── libarchive-3.7.4.patch
│ ├── libconfig/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── libconfig.patch
│ ├── libfribidi/
│ │ └── PKGBUILD
│ ├── libiconv/
│ │ ├── PKGBUILD
│ │ └── libiconv-1.17.patch
│ ├── libid3tag/
│ │ └── PKGBUILD
│ ├── libjpeg-turbo/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libjson-c/
│ │ ├── PKGBUILD
│ │ └── json-c-0.16.patch
│ ├── liblzma/
│ │ └── PKGBUILD
│ ├── libmad/
│ │ └── PKGBUILD
│ ├── libmodplug/
│ │ ├── PKGBUILD
│ │ └── libmodplug-0.8.9.0.patch
│ ├── libogg/
│ │ └── PKGBUILD
│ ├── libopus/
│ │ └── PKGBUILD
│ ├── libpng/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libsidplay/
│ │ ├── PKGBUILD
│ │ └── libsidplay-1.36.60.patch
│ ├── libtheora/
│ │ ├── PKGBUILD
│ │ └── libtheora-1.2.0.patch
│ ├── libvorbisidec/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libxmp/
│ │ └── PKGBUILD
│ ├── libzstd/
│ │ ├── PKGBUILD
│ │ └── zstd-1.5.5.patch
│ ├── lua51/
│ │ └── PKGBUILD
│ ├── lz4/
│ │ └── PKGBUILD
│ ├── mbedtls/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── mbedtls-2.28.8.patch
│ ├── mikmod/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── mpg123/
│ │ ├── PKGBUILD
│ │ └── mpg123-1.31.3.patch
│ ├── opusfile/
│ │ └── PKGBUILD
│ ├── physfs/
│ │ ├── PKGBUILD
│ │ └── physfs-3.2.0.patch
│ ├── pkg-config/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── pkg-config.in
│ ├── wslay/
│ │ └── PKGBUILD
│ ├── yaml_cpp/
│ │ └── PKGBUILD
│ └── zlib/
│ ├── .gitignore
│ └── PKGBUILD
├── 3ds-examples/
│ └── PKGBUILD
├── README.md
├── armv4t/
│ ├── bzip2/
│ │ └── PKGBUILD
│ ├── flac/
│ │ ├── PKGBUILD
│ │ └── flac-1.3.2.patch
│ ├── flite/
│ │ └── PKGBUILD
│ ├── freetype/
│ │ └── PKGBUILD
│ ├── libconfig/
│ │ ├── PKGBUILD
│ │ └── libconfig.patch
│ ├── libexpat/
│ │ └── PKGBUILD
│ ├── libid3tag/
│ │ └── PKGBUILD
│ ├── liblzma/
│ │ └── PKGBUILD
│ ├── libmad/
│ │ ├── PKGBUILD
│ │ └── libmad-0.15.1b.patch
│ ├── libogg/
│ │ └── PKGBUILD
│ ├── libpng/
│ │ └── PKGBUILD
│ ├── libtheora/
│ │ ├── PKGBUILD
│ │ └── libtheora-1.2.0.patch
│ ├── libvorbisidec/
│ │ └── PKGBUILD
│ ├── libxmp/
│ │ ├── PKGBUILD
│ │ └── libxmp.patch
│ ├── mikmod/
│ │ └── PKGBUILD
│ ├── mpg123/
│ │ ├── PKGBUILD
│ │ ├── mpg123-1.25.10.patch
│ │ └── mpg123-1.31.3.patch
│ ├── pkg-config/
│ │ ├── PKGBUILD
│ │ └── pkg-config.in
│ └── zlib/
│ └── PKGBUILD
├── calico/
│ └── PKGBUILD
├── citro2d/
│ └── PKGBUILD
├── citro3d/
│ └── PKGBUILD
├── cmake/
│ ├── 3ds/
│ │ ├── 3DS.cmake
│ │ ├── Nintendo3DS.cmake
│ │ ├── PKGBUILD
│ │ └── arm-none-eabi-cmake
│ ├── catnip/
│ │ └── PKGBUILD
│ ├── common-utils/
│ │ ├── Generic-dkP.cmake
│ │ ├── PKGBUILD
│ │ ├── dkp-asset-folder.cmake
│ │ ├── dkp-custom-target.cmake
│ │ ├── dkp-embedded-binary.cmake
│ │ ├── dkp-impl-helpers.cmake
│ │ ├── dkp-initialize-path.cmake
│ │ ├── dkp-linker-utils.cmake
│ │ ├── dkp-rule-overrides.cmake
│ │ └── dkp-toolchain-common.cmake
│ ├── devkita64/
│ │ ├── PKGBUILD
│ │ ├── aarch64-none-elf-cmake
│ │ └── devkitA64.cmake
│ ├── devkitarm/
│ │ ├── PKGBUILD
│ │ ├── arm-none-eabi-cmake
│ │ ├── devkitARM.cmake
│ │ ├── dkp-arm-mode-wrapper
│ │ ├── dkp-gba-ds-common.cmake
│ │ └── dkp-gba-ds-utils.cmake
│ ├── devkitppc/
│ │ ├── PKGBUILD
│ │ ├── devkitPPC.cmake
│ │ └── powerpc-eabi-cmake
│ ├── gamecube/
│ │ ├── GameCube.cmake
│ │ ├── NintendoGameCube.cmake
│ │ ├── PKGBUILD
│ │ └── powerpc-eabi-cmake
│ ├── gba/
│ │ ├── GBA.cmake
│ │ ├── NintendoGBA.cmake
│ │ ├── PKGBUILD
│ │ └── arm-none-eabi-cmake
│ ├── nds/
│ │ ├── NDS.cmake
│ │ ├── NintendoDS.cmake
│ │ ├── PKGBUILD
│ │ └── arm-none-eabi-cmake
│ ├── ogc/
│ │ ├── PKGBUILD
│ │ ├── libogc.cmake
│ │ └── ogc-common.cmake
│ ├── switch/
│ │ ├── NintendoSwitch.cmake
│ │ ├── PKGBUILD
│ │ ├── Switch.cmake
│ │ └── aarch64-none-elf-cmake
│ ├── wii/
│ │ ├── NintendoWii.cmake
│ │ ├── PKGBUILD
│ │ ├── Wii.cmake
│ │ └── powerpc-eabi-cmake
│ └── wiiu/
│ ├── CafeOS.cmake
│ ├── PKGBUILD
│ ├── WiiU.cmake
│ └── powerpc-eabi-cmake
├── default-arm7/
│ └── PKGBUILD
├── deko3d/
│ └── PKGBUILD
├── devkita64/
│ ├── devkitA64/
│ │ └── PKGBUILD
│ ├── devkita64-rules/
│ │ └── PKGBUILD
│ └── newlib/
│ └── PKGBUILD
├── devkitarm/
│ ├── devkitARM/
│ │ └── PKGBUILD
│ ├── devkitarm-crtls/
│ │ └── PKGBUILD
│ ├── devkitarm-rules/
│ │ └── PKGBUILD
│ └── newlib/
│ └── PKGBUILD
├── devkitppc/
│ ├── devkitPPC/
│ │ └── PKGBUILD
│ ├── devkitppc-crtls/
│ │ └── PKGBUILD
│ ├── devkitppc-rules/
│ │ └── PKGBUILD
│ └── newlib/
│ └── PKGBUILD
├── dkp-meson-scripts/
│ ├── PKGBUILD
│ ├── meson-cross.sh
│ └── meson-toolchain.sh
├── dkp-toolchain-vars/
│ ├── 3dsvars.sh
│ ├── PKGBUILD
│ ├── armv4tvars.sh
│ ├── cubevars.sh
│ ├── devkita64.sh
│ ├── devkitarm.sh
│ ├── devkitppc.sh
│ ├── ndsvars.sh
│ ├── portlibs_prefix.sh
│ ├── ppcvars.sh
│ ├── switchvars.sh
│ ├── wiiuvars.sh
│ └── wiivars.sh
├── dswifi/
│ └── PKGBUILD
├── gamecube/
│ ├── SDL/
│ │ ├── PKGBUILD
│ │ ├── SDL-1.2.15.patch
│ │ └── config.site
│ ├── SDL2/
│ │ ├── PKGBUILD
│ │ └── SDL2-2.28.5.patch
│ ├── SDL2_gfx/
│ │ └── PKGBUILD
│ ├── SDL2_image/
│ │ ├── Makefile.in.patch
│ │ └── PKGBUILD
│ ├── SDL2_mixer/
│ │ ├── PKGBUILD
│ │ └── sdl2_mixer-config.cmake.in.patch
│ ├── SDL2_ttf/
│ │ └── PKGBUILD
│ ├── SDL_gfx/
│ │ ├── PKGBUILD
│ │ └── SDL_gfx-2.0.25.patch
│ ├── SDL_image/
│ │ └── PKGBUILD
│ ├── SDL_mixer/
│ │ ├── PKGBUILD
│ │ └── SDL_mixer-1.2.12.patch
│ ├── SDL_ttf/
│ │ ├── PKGBUILD
│ │ └── SDL_ttf-2.0.11.patch
│ ├── freeglut/
│ │ ├── PKGBUILD
│ │ └── freeglut-3.6.0.patch
│ ├── glu/
│ │ ├── LICENSE
│ │ └── PKGBUILD
│ ├── opengx/
│ │ └── PKGBUILD
│ ├── physfs/
│ │ ├── PKGBUILD
│ │ └── physfs-3.2.0.patch
│ └── pkg-config/
│ ├── PKGBUILD
│ └── pkg-config.in
├── gamecube-examples/
│ └── PKGBUILD
├── gba/
│ └── pkg-config/
│ ├── PKGBUILD
│ └── pkg-config.in
├── gba-examples/
│ └── PKGBUILD
├── gp2x/
│ ├── gp2x-core/
│ │ └── PKGBUILD
│ ├── gp2x-examples/
│ │ └── PKGBUILD
│ ├── libfat/
│ │ └── PKGBUILD
│ ├── liborcus/
│ │ └── PKGBUILD
│ └── pkg-config/
│ ├── PKGBUILD
│ └── pkg-config.in
├── gp32-examples/
│ └── PKGBUILD
├── libctru/
│ └── PKGBUILD
├── libfat/
│ └── PKGBUILD
├── libfilesystem/
│ └── PKGBUILD
├── libgba/
│ └── PKGBUILD
├── libgxflux/
│ ├── PKGBUILD
│ └── libgxflux-destdir.patch
├── libmirko/
│ └── PKGBUILD
├── libnds/
│ ├── 0001-fix-within-comment.patch
│ └── PKGBUILD
├── libnx/
│ └── PKGBUILD
├── libogc/
│ └── PKGBUILD
├── libtonc/
│ └── PKGBUILD
├── maxmod/
│ └── PKGBUILD
├── nds/
│ ├── bzip2/
│ │ └── PKGBUILD
│ ├── freetype/
│ │ └── PKGBUILD
│ ├── libexpat/
│ │ └── PKGBUILD
│ ├── libmad/
│ │ ├── PKGBUILD
│ │ └── libmad-0.15.1b.patch
│ ├── libpng/
│ │ └── PKGBUILD
│ ├── pkg-config/
│ │ ├── PKGBUILD
│ │ └── pkg-config.in
│ └── zlib/
│ └── PKGBUILD
├── nds-examples/
│ └── PKGBUILD
├── pkgbuild-scripts/
│ ├── .gitignore
│ ├── PKGBUILD
│ └── pkgbuild-scripts.install
├── ppc/
│ ├── TinyXML2/
│ │ └── PKGBUILD
│ ├── box2d/
│ │ └── PKGBUILD
│ ├── brotli/
│ │ ├── PKGBUILD
│ │ └── brotli-1.2.0.patch
│ ├── bzip2/
│ │ └── PKGBUILD
│ ├── faad2/
│ │ └── PKGBUILD
│ ├── flac/
│ │ └── PKGBUILD
│ ├── freetype/
│ │ └── PKGBUILD
│ ├── giflib/
│ │ └── PKGBUILD
│ ├── glm/
│ │ ├── PKGBUILD
│ │ └── glm-1.0.2-ppc.patch
│ ├── harfbuzz/
│ │ └── PKGBUILD
│ ├── jansson/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── json-cpp/
│ │ └── PKGBUILD
│ ├── libconfig/
│ │ └── PKGBUILD
│ ├── libexpat/
│ │ └── PKGBUILD
│ ├── libfribidi/
│ │ └── PKGBUILD
│ ├── libgd/
│ │ ├── PKGBUILD
│ │ └── libgd-2.3.3.patch
│ ├── libjpeg-turbo/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── liblzma/
│ │ └── PKGBUILD
│ ├── libmad/
│ │ ├── PKGBUILD
│ │ ├── frame_length.patch
│ │ ├── optimise.diff
│ │ └── pkg-config.patch
│ ├── libmodplug/
│ │ └── PKGBUILD
│ ├── libogg/
│ │ └── PKGBUILD
│ ├── libopus/
│ │ └── PKGBUILD
│ ├── libpng/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libtheora/
│ │ ├── PKGBUILD
│ │ ├── config.guess
│ │ └── config.sub
│ ├── libvorbis/
│ │ └── PKGBUILD
│ ├── libvorbisidec/
│ │ └── PKGBUILD
│ ├── libwebp/
│ │ └── PKGBUILD
│ ├── libzip/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── lua51/
│ │ └── PKGBUILD
│ ├── lz4/
│ │ └── PKGBUILD
│ ├── mpg123/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── mxml/
│ │ └── PKGBUILD
│ ├── ode/
│ │ └── PKGBUILD
│ ├── opusfile/
│ │ └── PKGBUILD
│ ├── pkg-config/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── pkg-config.in
│ ├── yaml_cpp/
│ │ └── PKGBUILD
│ ├── zlib/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ └── zstd/
│ ├── PKGBUILD
│ └── zstd-1.5.7.patch
├── switch/
│ ├── SDL2/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── SDL2-2.28.5.patch
│ ├── SDL2_gfx/
│ │ ├── PKGBUILD
│ │ ├── config.guess
│ │ └── config.sub
│ ├── SDL2_image/
│ │ ├── Makefile.in.patch
│ │ └── PKGBUILD
│ ├── SDL2_mixer/
│ │ └── PKGBUILD
│ ├── SDL2_net/
│ │ └── PKGBUILD
│ ├── SDL2_ttf/
│ │ └── PKGBUILD
│ ├── TinyXML2/
│ │ └── PKGBUILD
│ ├── box2d/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── bulletphysics/
│ │ ├── PKGBUILD
│ │ └── bulletphysics.patch
│ ├── bzip2/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── curl/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── switch-curl.patch
│ ├── dav1d/
│ │ ├── PKGBUILD
│ │ └── dav1d.patch
│ ├── enet/
│ │ └── PKGBUILD
│ ├── ffmpeg/
│ │ ├── PKGBUILD
│ │ ├── ffmpeg-7.1.patch
│ │ └── tls.patch
│ ├── flac/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── flac-1.3.2.patch
│ ├── freetype/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── giflib/
│ │ └── PKGBUILD
│ ├── glad/
│ │ └── PKGBUILD
│ ├── glfw/
│ │ ├── PKGBUILD
│ │ └── switch-glfw-3.3.4.patch
│ ├── glm/
│ │ └── PKGBUILD
│ ├── glu/
│ │ ├── LICENSE
│ │ ├── PKGBUILD
│ │ └── glu-9.0.3-meson-enable-egl-arg.patch
│ ├── harfbuzz/
│ │ └── PKGBUILD
│ ├── jansson/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libarchive/
│ │ ├── PKGBUILD
│ │ └── libarchive-3.7.2.patch
│ ├── libass/
│ │ └── PKGBUILD
│ ├── libavif/
│ │ ├── CMakeLists.txt.patch
│ │ └── PKGBUILD
│ ├── libconfig/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── libconfig.patch
│ ├── libdrm_nouveau/
│ │ └── PKGBUILD
│ ├── libexpat/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libfribidi/
│ │ └── PKGBUILD
│ ├── libgd/
│ │ ├── PKGBUILD
│ │ └── libgd-2.2.5-nosyslog.patch
│ ├── libjpeg-turbo/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── libjpeg-turbo.patch
│ ├── libjson-c/
│ │ ├── PKGBUILD
│ │ └── json-c-0.16.patch
│ ├── liblzma/
│ │ └── PKGBUILD
│ ├── liblzo2/
│ │ └── PKGBUILD
│ ├── libmad/
│ │ └── PKGBUILD
│ ├── libmikmod/
│ │ ├── PKGBUILD
│ │ └── libmikmod-switch-support.patch
│ ├── libmodplug/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── libmodplug-0.8.9.0.patch
│ ├── libmpeg2/
│ │ └── PKGBUILD
│ ├── libmpv/
│ │ ├── PKGBUILD
│ │ └── mpv.patch
│ ├── libogg/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libopus/
│ │ └── PKGBUILD
│ ├── libpcre2/
│ │ └── PKGBUILD
│ ├── libplacebo/
│ │ └── PKGBUILD
│ ├── libpng/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libsamplerate/
│ │ ├── PKGBUILD
│ │ └── libsamplerate-0.1.9.patch
│ ├── libsodium/
│ │ └── PKGBUILD
│ ├── libssh2/
│ │ ├── PKGBUILD
│ │ └── disable-tests.patch
│ ├── libtheora/
│ │ ├── PKGBUILD
│ │ ├── config.guess
│ │ └── config.sub
│ ├── libtimidity/
│ │ └── PKGBUILD
│ ├── libvorbis/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ ├── libvorbisidec/
│ │ └── PKGBUILD
│ ├── libvpx/
│ │ ├── PKGBUILD
│ │ └── libvpx.patch
│ ├── libwebp/
│ │ └── PKGBUILD
│ ├── libxml2/
│ │ └── PKGBUILD
│ ├── libzstd/
│ │ └── PKGBUILD
│ ├── lua51/
│ │ └── PKGBUILD
│ ├── lwext4/
│ │ ├── PKGBUILD
│ │ └── lwext4-1.0.0.patch
│ ├── lz4/
│ │ └── PKGBUILD
│ ├── mbedtls/
│ │ ├── PKGBUILD
│ │ └── mbedtls-2.28.10.patch
│ ├── mesa/
│ │ ├── OpenGLConfig.cmake
│ │ ├── PKGBUILD
│ │ ├── glX_XML.py.patch
│ │ ├── gl_XML.py.patch
│ │ └── switch-mesa-20.1.0-5.patch
│ ├── miniupnpc/
│ │ ├── PKGBUILD
│ │ └── miniupnpc.patch
│ ├── mpg123/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── mpg123-1.31.3.patch
│ ├── mupdf/
│ │ ├── PKGBUILD
│ │ └── mupdf.patch
│ ├── ntfs-3g/
│ │ ├── PKGBUILD
│ │ └── ntfs-3g-2022.10.3.patch
│ ├── ode/
│ │ └── PKGBUILD
│ ├── oniguruma/
│ │ └── PKGBUILD
│ ├── openal-soft/
│ │ ├── PKGBUILD
│ │ └── avoid-readlink.patch
│ ├── opusfile/
│ │ └── PKGBUILD
│ ├── physfs/
│ │ ├── PKGBUILD
│ │ └── physfs-3.2.0.patch
│ ├── pkg-config/
│ │ ├── .gitignore
│ │ ├── PKGBUILD
│ │ └── pkg-config.in
│ ├── smpeg2/
│ │ ├── PKGBUILD
│ │ ├── config.guess
│ │ ├── config.sub
│ │ └── smpeg2-2.0.0.patch
│ ├── wslay/
│ │ └── PKGBUILD
│ ├── xxhash/
│ │ └── PKGBUILD
│ ├── zlib/
│ │ ├── .gitignore
│ │ └── PKGBUILD
│ └── zziplib/
│ ├── PKGBUILD
│ └── zziplib-0.13.78.patch
├── switch-examples/
│ └── PKGBUILD
├── wii/
│ ├── SDL/
│ │ ├── PKGBUILD
│ │ ├── SDL-1.2.15.patch
│ │ └── config.site
│ ├── SDL2/
│ │ ├── PKGBUILD
│ │ └── SDL2-2.28.5.patch
│ ├── SDL2_gfx/
│ │ └── PKGBUILD
│ ├── SDL2_image/
│ │ ├── Makefile.in.patch
│ │ └── PKGBUILD
│ ├── SDL2_mixer/
│ │ ├── PKGBUILD
│ │ └── sdl2_mixer-config.cmake.in.patch
│ ├── SDL2_ttf/
│ │ └── PKGBUILD
│ ├── SDL_gfx/
│ │ └── PKGBUILD
│ ├── SDL_image/
│ │ └── PKGBUILD
│ ├── SDL_mixer/
│ │ ├── PKGBUILD
│ │ └── SDL_mixer-1.2.12.patch
│ ├── SDL_ttf/
│ │ ├── PKGBUILD
│ │ └── SDL_ttf-2.0.11.patch
│ ├── freeglut/
│ │ ├── PKGBUILD
│ │ └── freeglut-3.6.0.patch
│ ├── glu/
│ │ ├── LICENSE
│ │ └── PKGBUILD
│ ├── opengx/
│ │ └── PKGBUILD
│ ├── physfs/
│ │ ├── PKGBUILD
│ │ └── physfs-3.2.0.patch
│ └── pkg-config/
│ ├── PKGBUILD
│ └── pkg-config.in
└── wii-examples/
└── PKGBUILD
Condensed preview — 478 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,623K chars).
[
{
"path": ".gitattributes",
"chars": 11,
"preview": "* text=lf\n\n"
},
{
"path": ".gitignore",
"chars": 80,
"preview": "sources\npackages\n*.tar.xz\nsrc\npkg\n*.pkg.tar.xz*\n*.tar.gz\n*.tar.bz2\n*.tar.zst\n*~\n"
},
{
"path": "3ds/SDL/PKGBUILD",
"chars": 1115,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=3ds-sdl\npkgver=1.2.15\npkgrel=19\npkgdesc=\"A library for portabl"
},
{
"path": "3ds/SDL/SDL-1.2.15.patch",
"chars": 77929,
"preview": "diff --git a/build-scripts/makedep.sh b/build-scripts/makedep.sh\nindex 3b3863b4c2..f24b851b2f 100755\n--- a/build-scripts"
},
{
"path": "3ds/SDL_gfx/PKGBUILD",
"chars": 1060,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=3ds-sdl_gfx\npkgver=2.0.25\npkgrel=2\npkgdesc=\"Graphics drawing p"
},
{
"path": "3ds/SDL_image/.gitignore",
"chars": 14,
"preview": "3ds-sdl_image\n"
},
{
"path": "3ds/SDL_image/PKGBUILD",
"chars": 1068,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=3ds-sdl_image\npkgver=1.2.12\npkgrel=3\npkgdesc=\"A simple library"
},
{
"path": "3ds/SDL_mixer/PKGBUILD",
"chars": 1315,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=3ds-sdl_mixer\npkgver=1.2.12\npkgrel=9\npkgdesc=\"A simple multi-c"
},
{
"path": "3ds/SDL_ttf/PKGBUILD",
"chars": 911,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=3ds-sdl_ttf\npkgver=2.0.11\npkgrel=2\npkgdesc=\"A sample library w"
},
{
"path": "3ds/TinyXML2/PKGBUILD",
"chars": 1169,
"preview": "\n# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=3ds-tinyxml2\npkgver=6.0.0\npkgrel=2\npkgdesc='A simple, small, eff"
},
{
"path": "3ds/WildMidi/PKGBUILD",
"chars": 1170,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\n# Contributor: oreo639 <oreo6391@gmail.com>\n\npkgname=3ds-wildmidi\npkgver="
},
{
"path": "3ds/WildMidi/wildmidi-0.4.3.patch",
"chars": 1401,
"preview": "diff -Naur wildmidi-wildmidi-0.4.2-orig/src/CMakeLists.txt wildmidi-wildmidi-0.4.2/src/CMakeLists.txt\n--- wildmidi-wildm"
},
{
"path": "3ds/box2d/PKGBUILD",
"chars": 800,
"preview": "# Maintainer: TurtleP <jpostelnek@outlook.com>\n\npkgbasename=box2d\npkgname=3ds-$pkgbasename\npkgver=2.4.1\npkgrel=1\npkgdesc"
},
{
"path": "3ds/bulletphysics/PKGBUILD",
"chars": 1469,
"preview": "\n# Maintainer: fincs <fincs.alt1@gmail.com>\npkgname=3ds-bulletphysics\npkgver=2.87\npkgrel=5\npkgdesc='Bullet Physics SDK: "
},
{
"path": "3ds/bulletphysics/bulletphysics.patch",
"chars": 1566,
"preview": "--- bullet3-2.87/CMakeLists.txt\t2017-09-30 00:20:39.000000000 +0100\n+++ bullet3-2.87-3ds/CMakeLists.txt\t2018-11-20 01:14"
},
{
"path": "3ds/bzip2/.gitignore",
"chars": 10,
"preview": "3ds-bzip2\n"
},
{
"path": "3ds/bzip2/PKGBUILD",
"chars": 1190,
"preview": "\n# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=('3ds-bzip2')\npkgver=1.0.8\npkgrel=1\npkgdesc=\"A high-quality da"
},
{
"path": "3ds/curl/.gitignore",
"chars": 9,
"preview": "3ds-curl\n"
},
{
"path": "3ds/curl/PKGBUILD",
"chars": 1780,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\n# Contributor: Elouan Martinet <exa@elou.world>\n\npkgname=3ds-curl\npkgver="
},
{
"path": "3ds/curl/curl-8.4.0.patch",
"chars": 1415,
"preview": "diff --git a/lib/cf-socket.c b/lib/cf-socket.c\nindex ce3f9e943..62d1ed4a3 100644\n--- a/lib/cf-socket.c\n+++ b/lib/cf-sock"
},
{
"path": "3ds/flac/.gitignore",
"chars": 9,
"preview": "3ds-flac\n"
},
{
"path": "3ds/flac/PKGBUILD",
"chars": 1111,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n# Contributor: cpasjuste <cpasjuste@gmail.com>\n# Contributor: oreo639 <"
},
{
"path": "3ds/flac/flac-1.3.4.patch",
"chars": 1764,
"preview": "diff -Naur flac-1.3.4.orig/include/share/compat.h flac-1.3.4/include/share/compat.h\n--- flac-1.3.4.orig/include/share/co"
},
{
"path": "3ds/flite/.gitignore",
"chars": 9,
"preview": "3ds-flite"
},
{
"path": "3ds/flite/PKGBUILD",
"chars": 1141,
"preview": "pkgname=3ds-flite\npkgver=2.1\npkgrel=2\npkgdesc='A small fast portable speech synthesis system'\narch=('any')\nurl='http://f"
},
{
"path": "3ds/freetype/.gitignore",
"chars": 13,
"preview": "3ds-freetype\n"
},
{
"path": "3ds/freetype/PKGBUILD",
"chars": 1508,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=\"3ds-freetype\"\npkgver=2.14.1\npkgrel=1\npkgdesc=\"TrueType font re"
},
{
"path": "3ds/giflib/PKGBUILD",
"chars": 920,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n# Contributor: Colin969 <colinb969@gmail.com>\npkgname=3ds-giflib\npkgver"
},
{
"path": "3ds/jansson/.gitignore",
"chars": 12,
"preview": "3ds-jansson\n"
},
{
"path": "3ds/jansson/PKGBUILD",
"chars": 979,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n# Contributor: Cpasjuste <cpasjuste@gmail.com>\n\npkgname=3ds-jansson\npkg"
},
{
"path": "3ds/libarchive/PKGBUILD",
"chars": 1347,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=3ds-libarchive\npkgver=3.7.4\npkgrel=1\npkgdesc='library that can"
},
{
"path": "3ds/libarchive/libarchive-3.7.4.patch",
"chars": 5786,
"preview": "diff --git a/libarchive/archive_read_disk_posix.c b/libarchive/archive_read_disk_posix.c\nindex 76a4fa44..efd192ec 100644"
},
{
"path": "3ds/libconfig/.gitignore",
"chars": 14,
"preview": "3ds-libconfig\n"
},
{
"path": "3ds/libconfig/PKGBUILD",
"chars": 1236,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=3ds-libconfig\npkgver=1.7.2\npkgrel=3\npkgdesc='C/C++ Configurati"
},
{
"path": "3ds/libconfig/libconfig.patch",
"chars": 1379,
"preview": "diff -Naur libconfig-1.7.2-ori/lib/libconfig.c libconfig-1.7.2-new/lib/libconfig.c\n--- libconfig-1.7.2-ori/lib/libconfig"
},
{
"path": "3ds/libfribidi/PKGBUILD",
"chars": 1105,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n# Contributor: carstene1ns <dev f4ke de>\n\npkgname=3ds-libfribidi\npkgver="
},
{
"path": "3ds/libiconv/PKGBUILD",
"chars": 967,
"preview": "pkgname=3ds-libiconv\npkgver=1.17\npkgrel=1\npkgdesc=''\narch=('any')\nurl='https://www.gnu.org/software/libiconv/'\nlicense=("
},
{
"path": "3ds/libiconv/libiconv-1.17.patch",
"chars": 449,
"preview": "--- Makefile.in~\t2023-06-12 18:17:08\n+++ Makefile.in\t2023-06-12 18:20:01\n@@ -31,11 +31,6 @@\n \n all : lib/localcharset.h "
},
{
"path": "3ds/libid3tag/PKGBUILD",
"chars": 1012,
"preview": "\n# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=3ds-libid3tag\npkgver=0.15.1b\npkgrel=2\npkgdesc='A library for rea"
},
{
"path": "3ds/libjpeg-turbo/.gitignore",
"chars": 18,
"preview": "3ds-libjpeg-turbo\n"
},
{
"path": "3ds/libjpeg-turbo/PKGBUILD",
"chars": 1115,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\n_libname=libjpeg-turbo\npkgname=3ds-${_libname}\npkgver=3.1.3\npkgrel=1\npkgd"
},
{
"path": "3ds/libjson-c/PKGBUILD",
"chars": 1040,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n# Contributor: Pablo Curiel <pabloacurielz@gmail.com>\n\npkgname=3ds-libj"
},
{
"path": "3ds/libjson-c/json-c-0.16.patch",
"chars": 1193,
"preview": "--- CMakeLists.txt.orig\t2023-03-06 22:27:27.653258333 +0000\n+++ CMakeLists.txt\t2023-03-06 22:29:07.183682590 +0000\n@@ -1"
},
{
"path": "3ds/liblzma/PKGBUILD",
"chars": 1074,
"preview": "\n# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=3ds-liblzma\npkgver=5.8.2\npkgrel=1\npkgdesc='A compression library"
},
{
"path": "3ds/libmad/PKGBUILD",
"chars": 936,
"preview": "\n# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=3ds-libmad\npkgver=0.15.1b\npkgrel=2\npkgdesc='A high-quality MPEG "
},
{
"path": "3ds/libmodplug/PKGBUILD",
"chars": 951,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n# Contributor: TurtleP <jpostelnek@outlook.com>\n\npkgname=3ds-libmodplug"
},
{
"path": "3ds/libmodplug/libmodplug-0.8.9.0.patch",
"chars": 1456,
"preview": "diff -Naur libmodplug-0.8.9.0.old/src/load_abc.cpp libmodplug-0.8.9.0/src/load_abc.cpp\n--- libmodplug-0.8.9.0.old/src/lo"
},
{
"path": "3ds/libogg/PKGBUILD",
"chars": 1221,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=3ds-libogg\npkgver=1.3.6\npkgrel=1\npkgdesc='The Ogg transport bi"
},
{
"path": "3ds/libopus/PKGBUILD",
"chars": 760,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=3ds-libopus\npkgver=1.4\npkgrel=1\npkgdesc='Reference implementat"
},
{
"path": "3ds/libpng/.gitignore",
"chars": 11,
"preview": "3ds-libpng\n"
},
{
"path": "3ds/libpng/PKGBUILD",
"chars": 1114,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n# Contributor: carstene1ns <arch carsten-teibes de> - http://git.io/ctP"
},
{
"path": "3ds/libsidplay/PKGBUILD",
"chars": 1061,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n# Contributor: badda71 <me@badda.de>\n\npkgname=3ds-libsidplay\npkgver=1.3"
},
{
"path": "3ds/libsidplay/libsidplay-1.36.60.patch",
"chars": 1169,
"preview": "--- src/samples.cpp\tWed May 22 18:38:18 2002\n+++ src/samples.cpp\tMon Mar 04 13:21:58 2019\n@@ -75,7 +75,7 @@\n sampleChann"
},
{
"path": "3ds/libtheora/PKGBUILD",
"chars": 1253,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n# Contributor: oreo639 <oreo6391@gmail.com>\n\npkgname=3ds-libtheora\npkgv"
},
{
"path": "3ds/libtheora/libtheora-1.2.0.patch",
"chars": 717,
"preview": "diff -Naur libtheora-1.2.0alpha1.orig/lib/arm/armcpu.c libtheora-1.2.0alpha1/lib/arm/armcpu.c\n--- libtheora-1.2.0alpha1."
},
{
"path": "3ds/libvorbisidec/.gitignore",
"chars": 18,
"preview": "3ds-libvorbisidec\n"
},
{
"path": "3ds/libvorbisidec/PKGBUILD",
"chars": 981,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=3ds-libvorbisidec\npkgver=1.2.1\npkgrel=3\npkgdesc='Fixed-point v"
},
{
"path": "3ds/libxmp/PKGBUILD",
"chars": 791,
"preview": "# Maintainer: Chromaryu <knight.ryu12@gmail.com>\npkgname=3ds-libxmp\npkgver=4.6.0\npkgrel=1\npkgdesc=\"Library that supports"
},
{
"path": "3ds/libzstd/PKGBUILD",
"chars": 1530,
"preview": "\n# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=3ds-libzstd\npkgver=1.5.5\npkgrel=2\npkgdesc='Zstd, short for Zstan"
},
{
"path": "3ds/libzstd/zstd-1.5.5.patch",
"chars": 4067,
"preview": "From d5e53f90cbd1ae0e999ec66e4113558c024c904e Mon Sep 17 00:00:00 2001\nFrom: Dave Murphy <davem@devkitpro.org>\nDate: Fri"
},
{
"path": "3ds/lua51/PKGBUILD",
"chars": 1602,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgsuffix=51\npkgname=(\"3ds-liblua${pkgsuffix}\")\npkgvermaj=5.1\npkgver=${"
},
{
"path": "3ds/lz4/PKGBUILD",
"chars": 615,
"preview": "# Maintainer: TurtleP <jpostelnek@outlook.com>\n\npkgname=3ds-lz4\npkgver=1.9.3\npkgrel=1\npkgdesc=\"Very fast lossless compre"
},
{
"path": "3ds/mbedtls/.gitignore",
"chars": 18,
"preview": "3ds-mbedtls\n*.tgz\n"
},
{
"path": "3ds/mbedtls/PKGBUILD",
"chars": 1840,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\n# Contributor: Elouan Martinet <exa@elou.world>\n\n_realname=mbedtls\npkgnam"
},
{
"path": "3ds/mbedtls/mbedtls-2.28.8.patch",
"chars": 1646,
"preview": "diff --git a/library/entropy.c b/library/entropy.c\nindex e9a7ae63d..b572edd2f 100644\n--- a/library/entropy.c\n+++ b/libra"
},
{
"path": "3ds/mikmod/.gitignore",
"chars": 11,
"preview": "3ds-mikmod\n"
},
{
"path": "3ds/mikmod/PKGBUILD",
"chars": 976,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=3ds-mikmod\npkgver=3.3.13\npkgrel=1\npkgdesc=\"Module player and l"
},
{
"path": "3ds/mpg123/PKGBUILD",
"chars": 1220,
"preview": "# Maintainer: Gabriel Kind <gabriel-dkp mastergk de>\n\npkgname=3ds-mpg123\npkgver=1.31.3\npkgrel=3\npkgdesc=\"A real time MPE"
},
{
"path": "3ds/mpg123/mpg123-1.31.3.patch",
"chars": 2861,
"preview": "diff -NBaur mpg123-1.31.3.orig/configure.ac mpg123-1.31.3/configure.ac\n--- mpg123-1.31.3.orig/configure.ac\t2023-03-17 17"
},
{
"path": "3ds/opusfile/PKGBUILD",
"chars": 810,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=3ds-opusfile\npkgver=0.11\npkgrel=1\npkgdesc='Library for opening"
},
{
"path": "3ds/physfs/PKGBUILD",
"chars": 1074,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n_realname=physfs\npkgname=3ds-${_realname}\npkgver=3.2.0\npkgrel=2\npkgdesc="
},
{
"path": "3ds/physfs/physfs-3.2.0.patch",
"chars": 8205,
"preview": "diff -NBaur physfs-release-3.2.0/CMakeLists.txt physfs-release-3.2.0-new/CMakeLists.txt\n--- physfs-release-3.2.0/CMakeLi"
},
{
"path": "3ds/pkg-config/.gitignore",
"chars": 15,
"preview": "3ds-pkg-config\n"
},
{
"path": "3ds/pkg-config/PKGBUILD",
"chars": 490,
"preview": "\n# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=3ds-pkg-config\npkgver=0.28\npkgrel=5\npkgdesc='pkg-config wrapper "
},
{
"path": "3ds/pkg-config/pkg-config.in",
"chars": 494,
"preview": "#!/usr/bin/env bash\n\ncommand -v pkg-config >/dev/null 2>&1 || { echo >&2 \"I require pkg-config but it's not installed. "
},
{
"path": "3ds/wslay/PKGBUILD",
"chars": 956,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=3ds-wslay\npkgver=1.1.1\npkgrel=1\npkgdesc='Wslay is a WebSocket "
},
{
"path": "3ds/yaml_cpp/PKGBUILD",
"chars": 783,
"preview": "_realname=yaml_cpp\npkgname=3ds-${_realname}\npkgver=0.8.0\npkgrel=1\npkgdesc='A YAML parser and emitter in C++ matching the"
},
{
"path": "3ds/zlib/.gitignore",
"chars": 9,
"preview": "3ds-zlib\n"
},
{
"path": "3ds/zlib/PKGBUILD",
"chars": 1209,
"preview": "\n# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=3ds-zlib\npkgver=1.3.1\npkgrel=1\npkgdesc='Deflate compression meth"
},
{
"path": "3ds-examples/PKGBUILD",
"chars": 590,
"preview": "\n# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=('3ds-examples')\npkgver=20240917\npkgrel=1\npkgdesc=\"Nintendo 3D"
},
{
"path": "README.md",
"chars": 133,
"preview": "# devkitPro portlibs\n\nAll the libraries here are installable through [devkitPro pacman](https://devkitpro.org/wiki/devki"
},
{
"path": "armv4t/bzip2/PKGBUILD",
"chars": 1083,
"preview": "\n# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=('armv4t-bzip2')\npkgver=1.0.8\npkgrel=1\npkgdesc=\"A high-quality"
},
{
"path": "armv4t/flac/PKGBUILD",
"chars": 1080,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n# Contributor: cpasjuste <cpasjuste@gmail.com>\n# Contributor: oreo639 <"
},
{
"path": "armv4t/flac/flac-1.3.2.patch",
"chars": 1761,
"preview": "diff -ur srcpure/include/share/compat.h srcpatched/include/share/compat.h\n--- srcpure/include/share/compat.h\t2016-12-07 "
},
{
"path": "armv4t/flite/PKGBUILD",
"chars": 1121,
"preview": "pkgname=armv4t-flite\npkgver=2.1\npkgrel=2\npkgdesc='A small fast portable speech synthesis system'\narch=('any')\nurl='http:"
},
{
"path": "armv4t/freetype/PKGBUILD",
"chars": 1698,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=armv4t-freetype\npkgver=2.13.0\npkgrel=1\npkgdesc='FreeType is a "
},
{
"path": "armv4t/libconfig/PKGBUILD",
"chars": 1151,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=armv4t-libconfig\npkgver=1.7.2\npkgrel=1\npkgdesc='C/C++ Configur"
},
{
"path": "armv4t/libconfig/libconfig.patch",
"chars": 1379,
"preview": "diff -Naur libconfig-1.7.2-ori/lib/libconfig.c libconfig-1.7.2-new/lib/libconfig.c\n--- libconfig-1.7.2-ori/lib/libconfig"
},
{
"path": "armv4t/libexpat/PKGBUILD",
"chars": 753,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=armv4t-libexpat\npkgver=2.2.5\npkgrel=1\npkgdesc='Expat, a stream"
},
{
"path": "armv4t/libid3tag/PKGBUILD",
"chars": 930,
"preview": "\n# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=armv4t-libid3tag\npkgver=0.15.1b\npkgrel=1\npkgdesc='A library for "
},
{
"path": "armv4t/liblzma/PKGBUILD",
"chars": 989,
"preview": "\n# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=armv4t-liblzma\npkgver=5.8.2\npkgrel=1\npkgdesc='A compression libr"
},
{
"path": "armv4t/libmad/PKGBUILD",
"chars": 1018,
"preview": "\n# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=armv4t-libmad\npkgver=0.15.1b\npkgrel=1\npkgdesc='A high-quality MP"
},
{
"path": "armv4t/libmad/libmad-0.15.1b.patch",
"chars": 1087,
"preview": "diff -ur libmad-0.15.1b/configure libmad-0.15.1b-patched/configure\n--- libmad-0.15.1b/configure\t2004-02-05 09:34:07.0000"
},
{
"path": "armv4t/libogg/PKGBUILD",
"chars": 1142,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=armv4t-libogg\npkgver=1.3.4\npkgrel=1\npkgdesc='The Ogg transport"
},
{
"path": "armv4t/libpng/PKGBUILD",
"chars": 947,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=armv4t-libpng\npkgver=1.6.48\npkgrel=1\npkgdesc='PNG format graph"
},
{
"path": "armv4t/libtheora/PKGBUILD",
"chars": 1339,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n# Contributor: oreo639 <oreo6391@gmail.com>\n\npkgname=armv4t-libtheora\np"
},
{
"path": "armv4t/libtheora/libtheora-1.2.0.patch",
"chars": 916,
"preview": "diff -Naur libtheora-1.2.0alpha1.orig/lib/arm/armcpu.c libtheora-1.2.0alpha1/lib/arm/armcpu.c\n--- libtheora-1.2.0alpha1."
},
{
"path": "armv4t/libvorbisidec/PKGBUILD",
"chars": 919,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=armv4t-libvorbisidec\npkgver=1.2.1\npkgrel=1\npkgdesc='Fixed-poin"
},
{
"path": "armv4t/libxmp/PKGBUILD",
"chars": 857,
"preview": "pkgname=armv4t-libxmp\npkgver=4.4.1\npkgrel=1\npkgdesc=\"Library that supports over 90 module formats\"\narch=('any')\nurl=\"htt"
},
{
"path": "armv4t/libxmp/libxmp.patch",
"chars": 696,
"preview": "diff -NBaur libxmp-4.4.1-old/src/load.c libxmp-4.4.1-new/src/load.c\n--- libxmp-4.4.1-old/src/load.c\t2016-10-12 11:30:03."
},
{
"path": "armv4t/mikmod/PKGBUILD",
"chars": 896,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=armv4t-mikmod\npkgver=3.3.11.1\npkgrel=1\npkgdesc=\"Amodule player"
},
{
"path": "armv4t/mpg123/PKGBUILD",
"chars": 1173,
"preview": "# Maintainer: Gabriel Kind <gabriel-dkp mastergk de>\n\npkgname=armv4t-mpg123\npkgver=1.31.3\npkgrel=2\npkgdesc=\"A real time "
},
{
"path": "armv4t/mpg123/mpg123-1.25.10.patch",
"chars": 3033,
"preview": "diff -Naur mpg123-1.25.10.old/configure.ac mpg123-1.25.10/configure.ac\n--- mpg123-1.25.10.old/configure.ac\t2018-02-27 10"
},
{
"path": "armv4t/mpg123/mpg123-1.31.3.patch",
"chars": 6106,
"preview": "diff -NBaur mpg123-1.31.3.orig/configure.ac mpg123-1.31.3/configure.ac\n--- mpg123-1.31.3.orig/configure.ac\t2023-03-17 17"
},
{
"path": "armv4t/pkg-config/PKGBUILD",
"chars": 481,
"preview": "\n# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=armv4t-pkg-config\npkgver=0.28\npkgrel=1\npkgdesc='pkg-config wrapp"
},
{
"path": "armv4t/pkg-config/pkg-config.in",
"chars": 454,
"preview": "#!/usr/bin/env bash\n\ncommand -v pkg-config >/dev/null 2>&1 || { echo >&2 \"I require pkg-config but it's not installed. "
},
{
"path": "armv4t/zlib/PKGBUILD",
"chars": 1222,
"preview": "\n# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=armv4t-zlib\npkgver=1.3\npkgrel=1\npkgdesc='Deflate compression met"
},
{
"path": "calico/PKGBUILD",
"chars": 608,
"preview": "\n# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=('calico')\npkgver=1.2.0\npkgrel=1\npkgdesc=\"RTOS-like bare metal"
},
{
"path": "citro2d/PKGBUILD",
"chars": 619,
"preview": "\n# Maintainer: fincs <fincs.alt1@gmail.com>\n\npkgname=('citro2d')\npkgver=1.7.0\npkgrel=1\npkgdesc=\"Nintendo 3DS gpu 2d help"
},
{
"path": "citro3d/PKGBUILD",
"chars": 668,
"preview": "\n# Maintainer: fincs <fincs.alt1@gmail.com>\n\npkgname=('citro3d')\npkgver=1.7.1\npkgrel=2\npkgdesc=\"Nintendo 3DS gpu library"
},
{
"path": "cmake/3ds/3DS.cmake",
"chars": 1061,
"preview": "cmake_minimum_required(VERSION 3.13)\n\nif(NOT CMAKE_SYSTEM_NAME)\n\tset(CMAKE_SYSTEM_NAME Nintendo3DS)\nendif()\n\nif(NOT CMAK"
},
{
"path": "cmake/3ds/Nintendo3DS.cmake",
"chars": 7886,
"preview": "# -----------------------------------------------------------------------------\n# Platform configuration\n\ncmake_minimum_"
},
{
"path": "cmake/3ds/PKGBUILD",
"chars": 965,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=3ds-cmake\npkgver=1.5.2\npkgrel=1\npkgdesc=\"CMake support for Ninten"
},
{
"path": "cmake/3ds/arm-none-eabi-cmake",
"chars": 100,
"preview": "#!/usr/bin/env bash\nset -e\n\nexec env CMAKE_TOOLCHAIN_FILE=\"${DEVKITPRO}/cmake/3DS.cmake\" cmake \"$@\"\n"
},
{
"path": "cmake/catnip/PKGBUILD",
"chars": 984,
"preview": "# Maintainer: fincs <fincs@devkitpro.org>\n\npkgname=('catnip')\npkgver=0.2.0\npkgrel=1\npkgdesc=\"Helper tool for devkitPro C"
},
{
"path": "cmake/common-utils/Generic-dkP.cmake",
"chars": 2717,
"preview": "# -----------------------------------------------------------------------------\n# Generic configuration for devkitPro pl"
},
{
"path": "cmake/common-utils/PKGBUILD",
"chars": 1921,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=dkp-cmake-common-utils\npkgver=1.5.3\npkgrel=1\npkgdesc=\"Common util"
},
{
"path": "cmake/common-utils/dkp-asset-folder.cmake",
"chars": 2745,
"preview": "cmake_minimum_required(VERSION 3.13)\ninclude_guard(GLOBAL)\n\ninclude(dkp-custom-target)\n\nfunction(dkp_add_asset_target ta"
},
{
"path": "cmake/common-utils/dkp-custom-target.cmake",
"chars": 1077,
"preview": "cmake_minimum_required(VERSION 3.13)\ninclude_guard(GLOBAL)\n\nfunction(dkp_set_target_file target)\n\tif (NOT ${ARGC} GREATE"
},
{
"path": "cmake/common-utils/dkp-embedded-binary.cmake",
"chars": 1996,
"preview": "cmake_minimum_required(VERSION 3.13)\ninclude_guard(GLOBAL)\n\ninclude(dkp-impl-helpers)\ninclude(dkp-custom-target)\n\nfuncti"
},
{
"path": "cmake/common-utils/dkp-impl-helpers.cmake",
"chars": 718,
"preview": "cmake_minimum_required(VERSION 3.13)\ninclude_guard(GLOBAL)\n\nfunction(__dkp_target_derive_name outvar target suffix)\n\tget"
},
{
"path": "cmake/common-utils/dkp-initialize-path.cmake",
"chars": 323,
"preview": "cmake_minimum_required(VERSION 3.13)\n\nif(CMAKE_HOST_WIN32)\n\tmessage(FATAL_ERROR \"CMake must be installed and launched fr"
},
{
"path": "cmake/common-utils/dkp-linker-utils.cmake",
"chars": 427,
"preview": "cmake_minimum_required(VERSION 3.13)\ninclude_guard(GLOBAL)\n\ninclude(dkp-impl-helpers)\n\nfunction(dkp_target_generate_symb"
},
{
"path": "cmake/common-utils/dkp-rule-overrides.cmake",
"chars": 1305,
"preview": "\nforeach(lang IN ITEMS C CXX ASM)\n\t# Set object file extension back to the default for Unix-like platforms\n\tset(CMAKE_${"
},
{
"path": "cmake/common-utils/dkp-toolchain-common.cmake",
"chars": 2425,
"preview": "cmake_minimum_required(VERSION 3.13)\n\nmacro(__dkp_toolchain name arch triplet)\n\tset(${name} TRUE)\n\n\tif(NOT CMAKE_SYSTEM_"
},
{
"path": "cmake/devkita64/PKGBUILD",
"chars": 723,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=devkita64-cmake\npkgver=1.1.3\npkgrel=1\npkgdesc=\"CMake support file"
},
{
"path": "cmake/devkita64/aarch64-none-elf-cmake",
"chars": 106,
"preview": "#!/usr/bin/env bash\nset -e\n\nexec env CMAKE_TOOLCHAIN_FILE=\"${DEVKITPRO}/cmake/devkitA64.cmake\" cmake \"$@\"\n"
},
{
"path": "cmake/devkita64/devkitA64.cmake",
"chars": 173,
"preview": "include(${CMAKE_CURRENT_LIST_DIR}/dkp-initialize-path.cmake)\ninclude(dkp-toolchain-common)\n\nset (DKP_BIN2S_ALIGNMENT 8)\n"
},
{
"path": "cmake/devkitarm/PKGBUILD",
"chars": 1284,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=devkitarm-cmake\npkgver=1.2.4\npkgrel=1\npkgdesc=\"CMake support file"
},
{
"path": "cmake/devkitarm/arm-none-eabi-cmake",
"chars": 106,
"preview": "#!/usr/bin/env bash\nset -e\n\nexec env CMAKE_TOOLCHAIN_FILE=\"${DEVKITPRO}/cmake/devkitARM.cmake\" cmake \"$@\"\n"
},
{
"path": "cmake/devkitarm/devkitARM.cmake",
"chars": 166,
"preview": "include(${CMAKE_CURRENT_LIST_DIR}/dkp-initialize-path.cmake)\ninclude(dkp-toolchain-common)\n\nset (DKP_BIN2S_ALIGNMENT 4)\n"
},
{
"path": "cmake/devkitarm/dkp-arm-mode-wrapper",
"chars": 530,
"preview": "#!/usr/bin/env bash\nset -e\nshopt -s extglob\n\nargs=()\nargmode=\"\"\nfilemode=\"\"\nwhile [[ $# -gt 0 ]]; do\n\tcase \"$1\" in\n\t-mar"
},
{
"path": "cmake/devkitarm/dkp-gba-ds-common.cmake",
"chars": 608,
"preview": "cmake_minimum_required(VERSION 3.13)\ninclude_guard(GLOBAL)\n\nlist(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES DKP_NO_ARM_"
},
{
"path": "cmake/devkitarm/dkp-gba-ds-utils.cmake",
"chars": 5051,
"preview": "cmake_minimum_required(VERSION 3.13)\ninclude_guard(GLOBAL)\n\ninclude(dkp-impl-helpers)\n\nmacro(__grit_parse_options_common"
},
{
"path": "cmake/devkitppc/PKGBUILD",
"chars": 718,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=devkitppc-cmake\npkgver=1.1.4\npkgrel=1\npkgdesc=\"CMake support file"
},
{
"path": "cmake/devkitppc/devkitPPC.cmake",
"chars": 222,
"preview": "include(${CMAKE_CURRENT_LIST_DIR}/dkp-initialize-path.cmake)\ninclude(dkp-toolchain-common)\n\nset (DKP_BIN2S_ALIGNMENT 32)"
},
{
"path": "cmake/devkitppc/powerpc-eabi-cmake",
"chars": 106,
"preview": "#!/usr/bin/env bash\nset -e\n\nexec env CMAKE_TOOLCHAIN_FILE=\"${DEVKITPRO}/cmake/devkitPPC.cmake\" cmake \"$@\"\n"
},
{
"path": "cmake/gamecube/GameCube.cmake",
"chars": 166,
"preview": "cmake_minimum_required(VERSION 3.13)\n\nif(NOT CMAKE_SYSTEM_NAME)\n\tset(CMAKE_SYSTEM_NAME NintendoGameCube)\nendif()\n\ninclud"
},
{
"path": "cmake/gamecube/NintendoGameCube.cmake",
"chars": 292,
"preview": "# -----------------------------------------------------------------------------\n# Platform configuration\n\ncmake_minimum_"
},
{
"path": "cmake/gamecube/PKGBUILD",
"chars": 977,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=gamecube-cmake\npkgver=1.0.1\npkgrel=1\npkgdesc=\"CMake support for N"
},
{
"path": "cmake/gamecube/powerpc-eabi-cmake",
"chars": 105,
"preview": "#!/usr/bin/env bash\nset -e\n\nexec env CMAKE_TOOLCHAIN_FILE=\"${DEVKITPRO}/cmake/GameCube.cmake\" cmake \"$@\"\n"
},
{
"path": "cmake/gba/GBA.cmake",
"chars": 1203,
"preview": "cmake_minimum_required(VERSION 3.13)\n\nif(NOT CMAKE_SYSTEM_NAME)\n\tset(CMAKE_SYSTEM_NAME NintendoGBA)\nendif()\n\nif(NOT CMAK"
},
{
"path": "cmake/gba/NintendoGBA.cmake",
"chars": 2743,
"preview": "# -----------------------------------------------------------------------------\n# Platform configuration\n\ncmake_minimum_"
},
{
"path": "cmake/gba/PKGBUILD",
"chars": 959,
"preview": "# Maintainer: fincs <fincs@devkitpro.org>\npkgname=gba-cmake\npkgver=1.0.2\npkgrel=1\npkgdesc=\"CMake support for Nintendo GB"
},
{
"path": "cmake/gba/arm-none-eabi-cmake",
"chars": 100,
"preview": "#!/usr/bin/env bash\nset -e\n\nexec env CMAKE_TOOLCHAIN_FILE=\"${DEVKITPRO}/cmake/GBA.cmake\" cmake \"$@\"\n"
},
{
"path": "cmake/nds/NDS.cmake",
"chars": 1072,
"preview": "cmake_minimum_required(VERSION 3.13)\n\nif(NOT CMAKE_SYSTEM_NAME)\n\tset(CMAKE_SYSTEM_NAME NintendoDS)\nendif()\n\nif(NOT CMAKE"
},
{
"path": "cmake/nds/NintendoDS.cmake",
"chars": 5511,
"preview": "# -----------------------------------------------------------------------------\n# Platform configuration\n\ncmake_minimum_"
},
{
"path": "cmake/nds/PKGBUILD",
"chars": 966,
"preview": "# Contributor: Cameron Cawley <ccawley2011@gmail.com>\npkgname=nds-cmake\npkgver=1.3.1\npkgrel=1\npkgdesc=\"CMake support for"
},
{
"path": "cmake/nds/arm-none-eabi-cmake",
"chars": 100,
"preview": "#!/usr/bin/env bash\nset -e\n\nexec env CMAKE_TOOLCHAIN_FILE=\"${DEVKITPRO}/cmake/NDS.cmake\" cmake \"$@\"\n"
},
{
"path": "cmake/ogc/PKGBUILD",
"chars": 734,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=ogc-cmake\npkgver=1.3.0\npkgrel=1\npkgdesc=\"CMake support for Ninten"
},
{
"path": "cmake/ogc/libogc.cmake",
"chars": 2264,
"preview": "# -----------------------------------------------------------------------------\n# Platform configuration\n\ncmake_minimum_"
},
{
"path": "cmake/ogc/ogc-common.cmake",
"chars": 1151,
"preview": "cmake_minimum_required(VERSION 3.13)\n\nif(\"${CMAKE_SYSTEM_NAME}\" STREQUAL \"NintendoWii\")\n set(OGC_CONSOLE wii)\n set"
},
{
"path": "cmake/switch/NintendoSwitch.cmake",
"chars": 9699,
"preview": "# -----------------------------------------------------------------------------\n# Platform configuration\n\ncmake_minimum_"
},
{
"path": "cmake/switch/PKGBUILD",
"chars": 994,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=switch-cmake\npkgver=1.5.2\npkgrel=1\npkgdesc=\"CMake support for Nin"
},
{
"path": "cmake/switch/Switch.cmake",
"chars": 1218,
"preview": "cmake_minimum_required(VERSION 3.13)\n\nif(NOT CMAKE_SYSTEM_NAME)\n\tset(CMAKE_SYSTEM_NAME NintendoSwitch)\nendif()\n\n# Import"
},
{
"path": "cmake/switch/aarch64-none-elf-cmake",
"chars": 103,
"preview": "#!/usr/bin/env bash\nset -e\n\nexec env CMAKE_TOOLCHAIN_FILE=\"${DEVKITPRO}/cmake/Switch.cmake\" cmake \"$@\"\n"
},
{
"path": "cmake/wii/NintendoWii.cmake",
"chars": 324,
"preview": "# -----------------------------------------------------------------------------\n# Platform configuration\n\ncmake_minimum_"
},
{
"path": "cmake/wii/PKGBUILD",
"chars": 927,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=wii-cmake\npkgver=1.0.1\npkgrel=1\npkgdesc=\"CMake support for Ninten"
},
{
"path": "cmake/wii/Wii.cmake",
"chars": 165,
"preview": "cmake_minimum_required(VERSION 3.13)\n\nif(NOT CMAKE_SYSTEM_NAME)\n set(CMAKE_SYSTEM_NAME NintendoWii)\nendif()\n\ninclude("
},
{
"path": "cmake/wii/powerpc-eabi-cmake",
"chars": 100,
"preview": "#!/usr/bin/env bash\nset -e\n\nexec env CMAKE_TOOLCHAIN_FILE=\"${DEVKITPRO}/cmake/Wii.cmake\" cmake \"$@\"\n"
},
{
"path": "cmake/wiiu/CafeOS.cmake",
"chars": 6923,
"preview": "# -----------------------------------------------------------------------------\n# Platform configuration\n\ncmake_minimum_"
},
{
"path": "cmake/wiiu/PKGBUILD",
"chars": 941,
"preview": "# Maintainer: fincs <fincs@devkitpro.org>\npkgname=wiiu-cmake\npkgver=1.3.2\npkgrel=1\npkgdesc=\"CMake support for Nintendo W"
},
{
"path": "cmake/wiiu/WiiU.cmake",
"chars": 929,
"preview": "cmake_minimum_required(VERSION 3.13)\n\nif(NOT CMAKE_SYSTEM_NAME)\n\tset(CMAKE_SYSTEM_NAME CafeOS)\nendif()\n\n# Import devkitP"
},
{
"path": "cmake/wiiu/powerpc-eabi-cmake",
"chars": 101,
"preview": "#!/usr/bin/env bash\nset -e\n\nexec env CMAKE_TOOLCHAIN_FILE=\"${DEVKITPRO}/cmake/WiiU.cmake\" cmake \"$@\"\n"
},
{
"path": "default-arm7/PKGBUILD",
"chars": 580,
"preview": "\n# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=('default-arm7')\npkgver=0.8.4\npkgrel=4\npkgdesc=\"nds default ar"
},
{
"path": "deko3d/PKGBUILD",
"chars": 701,
"preview": "# Maintainer: fincs <fincs@devkitpro.org>\n\npkgname=('deko3d')\npkgver=0.5.0\npkgrel=1\npkgdesc=\"Homebrew low level graphics"
},
{
"path": "devkita64/devkitA64/PKGBUILD",
"chars": 292,
"preview": "# Maintainer: Dave Murphy <davem[at]devkitpro.org>\npkgname=devkitA64\npkgver=r29.2\npkgrel=1\npkgdesc='devkitA64 metapackag"
},
{
"path": "devkita64/devkita64-rules/PKGBUILD",
"chars": 549,
"preview": "\n# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=('devkita64-rules')\npkgver=1.1.1\npkgrel=1\npkgdesc=\"devkitA64 b"
},
{
"path": "devkita64/newlib/PKGBUILD",
"chars": 1672,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\n_realname=newlib\n_target=aarch64-none-elf\n\npkgname=devkita64-${_realnam"
},
{
"path": "devkitarm/devkitARM/PKGBUILD",
"chars": 353,
"preview": "# Maintainer: Dave Murphy <davem[at]devkitpro.org>\npkgname=devkitARM\npkgver=r67.1\npkgrel=1\npkgdesc='devkitARM metapackag"
},
{
"path": "devkitarm/devkitarm-crtls/PKGBUILD",
"chars": 613,
"preview": "\n# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=('devkitarm-crtls')\npkgver=1.2.6\npkgrel=1\npkgdesc=\"devkitARM c"
},
{
"path": "devkitarm/devkitarm-rules/PKGBUILD",
"chars": 549,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=('devkitarm-rules')\npkgver=1.6.0\npkgrel=4\npkgdesc=\"devkitARM bu"
},
{
"path": "devkitarm/newlib/PKGBUILD",
"chars": 1573,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\n_realname=newlib\n_target=arm-none-eabi\n\npkgname=devkitarm-${_realname}\n"
},
{
"path": "devkitppc/devkitPPC/PKGBUILD",
"chars": 329,
"preview": "# Maintainer: Dave Murphy <davem[at]devkitpro.org>\npkgname=devkitPPC\npkgver=r50\npkgrel=1\npkgdesc='devkitPPC metapackage'"
},
{
"path": "devkitppc/devkitppc-crtls/PKGBUILD",
"chars": 521,
"preview": "\n# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=('devkitppc-crtls')\npkgver=2.1.0\npkgrel=1\npkgdesc=\"devkitPPC c"
},
{
"path": "devkitppc/devkitppc-rules/PKGBUILD",
"chars": 675,
"preview": "\n# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=('devkitppc-rules')\npkgver=1.2.1\npkgrel=1\npkgdesc=\"devkitPPC b"
},
{
"path": "devkitppc/newlib/PKGBUILD",
"chars": 1591,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\n_realname=newlib\n\npkgname=devkitppc-${_realname}\n\npkgver=4.6.0.20260123"
},
{
"path": "dkp-meson-scripts/PKGBUILD",
"chars": 585,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=dkp-meson-scripts\npkgver=1.1.0\npkgrel=1\n\npkgdesc='makepkg helpers"
},
{
"path": "dkp-meson-scripts/meson-cross.sh",
"chars": 508,
"preview": "#!/usr/bin/env bash\nSCRIPTDIR=\"${BASH_SOURCE%/*}\"\n\nif [ -z \"$1\" ]; then\n\techo \"No platform specified.\" 1>&2\n\texit 1\nfi\n\n"
},
{
"path": "dkp-meson-scripts/meson-toolchain.sh",
"chars": 2067,
"preview": "#!/usr/bin/env bash\nSCRIPTDIR=\"${BASH_SOURCE%/*}\"\n\nmake_flag_list()\n{\n\twhile (( \"$#\" )); do\n\t\techo -n \"'$1'\";\n\t\tif [ $# "
},
{
"path": "dkp-toolchain-vars/3dsvars.sh",
"chars": 442,
"preview": ". ${DEVKITPRO}/devkitarm.sh\n\nPORTLIBS_PREFIX=${PORTLIBS_ROOT}/3ds\nPATH=$PORTLIBS_PREFIX/bin:$PATH\n\nexport CFLAGS=\"-march"
},
{
"path": "dkp-toolchain-vars/PKGBUILD",
"chars": 1792,
"preview": "# Maintainer: WinterMute <davem@devkitpro.org>\npkgname=dkp-toolchain-vars\npkgver=1.0.5\npkgrel=1\n\npkgdesc='helper scripts"
},
{
"path": "dkp-toolchain-vars/armv4tvars.sh",
"chars": 304,
"preview": ". ${DEVKITPRO}/devkitarm.sh\n\nPORTLIBS_PREFIX=${PORTLIBS_ROOT}/armv4t\nPATH=$PORTLIBS_PREFIX/bin:$PATH\n\nexport CFLAGS=\"-ma"
},
{
"path": "dkp-toolchain-vars/cubevars.sh",
"chars": 518,
"preview": ". ${DEVKITPRO}/devkitppc.sh\n\nexport PORTLIBS_PREFIX=${PORTLIBS_ROOT}/gamecube\nexport PORTLIBS_PPC=${PORTLIBS_ROOT}/ppc\ne"
},
{
"path": "dkp-toolchain-vars/devkita64.sh",
"chars": 327,
"preview": "#!/usr/bin/env bash\nexport DEVKITPRO=/opt/devkitpro\nexport PORTLIBS_ROOT=${DEVKITPRO}/portlibs\nexport PATH=${DEVKITPRO}/"
},
{
"path": "dkp-toolchain-vars/devkitarm.sh",
"chars": 352,
"preview": "#!/usr/bin/env bash\nexport DEVKITPRO=/opt/devkitpro\nexport DEVKITARM=${DEVKITPRO}/devkitARM\nexport PORTLIBS_ROOT=${DEVKI"
},
{
"path": "dkp-toolchain-vars/devkitppc.sh",
"chars": 363,
"preview": "#!/usr/bin/env bash\nexport DEVKITPRO=/opt/devkitpro\nexport DEVKITPPC=${DEVKITPRO}/devkitPPC\nexport PORTLIBS_ROOT=${DEVKI"
},
{
"path": "dkp-toolchain-vars/ndsvars.sh",
"chars": 398,
"preview": ". ${DEVKITPRO}/devkitarm.sh\n\nPORTLIBS_PREFIX=${PORTLIBS_ROOT}/nds\nPATH=$PORTLIBS_PREFIX/bin:$PATH\n\nexport CFLAGS=\"-march"
},
{
"path": "dkp-toolchain-vars/portlibs_prefix.sh",
"chars": 169,
"preview": "#!/usr/bin/env bash\n\nif [ -z \"$1\" ]; then\n\techo \"No platform specified.\" 1>&2\n\texit 1\nfi\n\nPLATFORM=\"$1\"\nsource ${DEVKITP"
},
{
"path": "dkp-toolchain-vars/ppcvars.sh",
"chars": 319,
"preview": ". ${DEVKITPRO}/devkitppc.sh\n\nexport PORTLIBS_PREFIX=${PORTLIBS_ROOT}/ppc\n\nexport CFLAGS=\"-O2 -mcpu=750 -meabi -mhard-flo"
},
{
"path": "dkp-toolchain-vars/switchvars.sh",
"chars": 500,
"preview": ". ${DEVKITPRO}/devkita64.sh\n\nexport PORTLIBS_PREFIX=${DEVKITPRO}/portlibs/switch\nexport PATH=$PORTLIBS_PREFIX/bin:$PATH\n"
},
{
"path": "dkp-toolchain-vars/wiiuvars.sh",
"chars": 609,
"preview": ". ${DEVKITPRO}/devkitppc.sh\n\nexport PORTLIBS_PREFIX=${PORTLIBS_ROOT}/wiiu\nexport PORTLIBS_PPC=${PORTLIBS_ROOT}/ppc\nexpor"
},
{
"path": "dkp-toolchain-vars/wiivars.sh",
"chars": 558,
"preview": ". ${DEVKITPRO}/devkitppc.sh\n\nexport PORTLIBS_PREFIX=${PORTLIBS_ROOT}/wii\nexport PORTLIBS_PPC=${PORTLIBS_ROOT}/ppc\nexport"
},
{
"path": "dswifi/PKGBUILD",
"chars": 584,
"preview": "\n# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=('dswifi')\npkgver=2.1.0\npkgrel=1\npkgdesc=\"Nintendo DS wifi lib"
},
{
"path": "gamecube/SDL/PKGBUILD",
"chars": 1358,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n# Contributor: Sergio Padrino <sergio.padrino@gmail.com>\n\npkgname=gamec"
},
{
"path": "gamecube/SDL/SDL-1.2.15.patch",
"chars": 101151,
"preview": "diff --git a/README.ogc b/README.ogc\nnew file mode 100644\nindex 0000000000..ccda9877c4\n--- /dev/null\n+++ b/README.ogc\n@@"
},
{
"path": "gamecube/SDL/config.site",
"chars": 92,
"preview": "ac_cv_header_signal=no\nac_cv_header_signal_h=no\nac_cv_func_sigaction=no\nac_cv_func_iconv=no\n"
},
{
"path": "gamecube/SDL2/PKGBUILD",
"chars": 964,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n\npkgname=gamecube-sdl2\npkgver=2.28.5\npkgrel=17\npkgdesc=\"A library for p"
},
{
"path": "gamecube/SDL2/SDL2-2.28.5.patch",
"chars": 244587,
"preview": "diff --git a/.github/workflows/ngc.yml b/.github/workflows/ngc.yml\nnew file mode 100644\nindex 0000000000..aeaf6b9269\n---"
},
{
"path": "gamecube/SDL2_gfx/PKGBUILD",
"chars": 939,
"preview": "# Maintainer: Dave Murphy <davem@devkitpro.org>\n# Contributor: TurtleP <jeremy.postelnek@gmail.co>\n\npkgname=gamecub"
}
]
// ... and 278 more files (download for full content)
About this extraction
This page contains the full source code of the devkitPro/pacman-packages GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 478 files (3.2 MB), approximately 873.5k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.