devkitPro / pacman-packages

https://devkitpro.org
131 stars 104 forks source link

pkg-config file error on switch-sdl2_ttf 2.22.0 #349

Closed AGraber closed 4 months ago

AGraber commented 5 months ago

Bug Report

What's the issue you encountered?

The pkg-config file for this library (/opt/devkitpro/portlibs/switch/lib/pkgconfig/SDL2_ttf.pc) contains a mistake. Here are its full contents for reference:

prefix=/opt/devkitpro/portlibs/switch
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: SDL2_ttf
Description: ttf library for Simple DirectMedia Layer with FreeType 2 support
Version: 2.22.0
Requires: sdl2 >= 2.0.10
Libs: -L${libdir} -lSDL2_ttf
Cflags: -I${includedir}/SDL2
Requires.private: harfbuzz freetype2
Libs.private:
Requires.private: freetype2

The duplicate Requires.private overrides the previous one which ends up excluding harfbuzz, which breaks build systems that use pkg-config to depend on SDL2_ttf.

How can the issue be reproduced?

You can try building this project kichikuou/system3-sdl2 (pretty easy to build and only depends on included submodules and dkp-provided packages).

Environment?

Additional context?

We found out during CI of the project I mentioned before (https://github.com/kichikuou/system3-sdl2/issues/26), which used to work fine before 2.22.0's release (or more specifically, before 2.22.0 made it to the devkitpro/devkita64 container we use for CI)

Also, I saw this on the PKGBUILD:

https://github.com/devkitPro/pacman-packages/blob/013a75724f85af383c229c33c4b251b43c954952/switch/SDL2_ttf/PKGBUILD#L46-L47

Maybe this was needed at some point but now it seems superfluous considering there's already a Requires.private line preceeding it

R-YaTian commented 4 months ago

This should be closed by 6c5c181

AGraber commented 4 months ago

Yeah, it was solved a few weeks ago on the project I mentioned, thanks for fixing @WinterMute!

WinterMute commented 4 months ago

I neglected to close this issue at the time. Thanks for the reminder.