diff options
author | Daniel Fullmer <danielrf12@gmail.com> | 2017-10-03 14:05:57 -0400 |
---|---|---|
committer | Daniel Fullmer <danielrf12@gmail.com> | 2017-10-03 20:22:04 -0400 |
commit | 9c53b9cff9ca6cb50e5d02ccd05e7453c8f6d08a (patch) | |
tree | e8a912b17e9a3838fef293a16e2e60a0e863c96e /pkgs/applications/misc/mupdf | |
parent | d8fe9476b7f98afc2790ef5c6bdd9d281d2bbad9 (diff) |
mupdf: fix library linking
Previously, libmupdf.so did not have DT_NEEDED references to its dependencies. Packages which linked against libmupdf would have to also manually link against its dependencies as well.
Diffstat (limited to 'pkgs/applications/misc/mupdf')
-rw-r--r-- | pkgs/applications/misc/mupdf/default.nix | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/pkgs/applications/misc/mupdf/default.nix b/pkgs/applications/misc/mupdf/default.nix index 9fe275b490c1e..5651405633fb1 100644 --- a/pkgs/applications/misc/mupdf/default.nix +++ b/pkgs/applications/misc/mupdf/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, fetchpatch, pkgconfig -, freetype, harfbuzz, openjpeg, jbig2dec +, freetype, harfbuzz, openjpeg, jbig2dec, libjpeg , enableX11 ? true, libX11, libXext , enableCurl ? true, curl, openssl }: @@ -26,11 +26,17 @@ stdenv.mkDerivation rec { url = "http://git.ghostscript.com/?p=mupdf.git;a=blobdiff_plain;f=platform/x11/jstest_main.c;h=f158d9628ed0c0a84e37fe128277679e8334422a;hp=13c3a0a3ba3ff4aae29f6882d23740833c1d842f;hb=06a012a42c9884e3cd653e7826cff1ddec04eb6e;hpb=34e18d127a02146e3415b33c4b67389ce1ddb614"; sha256 = "163bllvjrbm0gvjb25lv7b6sih4zr4g4lap3h0cbq8dvpjxx0jfc"; }) + + (fetchpatch { + name = "mupdf-1.11-shared_libs-1.patch"; + url = "http://www.linuxfromscratch.org/patches/downloads/mupdf/mupdf-1.11-shared_libs-1.patch"; + sha256 = "127x8jhyj3i9cn3mxw9mm5barw2yk43rvmghg54bhn4rjalx857j"; + }) ]; makeFlags = [ "prefix=$(out)" ]; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ freetype harfbuzz openjpeg jbig2dec ] + buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg ] ++ lib.optionals enableX11 [ libX11 libXext ] ++ lib.optionals enableCurl [ curl openssl ]; outputs = [ "bin" "dev" "out" "man" "doc" ]; @@ -41,13 +47,6 @@ stdenv.mkDerivation rec { ''; postInstall = '' - for i in $out/lib/*.a; do - so="''${i%.a}.so" - gcc -shared -o $so.${version} -Wl,--whole-archive $i -Wl,--no-whole-archive - ln -s $so.${version} $so - rm $i - done - mkdir -p "$out/lib/pkgconfig" cat >"$out/lib/pkgconfig/mupdf.pc" <<EOF prefix=$out |