Unverified Commit 2da95a29 authored by K900's avatar K900 Committed by GitHub
Browse files

treewide: drop flattenInclude hack (#348483)

parents 873f2580 54874b38
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;

+3 −4
Original line number Diff line number Diff line
@@ -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
    + ''
  postInstall = ''
    substituteInPlace $dev/bin/freetype-config \
      --replace ${buildPackages.pkg-config} ${pkgsHostHost.pkg-config}
  '' + lib.optionalString (!stdenv.hostPlatform.isMinGW) ''
+0 −14
Original line number Diff line number Diff line
@@ -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";
+0 −2
Original line number Diff line number Diff line
@@ -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;