It fixes a bug in pkgconf(1) where the last line, if not terminated by a
newline character, would be chopped by one byte. This could lead to
incorrect flags returned by pkgconf(1).
An example is cppunit.pc from devel/cppunit: the cppunit.pc.in, used to
generate cppunit.pc, isn't newline-terminated. Our sed(1) currently adds
a newline to the last line, no matter what the input stream has. But
that's not the case with GNU sed and our sed should be soon fixed too. In
this case, "pkgconf --cflags cppunit" returned "-I" before this fix,
instead of "-I/usr/local/include" now.
This patch is already committed upstream.
Reviewed by: bapt@
Approved by: bapt@
Phabric: https://phabric.freebsd.org/D532