diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2021-01-30 12:47:21 +0300 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2021-01-30 12:51:59 +0300 |
commit | ee2f467df6f1d70f5d7e7741ac264c6d2893d323 (patch) | |
tree | d8bdd8d80dc891e9e6c7a3ac2315665b524731e7 /app-text | |
parent | app-text/xpdf: update download links (diff) | |
download | gentoo-ee2f467df6f1d70f5d7e7741ac264c6d2893d323.tar.gz gentoo-ee2f467df6f1d70f5d7e7741ac264c6d2893d323.tar.bz2 gentoo-ee2f467df6f1d70f5d7e7741ac264c6d2893d323.zip |
app-text/xpdf: version bump
This is mostly a bugfix release, it fixes plentiful of bugs (see
CHANGES) including many security issues, including but not limited
to CVE-2020-{25725,35376}.
Bug: https://bugs.gentoo.org/755938
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/xpdf/Manifest | 1 | ||||
-rw-r--r-- | app-text/xpdf/xpdf-4.03.ebuild | 146 |
2 files changed, 147 insertions, 0 deletions
diff --git a/app-text/xpdf/Manifest b/app-text/xpdf/Manifest index 38d054373af3..075768e2b3a8 100644 --- a/app-text/xpdf/Manifest +++ b/app-text/xpdf/Manifest @@ -1,4 +1,5 @@ DIST xpdf-4.02.tar.gz 912885 BLAKE2B 70dec3d213566c1a7c13edd05e4f6145b45ad4c4805843393e0f86a07820511a5187cd61a04adf3c3fc671840acdb3b1bbb19dda7dc101df75e564971f51b76f SHA512 72c9413fc7241dde5288137ca8a68c837d2a68e95e909dbe2afe8f374b5a7c92af4edf82918963d1c6388c947057fcf5f0ae1e6fbb2b31c3d5eb9a07d3c74ddc +DIST xpdf-4.03.tar.gz 936046 BLAKE2B bd0198ec6be627edce6386f0d93b0921906b2c5f79b3eb02f89719e64cbe3ca3b2df53db8aecc6df3581eb022ca0d4c209a880760e5bbb3eb46b40b106d6d144 SHA512 5f8478c2c4863a3c50f9b45a6fec73c7e67a74adbeaa651dd2e29982ea4cf050740874ee670672f985a323c12c28c968c16238c4238aeb52810a45e2728d622f 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.03.ebuild b/app-text/xpdf/xpdf-4.03.ebuild new file mode 100644 index 000000000000..486c4bc16290 --- /dev/null +++ b/app-text/xpdf/xpdf-4.03.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake desktop 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 + )" + +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 ) +" +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 +} |