Merge pull request #39502 from LnL7/darwin-harfbuzz
harfbuzz: add CoreText support for darwin
This commit is contained in:
commit
6a335f993e
@ -82,8 +82,8 @@ let
|
|||||||
xdg_utils yasm minizip libwebp
|
xdg_utils yasm minizip libwebp
|
||||||
libusb1 re2 zlib
|
libusb1 re2 zlib
|
||||||
ffmpeg libxslt libxml2
|
ffmpeg libxslt libxml2
|
||||||
# harfbuzz-icu # in versions over 63 harfbuzz and freetype are being built together
|
# harfbuzz # in versions over 63 harfbuzz and freetype are being built together
|
||||||
# so we can't build with one from system and other from source
|
# so we can't build with one from system and other from source
|
||||||
];
|
];
|
||||||
|
|
||||||
# build paths and release info
|
# build paths and release info
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, glib, freetype, cairo, libintl
|
{ stdenv, fetchurl, pkgconfig, glib, freetype, cairo, libintl
|
||||||
, icu, graphite2, harfbuzz # The icu variant uses and propagates the non-icu one.
|
, icu, graphite2, harfbuzz # The icu variant uses and propagates the non-icu one.
|
||||||
|
, ApplicationServices, CoreText
|
||||||
|
, withCoreText ? false
|
||||||
, withIcu ? false # recommended by upstream as default, but most don't needed and it's big
|
, withIcu ? false # recommended by upstream as default, but most don't needed and it's big
|
||||||
, withGraphite2 ? true # it is small and major distros do include it
|
, withGraphite2 ? true # it is small and major distros do include it
|
||||||
, python
|
, python
|
||||||
@ -27,12 +29,17 @@ stdenv.mkDerivation {
|
|||||||
outputBin = "dev";
|
outputBin = "dev";
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
( "--with-graphite2=" + (if withGraphite2 then "yes" else "no") ) # not auto-detected by default
|
# not auto-detected by default
|
||||||
( "--with-icu=" + (if withIcu then "yes" else "no") )
|
"--with-graphite2=${if withGraphite2 then "yes" else "no"}"
|
||||||
];
|
"--with-icu=${if withIcu then "yes" else "no"}"
|
||||||
|
]
|
||||||
|
++ stdenv.lib.optional withCoreText "--with-coretext=yes";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig libintl ];
|
nativeBuildInputs = [ pkgconfig libintl ];
|
||||||
buildInputs = [ glib freetype cairo ]; # recommended by upstream
|
|
||||||
|
buildInputs = [ glib freetype cairo ] # recommended by upstream
|
||||||
|
++ stdenv.lib.optionals withCoreText [ ApplicationServices CoreText ];
|
||||||
|
|
||||||
propagatedBuildInputs = []
|
propagatedBuildInputs = []
|
||||||
++ optional withGraphite2 graphite2
|
++ optional withGraphite2 graphite2
|
||||||
++ optionals withIcu [ icu harfbuzz ];
|
++ optionals withIcu [ icu harfbuzz ];
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, fetchFromGitHub, rustPlatform
|
{ stdenv, fetchFromGitHub, rustPlatform
|
||||||
, darwin, fontconfig, harfbuzz-icu, openssl, pkgconfig }:
|
, darwin, fontconfig, harfbuzz, openssl, pkgconfig }:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
name = "tectonic-${version}";
|
name = "tectonic-${version}";
|
||||||
@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
|
||||||
buildInputs = [ fontconfig harfbuzz-icu openssl ]
|
buildInputs = [ fontconfig harfbuzz openssl ]
|
||||||
++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Cocoa Foundation ]);
|
++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Cocoa Foundation ]);
|
||||||
|
|
||||||
# tests fail due to read-only nix store
|
# tests fail due to read-only nix store
|
||||||
|
@ -9769,13 +9769,14 @@ with pkgs;
|
|||||||
};
|
};
|
||||||
libheimdal = heimdal.override { type = "lib"; };
|
libheimdal = heimdal.override { type = "lib"; };
|
||||||
|
|
||||||
harfbuzz = callPackage ../development/libraries/harfbuzz { };
|
harfbuzz = callPackage ../development/libraries/harfbuzz {
|
||||||
harfbuzz-icu = harfbuzz.override {
|
inherit (darwin.apple_sdk.frameworks) ApplicationServices CoreText;
|
||||||
withIcu = true;
|
|
||||||
withGraphite2 = true;
|
|
||||||
};
|
};
|
||||||
harfbuzz-icu-58 = harfbuzz-icu.override {
|
|
||||||
icu = icu58;
|
harfbuzzFull = harfbuzz.override {
|
||||||
|
withCoreText = stdenv.isDarwin;
|
||||||
|
withGraphite2 = true;
|
||||||
|
withIcu = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
hawknl = callPackage ../development/libraries/hawknl { };
|
hawknl = callPackage ../development/libraries/hawknl { };
|
||||||
@ -11574,7 +11575,7 @@ with pkgs;
|
|||||||
inherit stdenv fetchurl makeSetupHook;
|
inherit stdenv fetchurl makeSetupHook;
|
||||||
bison = bison2; # error: too few arguments to function 'int yylex(...
|
bison = bison2; # error: too few arguments to function 'int yylex(...
|
||||||
inherit cups;
|
inherit cups;
|
||||||
harfbuzz = harfbuzz-icu;
|
harfbuzz = harfbuzzFull;
|
||||||
inherit libGL;
|
inherit libGL;
|
||||||
inherit perl;
|
inherit perl;
|
||||||
inherit (gst_all_1) gstreamer gst-plugins-base;
|
inherit (gst_all_1) gstreamer gst-plugins-base;
|
||||||
@ -11588,7 +11589,7 @@ with pkgs;
|
|||||||
inherit stdenv fetchurl makeSetupHook;
|
inherit stdenv fetchurl makeSetupHook;
|
||||||
bison = bison2; # error: too few arguments to function 'int yylex(...
|
bison = bison2; # error: too few arguments to function 'int yylex(...
|
||||||
inherit cups;
|
inherit cups;
|
||||||
harfbuzz = harfbuzz-icu;
|
harfbuzz = harfbuzzFull;
|
||||||
inherit libGL;
|
inherit libGL;
|
||||||
inherit perl;
|
inherit perl;
|
||||||
inherit (gst_all_1) gstreamer gst-plugins-base;
|
inherit (gst_all_1) gstreamer gst-plugins-base;
|
||||||
@ -11603,7 +11604,7 @@ with pkgs;
|
|||||||
inherit stdenv fetchurl fetchFromGitHub makeSetupHook;
|
inherit stdenv fetchurl fetchFromGitHub makeSetupHook;
|
||||||
bison = bison2; # error: too few arguments to function 'int yylex(...
|
bison = bison2; # error: too few arguments to function 'int yylex(...
|
||||||
inherit cups;
|
inherit cups;
|
||||||
harfbuzz = harfbuzz-icu;
|
harfbuzz = harfbuzzFull;
|
||||||
inherit libGL;
|
inherit libGL;
|
||||||
inherit perl;
|
inherit perl;
|
||||||
inherit (gst_all_1) gstreamer gst-plugins-base;
|
inherit (gst_all_1) gstreamer gst-plugins-base;
|
||||||
@ -12123,7 +12124,9 @@ with pkgs;
|
|||||||
|
|
||||||
tecla = callPackage ../development/libraries/tecla { };
|
tecla = callPackage ../development/libraries/tecla { };
|
||||||
|
|
||||||
tectonic = callPackage ../tools/typesetting/tectonic { };
|
tectonic = callPackage ../tools/typesetting/tectonic {
|
||||||
|
harfbuzz = harfbuzzFull;
|
||||||
|
};
|
||||||
|
|
||||||
tepl = callPackage ../development/libraries/tepl { };
|
tepl = callPackage ../development/libraries/tepl { };
|
||||||
|
|
||||||
@ -12318,13 +12321,15 @@ with pkgs;
|
|||||||
webkitgtk = webkitgtk220x;
|
webkitgtk = webkitgtk220x;
|
||||||
|
|
||||||
webkitgtk24x-gtk3 = callPackage ../development/libraries/webkitgtk/2.4.nix {
|
webkitgtk24x-gtk3 = callPackage ../development/libraries/webkitgtk/2.4.nix {
|
||||||
harfbuzz = harfbuzz-icu-58;
|
harfbuzz = harfbuzzFull.override {
|
||||||
|
icu = icu58;
|
||||||
|
};
|
||||||
gst-plugins-base = gst_all_1.gst-plugins-base;
|
gst-plugins-base = gst_all_1.gst-plugins-base;
|
||||||
inherit (darwin) libobjc;
|
inherit (darwin) libobjc;
|
||||||
};
|
};
|
||||||
|
|
||||||
webkitgtk220x = callPackage ../development/libraries/webkitgtk/2.20.nix {
|
webkitgtk220x = callPackage ../development/libraries/webkitgtk/2.20.nix {
|
||||||
harfbuzz = harfbuzz-icu;
|
harfbuzz = harfbuzzFull;
|
||||||
inherit (gst_all_1) gst-plugins-base gst-plugins-bad;
|
inherit (gst_all_1) gst-plugins-base gst-plugins-bad;
|
||||||
stdenv = overrideCC stdenv gcc6;
|
stdenv = overrideCC stdenv gcc6;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user