Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL_ttf submodule isn't using a stable version #456

Open
JayFoxRox opened this issue Apr 12, 2021 · 2 comments
Open

SDL_ttf submodule isn't using a stable version #456

JayFoxRox opened this issue Apr 12, 2021 · 2 comments

Comments

@JayFoxRox
Copy link
Member

See #455 (comment) for more information

@Margen67
Copy link
Contributor

Margen67 commented Apr 13, 2021

The latest stable (2.0.15) uses a newer version of FreeType (libsdl-org/SDL_ttf@5845edd) which causes build errors I presume due to this line:

FREETYPE_DIR = $(NXDK_DIR)/lib/sdl/SDL_ttf/external/freetype-2.4.12

I tried to fix it and got a different error:
https://github.com/Margen67/nxdk/actions/runs/744268552

Updating SDL_ttf to libsdl-org/SDL_ttf@f00286b (the commit before the breaking one) works.

@JayFoxRox
Copy link
Member Author

Thanks for the effort @Margen67
(I also came across your work on OpenRCT2 by accident; thanks for all the FOSS work you do)

My conclusion from your experience: It's probably best to just leave SDL_ttf as-is for now.

Because nxdk has a custom-made out-of-tree build-system for libs (a truly horrible situation) we'd have to update our own freetype makefile:

nxdk/lib/sdl/Makefile

Lines 7 to 19 in 9519fbd

FREETYPE_DIR = $(NXDK_DIR)/lib/sdl/SDL_ttf/external/freetype-2.4.12
FREETYPE_SRCS += $(FREETYPE_DIR)/src/base/ftbase.c
FREETYPE_SRCS += $(FREETYPE_DIR)/src/base/ftglyph.c
FREETYPE_SRCS += $(FREETYPE_DIR)/src/base/ftbitmap.c
FREETYPE_SRCS += $(FREETYPE_DIR)/src/base/ftstroke.c
FREETYPE_SRCS += $(FREETYPE_DIR)/src/base/ftinit.c
FREETYPE_SRCS += $(FREETYPE_DIR)/src/base/ftsystem.c
FREETYPE_SRCS += $(FREETYPE_DIR)/src/truetype/truetype.c
FREETYPE_SRCS += $(FREETYPE_DIR)/src/raster/raster.c
FREETYPE_SRCS += $(FREETYPE_DIR)/src/smooth/smooth.c
FREETYPE_SRCS += $(FREETYPE_DIR)/src/autofit/autofit.c
FREETYPE_SRCS += $(FREETYPE_DIR)/src/sfnt/sfnt.c
FREETYPE_OBJS = $(addsuffix .obj, $(basename $(FREETYPE_SRCS)))

This is probably missing ftgzip, but then we probably also have to update the "ft[...].h" configuration files in https://github.com/XboxDev/nxdk/tree/master/lib/sdl. It's way too risky to break something in an upgrade.

It's usually best to start from scratch, because otherwise you risk overlooking something.
However, even then you'd be wasting the maintainers time on review, for a rarely used library.


The maintenance overhead because of the stupid nxdk buildsystem is way too high; it distracts from working on Xbox related tasks (like drivers or winapi, which the nxdk project should focus on). It also doesn't scale with the amount of library ports that are getting proposed, and the pace at which libraries get updated.

I hope that SDL_ttf will eventually be removed from nxdk; it builds out-of-box with JayFoxRox#83 (which is a much better path for nxdk: become usable with existing tools).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants