ports/opt (3.5): [notify] xpdf: 4.00 -> 4.01.01 dependency change from qt4 to qt5

crux at crux.nu crux at crux.nu
Tue Sep 24 11:38:52 UTC 2019


commit 4966c837a6f38e2e10fd805f354ce198889cac20
Author: Danny Rawlins <monster.romster at gmail.com>
Date:   Tue Sep 24 21:34:09 2019 +1000

    [notify] xpdf: 4.00 -> 4.01.01 dependency change from qt4 to qt5

diff --git a/xpdf/.signature b/xpdf/.signature
index 346968e26..9f50f0de1 100644
--- a/xpdf/.signature
+++ b/xpdf/.signature
@@ -1,5 +1,8 @@
 untrusted comment: verify with /etc/ports/opt.pub
-RWSE3ohX2g5d/Sq3sL/V+rvS5XsybIZlVoTOZHExWsiI0Bn68UFsnsSAD+Uo3ImBwxJ7Y0MuwKDjKTRulP9Pu30XCz1ZmIeevQE=
-SHA256 (Pkgfile) = 8eb14596fceaab62a1d6d08853eda6240038786bb0b523f8a23194b2cae02a0d
+RWSE3ohX2g5d/UPlaCotfV4MCo/F8qfKEcYd05kRjGrQBLBTO5hxtIcTgC/yczRKCcfbxbR5Rw6rWxglD4n7oOT5jyncr6+YWgM=
+SHA256 (Pkgfile) = 6a24c771a563292d30ded44aaed208c15656c5addb705632dec3728fce7099ef
 SHA256 (.footprint) = b04fc4d3a62e3311e32f9350e044e905495c74101132621641fe2088f7248bdc
-SHA256 (xpdf-4.00.tar.gz) = ff3d92c42166e35b1ba6aec9b5f0adffb5fc05a3eb95dc49505b6e344e4216d6
+SHA256 (xpdf-4.01.01.tar.gz) = ba550c7d3e4f73b1833cfcdcd9dbe39849dd0cd459b6774c4ecdfeca993204a4
+SHA256 (xpdf-automagic.patch) = 3cf7b618a90e39891b140978c9147e7b8edfd39666f11c9eb11bfe8727241cd9
+SHA256 (xpdf-visibility.patch) = 4dfde83375f344c724cb51cf7d2e0fef726ef7617be36d4a0570980917f68ead
+SHA256 (xpdf-shared-libs.patch) = e48d08c44dffb9367ec2cfe31823a44549cbd4ff00b10317c14a8d5225cde82f
diff --git a/xpdf/Pkgfile b/xpdf/Pkgfile
index cd45735a9..d7d585d71 100644
--- a/xpdf/Pkgfile
+++ b/xpdf/Pkgfile
@@ -1,29 +1,37 @@
 # Description: PDF viewer
-# URL:         http://www.xpdfreader.com
+# URL:         https://www.xpdfreader.com
 # Maintainer:  Thomas Penteker, tek at serverop dot de
-# Packager:    Robert McMeekin, viper at mcmeekin dot info
-# Depends on:  lesstif, qt4
-# Nice to have: qt5 (instead of qt4)
+# Depends on:  qt5
+# Optional:    cups paper
 
 name=xpdf
