forked from ariadne/pkgconf
libpkgconf: fragment: handle -idirafter in the same way as -isystem
(https://bugs.freedesktop.org/show_bug.cgi?id=97337)feature/tap-sh
parent
c916e3a437
commit
ad1e414dee
|
@ -54,6 +54,7 @@ EXTRA_DIST = pkg.m4 \
|
||||||
tests/lib1/conflicts.pc \
|
tests/lib1/conflicts.pc \
|
||||||
tests/lib1/omg-uninstalled.pc \
|
tests/lib1/omg-uninstalled.pc \
|
||||||
tests/lib1/isystem.pc \
|
tests/lib1/isystem.pc \
|
||||||
|
tests/lib1/idirafter.pc \
|
||||||
tests/lib1/depgraph-break.pc \
|
tests/lib1/depgraph-break.pc \
|
||||||
tests/lib1/cflags-whitespace.pc \
|
tests/lib1/cflags-whitespace.pc \
|
||||||
tests/lib1/cflags-whitespace-trailing.pc \
|
tests/lib1/cflags-whitespace-trailing.pc \
|
||||||
|
|
|
@ -37,6 +37,7 @@ pkgconf_fragment_is_unmergeable(const char *string)
|
||||||
static struct pkgconf_fragment_check check_fragments[] = {
|
static struct pkgconf_fragment_check check_fragments[] = {
|
||||||
{"-framework", 10},
|
{"-framework", 10},
|
||||||
{"-isystem", 8},
|
{"-isystem", 8},
|
||||||
|
{"-idirafter", 10},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (*string != '-')
|
if (*string != '-')
|
||||||
|
@ -54,6 +55,7 @@ pkgconf_fragment_should_munge(const char *string, const char *sysroot_dir)
|
||||||
{
|
{
|
||||||
static struct pkgconf_fragment_check check_fragments[] = {
|
static struct pkgconf_fragment_check check_fragments[] = {
|
||||||
{"-isystem", 8},
|
{"-isystem", 8},
|
||||||
|
{"-idirafter", 10},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (*string != '/')
|
if (*string != '/')
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Name: Bad
|
||||||
|
Description: Demonstrates problems with -idirafter in both old pkg-config and current pkgconf; see also https://bugs.freedesktop.org/show_bug.cgi?id=97337
|
||||||
|
Version: 1
|
||||||
|
Cflags: -idirafter /opt/bad/include -idirafter /opt/bad2/include
|
|
@ -19,6 +19,8 @@ tests_init \
|
||||||
incomplete_cflags \
|
incomplete_cflags \
|
||||||
isystem_munge_order \
|
isystem_munge_order \
|
||||||
isystem_munge_sysroot \
|
isystem_munge_sysroot \
|
||||||
|
idirafter_munge_order \
|
||||||
|
idirafter_munge_sysroot \
|
||||||
pcpath \
|
pcpath \
|
||||||
sysroot_munge
|
sysroot_munge
|
||||||
|
|
||||||
|
@ -152,6 +154,22 @@ isystem_munge_sysroot_body()
|
||||||
pkgconf --cflags isystem
|
pkgconf --cflags isystem
|
||||||
}
|
}
|
||||||
|
|
||||||
|
idirafter_munge_order_body()
|
||||||
|
{
|
||||||
|
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
||||||
|
atf_check \
|
||||||
|
-o inline:"-idirafter /opt/bad/include -idirafter /opt/bad2/include \n" \
|
||||||
|
pkgconf --cflags idirafter
|
||||||
|
}
|
||||||
|
|
||||||
|
idirafter_munge_sysroot_body()
|
||||||
|
{
|
||||||
|
export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR='/test'
|
||||||
|
atf_check \
|
||||||
|
-o match:"-idirafter /test/opt/bad/include" \
|
||||||
|
pkgconf --cflags idirafter
|
||||||
|
}
|
||||||
|
|
||||||
pcpath_body()
|
pcpath_body()
|
||||||
{
|
{
|
||||||
export PKG_CONFIG_PATH="${selfdir}/lib2"
|
export PKG_CONFIG_PATH="${selfdir}/lib2"
|
||||||
|
|
Loading…
Reference in New Issue