libsdl-org / SDL_ttf

Support for TrueType (.ttf) font files with Simple Directmedia Layer.
zlib License
343 stars 116 forks source link

Harfbuzz fails to compile on Android #319

Closed 1bsyl closed 6 months ago

1bsyl commented 6 months ago

Since SDL commit https://github.com/libsdl-org/SDL_ttf/commit/79848aac621ffe7048365e4611367e093719d884ok Harfbuzz fails to compile on Android This patch is missing: https://github.com/libsdl-org/SDL_ttf/commit/f903900e8040a55486e8d59580db14002ea6e55f (issue https://github.com/libsdl-org/SDL_ttf/issues/214)

But even if we add it, there are new issues because of c++. Not sure how to fix this. The error appears with #include <functional> in hb-cplusplus.h

From https://github.com/harfbuzz/harfbuzz/issues/2944 we could compile with APP_STL := system but that seems now deprecated...

(Yes, adding APP_STL := system in Application.mk gets it compiled .. https://developer.android.com/ndk/guides/cpp-support new and delete. (Deprecated in r18.) And 'system' should be removed https://github.com/android/ndk/issues/744 )

slouken commented 6 months ago

Ah, I see. @madebr, the file .gitmodules still references the 2.9.1 branch. Can you fix that, and take a look at this?

madebr commented 6 months ago

Fixed in 5762821745b7be9c839e72becb9dd27109a47e91. Thanks @sezero

madebr commented 6 months ago

I just verified building SDL2 + SDL2_ttf using ndk 26.0.10792818 with -DSDL2TTF_VENDORED=ON -DSDL2TTF_HARFBUZZ=ON