Created attachment 180455 [details] This patch replaces bad hard-coded path with the appropriate one for FreeBSD Trying to portupgrade flightgear from 2016.4.4_1 to 2017.1.1 I got a build failure saying it failed to find ft2build.h. On investigation, I found that one of FlightGear's CMakeLists.txt files has a hard-coded path of "/usr/include/freetype2", so it's looking in the wrong place. My system: FreeBSD bogodyn.org 10.3-STABLE FreeBSD 10.3-STABLE #0 r312435: Thu Jan 19 13:55:14 MST 2017 russo@bogodyn.org:/usr/obj/usr/src/sys/GENERIC amd64 The error: --- utils/fgpanel/CMakeFiles/fgpanel.dir/FGFontCache.cxx.o --- In file included from /usr/ports/games/flightgear/work/flightgear-2017.1.1/utils/fgpanel/FGFontCache.cxx:28: /usr/ports/games/flightgear/work/flightgear-2017.1.1/utils/fgpanel/FGFontCache.hxx:21:10: fatal error: 'ft2build.h' file not found #include <ft2build.h> ^ When I edit flightgear-2017.1.1/utils/fgpanel and change the offending path in CMakeLists.txt from /usr/include/freetype2 to /usr/local/include/freetype2, then force a reconfigure and rebuild, it all works. The attached patch will do that, but seems the wrong approach. This CMakeLists.txt clearly has a "FindPackage(Freetype)" at the top, and then instead of using the path found there hard-codes the Linux-style location. This mistake in CMakeLists.txt should ideally be fixed upstream, but at least this patch will make it work for now.
A commit references this bug: Author: martymac Date: Fri Mar 3 21:16:41 UTC 2017 New revision: 435367 URL: https://svnweb.freebsd.org/changeset/ports/435367 Log: - Update Simgear & Flightgear ports to 2017.1.2 - Fix fgpanel build [1] PR: 217514 [1] Submitted by: russo@bogodyn.org [1] Changes: head/devel/simgear/Makefile head/devel/simgear/distinfo head/games/flightgear/Makefile head/games/flightgear/distinfo head/games/flightgear/files/patch-utils-fgpanel-CMakeLists.txt head/games/flightgear/pkg-plist head/games/flightgear-data/Makefile head/games/flightgear-data/distinfo
Hi, Thanks a lot for your report. That update should fix your build problems. Can you confirm everything is OK by now ?
Yes, I can now build flightgear with make in /usr/ports/games/flightgear. I see that the version number is also changed (2017.1.2) but the ports index has not been changed to reflect that, so portupgrade doesn't just update it, but it'll work with a portupgrade -f flightgear. I had to do the same with flightgear-data.
Hi, The INDEX should be up-to-date now (you can fetch it with a 'make fetchindex' within the ports' root dir). Thanks again for your feedback. Best regards, Ganael.