summary refs log tree commit diff
path: root/pkgs/development/libraries/freetype/default.nix
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2023-09-09 21:25:11 +0100
committerSergei Trofimovich <slyich@gmail.com>2023-09-09 21:29:16 +0100
commit8bddf58c4aa5dbdd4b60b087aa30c32451ade21d (patch)
tree4959d613a9f4e1a1dd49da63cab7789df3fc5afc /pkgs/development/libraries/freetype/default.nix
parent084dfe801e31dff372bcf424470ec0ae6dc07f38 (diff)
downloadnixpkgs-8bddf58c4aa5dbdd4b60b087aa30c32451ade21d.tar
nixpkgs-8bddf58c4aa5dbdd4b60b087aa30c32451ade21d.tar.gz
nixpkgs-8bddf58c4aa5dbdd4b60b087aa30c32451ade21d.tar.bz2
nixpkgs-8bddf58c4aa5dbdd4b60b087aa30c32451ade21d.tar.lz
nixpkgs-8bddf58c4aa5dbdd4b60b087aa30c32451ade21d.tar.xz
nixpkgs-8bddf58c4aa5dbdd4b60b087aa30c32451ade21d.tar.zst
nixpkgs-8bddf58c4aa5dbdd4b60b087aa30c32451ade21d.zip
freetype: enable 64-bit API on 32-bit systems
Without the change `pkgsi686Linux.fontconfig` test fails to find the font
on filesystems with 64-bit inodes:

    fontconfig> FAIL: test-bz106632

This happens because `freetype` uses 32-bit `fstat()` API in
builds/unix/ftsystem.c without explicit 64-bit bit switch on.
Diffstat (limited to 'pkgs/development/libraries/freetype/default.nix')
-rw-r--r--pkgs/development/libraries/freetype/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix
index f4a81633f54..6e6989d9304 100644
--- a/pkgs/development/libraries/freetype/default.nix
+++ b/pkgs/development/libraries/freetype/default.nix
@@ -55,7 +55,8 @@ stdenv.mkDerivation (finalAttrs: {
   CC_BUILD = "${buildPackages.stdenv.cc}/bin/cc";
 
   # The asm for armel is written with the 'asm' keyword.
-  CFLAGS = lib.optionalString stdenv.isAarch32 "-std=gnu99";
+  CFLAGS = lib.optionalString stdenv.isAarch32 "-std=gnu99"
+    + lib.optionalString stdenv.hostPlatform.is32bit " -D_FILE_OFFSET_BITS=64";
 
   enableParallelBuilding = true;