Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freetype: format #133165

Merged
merged 2 commits into from
Aug 16, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 21 additions & 24 deletions pkgs/development/libraries/freetype/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,11 @@
useEncumberedCode ? true
}:

let
inherit (lib) optional optionalString;

in stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
pname = "freetype";
version = "2.11.0";

meta = with lib; {
description = "A font rendering engine";
longDescription = ''
FreeType is a portable and efficient library for rendering fonts. It
supports TrueType, Type 1, CFF fonts, and WOFF, PCF, FNT, BDF and PFR
fonts. It has a bytecode interpreter and has an automatic hinter called
autofit which can be used instead of hinting instructions included in
fonts.
'';
homepage = "https://www.freetype.org/";
license = licenses.gpl2Plus; # or the FreeType License (BSD + advertising clause)
platforms = platforms.all;
maintainers = with maintainers; [ ttuegel ];
};

src = fetchurl {
url = "mirror://savannah/${pname}/${pname}-${version}.tar.xz";
sha256 = "sha256-i+45vTloxIBLcGFKCjrVlyma0OgkvIqtXOiq9IBnvec=";
Expand All @@ -41,12 +24,11 @@ in stdenv.mkDerivation rec {
# dependence on harfbuzz is looser than the reverse dependence
nativeBuildInputs = [ pkg-config which makeWrapper ]
# FreeType requires GNU Make, which is not part of stdenv on FreeBSD.
++ optional (!stdenv.isLinux) gnumake;
++ lib.optional (!stdenv.isLinux) gnumake;

patches =
[ ./enable-table-validation.patch
] ++
optional useEncumberedCode ./enable-subpixel-rendering.patch;
patches = [
./enable-table-validation.patch
] ++ lib.optional useEncumberedCode ./enable-subpixel-rendering.patch;

outputs = [ "out" "dev" ];

Expand All @@ -56,7 +38,7 @@ in stdenv.mkDerivation rec {
CC_BUILD = "${buildPackages.stdenv.cc}/bin/cc";

# The asm for armel is written with the 'asm' keyword.
CFLAGS = optionalString stdenv.isAarch32 "-std=gnu99";
CFLAGS = lib.optionalString stdenv.isAarch32 "-std=gnu99";

enableParallelBuilding = true;

Expand All @@ -70,4 +52,19 @@ in stdenv.mkDerivation rec {
--set PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$dev/lib/pkgconfig"
'';

meta = with lib; {
description = "A font rendering engine";
longDescription = ''
FreeType is a portable and efficient library for rendering fonts. It
supports TrueType, Type 1, CFF fonts, and WOFF, PCF, FNT, BDF and PFR
fonts. It has a bytecode interpreter and has an automatic hinter called
autofit which can be used instead of hinting instructions included in
fonts.
'';
homepage = "https://www.freetype.org/";
license = licenses.gpl2Plus; # or the FreeType License (BSD + advertising clause)
platforms = platforms.all;
maintainers = with maintainers; [ ttuegel ];
};

}
SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved