From 95fee14dfa5bd3896c510077af36ea371a9a2975 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 26 Oct 2018 13:47:53 +0300 Subject: Merge with 1.5.4 upstream package version --- libpkgconf/buildfile | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'libpkgconf/buildfile') diff --git a/libpkgconf/buildfile b/libpkgconf/buildfile index 9dd9fea..5231c42 100644 --- a/libpkgconf/buildfile +++ b/libpkgconf/buildfile @@ -22,6 +22,11 @@ tclass = $c.target.class # The whole idea feels utterly broken (hello cross-compilation) so we will # just do bare minimum and wait and see. # +# There is also PERSONALITY_PATH macro added in 1.5.1. It looks like the +# personality files are invented to fix cross-compilation but are unlikely to +# have any noticeable distribution yet. Normally these files are located in +# the personality.d/ subdirectory of the .pc files directory. +# # @@ We should probably allow to configure these macros via configuration # variables config.pkgconfig.pkg_default_path and alike. # @@ -37,23 +42,32 @@ if ($tclass == "windows") # # /../lib/pkgconfig;/../share/pkgconfig # - # So we keep it empty. + # So we keep the macros empty. # def_paths = "" + personality_dirs = "" } else { inc_dirs = "/usr/include" lib_dirs = "/usr/lib" - def_dirs = ($install.root != [null] \ - ? "$install.resolve($install.pkgconfig)" \ - : "") + if ($install.root != [null]) + { + def_dirs = "$install.resolve($install.pkgconfig)" + personality_dirs = "$def_dirs/personality.d" + } + else + { + def_dirs = "" + personality_dirs = "" + } } c.poptions += -DPKG_DEFAULT_PATH=\"$def_dirs\" \ -DSYSTEM_INCLUDEDIR=\"$inc_dirs\" \ - -DSYSTEM_LIBDIR=\"$lib_dirs\" + -DSYSTEM_LIBDIR=\"$lib_dirs\" \ + -DPERSONALITY_PATH=\"$personality_dirs\" # Disable warnings. # @@ -101,7 +115,8 @@ if ($tclass != "windows") if ($tclass != "bsd" && $tclass != "macos") c.poptions += -D_POSIX_C_SOURCE=200112L - obj{client fragment path pkg queue tuple}: c.poptions += -D_GNU_SOURCE + obj{client fragment path personality pkg queue tuple}: \ + c.poptions += -D_GNU_SOURCE } # Install into the pkgconf/libpkgconf/ subdirectory of, say, /usr/include/. -- cgit v1.1