zathura_djvu: 0.2.7 → 0.2.8

This commit is contained in:
Jan Tojnar 2018-03-27 21:55:46 +02:00
parent 3a8cabfe0b
commit 33662598b5
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
2 changed files with 7 additions and 39 deletions

View File

@ -1,29 +1,20 @@
{ stdenv, fetchurl, pkgconfig, gtk, zathura_core, girara, djvulibre, gettext }:
{ stdenv, fetchurl, meson, ninja, pkgconfig, gtk, zathura_core, girara, djvulibre, gettext }:
stdenv.mkDerivation rec {
name = "zathura-djvu-0.2.7";
name = "zathura-djvu-0.2.8";
src = fetchurl {
url = "http://pwmt.org/projects/zathura/plugins/download/${name}.tar.gz";
sha256 = "1sbfdsyp50qc85xc4458sn4w1rv1qbygdwmcr5kjlfpsmdq98vhd";
url = "https://pwmt.org/projects/zathura/plugins/download/${name}.tar.xz";
sha256 = "0axkv1crdxn0z44whaqp2ibkdqcykhjnxk7qzms0dp1b67an9rnh";
};
nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ meson ninja pkgconfig ];
buildInputs = [ djvulibre gettext zathura_core gtk girara ];
patches = [ ./gtkflags.patch ];
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
string1='-shared ''${LDFLAGS} -o $@ ''$(OBJECTS) ''${LIBS}'
string2='-Wl,-dylib_install_name,''${PLUGIN}.dylib -Wl,-bundle_loader,${zathura_core}/bin/.zathura-wrapped -bundle ''${LDFLAGS} -o $@ ''${OBJECTS} ''${LIBS}'
makefileC1=$(sed -r 's/\.so/.dylib/g' Makefile)
echo "''${makefileC1/$string1/$string2}" > Makefile
'';
makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ];
PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
meta = with stdenv.lib; {
homepage = http://pwmt.org/projects/zathura/;
homepage = https://pwmt.org/projects/zathura-djvu/;
description = "A zathura DJVU plugin";
longDescription = ''
The zathura-djvu plugin adds DjVu support to zathura by using the

View File

@ -1,23 +0,0 @@
--- zathura-djvu-0.2.7.orig/config.mk 2017-12-21 14:20:24.000000000 +0100
+++ zathura-djvu-0.2.7/config.mk 2017-12-31 00:41:02.580154770 +0100
@@ -16,6 +16,9 @@
DESKTOPPREFIX ?= ${PREFIX}/share/applications
# libs
+GTK_INC ?= $(shell pkg-config --cflags gtk+-2.0)
+GTK_LIB ?= $(shell pkg-config --libs gtk+-2.0)
+
CAIRO_INC ?= $(shell pkg-config --cflags cairo)
CAIRO_LIB ?= $(shell pkg-config --libs cairo)
@@ -34,8 +37,8 @@
PLUGINDIR = ${LIBDIR}/zathura
endif
-INCS = ${GIRARA_INC} ${GLIB_INC} ${DJVU_INC} ${CAIRO_INC} ${ZATHURA_INC}
-LIBS = ${GIRARA_LIB} ${GLIB_LIB} ${DJVU_LIB} ${CAIRO_LIB}
+INCS = ${GIRARA_INC} ${GLIB_INC} ${DJVU_INC} ${CAIRO_INC} ${ZATHURA_INC} ${GTK_INC}
+LIBS = ${GIRARA_LIB} ${GLIB_LIB} ${DJVU_LIB} ${CAIRO_LIB} ${GTK_LIB}
# pre-processor flags
CPPFLAGS += -D_FILE_OFFSET_BITS=64