Skip to content

Commit

Permalink
Set PKG_CONFIG_ALLOW_SYSTEM_(CFLAGS|LIBS) by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo committed Sep 18, 2023
1 parent 470aa2e commit e69b7b8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Cabal/src/Distribution/Simple/Program/Builtin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -400,4 +400,11 @@ pkgConfigProgram :: Program
pkgConfigProgram =
(simpleProgram "pkg-config")
{ programFindVersion = findProgramVersion "--version" id
, programPostConf = \_ pkgConfProg ->
let programOverrideEnv' =
programOverrideEnv pkgConfProg
++ [ ("PKG_CONFIG_ALLOW_SYSTEM_CFLAGS", Just "1")
, ("PKG_CONFIG_ALLOW_SYSTEM_LIBS", Just "1")
]
in pure $ pkgConfProg{programOverrideEnv = programOverrideEnv'}
}
8 changes: 8 additions & 0 deletions changelog.d/pkgconfig-envvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
+synopsis: PkgConfig environment variables
+prs: #9134
+
+description: {
+
+- `cabal` invokes `pkg-config` with `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS` and `PKG_CONFIG_ALLOW_SYSTEM_LIBS` set
+
+}

0 comments on commit e69b7b8

Please sign in to comment.