Bug 1474072

Summary: fontconfig-devel provides incorrect includedir in /usr/lib64/pkgconfig/fontconfig.pc
Product: [Fedora] Fedora Reporter: Alexandr Kondratev <theg4sh>
Component: fontconfigAssignee: Akira TAGOH <tagoh>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: fonts-bugs, i18n-bugs, pnemade, tagoh, theg4sh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-23 23:28:55 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
Compilation check none

Description Alexandr Kondratev 2017-07-23 11:14:36 EDT
Created attachment 1303238 [details]
Compilation check

Description of problem:
See subj.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. dnf install fontconfig-devel
2. # Unpack tarball from attachment. 
3. cd xfontchk
4. make

Actual results:
c99 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/libpng16   -I/usr/include/freetype2 -I/usr/include/libpng16  -DVERSION="0.7" -D_XOPEN_SOURCE=600 -O -c xfontchk.c
xfontchk.c:2:10: fatal error: fontconfig.h: No such file or directory
 #include <fontconfig.h>
compilation terminated.
make: *** [Makefile:7: xfontchk.o] Error 1

Expected results:
c99 -I/usr/X11R6/include -I/usr/include/fontconfig -I/usr/include/freetype2 -I/usr/include/libpng16   -I/usr/include/freetype2 -I/usr/include/libpng16  -DVERSION="0.7" -D_XOPEN_SOURCE=600 -O -c xfontchk.c
c99 -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft -lfontconfig -lfreetype  -lfreetype  -o xfontchk xfontchk.o

Additional info:
Due to fontconfig-devel provides only /usr/include/fontconfig folder, the solution is:
$ diff /usr/lib64/pkgconfig/fontconfig.pc{.orig,}
< includedir=/usr/include
> includedir=/usr/include/fontconfig

which give expected result.
Comment 1 Alexandr Kondratev 2017-07-23 11:52:36 EDT
Formatted patch:

--- /usr/lib64/pkgconfig/fontconfig.pc  2017-07-23 17:52:51.844365570 +0300
+++ /usr/lib64/pkgconfig/fontconfig.pc  2017-07-23 18:09:14.221529256 +0300
@@ -1,7 +1,7 @@
Comment 2 Akira TAGOH 2017-07-23 23:28:55 EDT
Many applications has #include <fontconfig/fontconfig.h> long time since it has been launched. I won't fix that since this affects so many.