Blame patches/xpdf-4.02_pre.local.patch

5a7952
diff -ru xpdf-4.02.orig/cmake-config.txt xpdf-4.02/cmake-config.txt
5a7952
--- xpdf-4.02.orig/cmake-config.txt	2019-09-25 21:54:33.000000000 +0200
5a7952
+++ xpdf-4.02/cmake-config.txt	2020-07-03 18:17:21.191267235 +0200
5a7952
@@ -188,61 +188,6 @@
5a7952
 
5a7952
 
5a7952
 
5a7952
-#--- look for Qt
5a7952
-find_package(Qt5Widgets QUIET)
5a7952
-if (Qt5Widgets_FOUND)
5a7952
-  find_package(Qt5Network)
5a7952
-  find_package(Qt5PrintSupport)
5a7952
-else ()
5a7952
-  find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED)
5a7952
-endif ()
5a7952
-if(Qt5Widgets_FOUND)
5a7952
-  message(STATUS "Qt5 found")
5a7952
-  if (XPDFWIDGET_PRINTING)
5a7952
-    set(QT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5PrintSupport_INCLUDE_DIRS}")
5a7952
-    set(QT_DEFINITIONS "${Qt5Widgets_DEFINITIONS} ${Qt5Network_DEFINITIONS} ${Qt5PrintSupport_DEFINITIONS}")
5a7952
-    set(QT_LIBRARIES Qt5::Widgets Qt5::Network Qt5::PrintSupport)
5a7952
-  else ()
5a7952
-    set(QT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS}")
5a7952
-    set(QT_DEFINITIONS "${Qt5Widgets_DEFINITIONS} ${Qt5Network_DEFINITIONS}")
5a7952
-    set(QT_LIBRARIES Qt5::Widgets Qt5::Network)
5a7952
-  endif ()
5a7952
-  if (XPDFWIDGET_PRINTING)
5a7952
-    if (APPLE)
5a7952
-      set(EXTRA_QT_LIBRARIES "-framework ApplicationServices")
5a7952
-    elseif (UNIX)
5a7952
-      find_package(Cups)
5a7952
-      if (CUPS_FOUND)
5a7952
-        set(EXTRA_QT_LIBRARIES ${CUPS_LIBRARIES})
5a7952
-      else ()
5a7952
-        set (XPDFWIDGET_PRINTING OFF)
5a7952
-      endif ()
5a7952
-    else ()
5a7952
-      set(EXTRA_QT_LIBRARIES "")
5a7952
-    endif ()
5a7952
-  endif ()
5a7952
-  # remove "-fPIE" here because we added "-fPIC" above
5a7952
-  string(REPLACE "-fPIE" "" QT_CFLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
5a7952
-elseif(QT4_FOUND)
5a7952
-  message(STATUS "Qt4 found")
5a7952
-  if (XPDFWIDGET_PRINTING)
5a7952
-    if (APPLE)
5a7952
-      set(EXTRA_QT_LIBRARIES "-framework ApplicationServices")
5a7952
-    elseif (UNIX)
5a7952
-      find_package(Cups)
5a7952
-      if (CUPS_FOUND)
5a7952
-        set(EXTRA_QT_LIBRARIES ${CUPS_LIBRARIES})
5a7952
-      else ()
5a7952
-        set (XPDFWIDGET_PRINTING OFF)
5a7952
-      endif ()
5a7952
-    else ()
5a7952
-      set(EXTRA_QT_LIBRARIES "")
5a7952
-    endif ()
5a7952
-  endif ()
5a7952
-else()
5a7952
-  message(STATUS "No Qt library found")
5a7952
-endif()
5a7952
-
5a7952
 #--- look for libpaper
5a7952
 find_library(PAPER_LIBRARY
5a7952
              NAMES paper libpaper
5a7952
diff -ru xpdf-4.02.orig/CMakeLists.txt xpdf-4.02/CMakeLists.txt
5a7952
--- xpdf-4.02.orig/CMakeLists.txt	2019-09-25 21:54:33.000000000 +0200
5a7952
+++ xpdf-4.02/CMakeLists.txt	2020-07-03 18:16:19.639269162 +0200
5a7952
@@ -28,10 +28,6 @@
5a7952
   message(WARNING "Couldn't find libpng -- will not build pdftopng or pdftohtml.")
5a7952
 endif ()
5a7952
 
5a7952
-if (NOT QT4_FOUND AND NOT Qt5Widgets_FOUND)
5a7952
-  message(WARNING "Couldn't find Qt4 or Qt5 -- will not build xpdf.")
5a7952
-endif ()
5a7952
-
5a7952
 if (NOT MULTITHREADED)
5a7952
   message(WARNING "Multithreading is disabled -- will not build xpdf.")
5a7952
 endif ()