diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2022-05-15 16:49:16 +0300 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2022-05-15 16:57:09 +0300 |
commit | 7de5ff2a819eb06c7cb3ae30728a82670f0462f6 (patch) | |
tree | 1a3194b0131b15f78adb1f0124e2347898a96d99 /app-text/xpdf | |
parent | sec-keys/openpgp-keys-xpdf: Add OpenPGP key for app-text/xpdf verification (diff) | |
download | gentoo-7de5ff2a819eb06c7cb3ae30728a82670f0462f6.tar.gz gentoo-7de5ff2a819eb06c7cb3ae30728a82670f0462f6.tar.bz2 gentoo-7de5ff2a819eb06c7cb3ae30728a82670f0462f6.zip |
app-text/xpdf: Update to 4.04.
This fixes numerous security issues.
Bug: https://bugs.gentoo.org/840873
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'app-text/xpdf')
-rw-r--r-- | app-text/xpdf/Manifest | 2 | ||||
-rw-r--r-- | app-text/xpdf/xpdf-4.04.ebuild | 149 |
2 files changed, 151 insertions, 0 deletions
diff --git a/app-text/xpdf/Manifest b/app-text/xpdf/Manifest index af00a43fdcac..46bf6536f101 100644 --- a/app-text/xpdf/Manifest +++ b/app-text/xpdf/Manifest @@ -1,4 +1,6 @@ DIST xpdf-4.03.tar.gz 936046 BLAKE2B bd0198ec6be627edce6386f0d93b0921906b2c5f79b3eb02f89719e64cbe3ca3b2df53db8aecc6df3581eb022ca0d4c209a880760e5bbb3eb46b40b106d6d144 SHA512 5f8478c2c4863a3c50f9b45a6fec73c7e67a74adbeaa651dd2e29982ea4cf050740874ee670672f985a323c12c28c968c16238c4238aeb52810a45e2728d622f +DIST xpdf-4.04.tar.gz 969535 BLAKE2B 981f791c098b4632dd65ad581c0284beb730ebe1935dbe942882aa63fb23920eb241334e946ba9be07b5bc1b0c73effcccb2c8b2c95182a06d35a745862926a8 SHA512 a26b67a4b3d5a5a365153845bf72d77949e683ce26aaf4705b49194cb32bbc581617c3e9c37f74bf6c49480df06d49e8c38d41233966b6215eacf92591d4d9bf +DIST xpdf-4.04.tar.gz.sig 801 BLAKE2B 2f2b5c6a70ae007165afd3ec78c2fe168a380f6960176cc6c655a235aa83c1f7e608c5fd82cbce0b0877a92e3dea76950db450b96527eb14813ddcab2125a3ab SHA512 4c2740cf6a659e896584339a1238089465a548547c829f047d0313e46f6e3bba6c404ff37df7baf2f5d0c317d6ec954167f31bb1501a65e638b2617c6730d925 DIST xpdf-arabic.tar.gz 1057 BLAKE2B 5889fa5704a805b152886043ee32082d5e60044fb96f91d429661f823d1ea9c929dcae22460421a7c26a7aae43d5926263fa2a1ea4c07e0e130e67f2fb0b6fab SHA512 1ddaee045c0c3576bda0ebf065021e66e1ac6673d6872aff8e8afb3bae33dd927d920d89761553bade040d20e4b60eb286131bdb2f2d75ec1e833b9a9ce58d3e DIST xpdf-chinese-simplified-20201222.tar.gz 912967 BLAKE2B 74eb8da7642147cc6a0d5ee92379823786a78d0dccbdc1d4eab46094d15009bbe72599152b5001c58e7a88bfbb2f7af515e3582e293367a5b0a12bb1c017e8e1 SHA512 91c80dc4173a7b40267af1c95708f24557fb56ffc72cbaf48e9adcb0fc310b1bb40f327a8f36b3c6024317e98a44a8ab04d99f6f7b1ea81e775686534f0251ef DIST xpdf-chinese-traditional-20201222.tar.gz 922808 BLAKE2B 39a9bc094061298eb2afbdb8a53d71bf4e1fb1fbe33ca7a8855a34e4ece1b319edc334db71fec72df1860362878b401557fb623eaa2ca8c7ed973d5344e57e75 SHA512 c7709409f00365fea83f92db74401b6afbe4ceab9290d9471b9226b71ff24823d19054472d5700fbd91043859e78958628b82afa8b0361544247a76cf9d21d1e diff --git a/app-text/xpdf/xpdf-4.04.ebuild b/app-text/xpdf/xpdf-4.04.ebuild new file mode 100644 index 000000000000..aaedc7d90ef4 --- /dev/null +++ b/app-text/xpdf/xpdf-4.04.ebuild @@ -0,0 +1,149 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/xpdf.asc +inherit cmake desktop verify-sig xdg + +DESCRIPTION="The PDF viewer and tools" +HOMEPAGE="https://www.xpdfreader.com" +SRC_URI="https://dl.xpdfreader.com/${P}.tar.gz + i18n? ( + https://dl.xpdfreader.com/xpdf-arabic.tar.gz + https://dl.xpdfreader.com/xpdf-chinese-simplified.tar.gz -> xpdf-chinese-simplified-20201222.tar.gz + https://dl.xpdfreader.com/xpdf-chinese-traditional.tar.gz -> xpdf-chinese-traditional-20201222.tar.gz + https://dl.xpdfreader.com/xpdf-cyrillic.tar.gz + https://dl.xpdfreader.com/xpdf-greek.tar.gz + https://dl.xpdfreader.com/xpdf-hebrew.tar.gz + https://dl.xpdfreader.com/xpdf-japanese.tar.gz -> xpdf-japanese-20201222.tar.gz + https://dl.xpdfreader.com/xpdf-korean.tar.gz -> xpdf-korean-20201222.tar.gz + https://dl.xpdfreader.com/xpdf-latin2.tar.gz + https://dl.xpdfreader.com/xpdf-thai.tar.gz + https://dl.xpdfreader.com/xpdf-turkish.tar.gz + ) + verify-sig? ( https://dl.xpdfreader.com/${P}.tar.gz.sig )" + +LICENSE="|| ( GPL-2 GPL-3 ) i18n? ( BSD )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cmyk cups +fontconfig i18n icons +libpaper metric opi png +textselect utils" + +BDEPEND=" + icons? ( gnome-base/librsvg ) + verify-sig? ( sec-keys/openpgp-keys-xpdf ) +" +DEPEND=" + cups? ( + dev-qt/qtprintsupport:5[cups] + net-print/cups + ) + fontconfig? ( media-libs/fontconfig ) + 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} + dev-qt/qtsvg:5 + media-fonts/urw-fonts +" + +PATCHES=( + "${FILESDIR}"/${PN}-automagic.patch + "${FILESDIR}"/${PN}-visibility.patch + "${FILESDIR}"/${PN}-shared-libs.patch +) + +DOCS=( ANNOUNCE CHANGES README ) + +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 + + xdg_environment_reset + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DA4_PAPER=$(usex metric) + -DNO_FONTCONFIG=$(usex fontconfig off on) + -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_src_configure +} + +src_compile() { + cmake_src_compile + + if use icons; then + sizes="16 22 24 32 36 48 64 72 96 128 192 256 512" + cd xpdf-qt + mkdir $sizes + local i + for i in $sizes; do + rsvg-convert xpdf-icon.svg -w $i -h $i -o $i/xpdf.png + done + fi +} + +src_install() { + cmake_src_install + + domenu "${FILESDIR}/xpdf.desktop" + newicon -s scalable xpdf-qt/xpdf-icon.svg xpdf.svg + if use icons; then + local i + for i in $sizes; do + doicon -s $i xpdf-qt/$i/xpdf.png + done + unset sizes + fi + + 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 +} |