From 5a79529eaa3e2952afb1ed29e3ab30d8e7cdb36b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98rjan=20Malde?= Date: Fri, 3 Jul 2020 19:56:01 +0200 Subject: groups/231.native_packages_etc.group: adds xpdf v4.02 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lucio Andrés Illanes Albornoz --- groups/231.native_packages_etc.group | 5 ++- patches/xpdf-4.02_pre.local.patch | 79 ++++++++++++++++++++++++++++++++++++ vars/xpdf.vars | 25 ++++++++++++ 3 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 patches/xpdf-4.02_pre.local.patch create mode 100644 vars/xpdf.vars diff --git a/groups/231.native_packages_etc.group b/groups/231.native_packages_etc.group index 37be5d73..fea8b49e 100644 --- a/groups/231.native_packages_etc.group +++ b/groups/231.native_packages_etc.group @@ -9,7 +9,7 @@ giflib gnuchess gzip hastyhex hexcurse htop imagemagick infounzip infozip john lcms2 less libmetalink lolcode mintty mlogin musl_compat musl_fts ncdu ncurses ncursestw ncursesw npth openjpeg p7zip pcre popt potrace procps_ng qemu qpdf qrencode rpm rw shared_mime_info slang sqlite3 tcl tdnf texinfo -tiff tmux tzdb utf8proc util_linux vim w32api w32lib xorriso xz yabasic +tiff tmux tzdb utf8proc util_linux vim w32api w32lib xorriso xpdf xz yabasic zstd")"; : ${PKG_ALSA_LIB_SHA256SUM:=3cdc3a93a6427a26d8efab4ada2152e64dd89140d981f6ffa003e85be707aedf}; : ${PKG_ALSA_LIB_VERSION:=1.1.8}; @@ -338,6 +338,9 @@ zstd")"; : ${PKG_XORRISO_VERSION:=1.5.2}; : ${PKG_XORRISO_URL:=https://www.gnu.org/software/xorriso/xorriso-${PKG_XORRISO_VERSION}.tar.gz}; : ${PKG_XORRISO_IN_TREE:=1}; +: ${PKG_XPDF_SHA256SUM:=52d51dc943b9614b8da66e8662b3031a3c82dc25bfc792eac6b438aa36d549a4}; +: ${PKG_XPDF_VERSION:=4.02}; +: ${PKG_XPDF_URL:=https://dl.xpdfreader.com/xpdf-${PKG_XPDF_VERSION}.tar.gz}; : ${PKG_XZ_SHA256SUM:=3e1e518ffc912f86608a8cb35e4bd41ad1aec210df2a47aaa1f95e7f5576ef56}; : ${PKG_XZ_VERSION:=5.2.5}; : ${PKG_XZ_URL:=https://fossies.org/linux/misc/xz-${PKG_XZ_VERSION}.tar.xz}; diff --git a/patches/xpdf-4.02_pre.local.patch b/patches/xpdf-4.02_pre.local.patch new file mode 100644 index 00000000..c894b0b9 --- /dev/null +++ b/patches/xpdf-4.02_pre.local.patch @@ -0,0 +1,79 @@ +diff -ru xpdf-4.02.orig/cmake-config.txt xpdf-4.02/cmake-config.txt +--- xpdf-4.02.orig/cmake-config.txt 2019-09-25 21:54:33.000000000 +0200 ++++ xpdf-4.02/cmake-config.txt 2020-07-03 18:17:21.191267235 +0200 +@@ -188,61 +188,6 @@ + + + +-#--- look for Qt +-find_package(Qt5Widgets QUIET) +-if (Qt5Widgets_FOUND) +- find_package(Qt5Network) +- find_package(Qt5PrintSupport) +-else () +- find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED) +-endif () +-if(Qt5Widgets_FOUND) +- message(STATUS "Qt5 found") +- if (XPDFWIDGET_PRINTING) +- set(QT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5PrintSupport_INCLUDE_DIRS}") +- set(QT_DEFINITIONS "${Qt5Widgets_DEFINITIONS} ${Qt5Network_DEFINITIONS} ${Qt5PrintSupport_DEFINITIONS}") +- set(QT_LIBRARIES Qt5::Widgets Qt5::Network Qt5::PrintSupport) +- else () +- set(QT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS}") +- set(QT_DEFINITIONS "${Qt5Widgets_DEFINITIONS} ${Qt5Network_DEFINITIONS}") +- set(QT_LIBRARIES Qt5::Widgets Qt5::Network) +- endif () +- if (XPDFWIDGET_PRINTING) +- if (APPLE) +- set(EXTRA_QT_LIBRARIES "-framework ApplicationServices") +- elseif (UNIX) +- find_package(Cups) +- if (CUPS_FOUND) +- set(EXTRA_QT_LIBRARIES ${CUPS_LIBRARIES}) +- else () +- set (XPDFWIDGET_PRINTING OFF) +- endif () +- else () +- set(EXTRA_QT_LIBRARIES "") +- endif () +- endif () +- # remove "-fPIE" here because we added "-fPIC" above +- string(REPLACE "-fPIE" "" QT_CFLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}") +-elseif(QT4_FOUND) +- message(STATUS "Qt4 found") +- if (XPDFWIDGET_PRINTING) +- if (APPLE) +- set(EXTRA_QT_LIBRARIES "-framework ApplicationServices") +- elseif (UNIX) +- find_package(Cups) +- if (CUPS_FOUND) +- set(EXTRA_QT_LIBRARIES ${CUPS_LIBRARIES}) +- else () +- set (XPDFWIDGET_PRINTING OFF) +- endif () +- else () +- set(EXTRA_QT_LIBRARIES "") +- endif () +- endif () +-else() +- message(STATUS "No Qt library found") +-endif() +- + #--- look for libpaper + find_library(PAPER_LIBRARY + NAMES paper libpaper +diff -ru xpdf-4.02.orig/CMakeLists.txt xpdf-4.02/CMakeLists.txt +--- xpdf-4.02.orig/CMakeLists.txt 2019-09-25 21:54:33.000000000 +0200 ++++ xpdf-4.02/CMakeLists.txt 2020-07-03 18:16:19.639269162 +0200 +@@ -28,10 +28,6 @@ + message(WARNING "Couldn't find libpng -- will not build pdftopng or pdftohtml.") + endif () + +-if (NOT QT4_FOUND AND NOT Qt5Widgets_FOUND) +- message(WARNING "Couldn't find Qt4 or Qt5 -- will not build xpdf.") +-endif () +- + if (NOT MULTITHREADED) + message(WARNING "Multithreading is disabled -- will not build xpdf.") + endif () diff --git a/vars/xpdf.vars b/vars/xpdf.vars new file mode 100644 index 00000000..209aab95 --- /dev/null +++ b/vars/xpdf.vars @@ -0,0 +1,25 @@ +# +# set +o errexit -o noglob -o nounset is assumed. +# + +pkg_xpdf_configure() { + if ! rtl_fileop rm config.cache \ + || ! env CXX_FLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" PREFIX="" \ + cmake -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ + -DCMAKE_BUILD_TYPE="Debug" \ + -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ + -DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_CXX}" \ + -DCMAKE_SYSROOT=${PREFIX_NATIVE} \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="ONLY" \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="NEVER" \ + -DCMAKE_INSTALL_PREFIX="" \ + -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ + -DFREETYPE_LIBRARY=${PREFIX_NATIVE}/lib/libfreetype.lib.a \ + -DFREETYPE_INCLUDE_DIR_ft2build={PREFIX_NATIVE}/include/ft2build \ + -DFONTCONFIG_LIBRARY=${PREFIX_NATIVE}/lib/libfontconfig.lib.a \ + "../xpdf-${PKG_VERSION}"; then + return 1; + fi; +}; + +# vim:filetype=sh textwidth=0 -- cgit v1.2.3