freetype, pixman: restore flatten include hack for now, but better

This commit is contained in:
K900 2024-10-17 15:00:58 +03:00
parent f9490f9709
commit a7b40b71cd
5 changed files with 25 additions and 2 deletions

View File

@ -0,0 +1,2 @@
{ makeSetupHook }:
makeSetupHook { name = "flatten-include-hack-hook"; } ./flatten-include-hack-hook.sh

View File

@ -0,0 +1,16 @@
# shellcheck shell=bash
# This is a horrible hack. You should not use this.
flattenIncludes() {
(
cd "${!outputInclude}/include" || exit
for file in */*; do
target=$(basename "$file")
echo "[HACK] Symlinking include $file to flattened path $target..."
ln -s "$file" "$target"
done
)
}
preFixupHooks+=(flattenIncludes)

View File

@ -33,6 +33,7 @@
, texmacs
, ttfautohint
, testers
, __flattenIncludeHackHook
}:
@ -48,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
propagatedBuildInputs = [ zlib bzip2 brotli libpng ]; # needed when linking against freetype
# dependence on harfbuzz is looser than the reverse dependence
nativeBuildInputs = [ pkg-config which ]
nativeBuildInputs = [ pkg-config which __flattenIncludeHackHook ]
++ lib.optional (!stdenv.hostPlatform.isWindows) makeWrapper
# FreeType requires GNU Make, which is not part of stdenv on FreeBSD.
++ lib.optional (!stdenv.hostPlatform.isLinux) gnumake;

View File

@ -18,6 +18,8 @@
, gitUpdater
, testers
, __flattenIncludeHackHook
}:
stdenv.mkDerivation (finalAttrs: {
@ -40,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: {
separateDebugInfo = !stdenv.hostPlatform.isStatic;
nativeBuildInputs = [ meson ninja pkg-config ];
nativeBuildInputs = [ meson ninja pkg-config __flattenIncludeHackHook ];
buildInputs = [ libpng ];

View File

@ -161,6 +161,8 @@ with pkgs;
### BUILD SUPPORT
__flattenIncludeHackHook = callPackage ../build-support/setup-hooks/flatten-include-hack { };
autoreconfHook = callPackage (
{ makeSetupHook, autoconf, automake, gettext, libtool }:
makeSetupHook {