-version=4.00
-release=2
-source=(https://xpdfreader-dl.s3.amazonaws.com/xpdf-${version}.tar.gz)
+version=4.01.01
+release=1
+source=(https://xpdfreader-dl.s3.amazonaws.com/xpdf-${version}.tar.gz
+    xpdf-automagic.patch
+    xpdf-visibility.patch
+    xpdf-shared-libs.patch)
 
 build() {
     cd $name-$version
 
+    CXXFLAGS+=' -Wno-deprecated -Wno-deprecated-declarations'
+
+    patch -p1 -i $SRC/xpdf-automagic.patch
+    patch -p1 -i $SRC/xpdf-visibility.patch
+    patch -p1 -i $SRC/xpdf-shared-libs.patch
+
     mkdir build
     cd build
 
     cmake -DCMAKE_BUILD_TYPE=Release \
           -DCMAKE_INSTALL_PREFIX=/usr \
-          -DA4_PAPER=ON -LAH .. 
+          -DA4_PAPER=ON  \
+          -DXPDFWIDGET_PRINTING="$(prt-get isinst cups >/dev/null && echo ON || echo OFF)" \
+          -DWITH_LIBPAPER=$(prt-get isinst paper >/dev/null && echo ON || echo OFF) .. 
 
     cd xpdf-qt
 
-    sed -i 's|man/man1|share/man/man1|g' cmake_install.cmake
-
     make
     make install DESTDIR=$PKG
 
diff --git a/xpdf/xpdf-automagic.patch b/xpdf/xpdf-automagic.patch
new file mode 100644
index 000000000..4c35ca891
--- /dev/null
+++ b/xpdf/xpdf-automagic.patch
@@ -0,0 +1,36 @@
+--- xpdf-4.01.orig/cmake-config.txt	2019-02-18 21:24:19.000000000 +0300
++++ xpdf-4.01/cmake-config.txt	2019-03-10 20:59:59.769610445 +0300
+@@ -93,6 +93,10 @@
+   option(XPDFWIDGET_PRINTING "include printing support in XpdfWidget" ON)
+ endif ()
+ 
++#--- disable lib dep automagick ---
++option(WITH_LIBPAPER "Enable libpaper support for getting paper size preferences" ON)
++option(WITH_LIBPNG "Enable png support via libpng" ON)
++
+ #--- check for various library functions
+ check_function_exists(mkstemp HAVE_MKSTEMP)
+ check_function_exists(mkstemps HAVE_MKSTEMPS)
+@@ -182,7 +186,9 @@
+ find_package(ZLIB)
+ 
+ #--- look for libpng
++if (WITH_LIBPNG)
+ find_package(PNG)
++endif ()
+ 
+ 
+ 
+@@ -239,10 +245,12 @@
+ endif()
+ 
+ #--- look for libpaper
++if (WITH_LIBPAPER)
+ find_library(PAPER_LIBRARY
+              NAMES paper libpaper
+              PATH_SUFFIXES lib64 lib
+ )
++endif ()
+ if (PAPER_LIBRARY)
+   set(HAVE_PAPER_H TRUE)
+ else ()
diff --git a/xpdf/xpdf-shared-libs.patch b/xpdf/xpdf-shared-libs.patch
new file mode 100644
index 000000000..c8aafa840
--- /dev/null
+++ b/xpdf/xpdf-shared-libs.patch
@@ -0,0 +1,54 @@
+diff '--color=auto' -Naurd xpdf-4.01.orig/cmake-config.txt xpdf-4.01/cmake-config.txt
+--- xpdf-4.01.orig/cmake-config.txt	2019-03-10 21:32:18.000000000 +0300
++++ xpdf-4.01/cmake-config.txt	2019-03-11 09:03:37.025125528 +0300
+@@ -12,6 +12,9 @@
+ include(CheckCXXSourceCompiles)
+ include(GNUInstallDirs)
+ 
++set(XPDF_LIBDIR ${CMAKE_INSTALL_LIBDIR}/xpdf)
++set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/xpdf)
++
+ enable_language(CXX)
+ 
+ #--- set default C/C++ compiler flags for Unix
+diff '--color=auto' -Naurd xpdf-4.01.orig/fofi/CMakeLists.txt xpdf-4.01/fofi/CMakeLists.txt
+--- xpdf-4.01.orig/fofi/CMakeLists.txt	2019-03-10 21:32:19.000000000 +0300
++++ xpdf-4.01/fofi/CMakeLists.txt	2019-03-11 09:04:16.257526539 +0300
+@@ -24,3 +24,6 @@
+ add_library(fofi
+   $<TARGET_OBJECTS:fofi_objs>
+ )
++
++set_target_properties(fofi_objs PROPERTIES COMPILE_FLAGS "-fPIC")
++install(TARGETS fofi LIBRARY DESTINATION ${XPDF_LIBDIR})
+diff '--color=auto' -Naurd xpdf-4.01.orig/goo/CMakeLists.txt xpdf-4.01/goo/CMakeLists.txt
+--- xpdf-4.01.orig/goo/CMakeLists.txt	2019-03-11 09:03:04.000000000 +0300
++++ xpdf-4.01/goo/CMakeLists.txt	2019-03-11 09:02:51.638793035 +0300
+@@ -25,3 +25,6 @@
+ add_library(goo
+   $<TARGET_OBJECTS:goo_objs>
+ )
++
++set_target_properties(goo_objs PROPERTIES COMPILE_FLAGS "-fPIC")
++install(TARGETS goo LIBRARY DESTINATION ${XPDF_LIBDIR})
+diff '--color=auto' -Naurd xpdf-4.01.orig/splash/CMakeLists.txt xpdf-4.01/splash/CMakeLists.txt
+--- xpdf-4.01.orig/splash/CMakeLists.txt	2019-03-10 21:32:19.000000000 +0300
++++ xpdf-4.01/splash/CMakeLists.txt	2019-03-11 09:04:48.885028391 +0300
+@@ -44,4 +44,7 @@
+   add_library(splash
+     $<TARGET_OBJECTS:splash_objs>
+   )
++
++  set_target_properties(splash_objs PROPERTIES COMPILE_FLAGS "-fPIC")
++  install(TARGETS splash LIBRARY DESTINATION ${XPDF_LIBDIR})
+ endif ()
+--- xpdf-4.01.orig/xpdf-qt/CMakeLists.txt	2019-02-18 21:24:19.000000000 +0300
++++ xpdf-4.01/xpdf-qt/CMakeLists.txt	2019-03-11 17:29:55.445451783 +0300
+@@ -93,6 +93,7 @@
+   else ()
+     set_property(TARGET xpdf PROPERTY Qt5_NO_LINK_QTMAIN ON)
+   endif ()
++  set_property(TARGET xpdf PROPERTY INSTALL_RPATH "")
+ 
+   install(TARGETS xpdf RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+   install(FILES ${PROJECT_SOURCE_DIR}/doc/xpdf.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
diff --git a/xpdf/xpdf-visibility.patch b/xpdf/xpdf-visibility.patch
new file mode 100644
index 000000000..9eab57b4a
--- /dev/null
+++ b/xpdf/xpdf-visibility.patch
@@ -0,0 +1,11 @@
+--- xpdf-4.01/goo/GString.h.orig	2019-02-18 21:24:19.000000000 +0300
++++ xpdf-4.01/goo/GString.h	2019-03-10 20:16:48.257102840 +0300
+@@ -39,7 +39,7 @@
+ 
+   // Copy a string.
+   GString(GString *str);
+-  GString *copy() { return new GString(this); }
++  __attribute__ ((visibility ("default"))) GString *copy() { return new GString(this); }
+ 
+   // Concatenate two strings.
+   GString(GString *str1, GString *str2);


More information about the CRUX mailing list