Cflags in pkgconfig/cfitsio.pc is wrong

Description:

Install cfitsio-1:4.6.0-1

$ cat /usr/lib/pkgconfig/cfitsio.pc
prefix=/usr
exec_prefix=/usr
libdir=
includedir=

Name: cfitsio
Description: FITS File Subroutine Library
URL: https://heasarc.gsfc.nasa.gov/fitsio/
Version: 4.6.0
Libs: -L${libdir} -lcfitsio
Libs.private:  -lz -lcurl -lm
Cflags: -I${includedir}

This causes the command pkg-config --cflags cfitsio to output just -I. When this is used in compiling other code (wcs-grab.c from astrometry.net) with a cfitsio dependency, the whole command becomes (some parts omitted) gcc ... -I../include -I../util -I. -I -MM -MG wcs-grab.c, where the -MM is recognized as a path of the preceding -I, and the command fails. The Cflags should be either empty or -I/usr/include, not just -I.

Additional info:

In cfitsio-1:4.5.0-1-x86_64, this was

prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include

Name: cfitsio
Description: FITS File Subroutine Library
URL: https://heasarc.gsfc.nasa.gov/fitsio/
Version: 4.5.0
Libs: -L${libdir} -lcfitsio
Libs.private:  -lz -lcurl -lm
Cflags: -I${includedir}
  • package version(s): cfitsio-1:4.6.0-1-x86_64
  • config and/or log files:
  • link to upstream bug report, if any:

Steps to reproduce:

$ cat /usr/lib/pkgconfig/cfitsio.pc