mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
fontforge: 20170730 -> 20190317
https://github.com/fontforge/fontforge/releases/tag/20190317 * add zmq (collab), woff2 (format), readline (cli) * "just in case", keep determinism patching * fontforge-fonttools: replace with override enabling tools Don't see any reason to not include by default, so this might make more sense as an alias instead.
This commit is contained in:
parent
0ddae82e6a
commit
867564a73d
3 changed files with 21 additions and 50 deletions
|
@ -1,26 +1,26 @@
|
||||||
{ stdenv, fetchFromGitHub, lib
|
{ stdenv, fetchurl, lib
|
||||||
, autoconf, automake, gnum4, libtool, perl, gnulib, uthash, pkgconfig, gettext
|
, autoconf, automake, gnum4, libtool, perl, gnulib, uthash, pkgconfig, gettext
|
||||||
, python, freetype, zlib, glib, libungif, libpng, libjpeg, libtiff, libxml2, pango
|
, python, freetype, zlib, glib, libungif, libpng, libjpeg, libtiff, libxml2, cairo, pango
|
||||||
|
, readline, woff2, zeromq
|
||||||
, withSpiro ? false, libspiro
|
, withSpiro ? false, libspiro
|
||||||
, withGTK ? false, gtk2
|
, withGTK ? false, gtk2
|
||||||
, withPython ? true
|
, withPython ? true
|
||||||
|
, withExtras ? true
|
||||||
, Carbon ? null, Cocoa ? null
|
, Carbon ? null, Cocoa ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "fontforge-${version}";
|
pname = "fontforge";
|
||||||
version = "20170730";
|
version = "20190317";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchurl {
|
||||||
owner = "fontforge";
|
url = "https://github.com/${pname}/${pname}/releases/download/${version}/${pname}-${version}.tar.gz";
|
||||||
repo = "fontforge";
|
sha256 = "1ddqbpc32cgbccdnv0lfw0qhj59hcqzb7616ph5lkvm91pnas4dp";
|
||||||
rev = version;
|
|
||||||
sha256 = "15k6x97383p8l40jvcivalhwgbbcdg5vciyjz6m9r0lrlnjqkv99";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./fontforge-20140813-use-system-uthash.patch ];
|
patches = [ ./fontforge-20140813-use-system-uthash.patch ];
|
||||||
|
|
||||||
# use $SOURCE_DATE_EPOCH instead of non-determenistic timestamps
|
# use $SOURCE_DATE_EPOCH instead of non-deterministic timestamps
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
find . -type f -name '*.c' -exec sed -r -i 's#\btime\(&(.+)\)#if (getenv("SOURCE_DATE_EPOCH")) \1=atol(getenv("SOURCE_DATE_EPOCH")); else &#g' {} \;
|
find . -type f -name '*.c' -exec sed -r -i 's#\btime\(&(.+)\)#if (getenv("SOURCE_DATE_EPOCH")) \1=atol(getenv("SOURCE_DATE_EPOCH")); else &#g' {} \;
|
||||||
sed -r -i 's#author\s*!=\s*NULL#& \&\& !getenv("SOURCE_DATE_EPOCH")#g' fontforge/cvexport.c fontforge/dumppfa.c fontforge/print.c fontforge/svg.c fontforge/splineutil2.c
|
sed -r -i 's#author\s*!=\s*NULL#& \&\& !getenv("SOURCE_DATE_EPOCH")#g' fontforge/cvexport.c fontforge/dumppfa.c fontforge/print.c fontforge/svg.c fontforge/splineutil2.c
|
||||||
|
@ -32,19 +32,20 @@ stdenv.mkDerivation rec {
|
||||||
# do not use x87's 80-bit arithmetic, rouding errors result in very different font binaries
|
# do not use x87's 80-bit arithmetic, rouding errors result in very different font binaries
|
||||||
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isi686 [ "-msse2" "-mfpmath=sse" ];
|
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isi686 [ "-msse2" "-mfpmath=sse" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig autoconf automake gnum4 libtool perl gettext ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
autoconf automake gnum4 libtool perl gettext uthash
|
readline uthash woff2 zeromq
|
||||||
python freetype zlib glib libungif libpng libjpeg libtiff libxml2
|
python freetype zlib glib libungif libpng libjpeg libtiff libxml2
|
||||||
]
|
]
|
||||||
++ lib.optionals withSpiro [libspiro]
|
++ lib.optionals withSpiro [libspiro]
|
||||||
++ lib.optionals withGTK [ gtk2 pango ]
|
++ lib.optionals withGTK [ gtk2 cairo pango ]
|
||||||
++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ];
|
++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ];
|
||||||
|
|
||||||
configureFlags =
|
configureFlags = [ "--enable-woff2" ]
|
||||||
lib.optionals (!withPython) [ "--disable-python-scripting" "--disable-python-extension" ]
|
++ lib.optionals (!withPython) [ "--disable-python-scripting" "--disable-python-extension" ]
|
||||||
++ lib.optional withGTK "--enable-gtk2-use"
|
++ lib.optional withGTK "--enable-gtk2-use"
|
||||||
++ lib.optional (!withGTK) "--without-x";
|
++ lib.optional (!withGTK) "--without-x"
|
||||||
|
++ lib.optional withExtras "--enable-fontforge-extras";
|
||||||
|
|
||||||
# work-around: git isn't really used, but configuration fails without it
|
# work-around: git isn't really used, but configuration fails without it
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
@ -54,7 +55,7 @@ stdenv.mkDerivation rec {
|
||||||
export GIT="$(type -P true)"
|
export GIT="$(type -P true)"
|
||||||
cp -r "${gnulib}" ./gnulib
|
cp -r "${gnulib}" ./gnulib
|
||||||
chmod +w -R ./gnulib
|
chmod +w -R ./gnulib
|
||||||
./bootstrap --skip-git --gnulib-srcdir=./gnulib
|
./bootstrap --skip-git --gnulib-srcdir=./gnulib --force
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = false; # tries to wget some fonts
|
doCheck = false; # tries to wget some fonts
|
||||||
|
|
|
@ -8,10 +8,11 @@
|
||||||
EXTRA_DIST =
|
EXTRA_DIST =
|
||||||
CLEANFILES =
|
CLEANFILES =
|
||||||
MOSTLYCLEANFILES =
|
MOSTLYCLEANFILES =
|
||||||
@@ -113,7 +112,6 @@
|
@@ -113,8 +112,7 @@
|
||||||
Packaging/FontForge-doc.spec \
|
Packaging/FontForge-doc.spec \
|
||||||
Packaging/FontForge.spec \
|
Packaging/FontForge.spec \
|
||||||
Packaging/FontForge.static.spec \
|
Packaging/FontForge.static.spec \
|
||||||
|
README \
|
||||||
- uthash/src \
|
- uthash/src \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1 @@
|
||||||
{ stdenv, fetchFromGitHub, zlib }:
|
{ fontforge }: fontforge.override { withExtras = true; }
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
version = "20160404";
|
|
||||||
name = "fontforge-fonttools-${version}";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "fontforge";
|
|
||||||
repo = "fontforge";
|
|
||||||
rev = version;
|
|
||||||
sha256 = "15nacq84n9gvlzp3slpmfrrbh57kfb6lbdlc46i7aqgci4qv6fg0";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [ zlib ];
|
|
||||||
|
|
||||||
setSourceRoot = ''export sourceRoot="$(echo */contrib/fonttools)"'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p "$out"/{bin,share/doc/fontforge-fonttools}
|
|
||||||
for i in *.c; do
|
|
||||||
$CC "$i" -lz -lm --std=c99 -o "$out"/bin/$(basename "$i" .c)
|
|
||||||
done
|
|
||||||
cp README* "$out/share/doc/fontforge-fonttools"
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
description = ''Small font tools shipped in FontForge contrib'';
|
|
||||||
license = licenses.bsd3;
|
|
||||||
maintainers = with maintainers; [ raskin ];
|
|
||||||
platforms = with platforms; unix;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue