diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2019-03-12 09:47:32 +0300 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2019-03-12 09:48:43 +0300 |
commit | bb4f79138a75abb85109b342c215b93c448ee153 (patch) | |
tree | 0c54a7ae5f6995b5e1509accaaca5abfeac9bf56 /app-text | |
parent | sci-mathematics/genius: remove old (diff) | |
download | gentoo-bb4f79138a75abb85109b342c215b93c448ee153.tar.gz gentoo-bb4f79138a75abb85109b342c215b93c448ee153.tar.bz2 gentoo-bb4f79138a75abb85109b342c215b93c448ee153.zip |
app-text/xpdf: re-add to the tree
Xpdf is back on track again with modern interface and active
development :)
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/xpdf/Manifest | 12 | ||||
-rw-r--r-- | app-text/xpdf/files/xpdf-automagic.patch | 36 | ||||
-rw-r--r-- | app-text/xpdf/files/xpdf-shared-libs.patch | 54 | ||||
-rw-r--r-- | app-text/xpdf/files/xpdf-visibility.patch | 11 | ||||
-rw-r--r-- | app-text/xpdf/metadata.xml | 17 | ||||
-rw-r--r-- | app-text/xpdf/xpdf-4.0.1.ebuild | 116 |
6 files changed, 246 insertions, 0 deletions
diff --git a/app-text/xpdf/Manifest b/app-text/xpdf/Manifest new file mode 100644 index 000000000000..997f9a14c515 --- /dev/null +++ b/app-text/xpdf/Manifest @@ -0,0 +1,12 @@ +DIST xpdf-4.01.tar.gz 891150 BLAKE2B 6280bf9d4c17894a22e63d3fdbe3c67679657121196f84964c1353cb2f09348c38de327f7a6259831afb2ff748340c94196eec11b24a442c6e76dbc170d62ac7 SHA512 327d8bcf1f30a0fdbbdc33e2262d4e7de44f28a0f42cc87bbee6b2a8059d8cca8ffa715f7e810f9b53deb690bf9744ae5e8cf86a101941b8103100ded89e36e6 +DIST xpdf-arabic.tar.gz 1057 BLAKE2B 5889fa5704a805b152886043ee32082d5e60044fb96f91d429661f823d1ea9c929dcae22460421a7c26a7aae43d5926263fa2a1ea4c07e0e130e67f2fb0b6fab SHA512 1ddaee045c0c3576bda0ebf065021e66e1ac6673d6872aff8e8afb3bae33dd927d920d89761553bade040d20e4b60eb286131bdb2f2d75ec1e833b9a9ce58d3e +DIST xpdf-chinese-simplified.tar.gz 918277 BLAKE2B ad41cc6ceae8d5295e49e6cb6356885a77dd314fd55cae95f4adf7ca597c7d86c0029b2767b1ecae86883d31cf9acc5d67997e1ab7871f10d2b6550734bb3b34 SHA512 1f016ff06301cf445546b380fe4cf0c1c9ef08b5e37bd392ca975b4a54fa43afbe251c31e14f216c68fb38dcf04f40ab5baf828586734efb7881a755f92cc49e +DIST xpdf-chinese-traditional.tar.gz 906297 BLAKE2B 63f4e482b0ba127331ae9adaa69a64ac868e5973d631cec57867ccab83566b61c37771be28c42d02994f574e7bf0fe16813d2d18d6ef5869dc1200f702d7c6dc SHA512 6fec238af3c76f149087bb4445786cb1de31fbcb17982b8da779e71a91e76c780dde7970515eaa6131db2e654d04d13aebe8d840203293b9072850c5d1e6ba0b +DIST xpdf-cyrillic.tar.gz 1656 BLAKE2B 454b9a276106d61481fdb8da934ac0de50b86a99d882e27bc9e1cf09a03ae2156909df405de78413e0ac3b529af479b2fbdf5978cc1022cee25c50df6ef21f0e SHA512 ab1197c90f8cd3d8664ebbdc7ecefdfb8ec12e24da2f7616cad1d5bc9c7fd172c48db6a18d76172de8342377acc8e1dcd78bcf0fb1ef9f05cf94729e90586827 +DIST xpdf-greek.tar.gz 1259 BLAKE2B f9f695b55c48ee2956ccab1ba9c7ae5bcb2df0669efcb8e111c6100f957238ae73b18589e40dece8b0c38212f00a52c1dc381cc5efcca7c97fe261d72470bb6f SHA512 2e0e281e09e1abc2f0e40b6787703538d52cb62edcd4c4156698700a5f908afee290c62ad9a6ff4ea74bc42e0a8fe9a7765a212efbc223512d4bb442448ea52f +DIST xpdf-hebrew.tar.gz 1317 BLAKE2B bfd5bddc250c1ae1e01fe68f1a4caa649d2a443d3c39565b5209d07f32d46e3474e6823f243b08ab6088e4686cb79e58fce5c9a3de271a77c6b1713fa58b1000 SHA512 0ebe652f8633151d13ef2403bd293682b511ab86c1391ce187f1fc0274f33bd9c7e6ec682c8f79ac4fd27c74ab81ad2ae334a75f26001092521cff9a73cd0b8a +DIST xpdf-japanese.tar.gz 1011166 BLAKE2B 67c2e8045214462737aa2332aa6ddba35581866e22bece5c166aa3fa808da0dddae11b7e9bcfe50f00087b74f1e7694ac8e407268cdefcab1fe60163eb3bdf70 SHA512 0d7b6e4c31caae1ec49d43f108d2dacc76fa84b79e9794d2d0071f33d7fadfacd533f0da1d5bcac3ec1c0757dbd6be4279acac1d148620e1d89d7a9af0966a08 +DIST xpdf-korean.tar.gz 526847 BLAKE2B e1640f6df0bc1e126b2e0f010403fc3ff068a8171d31cc616dfaff43170acfa69ff5dc0ac732d346d6aa9b2b21549b21e11f98f5038050b5075ee7fff8a93444 SHA512 871a9de0e40d7ef9fb42bb2d90558875f5b84962d7f811d5a18f4b68fadbe7c34e2c18c660a160c9ed9539adc22684985f296c77af2ed3bf604d9989bdcb3d1d +DIST xpdf-latin2.tar.gz 1431 BLAKE2B db8c823c4e90643b9d08c9a4106f479470236a00115d2dc6f3a71da4bc9b5e33561da5ac5dce81cbf5fc943a65572f3595601f6e9f31a3fba9bc0d35f28e0016 SHA512 5fe0b60bfac7f0f4a26e3e7216de5043f6b94446f464c984b7c25431ec01a5912952c0dc66bb2c7159c9f63e4805689c6cfc761086aad9e59f1f21d0cddb5d15 +DIST xpdf-thai.tar.gz 1878 BLAKE2B dbcc2aa2652c40c2220688767a58cadcfbe39310d6c2664b98392a03b00de6d558fa3f333a085e7c6ff3476b6ffcd98fcc228eeb8dd59e905f870c8a39143ac9 SHA512 5584b590e34da29285c379e3b7a7243c28241ec6fddb3e4a8e2e7bf88b8f7aaae3483061d12c332a1ff042ec5e2b31869a67d60512ac48f7903c5e2fc871aa87 +DIST xpdf-turkish.tar.gz 1137 BLAKE2B f735e9842361a5a73fabe40aa4e9cb552475d3751df3e885c5a1a68e0de8ca7b5a031e6332495f70abdc1e943fa615f09185e9ba22922f37f02e42f59ddfc57c SHA512 a73e90bce8f2a12154b06ef29333a45d96258c0d653d5cb15afd2e5ad9e79a9b617e5f8ebeb20bde545684d50f3bc1349800c99f70c863bdd502c24c266b4fb1 diff --git a/app-text/xpdf/files/xpdf-automagic.patch b/app-text/xpdf/files/xpdf-automagic.patch new file mode 100644 index 000000000000..4c35ca8916ff --- /dev/null +++ b/app-text/xpdf/files/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/app-text/xpdf/files/xpdf-shared-libs.patch b/app-text/xpdf/files/xpdf-shared-libs.patch new file mode 100644 index 000000000000..c8aafa8405db --- /dev/null +++ b/app-text/xpdf/files/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/app-text/xpdf/files/xpdf-visibility.patch b/app-text/xpdf/files/xpdf-visibility.patch new file mode 100644 index 000000000000..9eab57b4a3ff --- /dev/null +++ b/app-text/xpdf/files/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); diff --git a/app-text/xpdf/metadata.xml b/app-text/xpdf/metadata.xml new file mode 100644 index 000000000000..aab31e840b14 --- /dev/null +++ b/app-text/xpdf/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>bircoph@gentoo.org</email> + <name>Andrew Savchenko</name> + </maintainer> + <use> + <flag name="cmyk">Include support for CMYK rasterization</flag> + <flag name="i18n">Enable support non-UTF8 national charsets</flag> + <flag name="libpaper">Use <pkg>app-text/libpaper</pkg> to get paper preferences</flag> + <flag name="metric">Use A4 instead of US Letter paper size by default for PostScript output. This option has effect only if libpaper USE flag is disabled</flag> + <flag name="opi">Include support for OPI (Open Prepress Interface) comments</flag> + <flag name="textselect">Allow text selection</flag> + <flag name="utils">Install command-line PDF converters and various utilities</flag> + </use> +</pkgmetadata> diff --git a/app-text/xpdf/xpdf-4.0.1.ebuild b/app-text/xpdf/xpdf-4.0.1.ebuild new file mode 100644 index 000000000000..1a243e175e9e --- /dev/null +++ b/app-text/xpdf/xpdf-4.0.1.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils + +MY_P=${PN}-$(ver_rs 2 "") +DESCRIPTION="The PDF viewer and tools" +HOMEPAGE="https://www.xpdfreader.com" +SRC_URI="https://xpdfreader-dl.s3.amazonaws.com/${MY_P}.tar.gz + i18n? ( + https://xpdfreader-dl.s3.amazonaws.com/xpdf-arabic.tar.gz + https://xpdfreader-dl.s3.amazonaws.com/xpdf-chinese-simplified.tar.gz + https://xpdfreader-dl.s3.amazonaws.com/xpdf-chinese-traditional.tar.gz + https://xpdfreader-dl.s3.amazonaws.com/xpdf-cyrillic.tar.gz + https://xpdfreader-dl.s3.amazonaws.com/xpdf-greek.tar.gz + https://xpdfreader-dl.s3.amazonaws.com/xpdf-hebrew.tar.gz + https://xpdfreader-dl.s3.amazonaws.com/xpdf-japanese.tar.gz + https://xpdfreader-dl.s3.amazonaws.com/xpdf-korean.tar.gz + https://xpdfreader-dl.s3.amazonaws.com/xpdf-latin2.tar.gz + https://xpdfreader-dl.s3.amazonaws.com/xpdf-thai.tar.gz + https://xpdfreader-dl.s3.amazonaws.com/xpdf-turkish.tar.gz + )" + +LICENSE="GPL-2 GPL-3 i18n? ( BSD )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cmyk cups i18n +libpaper metric opi png +textselect utils" + +DEPEND=" + cups? ( + dev-qt/qtprintsupport:5 + net-print/cups + ) + libpaper? ( app-text/libpaper ) + utils? ( png? ( media-libs/libpng:0 ) ) + dev-qt/qtnetwork:5 + dev-qt/qtwidgets:5 + media-libs/freetype + sys-libs/zlib +" +RDEPEND="${DEPEND} + media-fonts/urw-fonts +" + +PATCHES=( + "${FILESDIR}"/${PN}-automagic.patch + "${FILESDIR}"/${PN}-visibility.patch + "${FILESDIR}"/${PN}-shared-libs.patch +) + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + sed -i \ + "s|/usr/local/etc|${EPREFIX}/etc|; + s|/usr/local|${EPREFIX}/usr|" \ + doc/sample-xpdfrc || die + + if use i18n; then + sed -i "s|/usr/local|${EPREFIX}/usr|" "${WORKDIR}"/*/add-to-xpdfrc || die + fi + + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DA4_PAPER=$(usex metric) + -DNO_TEXT_SELECT=$(usex textselect off on) + -DOPI_SUPPORT=$(usex opi) + -DSPLASH_CMYK=$(usex cmyk) + -DWITH_LIBPAPER=$(usex libpaper) + -DWITH_LIBPNG=$(usex png) + -DXPDFWIDGET_PRINTING=$(usex cups) + -DSYSTEM_XPDFRC="${EPREFIX}/etc/xpdfrc" + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + insinto /etc + newins doc/sample-xpdfrc xpdfrc + + local d i + if use utils; then + for d in "bin" "share/man/man1"; do + pushd "${ED}/usr/${d}" || die + for i in pdf*; do + mv "${i}" "x${i}" || die + done + popd || die + done + + einfo "PDF utilities were renamed from pdf* to xpdf* to avoid file collisions" + einfo "with other packages" + else + rm -rf "${ED}"/usr/bin/pdf* \ + "${ED}"/usr/share/man/man1/pdf* \ + "${ED}"/usr/$(get_libdir) || die + fi + + if use i18n; then + for i in arabic chinese-simplified chinese-traditional cyrillic greek \ + hebrew japanese korean latin2 thai turkish; do + insinto "/usr/share/xpdf/${i}" + doins -r $(find -O3 "${WORKDIR}/xpdf-${i}" -maxdepth 1 -mindepth 1 \ + ! -name README ! -name add-to-xpdfrc || die) + + cat "${WORKDIR}/xpdf-${i}/add-to-xpdfrc" >> "${ED}/etc/xpdfrc" || die + done + fi +} |