mupdf: fix finding pkg-config under cross-compilation
This commit is contained in:
parent
511cc4866f
commit
48728f5ca4
@ -5,6 +5,7 @@
|
|||||||
, copyDesktopItems
|
, copyDesktopItems
|
||||||
, makeDesktopItem
|
, makeDesktopItem
|
||||||
, desktopToDarwinBundle
|
, desktopToDarwinBundle
|
||||||
|
, buildPackages
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, freetype
|
, freetype
|
||||||
, harfbuzz
|
, harfbuzz
|
||||||
@ -49,13 +50,17 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i "s/__OPENJPEG__VERSION__/${openJpegVersion}/" source/fitz/load-jpx.c
|
sed -i "s/__OPENJPEG__VERSION__/${openJpegVersion}/" source/fitz/load-jpx.c
|
||||||
|
substituteInPlace Makerules --replace "(shell pkg-config" "(shell $PKG_CONFIG"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Use shared libraries to decrease size
|
# Use shared libraries to decrease size
|
||||||
buildFlags = [ "shared" ];
|
buildFlags = [ "shared" ];
|
||||||
|
|
||||||
makeFlags = [ "prefix=$(out)" "USE_SYSTEM_LIBS=yes" ]
|
makeFlags = [
|
||||||
++ lib.optionals (!enableX11) [ "HAVE_X11=no" ]
|
"prefix=$(out)"
|
||||||
|
"USE_SYSTEM_LIBS=yes"
|
||||||
|
"PKG_CONFIG=${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config"
|
||||||
|
] ++ lib.optionals (!enableX11) [ "HAVE_X11=no" ]
|
||||||
++ lib.optionals (!enableGL) [ "HAVE_GLUT=no" ];
|
++ lib.optionals (!enableGL) [ "HAVE_GLUT=no" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ]
|
nativeBuildInputs = [ pkg-config ]
|
||||||
|
Loading…
Reference in New Issue
Block a user