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

fontforge: Fix uninterpolated CMAKE_INSTALL_PREFIX in RPATH. #94126

Merged
merged 1 commit into from
Jul 30, 2020
Merged
Changes from all commits
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
13 changes: 13 additions & 0 deletions pkgs/tools/misc/fontforge/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ stdenv, fetchurl, lib
, fetchpatch
, cmake, perl, uthash, pkgconfig, gettext
, python, freetype, zlib, glib, libungif, libpng, libjpeg, libtiff, libxml2, cairo, pango
, readline, woff2, zeromq, libuninameslist
Expand All @@ -21,6 +22,18 @@ stdenv.mkDerivation rec {
sha256 = "0qf88wd6riycq56d24brybyc93ns74s0nyyavm43zp2kfcihn6fd";
};

patches = [
# Unreleased fix for https://github.com/fontforge/fontforge/issues/4229
# which is required to fix an uninterposated `${CMAKE_INSTALL_PREFIX}/lib`, see
# see https://github.com/nh2/static-haskell-nix/pull/98#issuecomment-665395399
# TODO: Remove https://github.com/fontforge/fontforge/pull/4232 is in a release.
(fetchpatch {
name = "fontforge-cmake-set-rpath-to-the-configure-time-CMAKE_INSTALL_PREFIX";
url = "https://github.com/fontforge/fontforge/commit/297ee9b5d6db5970ca17ebe5305189e79a1520a1.patch";
sha256 = "14qfp8pwh0vzzib4hq2nc6xhn8lc1cal1sb0lqwb2q5dijqx5kqk";
})
];

# use $SOURCE_DATE_EPOCH instead of non-deterministic timestamps
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' {} \;
Expand Down