djview-4.8, fix build with qt-4.8
svn path=/nixpkgs/trunk/; revision=32171
This commit is contained in:
parent
f9c551a41f
commit
3217e1c5c3
@ -1,14 +1,18 @@
|
|||||||
{stdenv, fetchurl, djvulibre, qt4 }:
|
{stdenv, fetchurl, djvulibre, qt4, pkgconfig }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
name = "djview4-4.1-2";
|
name = "djview-4.8";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = mirror://sf/djvu/djview4-4.1-2.tar.gz;
|
url = "mirror://sourceforge/djvu/${name}.tar.gz";
|
||||||
sha256 = "10k0h892kab3n8xypw6vsnvhwil410hvvqj375pwiss4vlm5isv1";
|
sha256 = "17y8jvbvj98h25qwsr93v24x75famv8d0jbb0h46xjj555y6wx4c";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [djvulibre qt4];
|
buildInputs = [djvulibre qt4];
|
||||||
|
|
||||||
|
buildNativeInputs = [ pkgconfig ];
|
||||||
|
|
||||||
|
patches = [ ./djview4-qt-4.8.patch ];
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
mozillaPlugin = "/lib/netscape/plugins";
|
mozillaPlugin = "/lib/netscape/plugins";
|
||||||
};
|
};
|
||||||
|
38
pkgs/applications/graphics/djview/djview4-qt-4.8.patch
Normal file
38
pkgs/applications/graphics/djview/djview4-qt-4.8.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
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 */
|
@ -6624,7 +6624,8 @@ let
|
|||||||
|
|
||||||
djvulibre = callPackage ../applications/misc/djvulibre { };
|
djvulibre = callPackage ../applications/misc/djvulibre { };
|
||||||
|
|
||||||
djview4 = callPackage ../applications/graphics/djview { };
|
djview = callPackage ../applications/graphics/djview { };
|
||||||
|
djview4 = pkgs.djview;
|
||||||
|
|
||||||
dmenu = callPackage ../applications/misc/dmenu { };
|
dmenu = callPackage ../applications/misc/dmenu { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user