mupdf: 1.8 -> 1.9
Updates mupdf, and libmupdf.so
This commit is contained in:
parent
862c160e29
commit
9b385535e8
@ -1,42 +1,25 @@
|
|||||||
{ stdenv, fetchurl, fetchpatch, pkgconfig, zlib, freetype, libjpeg, jbig2dec, openjpeg
|
{ stdenv, fetchurl, fetchpatch, pkgconfig
|
||||||
, libX11, libXext }:
|
, zlib, freetype, libjpeg, jbig2dec, openjpeg
|
||||||
|
, libX11, libXcursor, libXrandr, libXinerama, libXext, harfbuzz, mesa }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "1.8";
|
version = "1.9";
|
||||||
name = "mupdf-${version}";
|
name = "mupdf-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://mupdf.com/downloads/archive/${name}-source.tar.gz";
|
url = "http://mupdf.com/downloads/archive/${name}-source.tar.gz";
|
||||||
sha256 = "01n26cy41lc2fjri63s4js23ixxb4nd37aafry3hz4i4id6wd8x2";
|
sha256 = "15p2k1n3afc7bnqrc0zfqz31fjfq3rrrrj4fwwy5az26d11ynxhp";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE= [ "-fPIC" ];
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
propagatedBuildInputs = [ openjpeg libjpeg jbig2dec ];
|
buildInputs = [ zlib freetype libX11 libXcursor libXext harfbuzz mesa libXrandr libXinerama];
|
||||||
buildInputs = [ zlib freetype libX11 libXext ];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
installPhase = ''
|
||||||
|
make install prefix=$out
|
||||||
|
gcc -shared -o $out/lib/libmupdf.so.${version} -Wl,--whole-archive $out/lib/libmupdf.a -Wl,--no-whole-archive
|
||||||
|
|
||||||
my_soname = "libmupdf.so.1.3";
|
ln -s $out/lib/libmupdf.so.${version} $out/lib/libmupdf.so
|
||||||
my_soname_js_none = "libmupdf-js-none.so.1.3";
|
|
||||||
preBuild = ''
|
|
||||||
export makeFlags="prefix=$out build=release XCFLAGS=-fpic"
|
|
||||||
export NIX_CFLAGS_COMPILE=" $NIX_CFLAGS_COMPILE -I$(echo ${openjpeg}/include/openjpeg-*) "
|
|
||||||
|
|
||||||
# Copied from Gentoo ebuild
|
|
||||||
rm -rf thirdparty
|
|
||||||
sed -e "\$a\$(MUPDF_LIB): \$(MUPDF_JS_NONE_LIB)" \
|
|
||||||
-e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname -Wl,${my_soname} -Wl,--no-undefined -o \$@ \$^ \$(MUPDF_JS_NONE_LIB) \$(LIBS)" \
|
|
||||||
-e "/^MUPDF_LIB :=/s:=.*:= \$(OUT)/${my_soname}:" \
|
|
||||||
-e "\$a\$(MUPDF_JS_NONE_LIB):" \
|
|
||||||
-e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname -Wl,${my_soname_js_none} -Wl,--no-undefined -o \$@ \$^ \$(LIBS)" \
|
|
||||||
-e "/^MUPDF_JS_NONE_LIB :=/s:=.*:= \$(OUT)/${my_soname_js_none}:" \
|
|
||||||
-i Makefile
|
|
||||||
|
|
||||||
sed -e "s/libopenjpeg1/libopenjp2/" -i Makerules
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
ln -s ${my_soname} $out/lib/libmupdf.so
|
|
||||||
|
|
||||||
mkdir -p "$out/lib/pkgconfig"
|
mkdir -p "$out/lib/pkgconfig"
|
||||||
cat >"$out/lib/pkgconfig/mupdf.pc" <<EOF
|
cat >"$out/lib/pkgconfig/mupdf.pc" <<EOF
|
||||||
@ -63,14 +46,14 @@ stdenv.mkDerivation rec {
|
|||||||
Terminal=false
|
Terminal=false
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://mupdf.com/;
|
homepage = http://mupdf.com;
|
||||||
repositories.git = git://git.ghostscript.com/mupdf.git;
|
repositories.git = git://git.ghostscript.com/mupdf.git;
|
||||||
description = "Lightweight PDF viewer and toolkit written in portable C";
|
description = "Lightweight PDF viewer and toolkit written in portable C";
|
||||||
license = stdenv.lib.licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
maintainers = with stdenv.lib.maintainers; [ viric ];
|
maintainers = with maintainers; [ viric vrthra ];
|
||||||
platforms = with stdenv.lib.platforms; linux;
|
platforms = platforms.linux;
|
||||||
inherit version;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user