From 80d21cb05b18629b076f3e4129e7242d4a31cd00 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Thu, 5 Jan 2012 09:54:46 +0000 Subject: [PATCH] Fix djvulibre compilation Also remove djview3. Use djview4 instead. svn path=/nixpkgs/branches/stdenv-updates/; revision=31307 --- pkgs/applications/misc/djvulibre/default.nix | 11 +- .../applications/misc/djvulibre/gcc-4.6.patch | 658 ++++++++++++++++++ 2 files changed, 664 insertions(+), 5 deletions(-) create mode 100644 pkgs/applications/misc/djvulibre/gcc-4.6.patch diff --git a/pkgs/applications/misc/djvulibre/default.nix b/pkgs/applications/misc/djvulibre/default.nix index b1001976ea04..e22dce72b628 100644 --- a/pkgs/applications/misc/djvulibre/default.nix +++ b/pkgs/applications/misc/djvulibre/default.nix @@ -1,5 +1,4 @@ -{ stdenv, fetchurl, lib, useQt3 ? false, libjpeg, libtiff, libpng, ghostscript -, libungif, zlib, x11, libX11, mesa, qt3 }: +{ stdenv, fetchurl, libjpeg, libtiff, libpng, ghostscript, libungif, zlib }: stdenv.mkDerivation rec { name = "djvulibre-3.5.24"; @@ -9,12 +8,14 @@ stdenv.mkDerivation rec { sha256 = "0d1592cmc7scg2jzah47mnvbqldhxb1x9vxm7y64a3iasa0lqwy0"; }; - buildInputs = [ libjpeg libtiff libpng ghostscript zlib libungif ] ++ - stdenv.lib.optionals useQt3 [qt3 libX11 x11 mesa]; + buildInputs = [ libjpeg libtiff libpng ghostscript zlib libungif ]; + + patches = [ ./gcc-4.6.patch ]; meta = { description = "A library and viewer for the DJVU file format for scanned images"; homepage = http://djvu.sourceforge.net; - maintainers = [ lib.maintainers.urkud ]; + maintainers = [ stdenv.lib.maintainers.urkud ]; + platforms = stdenv.lib.platforms.all; }; } diff --git a/pkgs/applications/misc/djvulibre/gcc-4.6.patch b/pkgs/applications/misc/djvulibre/gcc-4.6.patch new file mode 100644 index 000000000000..48fbc2bc7aca --- /dev/null +++ b/pkgs/applications/misc/djvulibre/gcc-4.6.patch @@ -0,0 +1,658 @@ +commit 3341545edba359b292a8ef6db1b7d342caf3dcf1 +Author: Leon Bottou +Date: Wed May 4 21:25:35 2011 -0700 + + Added include for gcc-4.6 + +diff --git a/libdjvu/BSByteStream.cpp b/libdjvu/BSByteStream.cpp +index b762ccf..d662ab0 100644 +--- a/libdjvu/BSByteStream.cpp ++++ b/libdjvu/BSByteStream.cpp +@@ -62,6 +62,7 @@ + + // - Author: Leon Bottou, 07/1998 + ++#include + #include + #include + #include +diff --git a/libdjvu/BSEncodeByteStream.cpp b/libdjvu/BSEncodeByteStream.cpp +index 5d80e51..68bc3e3 100644 +--- a/libdjvu/BSEncodeByteStream.cpp ++++ b/libdjvu/BSEncodeByteStream.cpp +@@ -71,6 +71,7 @@ + #include "GOS.h" + #endif + ++#include + #include + #include + #include +diff --git a/libdjvu/ByteStream.cpp b/libdjvu/ByteStream.cpp +index 158c33c..be01847 100644 +--- a/libdjvu/ByteStream.cpp ++++ b/libdjvu/ByteStream.cpp +@@ -73,6 +73,7 @@ + #include "GOS.h" + #include "GURL.h" + #include "DjVuMessage.h" ++#include + #include + #if defined(WIN32) || defined(__CYGWIN32__) + # include +diff --git a/libdjvu/DjVuFileCache.cpp b/libdjvu/DjVuFileCache.cpp +index 6b1e85d..7d7a192 100644 +--- a/libdjvu/DjVuFileCache.cpp ++++ b/libdjvu/DjVuFileCache.cpp +@@ -63,6 +63,7 @@ + #include "DjVuFileCache.h" + #include "debug.h" + ++#include + #include + + +diff --git a/libdjvu/DjVuGlobal.cpp b/libdjvu/DjVuGlobal.cpp +index e6d3cec..df9278e 100644 +--- a/libdjvu/DjVuGlobal.cpp ++++ b/libdjvu/DjVuGlobal.cpp +@@ -76,6 +76,8 @@ + #include "GThreads.h" + #include "GException.h" + #include "GContainer.h" ++ ++#include + #include + #include + #include +diff --git a/libdjvu/DjVuGlobalMemory.cpp b/libdjvu/DjVuGlobalMemory.cpp +index 3c6012c..c8ba309 100644 +--- a/libdjvu/DjVuGlobalMemory.cpp ++++ b/libdjvu/DjVuGlobalMemory.cpp +@@ -67,6 +67,8 @@ + + #include "DjVuGlobal.h" + #include "GException.h" ++ ++#include + #include + #include + #include "debug.h" +diff --git a/libdjvu/DjVuMessage.cpp b/libdjvu/DjVuMessage.cpp +index 6f5a735..1726025 100644 +--- a/libdjvu/DjVuMessage.cpp ++++ b/libdjvu/DjVuMessage.cpp +@@ -71,6 +71,7 @@ + #include "debug.h" + #include + #include ++#include + #include + #ifdef WIN32 + # include +diff --git a/libdjvu/DjVuMessageLite.cpp b/libdjvu/DjVuMessageLite.cpp +index b8c1010..5daa9d9 100644 +--- a/libdjvu/DjVuMessageLite.cpp ++++ b/libdjvu/DjVuMessageLite.cpp +@@ -73,8 +73,8 @@ + #include "debug.h" + #include + #include ++#include + #include +-// #include + #ifdef WIN32 + #include + #include +diff --git a/libdjvu/DjVuPalette.cpp b/libdjvu/DjVuPalette.cpp +index c489f7b..76b0bf4 100644 +--- a/libdjvu/DjVuPalette.cpp ++++ b/libdjvu/DjVuPalette.cpp +@@ -64,6 +64,8 @@ + #include "ByteStream.h" + #include "BSByteStream.h" + #include "DjVuPalette.h" ++ ++#include + #include + #include + +diff --git a/libdjvu/DjVuPort.h b/libdjvu/DjVuPort.h +index f6a92f6..e2b3125 100644 +--- a/libdjvu/DjVuPort.h ++++ b/libdjvu/DjVuPort.h +@@ -65,6 +65,7 @@ + + #include "GThreads.h" + #include "GURL.h" ++#include "stddef.h" + + #ifdef HAVE_NAMESPACES + namespace DJVU { +diff --git a/libdjvu/DjVuToPS.cpp b/libdjvu/DjVuToPS.cpp +index 5517bf3..6914ff9 100644 +--- a/libdjvu/DjVuToPS.cpp ++++ b/libdjvu/DjVuToPS.cpp +@@ -72,6 +72,7 @@ + #include "GPixmap.h" + #include "debug.h" + #include ++#include + #include + #include + #include +diff --git a/libdjvu/GBitmap.cpp b/libdjvu/GBitmap.cpp +index ab5c0de..797edcc 100644 +--- a/libdjvu/GBitmap.cpp ++++ b/libdjvu/GBitmap.cpp +@@ -66,6 +66,8 @@ + #include "GString.h" + #include "GThreads.h" + #include "GException.h" ++#include ++#include + #include + + // - Author: Leon Bottou, 05/1997 +diff --git a/libdjvu/GException.cpp b/libdjvu/GException.cpp +index 2ea179a..89da70f 100644 +--- a/libdjvu/GException.cpp ++++ b/libdjvu/GException.cpp +@@ -60,6 +60,7 @@ + # pragma implementation + #endif + ++#include + #include + #include + #include +diff --git a/libdjvu/GOS.cpp b/libdjvu/GOS.cpp +index e784932..d2088e2 100644 +--- a/libdjvu/GOS.cpp ++++ b/libdjvu/GOS.cpp +@@ -65,6 +65,7 @@ + #include "GOS.h" + #include "GURL.h" + ++#include + #include + #include + #include +diff --git a/libdjvu/GPixmap.cpp b/libdjvu/GPixmap.cpp +index 392df54..4bf6f57 100644 +--- a/libdjvu/GPixmap.cpp ++++ b/libdjvu/GPixmap.cpp +@@ -75,6 +75,8 @@ + #include "GThreads.h" + #include "Arrays.h" + #include "JPEGDecoder.h" ++ ++#include + #include + #include + #include +diff --git a/libdjvu/GSmartPointer.cpp b/libdjvu/GSmartPointer.cpp +index 6e523e7..58aef5b 100644 +--- a/libdjvu/GSmartPointer.cpp ++++ b/libdjvu/GSmartPointer.cpp +@@ -67,6 +67,7 @@ + // Our original implementation consisted of multiple classes. + // . + ++#include + #include + #if PARANOID_DEBUG + # include +diff --git a/libdjvu/GSmartPointer.h b/libdjvu/GSmartPointer.h +index 82781bd..8a8bb8a 100644 +--- a/libdjvu/GSmartPointer.h ++++ b/libdjvu/GSmartPointer.h +@@ -97,6 +97,8 @@ + #include "DjVuGlobal.h" + #include "atomic.h" + ++#include ++ + #ifdef HAVE_NAMESPACES + namespace DJVU { + # ifdef NOT_DEFINED // Just to fool emacs c++ mode +diff --git a/libdjvu/GString.cpp b/libdjvu/GString.cpp +index 03f6226..350b11b 100644 +--- a/libdjvu/GString.cpp ++++ b/libdjvu/GString.cpp +@@ -73,6 +73,7 @@ + #include "GThreads.h" + #include "debug.h" + ++#include + #include + #include + #include +diff --git a/libdjvu/GString.h b/libdjvu/GString.h +index b63b753..3aa1f76 100644 +--- a/libdjvu/GString.h ++++ b/libdjvu/GString.h +@@ -108,6 +108,7 @@ + #include "DjVuGlobal.h" + #include "GContainer.h" + ++#include + #include + #include + #ifdef WIN32 +diff --git a/libdjvu/GThreads.cpp b/libdjvu/GThreads.cpp +index d81f3c3..253fed8 100644 +--- a/libdjvu/GThreads.cpp ++++ b/libdjvu/GThreads.cpp +@@ -71,6 +71,8 @@ + #include "GThreads.h" + #include "GException.h" + #include "DjVuMessageLite.h" ++ ++#include + #include + #include + +diff --git a/libdjvu/GURL.cpp b/libdjvu/GURL.cpp +index c37bf52..a80078c 100644 +--- a/libdjvu/GURL.cpp ++++ b/libdjvu/GURL.cpp +@@ -72,6 +72,7 @@ + #include "GURL.h" + #include "debug.h" + ++#include + #include + #include + #include +diff --git a/libdjvu/GUnicode.cpp b/libdjvu/GUnicode.cpp +index 415c081..a8b25b8 100644 +--- a/libdjvu/GUnicode.cpp ++++ b/libdjvu/GUnicode.cpp +@@ -62,6 +62,8 @@ + + #include "GString.h" + ++#include ++ + #if HAS_ICONV + #include + #endif +diff --git a/libdjvu/IFFByteStream.h b/libdjvu/IFFByteStream.h +index a653f8c..e31b216 100644 +--- a/libdjvu/IFFByteStream.h ++++ b/libdjvu/IFFByteStream.h +@@ -124,6 +124,7 @@ + + + #include "DjVuGlobal.h" ++#include + #include + #include + #include +diff --git a/libdjvu/IW44EncodeCodec.cpp b/libdjvu/IW44EncodeCodec.cpp +index 8d7b12c..49081b7 100644 +--- a/libdjvu/IW44EncodeCodec.cpp ++++ b/libdjvu/IW44EncodeCodec.cpp +@@ -76,6 +76,7 @@ + #include "IFFByteStream.h" + #include "GRect.h" + ++#include + #include + #include + #include +diff --git a/libdjvu/IW44Image.cpp b/libdjvu/IW44Image.cpp +index 9476726..4a19fb5 100644 +--- a/libdjvu/IW44Image.cpp ++++ b/libdjvu/IW44Image.cpp +@@ -76,6 +76,7 @@ + #include "IFFByteStream.h" + #include "GRect.h" + ++#include + #include + #include + #include +diff --git a/libdjvu/JPEGDecoder.h b/libdjvu/JPEGDecoder.h +index bd430a0..fad1d4c 100644 +--- a/libdjvu/JPEGDecoder.h ++++ b/libdjvu/JPEGDecoder.h +@@ -64,6 +64,7 @@ + + #ifdef NEED_JPEG_DECODER + ++#include + #include + #include + +diff --git a/libdjvu/MMX.cpp b/libdjvu/MMX.cpp +index 5ab60bb..528dab6 100644 +--- a/libdjvu/MMX.cpp ++++ b/libdjvu/MMX.cpp +@@ -62,6 +62,7 @@ + + #include "MMX.h" + #include ++#include + #include + + +diff --git a/libdjvu/UnicodeByteStream.h b/libdjvu/UnicodeByteStream.h +index 0ae112b..9b49a17 100644 +--- a/libdjvu/UnicodeByteStream.h ++++ b/libdjvu/UnicodeByteStream.h +@@ -88,6 +88,7 @@ + #include "GString.h" + #include "ByteStream.h" + ++#include + + #ifdef HAVE_NAMESPACES + namespace DJVU { +diff --git a/libdjvu/XMLParser.cpp b/libdjvu/XMLParser.cpp +index 84386c5..7da923a 100644 +--- a/libdjvu/XMLParser.cpp ++++ b/libdjvu/XMLParser.cpp +@@ -75,6 +75,7 @@ + #include "debug.h" + #include + #include ++#include + #include + + +diff --git a/libdjvu/ZPCodec.cpp b/libdjvu/ZPCodec.cpp +index f6e971d..ff5b9bf 100644 +--- a/libdjvu/ZPCodec.cpp ++++ b/libdjvu/ZPCodec.cpp +@@ -66,6 +66,8 @@ + #include "ZPCodec.h" + #include "ByteStream.h" + #include "GException.h" ++ ++#include + #include + #include + #include +diff --git a/libdjvu/atomic.cpp b/libdjvu/atomic.cpp +index bdc193e..63fd483 100644 +--- a/libdjvu/atomic.cpp ++++ b/libdjvu/atomic.cpp +@@ -28,6 +28,7 @@ + # include "config.h" + #endif + ++#include + #include + #include + #include "atomic.h" +diff --git a/libdjvu/ddjvuapi.cpp b/libdjvu/ddjvuapi.cpp +index b18b84b..f40f5aa 100644 +--- a/libdjvu/ddjvuapi.cpp ++++ b/libdjvu/ddjvuapi.cpp +@@ -60,6 +60,7 @@ + # pragma implementation "ddjvuapi.h" + #endif + ++#include + #include + #include + #include +diff --git a/libdjvu/ddjvuapi.h b/libdjvu/ddjvuapi.h +index d0ed48f..841f223 100644 +--- a/libdjvu/ddjvuapi.h ++++ b/libdjvu/ddjvuapi.h +@@ -64,6 +64,7 @@ extern "C" { + } + #endif + ++#include + #include + #include + +diff --git a/libdjvu/miniexp.cpp b/libdjvu/miniexp.cpp +index e0fb087..fc51297 100644 +--- a/libdjvu/miniexp.cpp ++++ b/libdjvu/miniexp.cpp +@@ -23,6 +23,7 @@ + # pragma implementation "miniexp.h" + #endif + ++#include + #include + #include + #include +diff --git a/libdjvu/miniexp.h b/libdjvu/miniexp.h +index 91e345d..993005b 100644 +--- a/libdjvu/miniexp.h ++++ b/libdjvu/miniexp.h +@@ -38,7 +38,8 @@ extern "C" { + #ifndef MINILISPAPI + # define MINILISPAPI /**/ + #endif +- ++ ++#include + + /* -------------------------------------------------- */ + /* LISP EXPRESSIONS */ +diff --git a/tools/bzz.cpp b/tools/bzz.cpp +index ca092e1..2ebc7b9 100644 +--- a/tools/bzz.cpp ++++ b/tools/bzz.cpp +@@ -94,6 +94,7 @@ + #include "GURL.h" + #include "DjVuMessage.h" + #include ++#include + #include + + static const char *program = "(unknown)"; +diff --git a/tools/c44.cpp b/tools/c44.cpp +index 6f23b53..855504b 100644 +--- a/tools/c44.cpp ++++ b/tools/c44.cpp +@@ -226,6 +226,7 @@ + #include + #include + #include ++#include + #include + + // command line data +diff --git a/tools/cjb2.cpp b/tools/cjb2.cpp +index 8cf89b9..11eb662 100644 +--- a/tools/cjb2.cpp ++++ b/tools/cjb2.cpp +@@ -120,6 +120,7 @@ + #include "jb2tune.h" + + #include ++#include + #include + #if HAVE_TIFF + #include +diff --git a/tools/cpaldjvu.cpp b/tools/cpaldjvu.cpp +index 111cbd3..b640a7a 100644 +--- a/tools/cpaldjvu.cpp ++++ b/tools/cpaldjvu.cpp +@@ -118,6 +118,7 @@ + #include "jb2tune.h" + + #include ++#include + #include + #include + +diff --git a/tools/csepdjvu.cpp b/tools/csepdjvu.cpp +index cd721f8..d5203d5 100644 +--- a/tools/csepdjvu.cpp ++++ b/tools/csepdjvu.cpp +@@ -162,6 +162,7 @@ + #include "jb2tune.h" + + #include ++#include + #include + + #undef MIN +diff --git a/tools/ddjvu.cpp b/tools/ddjvu.cpp +index 817e045..981a270 100644 +--- a/tools/ddjvu.cpp ++++ b/tools/ddjvu.cpp +@@ -62,6 +62,7 @@ + # include "config.h" + #endif + ++#include + #include + #include + #include +diff --git a/tools/djvm.cpp b/tools/djvm.cpp +index 951bd66..6ea88c2 100644 +--- a/tools/djvm.cpp ++++ b/tools/djvm.cpp +@@ -135,9 +135,9 @@ + #include "DjVuMessage.h" + + #include ++#include + #include + #include +-#include + + static const char * progname; + +diff --git a/tools/djvmcvt.cpp b/tools/djvmcvt.cpp +index 9ca1c54..20b468a 100644 +--- a/tools/djvmcvt.cpp ++++ b/tools/djvmcvt.cpp +@@ -144,6 +144,7 @@ + + #include + #include ++#include + #include + + static const char * progname; +diff --git a/tools/djvudump.cpp b/tools/djvudump.cpp +index 6a0215a..2dddbdf 100644 +--- a/tools/djvudump.cpp ++++ b/tools/djvudump.cpp +@@ -119,6 +119,7 @@ xxx + #include + #include + #include ++#include + #include + + void +diff --git a/tools/djvuextract.cpp b/tools/djvuextract.cpp +index 4a9f381..907b99c 100644 +--- a/tools/djvuextract.cpp ++++ b/tools/djvuextract.cpp +@@ -105,6 +105,7 @@ + #include "GOS.h" + #include "DjVuMessage.h" + #include ++#include + #include + + +diff --git a/tools/djvumake.cpp b/tools/djvumake.cpp +index 7020484..4c5fc0f 100644 +--- a/tools/djvumake.cpp ++++ b/tools/djvumake.cpp +@@ -153,6 +153,7 @@ + + #include + #include ++#include + #include + #include + +diff --git a/tools/djvups.cpp b/tools/djvups.cpp +index 51aa999..632b832 100644 +--- a/tools/djvups.cpp ++++ b/tools/djvups.cpp +@@ -57,6 +57,7 @@ + # include "config.h" + #endif + ++#include + #include + #include + #include +diff --git a/tools/djvused.cpp b/tools/djvused.cpp +index de84dcd..687fdca 100644 +--- a/tools/djvused.cpp ++++ b/tools/djvused.cpp +@@ -61,6 +61,7 @@ + #endif + + #include ++#include + #include + #include + #include +diff --git a/tools/djvuserve.cpp b/tools/djvuserve.cpp +index 19a17da..818fe78 100644 +--- a/tools/djvuserve.cpp ++++ b/tools/djvuserve.cpp +@@ -73,6 +73,7 @@ + + #include + #include ++#include + #include + #include + #include +diff --git a/tools/djvutxt.cpp b/tools/djvutxt.cpp +index ba2c745..9e9124c 100644 +--- a/tools/djvutxt.cpp ++++ b/tools/djvutxt.cpp +@@ -61,6 +61,7 @@ + # include "config.h" + #endif + ++#include + #include + #include + #include +diff --git a/tools/tiff2pdf.h b/tools/tiff2pdf.h +index 082f5fb..656dc43 100644 +--- a/tools/tiff2pdf.h ++++ b/tools/tiff2pdf.h +@@ -22,6 +22,7 @@ + # endif + # if HAVE_TIFF + # include ++# include + # include + # include + # include +diff --git a/xmltools/djvutoxml.cpp b/xmltools/djvutoxml.cpp +index 17c769b..b40535e 100644 +--- a/xmltools/djvutoxml.cpp ++++ b/xmltools/djvutoxml.cpp +@@ -71,6 +71,7 @@ + + #include + #include ++#include + #include + #include + #include +diff --git a/xmltools/djvuxmlparser.cpp b/xmltools/djvuxmlparser.cpp +index bdc5768..6679a9d 100644 +--- a/xmltools/djvuxmlparser.cpp ++++ b/xmltools/djvuxmlparser.cpp +@@ -70,6 +70,7 @@ + #include + #include + #include ++#include + #include + + static void