! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[PATCH] Use pkg-config to find FreeType
Status:
RESOLVED: FIXED
Product:
Tumbler
Component:
General

Comments

Description Evangelos Foutras 2018-06-11 11:30:15 CEST
Created attachment 7777 
[PATCH] Use pkg-config to find FreeType

This is needed in order to detect FreeType 2.9.1 which defaults to not shipping /usr/bin/freetype-config. (There is an --enable-freetype-config build option for FreeType, but it's not used by Arch Linux.)
Comment 1 Ali Abdallah editbugs 2018-07-15 20:34:22 CEST
Your attach patch will work only with FreeType >= 2.9.1, it removes he freetype-config based configure code. Not everybody ships with the latest version of FreeType. 

If you can provide a better patch, I'll be happy to merge it. Otherwise, I will try to address this when there will be enough fixes to worth a release.
Comment 2 Evangelos Foutras 2018-07-15 21:41:41 CEST
Sorry about the incorrect patch. Do you think passing the existing freetype-config detection code as the last argument to PKG_CHECK_MODULES() would be an acceptable solution here? If yes, I can prepare and test a patch that does that.
Comment 3 Ali Abdallah editbugs 2018-07-17 16:05:43 CEST
Yes of course, the important point is that it works with freetype-config and with freetype >= 2.9.1 pkg-config.

Thanks!
Comment 4 Evangelos Foutras 2018-07-17 17:43:33 CEST
I looked more into it and I believe my original patch might actually be fine. The freetype2.pc file has existed since 2003 so the freetype-config fallback is unneeded. [1]

What seems to have changed in 2.9.1 is that the CMake build now also installs freetype2.pc. Thing is, the CMake build doesn't install freetype-config.

Based on the above, I cannot think of a case where freetype-config would be present but freetype2.pc would not. Please correct me if I'm missing something.

[1] http://git.savannah.gnu.org/cgit/freetype/freetype2.git/log/builds/unix/freetype2.in
Comment 5 olaf 2018-07-23 22:44:04 CEST
I agree with that. pkgconfig is the thing to use, especially since it is used all over the place in XFCE. Usage of *-config has to be removed.
Comment 6 Ali Abdallah editbugs 2018-09-02 08:43:01 CEST
The patch has been pushed to master, will be included in 0.2.2.

Bug #14446

Reported by:
Evangelos Foutras
Reported on: 2018-06-11
Last modified on: 2018-09-02

People

Assignee:
Ali Abdallah
CC List:
1 user

Version

Attachments

[PATCH] Use pkg-config to find FreeType (1.39 KB, patch)
2018-06-11 11:30 CEST , Evangelos Foutras
no flags

Additional information