summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Savchenko <bircoph@gentoo.org>2024-07-21 00:04:06 +0300
committerAndrew Savchenko <bircoph@gentoo.org>2024-07-21 00:12:13 +0300
commit47a254308b64f4462a3cdcc7ce49655b41b7bdb5 (patch)
tree11aacf2d3cadd1308859522800e60595cd5da646 /app-text
parentapp-text/xpdf: update metadata (diff)
downloadgentoo-47a254308b64f4462a3cdcc7ce49655b41b7bdb5.tar.gz
gentoo-47a254308b64f4462a3cdcc7ce49655b41b7bdb5.tar.bz2
gentoo-47a254308b64f4462a3cdcc7ce49655b41b7bdb5.zip
app-text/xpdf: add 4.05
* Add qt6 support per bug 925519, use updated font-paths patch from Andrii Batyiev. * Update simplified Chinese and Korean language support packages. * Fix the following CVEs: - CVE-2018-7453 PDF object loop in AcroForm::scanField - CVE-2018-16369 PDF object loop in AcroForm::scanField - CVE-2019-9587 PDF object loop in Catalog::countPageTree - CVE-2019-9588 PDF object loop in Catalog::countPageTree - CVE-2019-16088 PDF object loop in Catalog::countPageTree - CVE-2022-30524 logic bug in text extractor led to invalid memory access - CVE-2022-30775 integer overflow in rasterizer - CVE-2022-33108 PDF object loop in Catalog::countPageTree - CVE-2022-36561 PDF object loop in AcroForm::scanField - CVE-2022-38222 logic bug in JBIG2 decoder - CVE-2022-38334 PDF object loop in Catalog::countPageTree - CVE-2022-38928 missing bounds check in CFF font converter caused null pointer dereference - CVE-2022-41842 PDF object loop in Catalog::countPageTree - CVE-2022-41843 missing bounds check in CFF font parser caused invalid memory access - CVE-2022-41844 PDF object loop in AcroForm::scanField - CVE-2022-43071 PDF object loop in Catalog::readPageLabelTree2 - CVE-2022-43295 PDF object loop in Catalog::countPageTree - CVE-2022-45586 PDF object loop in Catalog::countPageTree - CVE-2022-45587 PDF object loop in Catalog::countPageTree - CVE-2023-2662 Divide-by-zero in Xpdf 4.04 due to bad color space object - CVE-2023-2663 PDF object loop in Catalog::readPageLabelTree2 - CVE-2023-2664 PDF object loop in Catalog::readEmbeddedFileTree - CVE-2023-3044 Divide-by-zero in Xpdf 4.04 due to very large page size - CVE-2023-3436 Deadlock in Xpdf 4.04 due to PDF object stream references Closes: https://bugs.gentoo.org/925519 Bug: https://bugs.gentoo.org/845027 Bug: https://bugs.gentoo.org/856475 Bug: https://bugs.gentoo.org/881351 Bug: https://bugs.gentoo.org/908037 Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r--app-text/xpdf/Manifest4
-rw-r--r--app-text/xpdf/files/xpdf-4.05-font-paths.patch46
-rw-r--r--app-text/xpdf/xpdf-4.05.ebuild161
3 files changed, 211 insertions, 0 deletions
diff --git a/app-text/xpdf/Manifest b/app-text/xpdf/Manifest
index 5f89e2aa56cf..b87e88397670 100644
--- a/app-text/xpdf/Manifest
+++ b/app-text/xpdf/Manifest
@@ -1,13 +1,17 @@
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-4.05.tar.gz 986596 BLAKE2B 1ea706486c4597ced45bed8dea500173d65e5ec4bdbfac087d27916ee30d26f07ebef262a94d99e1bb192aa85434c5ad0e9008d6997a6e991b1fd251e87a7637 SHA512 1ee18a2fcae138e60158cf6289f588832a982e1b13995382a396d1953949cf4e32cb4f9884f2506154512d961853e70ff499a35c525e707c3bf2950fe7f9040b
+DIST xpdf-4.05.tar.gz.sig 801 BLAKE2B 4cd3e4a35bf548eb3a55e6204535d0131a1595195a25362a60cead8f629d3b0e8f799fa066d0b46cea35eeb24b5b3e6253563e1c0a8ba941c0d8eea7bcfbeb2c SHA512 86500cf8d5a7d588784f94dddf5d4533cfff1700b4f193add9c417896fd92d011b52615f341f30e82224740e845b7f870b9277d7f3cb1b250fd0db2bbd3123d1
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-simplified-20231205.tar.gz 913753 BLAKE2B 1c8a38a0804a461cc9db435fd7e57df9a8513870d4d82d3a01ccd9182d0d0755f669f116bc5d919cdc510719c40be6d3ae2a83a9424fd6414e79f6ab05ec96cc SHA512 81d5111b08e5f67a7a110acd2689eff8c80196709942f22e6e6a087b1f1e477b4126385fa48634168b3ba12ade580f6bf52529a44e3db81394d5d51c30e27385
DIST xpdf-chinese-traditional-20201222.tar.gz 922808 BLAKE2B 39a9bc094061298eb2afbdb8a53d71bf4e1fb1fbe33ca7a8855a34e4ece1b319edc334db71fec72df1860362878b401557fb623eaa2ca8c7ed973d5344e57e75 SHA512 c7709409f00365fea83f92db74401b6afbe4ceab9290d9471b9226b71ff24823d19054472d5700fbd91043859e78958628b82afa8b0361544247a76cf9d21d1e
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-20201222.tar.gz 1012686 BLAKE2B 14d59d2dd73dc9be913fb7557bce4844d2babbb88a573f9b962e7cc39e55268bb1a93c69c59585dc6b8aea8e6d771571e0105d1b9ee008ff07c80ae606125ed4 SHA512 f4e33525038f89c7b6ffb06b5b49726ab66ad1d61f5d0b813054ccefc035871e50996f31f3f67e6079eccf4c00619f582bdb2e1059df70e0101731a1e067d950
DIST xpdf-korean-20201222.tar.gz 809664 BLAKE2B 3c3a4397f25ae74ed8bd68d0736144b9f644f79757ce48f435030cc675650aaa919ee95e8ad7a8b039777f3505c78fdf335cfefbf780957b7c5442a25c5e10c4 SHA512 1b829f276f9fbf0ab637cef345f1343faa582af2db95f68003c01d1ec96ca0d9ab38093502ac666ad7b4ce55120a9103bd492a9fea1e8287983227d45ebc378f
+DIST xpdf-korean-20231205.tar.gz 809244 BLAKE2B f24d521d17d675a1054aed0df12b4105a7d5d732e6c7d50041e6c664157bac4dd93d30a23d1d4366983090f4a69d620a9ade4b4d1829fb128b09581f3e388113 SHA512 145330ea8dbc0ce7d9ca011f7f4a74dd23e766077938a542abf3e8edd3ab6dc6d4b0f747bbf5bc6ca63086313ac0187515c93b2d5766a98039ddd5f1c709f8e1
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-4.05-font-paths.patch b/app-text/xpdf/files/xpdf-4.05-font-paths.patch
new file mode 100644
index 000000000000..5f88680d0bc6
--- /dev/null
+++ b/app-text/xpdf/files/xpdf-4.05-font-paths.patch
@@ -0,0 +1,46 @@
+diff -Naur xpdf-4.05/xpdf/GlobalParams.cc xpdf-4.05.new/xpdf/GlobalParams.cc
+--- xpdf-4.05/xpdf/GlobalParams.cc 2024-02-07 22:32:41.000000000 +0200
++++ xpdf-4.05.new/xpdf/GlobalParams.cc 2024-02-26 05:15:42.349868874 +0200
+@@ -82,20 +82,20 @@
+ const char *obliqueFont; // name of font to oblique
+ double obliqueFactor; // oblique sheer factor
+ } displayFontTab[] = {
+- {"Courier", "n022003l.pfb", "cour.ttf", "Courier", "Courier", NULL, 0},
+- {"Courier-Bold", "n022004l.pfb", "courbd.ttf", "Courier", "Courier Bold", NULL, 0},
+- {"Courier-BoldOblique", "n022024l.pfb", "courbi.ttf", "Courier", "Courier Bold Oblique", "Courier-Bold", 0.212557},
+- {"Courier-Oblique", "n022023l.pfb", "couri.ttf", "Courier", "Courier Oblique", "Courier", 0.212557},
+- {"Helvetica", "n019003l.pfb", "arial.ttf", "Helvetica", "Helvetica", NULL, 0},
+- {"Helvetica-Bold", "n019004l.pfb", "arialbd.ttf", "Helvetica", "Helvetica Bold", NULL, 0},
+- {"Helvetica-BoldOblique", "n019024l.pfb", "arialbi.ttf", "Helvetica", "Helvetica Bold Oblique", "Helvetica-Bold", 0.212557},
+- {"Helvetica-Oblique", "n019023l.pfb", "ariali.ttf", "Helvetica", "Helvetica Oblique", "Helvetica", 0.212557},
+- {"Symbol", "s050000l.pfb", NULL, "Symbol", "Symbol", NULL, 0},
+- {"Times-Bold", "n021004l.pfb", "timesbd.ttf", "Times", "Times Bold", NULL, 0},
+- {"Times-BoldItalic", "n021024l.pfb", "timesbi.ttf", "Times", "Times Bold Italic", NULL, 0},
+- {"Times-Italic", "n021023l.pfb", "timesi.ttf", "Times", "Times Italic", NULL, 0},
+- {"Times-Roman", "n021003l.pfb", "times.ttf", "Times", "Times Roman", NULL, 0},
+- {"ZapfDingbats", "d050000l.pfb", NULL, "ZapfDingbats", "Zapf Dingbats", NULL, 0},
++ {"Courier", "NimbusMonoPS-Regular.t1", "cour.ttf", "Courier", "Courier", NULL, 0},
++ {"Courier-Bold", "NimbusMonoPS-Bold.t1", "courbd.ttf", "Courier", "Courier Bold", NULL, 0},
++ {"Courier-BoldOblique", "NimbusMonoPS-BoldItalic.t1", "courbi.ttf", "Courier", "Courier Bold Oblique", "Courier-Bold", 0.212557},
++ {"Courier-Oblique", "NimbusMonoPS-Italic.t1", "couri.ttf", "Courier", "Courier Oblique", "Courier", 0.212557},
++ {"Helvetica", "NimbusSans-Regular.t1", "arial.ttf", "Helvetica", "Helvetica", NULL, 0},
++ {"Helvetica-Bold", "NimbusSans-Bold.t1", "arialbd.ttf", "Helvetica", "Helvetica Bold", NULL, 0},
++ {"Helvetica-BoldOblique", "NimbusSans-BoldItalic.t1", "arialbi.ttf", "Helvetica", "Helvetica Bold Oblique", "Helvetica-Bold", 0.212557},
++ {"Helvetica-Oblique", "NimbusSans-Italic.t1", "ariali.ttf", "Helvetica", "Helvetica Oblique", "Helvetica", 0.212557},
++ {"Symbol", "StandardSymbolsPS.t1", NULL, "Symbol", "Symbol", NULL, 0},
++ {"Times-Bold", "NimbusRoman-Bold.t1", "timesbd.ttf", "Times", "Times Bold", NULL, 0},
++ {"Times-BoldItalic", "NimbusRoman-BoldItalic.t1", "timesbi.ttf", "Times", "Times Bold Italic", NULL, 0},
++ {"Times-Italic", "NimbusRoman-Italic.t1", "timesi.ttf", "Times", "Times Italic", NULL, 0},
++ {"Times-Roman", "NimbusRoman-Regular.t1", "times.ttf", "Times", "Times Roman", NULL, 0},
++ {"ZapfDingbats", "D050000L.t1", NULL, "ZapfDingbats", "Zapf Dingbats", NULL, 0},
+ {NULL}
+ };
+
+@@ -107,6 +107,7 @@
+ "c:/windows/fonts",
+ "c:/winnt/fonts",
+ #else // _WIN32
++ "/usr/share/fonts/urw-fonts",
+ "/usr/share/ghostscript/fonts",
+ "/usr/local/share/ghostscript/fonts",
+ "/usr/share/fonts/default/Type1",
diff --git a/app-text/xpdf/xpdf-4.05.ebuild b/app-text/xpdf/xpdf-4.05.ebuild
new file mode 100644
index 000000000000..74678b63195a
--- /dev/null
+++ b/app-text/xpdf/xpdf-4.05.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/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-20231205.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-20231205.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 qt6"
+
+BDEPEND="
+ icons? ( gnome-base/librsvg )
+ verify-sig? ( sec-keys/openpgp-keys-xpdf )
+"
+DEPEND="
+ cups? (
+ qt6? ( dev-qt/qtbase:6[gui,widgets] )
+ !qt6? ( dev-qt/qtprintsupport:5[cups] )
+ dev-qt/qtprintsupport:5[cups]
+ net-print/cups
+ )
+ fontconfig? ( media-libs/fontconfig )
+ libpaper? ( app-text/libpaper:= )
+ utils? ( png? ( media-libs/libpng:0 ) )
+ qt6? ( dev-qt/qtbase:6[network,concurrent,widgets] )
+ !qt6? ( dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 )
+ media-libs/freetype
+ sys-libs/zlib
+"
+RDEPEND="${DEPEND}
+ qt6? ( dev-qt/qtsvg:6 )
+ !qt6? ( dev-qt/qtsvg:5 )
+ media-fonts/urw-fonts
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-automagic.patch
+ "${FILESDIR}"/${PN}-visibility.patch
+ "${FILESDIR}"/${PN}-shared-libs.patch
+ "${FILESDIR}"/${PN}-4.05-font-paths.patch
+)
+
+DOCS=( ANNOUNCE CHANGES README )
+
+src_unpack() {
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.sig}
+ fi
+ default
+}
+
+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"
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt6Widgets=$(usex !qt6)
+ )
+ 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
+}