3
0
Fork 0
forked from mirrors/nixpkgs

djview: update 4.8 -> 4.10.3

Also kill tabs, remove unneeded (and failing) patch.
No qt5 yet, unfortunately.
This commit is contained in:
Vladimír Čunát 2015-09-20 08:43:32 +02:00
parent 80a9e5a183
commit a4d721efd7
2 changed files with 18 additions and 54 deletions

View file

@ -1,27 +1,29 @@
{stdenv, fetchurl, djvulibre, qt4, pkgconfig }:
{ stdenv, fetchurl, pkgconfig, djvulibre, qt4, xorg, libtiff }:
let
qt = qt4;
# TODO: qt = qt5.base; # should work but there's a mysterious "-silent" error
in
stdenv.mkDerivation rec {
name = "djview-4.8";
name = "djview-4.10.3";
src = fetchurl {
url = "mirror://sourceforge/djvu/${name}.tar.gz";
sha256 = "17y8jvbvj98h25qwsr93v24x75famv8d0jbb0h46xjj555y6wx4c";
sha256 = "09dbws0k8giizc0xqpad8plbyaply8x1pjc2k3207v2svk6hxf2h";
};
buildInputs = [djvulibre qt4];
nativeBuildInputs = [ pkgconfig ];
patches = [ ./djview4-qt-4.8.patch ];
buildInputs = [ djvulibre qt xorg.libXt libtiff ];
passthru = {
mozillaPlugin = "/lib/netscape/plugins";
};
meta = {
meta = with stdenv.lib; {
homepage = http://djvu.sourceforge.net/djview4.html;
description = "A new portable DjVu viewer and browser plugin";
license = stdenv.lib.licenses.gpl2;
inherit (qt4.meta) platforms;
maintainers = [ stdenv.lib.maintainers.urkud ];
description = "A portable DjVu viewer and browser plugin";
license = licenses.gpl2;
inherit (qt.meta) platforms;
maintainers = [ maintainers.urkud ];
};
}

View file

@ -1,38 +0,0 @@
Origin: OpenSUSE
Index: djview-4.8/src/qdjvuwidget.cpp
===================================================================
--- djview-4.8.orig/src/qdjvuwidget.cpp
+++ djview-4.8/src/qdjvuwidget.cpp
@@ -153,7 +153,7 @@ all_numbers(const char *s)
}
template<class T> static inline void
-swap(T& x, T& y)
+myswap(T& x, T& y)
{
T tmp;
tmp = x;
@@ -173,11 +173,11 @@ ksmallest(T *v, int n, int k)
/* Sort v[lo], v[m], v[hi] by insertion */
m = (lo+hi)/2;
if (v[lo]>v[m])
- swap(v[lo],v[m]);
+ myswap(v[lo],v[m]);
if (v[m]>v[hi]) {
- swap(v[m],v[hi]);
+ myswap(v[m],v[hi]);
if (v[lo]>v[m])
- swap(v[lo],v[m]);
+ myswap(v[lo],v[m]);
}
/* Extract pivot, place sentinel */
pivot = v[m];
@@ -191,7 +191,7 @@ ksmallest(T *v, int n, int k)
do ++l; while (v[l]<pivot);
do --h; while (v[h]>pivot);
if (l < h) {
- swap(v[l],v[h]);
+ myswap(v[l],v[h]);
goto loop;
}
/* Finish up */