treewide: drop flattenInclude hack (#348483)

This commit is contained in:
K900
2024-10-14 22:07:40 +03:00
committed by GitHub
4 changed files with 4 additions and 21 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ in {
# `-I' flags to be propagated.
sed -i "$out/lib/pkgconfig/cairo.pc" \
-es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype.dev}/include/freetype2 -I${freetype.dev}/include|g'
'' + lib.optionalString stdenv.hostPlatform.isDarwin glib.flattenInclude;
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
@@ -72,10 +72,9 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = true;
postInstall = glib.flattenInclude
# pkgsCross.mingwW64.pkg-config doesn't build
# makeWrapper doesn't cross-compile to windows #120726
+ ''
# pkgsCross.mingwW64.pkg-config doesn't build
# makeWrapper doesn't cross-compile to windows #120726
postInstall = ''
substituteInPlace $dev/bin/freetype-config \
--replace ${buildPackages.pkg-config} ${pkgsHostHost.pkg-config}
'' + lib.optionalString (!stdenv.hostPlatform.isMinGW) ''
@@ -33,19 +33,6 @@
assert stdenv.hostPlatform.isLinux -> util-linuxMinimal != null;
let
# Some packages don't get "Cflags" from pkg-config correctly
# and then fail to build when directly including like <glib/...>.
# This is intended to be run in postInstall of any package
# which has $out/include/ containing just some disjunct directories.
flattenInclude = ''
for dir in "''${!outputInclude}"/include/*; do
cp -r "$dir"/* "''${!outputInclude}/include/"
rm -r "$dir"
ln -s . "$dir"
done
ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true
'';
gobject-introspection' = buildPackages.gobject-introspection.override {
propagateFullGlib = false;
# Avoid introducing cairo, which enables gobjectSupport by default.
@@ -306,7 +293,6 @@ stdenv.mkDerivation (finalAttrs: {
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
inherit flattenInclude;
updateScript = gnome.updateScript {
packageName = "glib";
versionPolicy = "odd-unstable";
@@ -63,8 +63,6 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = !stdenv.hostPlatform.isDarwin;
postInstall = glib.flattenInclude;
passthru = {
tests = {
inherit cairo qemu scribus tigervnc wlroots_0_17 wlroots_0_18 xwayland;