diff --git a/pkgs/applications/misc/diffpdf/default.nix b/pkgs/applications/misc/diffpdf/default.nix index fd3d0b35729e..144e1fa566ca 100644 --- a/pkgs/applications/misc/diffpdf/default.nix +++ b/pkgs/applications/misc/diffpdf/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt4, poppler_qt4, qmake4Hook }: +{ stdenv, fetchurl, fetchpatch, qmake, qttools, qtbase, poppler_qt5 }: stdenv.mkDerivation rec { version = "2.1.3"; @@ -9,13 +9,19 @@ stdenv.mkDerivation rec { sha256 = "0cr468fi0d512jjj23r5flfzx957vibc9c25gwwhi0d773h2w566"; }; - patches = [ ./fix_path_poppler_qt4.patch ]; + patches = [ + (fetchpatch { + url = https://raw.githubusercontent.com/gentoo/gentoo/9b971631588ff46e7c2d501bc35cd0d9ce2d98e2/app-text/diffpdf/files/diffpdf-2.1.3-qt5.patch; + sha256 = "0sax8gcqcmzf74hmdr3rarqs4nsxmml9qmh6pqyjmgl3lypxhafg"; + }) + ./fix_path_poppler_qt5.patch + ]; - buildInputs = [ qt4 poppler_qt4 ]; - nativeBuildInputs = [ qmake4Hook ]; + nativeBuildInputs = [ qmake qttools ]; + buildInputs = [ qtbase poppler_qt5 ]; preConfigure = '' - substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT4@@ ${poppler_qt4.dev} + substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT5@@ ${poppler_qt5.dev} lrelease diffpdf.pro ''; diff --git a/pkgs/applications/misc/diffpdf/fix_path_poppler_qt4.patch b/pkgs/applications/misc/diffpdf/fix_path_poppler_qt5.patch similarity index 53% rename from pkgs/applications/misc/diffpdf/fix_path_poppler_qt4.patch rename to pkgs/applications/misc/diffpdf/fix_path_poppler_qt5.patch index e72cad8b7a25..9535ea2c6b0d 100644 --- a/pkgs/applications/misc/diffpdf/fix_path_poppler_qt4.patch +++ b/pkgs/applications/misc/diffpdf/fix_path_poppler_qt5.patch @@ -2,15 +2,15 @@ diff -uNr diffpdf-2.1.3/diffpdf.pro diffpdf-2.1.3-new/diffpdf.pro --- diffpdf-2.1.3/diffpdf.pro 2013-10-15 09:01:22.000000000 +0200 +++ diffpdf-2.1.3-new/diffpdf.pro 2015-07-07 23:13:36.445572148 +0200 @@ -47,9 +47,9 @@ - INCLUDEPATH += /c/poppler_lib/include/poppler/qt4 + INCLUDEPATH += /c/poppler_lib/include/poppler/qt5 LIBS += -Wl,-rpath -Wl,/c/poppler_lib/bin -Wl,-L/c/poppler_lib/bin } else { -- exists(/usr/include/poppler/qt4) { +- exists(/usr/include/poppler/qt5) { - INCLUDEPATH += /usr/include/poppler/cpp -- INCLUDEPATH += /usr/include/poppler/qt4 -+ exists(@@NIX_POPPLER_QT4@@/include/poppler/qt4) { -+ INCLUDEPATH += @@NIX_POPPLER_QT4@@/include/poppler/cpp -+ INCLUDEPATH += @@NIX_POPPLER_QT4@@/include/poppler/qt4 +- INCLUDEPATH += /usr/include/poppler/qt5 ++ exists(@@NIX_POPPLER_QT5@@/include/poppler/qt5) { ++ INCLUDEPATH += @@NIX_POPPLER_QT5@@/include/poppler/cpp ++ INCLUDEPATH += @@NIX_POPPLER_QT5@@/include/poppler/qt5 } else { INCLUDEPATH += /usr/local/include/poppler/cpp - INCLUDEPATH += /usr/local/include/poppler/qt4 + INCLUDEPATH += /usr/local/include/poppler/qt5 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 508e674660ee..f4c5fb4d4ce2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16524,7 +16524,7 @@ with pkgs; mupdf = callPackage ../applications/misc/mupdf { }; - diffpdf = callPackage ../applications/misc/diffpdf { }; + diffpdf = libsForQt5.callPackage ../applications/misc/diffpdf { }; diff-pdf = callPackage ../applications/misc/diff-pdf { wxGTK = wxGTK31; };