Bug 246977 - devel/readline: fix include path in readline.pc
Summary: devel/readline: fix include path in readline.pc
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Po-Chuan Hsieh
URL:
Keywords: buildisok
Depends on:
Blocks:
 
Reported: 2020-06-04 11:02 UTC by ice
Modified: 2020-06-19 12:54 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
Patch to fix devel/readline pkg-config include path (775 bytes, patch)
2020-06-04 11:02 UTC, ice
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ice 2020-06-04 11:02:16 UTC
Created attachment 215224 [details]
Patch to fix devel/readline pkg-config include path

This has been reported upstream already (see https://lists.gnu.org/archive/html/bug-readline/2019-04/msg00007.html), but a fix has not materialised yet (see https://lists.gnu.org/archive/html/bug-readline/2019-04/msg00008.html).

Readline is supposed to be used as "#include <readline/readline.h>". Currently, readline.pc includes the trailing readline/ directory component for the include path like such:

$ pkg-config --cflags readline
-I/usr/local/include/readline 

making the compiler look for /usr/local/include/readline/readline/readline.h, which is obviously wrong and no software using readline as documented wanting to use pkg-config will compile (but happens to work on Linux by accident).

The attached patch fixes the issue by stripping the final readline/ component off the include path advertised by readline.pc:

$ pkg-config --cflags readline
-I/usr/local/include
Comment 1 Automation User 2020-06-19 00:08:02 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/157848904
Comment 2 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-06-19 12:54:41 UTC
I'm afraid that this change of include path may introduce more build failures of dependent ports. Therefore, I would follow the upstream now.