diff options
author | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-11-03 23:01:03 +0000 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-11-03 23:03:51 +0000 |
commit | de96fb7cc7c1477af00e260dc972331500881769 (patch) | |
tree | a3c9f720f3509dd8d2f1376b96288b65475f7dac /pkgs/applications/graphics/sxiv | |
parent | 7c605db462a6f96da08cae4ff5e8e191c254f67b (diff) |
sxiv: update to 1.3-git and fix runtime behaviour
The fix involves using imlib2 built with giflib instead of a libungif. Initially I split imlib2 into two but other distros seem to build imlib2 with giflib already and everything still builds with giflib version so I migrated imlib2 to giflib all together. Closes #4622
Diffstat (limited to 'pkgs/applications/graphics/sxiv')
-rw-r--r-- | pkgs/applications/graphics/sxiv/146.patch | 25 | ||||
-rw-r--r-- | pkgs/applications/graphics/sxiv/default.nix | 23 |
2 files changed, 12 insertions, 36 deletions
diff --git a/pkgs/applications/graphics/sxiv/146.patch b/pkgs/applications/graphics/sxiv/146.patch deleted file mode 100644 index ad1b030e1a464..0000000000000 --- a/pkgs/applications/graphics/sxiv/146.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b901236261dc717dc08ed10f63e2d5cd3f3031f8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bart=C5=82omiej=20Piotrowski?= <b@bpiotrowski.pl> -Date: Tue, 27 May 2014 11:46:06 +0200 -Subject: [PATCH] Fix build with giflib >= 5.1.0. - ---- - image.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/image.c b/image.c -index e62a69f..7eec544 100644 ---- a/image.c -+++ b/image.c -@@ -278,7 +278,11 @@ bool img_load_gif(img_t *img, const fileinfo_t *file) - } - } while (rec != TERMINATE_RECORD_TYPE); - -+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1 -+ DGifCloseFile(gif, NULL); -+#else - DGifCloseFile(gif); -+#endif - - if (err && !file->loaded) - warn("corrupted gif file: %s", file->name); diff --git a/pkgs/applications/graphics/sxiv/default.nix b/pkgs/applications/graphics/sxiv/default.nix index b62bbb57f6425..e7e52f91b4993 100644 --- a/pkgs/applications/graphics/sxiv/default.nix +++ b/pkgs/applications/graphics/sxiv/default.nix @@ -1,20 +1,21 @@ -{ stdenv, fetchurl, libX11, imlib2, giflib }: +{ stdenv, fetchgit, libX11, imlib2, giflib, libexif }: stdenv.mkDerivation rec { - name = "sxiv-1.2"; + version = "1.3-git"; + name = "sxiv-${version}"; - src = fetchurl { - url = "https://github.com/muennich/sxiv/archive/v1.2.tar.gz"; - name = "${name}.tar.gz"; - sha256 = "1wwcxy2adc67xd8x6c2sayy1cjcwrv2lvv1iwln7y4w992gbcxmc"; + src = fetchgit { + url = "git@github.com:muennich/sxiv.git"; + rev = "f55d9f4283f7133ab5a137fc04ee19d1df62fafb"; + sha256 = "85f734f40fdc837514b72694de12bac92fe130286fa6f1dc374e94d575ca8280"; }; - patches = [ ./146.patch ]; - - buildInputs = [ libX11 imlib2 giflib ]; - - prePatch = ''sed -i "s@/usr/local@$out@" Makefile''; + postUnpack = '' + substituteInPlace $sourceRoot/Makefile \ + --replace /usr/local $out + ''; + buildInputs = [ libX11 imlib2 giflib libexif ]; meta = { description = "Simple X Image Viewer"; homepage = "https://github.com/muennich/sxiv"; |