Closed averne closed 2 years ago
Setting UNIX
to true isn't really correct for our platforms and we intentionally avoided this in our toolchain files. Which codepaths does this enable that result in the turbojpeg API being repaired?
Setting WITH_TURBOJPEG to true enables compilation of the turbojpeg library. However it also activates a test program for it that will fail to link unless UNIX is true (for libm). Unfortunately disabling that test program isn't possible afaict. https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/CMakeLists.txt#L667
The current package doesn't include turbojpeg.h (or .a):
$ pacman -Ql switch-libjpeg-turbo
switch-libjpeg-turbo /opt/
switch-libjpeg-turbo /opt/devkitpro/
switch-libjpeg-turbo /opt/devkitpro/portlibs/
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/include/
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/include/jconfig.h
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/include/jerror.h
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/include/jmorecfg.h
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/include/jpeglib.h
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/lib/
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/lib/cmake/
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/lib/cmake/libjpeg-turbo/
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/lib/cmake/libjpeg-turbo/libjpeg-turboConfig.cmake
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/lib/cmake/libjpeg-turbo/libjpeg-turboTargets-release.cmake
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/lib/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/lib/libjpeg.a
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/lib/pkgconfig/
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/lib/pkgconfig/libjpeg.pc
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/lib/pkgconfig/libturbojpeg.pc
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/licenses/
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/licenses/switch-libjpeg-turbo/
switch-libjpeg-turbo /opt/devkitpro/portlibs/switch/licenses/switch-libjpeg-turbo/LICENSE.md
Setting UNIX to true is never the right solution. Disabling test programs is always possible, As I've done with https://github.com/devkitPro/pacman-packages/commit/632cc0ebd2e9639c09f561e71de09c16d528e76e
This fixes compilation of nx-hbmemu