diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2020-01-18 21:23:23 +0300 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2020-01-18 21:26:19 +0300 |
commit | c0532994d83390f3ef3964cea43edab9be194057 (patch) | |
tree | ff54e17f182d1e6afb6918fad27a1896dca50a53 /app-text | |
parent | app-emulation/containers-storage: Bump to version 1.15.7 (diff) | |
download | gentoo-c0532994d83390f3ef3964cea43edab9be194057.tar.gz gentoo-c0532994d83390f3ef3964cea43edab9be194057.tar.bz2 gentoo-c0532994d83390f3ef3964cea43edab9be194057.zip |
app-text/xpdf: Add desktop files and icons
Also add USE=icons to generate PNG icon files since not all DE/WMs
can work with SVG.
Closes: https://bugs.gentoo.org/705344
Package-Manager: Portage-2.3.82, Repoman-2.3.20
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/xpdf/files/xpdf.desktop | 104 | ||||
-rw-r--r-- | app-text/xpdf/metadata.xml | 1 | ||||
-rw-r--r-- | app-text/xpdf/xpdf-4.02-r1.ebuild | 140 |
3 files changed, 245 insertions, 0 deletions
diff --git a/app-text/xpdf/files/xpdf.desktop b/app-text/xpdf/files/xpdf.desktop new file mode 100644 index 000000000000..d22edbe76d9f --- /dev/null +++ b/app-text/xpdf/files/xpdf.desktop @@ -0,0 +1,104 @@ +[Desktop Entry] +Name=XPDF +Name[bn]=এক্স পি-ডি-এফ +Name[de]=X-PDF +Name[eo]=XPDF +Name[es]=PDF para X +Name[fr]=XPDF +Name[hi]=एक्स पीडीएफ +Name[ko]=X용 PDF +Name[mn]=X-PDF +Name[nds]=X-PDF +Name[te]=ఎక్స్ పిడిఎఫ్ +Comment=PDF Viewer +Comment[af]=Pdf Aansig +Comment[ar]=عارض الملفات PDF +Comment[az]=PDF Nümayişçisi +Comment[be]=Праглядальнік PDF +Comment[bg]=Преглед на PDF документи +Comment[bn]=পি-ডি-এফ প্রদর্শক +Comment[br]=Gweler PDF +Comment[bs]=Preglednik PDF dokumenata +Comment[ca]=Visor PDF +Comment[cs]=Prohlížeč PDF souborů +Comment[csb]=Przezérnik PDF +Comment[cy]=Gwelydd PDF +Comment[da]=PDF-fremviser +Comment[de]=PDF-Betrachter +Comment[el]=Προβολέας PDF +Comment[eo]=PDF-rigardilo +Comment[es]=Visor de documentos PDF +Comment[et]=PDF failide vaatamine +Comment[eu]=PDF ikustailua +Comment[fa]=مشاهدهگر PDF +Comment[fi]=PDF-näytin +Comment[fo]=PDF-vísari +Comment[fr]=Afficheur PDF +Comment[fy]=PDF-werjefteprogramma +Comment[ga]=Amharcán PDF +Comment[gl]=Visualizador de PDF +Comment[he]=מציג קבצי PDF +Comment[hi]=पीडीएफ प्रदर्शक +Comment[hr]=Preglednik PDF dokumenata +Comment[hu]=PDF-nézegető +Comment[id]=Viewer PDF +Comment[is]=PDF-sjá +Comment[it]=Visualizzatore PDF +Comment[ja]=PDF ビューア +Comment[kk]=PDF қарау құралы +Comment[km]=កម្មវិធីមើល PDF +Comment[ko]=PDF 보기 +Comment[lo]=ສະແດງຜົນPDF +Comment[lt]=PDF Žiūriklis +Comment[lv]=PDF Skatītājs +Comment[mk]=Прегледувач на PDF +Comment[mn]=PDF-Харагч +Comment[ms]=Pemapar PDF +Comment[mt]=Werrej PDF +Comment[nb]=PDF-leser +Comment[nds]=Kieker för PDF-Dateien +Comment[ne]=PDF दर्शक +Comment[nl]=PDF-weergaveprogramma +Comment[nn]=PDF-lesar +Comment[nso]=Molebeledi wa PDF +Comment[oc]=Visualisor PDF +Comment[pa]=PDF ਦਰਸ਼ਕ +Comment[pl]=Przeglądarka plików PDF +Comment[pt]=Visualizador de PDFs +Comment[pt_BR]=Visualizador de arquivos PDF +Comment[ro]=Vizualizor de documente PDF +Comment[ru]=Просмотр PDF +Comment[rw]=Mugaragaza PDF +Comment[se]=PDF-logan +Comment[sk]=Prehliadač PDF súborov +Comment[sl]=Pregledovalnik datotek PDF +Comment[sr]=PDF приказивач +Comment[sr@Latn]=PDF prikazivač +Comment[ss]=Sibuki se PDF +Comment[sv]=PDF-visare +Comment[ta]=PDF காட்சி +Comment[tg]=Намоишгари PDF +Comment[th]=ตัวแสดงผล PDF +Comment[tr]=PDF Görüntüleyici +Comment[tt]=PDF Kürsätkeç +Comment[uk]=Переглядач PDF +Comment[uz]=PDF кўрувчи +Comment[ven]=Tshivhoni tsha PDF +Comment[vi]=Trình xem PDF +Comment[wa]=Håyneu di documints PDF +Comment[zh_CN]=PDF 查看器 +Comment[zh_TW]=PDF 檢視程式 +Comment[zu]=Umbukisi we-PDF +Keywords=pdf;document;presentation;viewer; +Keywords[de]=pdf;Dokument;Präsentation;Betrachter; +Keywords[ru]=pdf;документ;презентация;просмотр; +Keywords[uk]=pdf;документ;презентація;перегляд; +Keywords[ja]=pdf;ドキュメント;プレゼンテーション;ビューアー; + +Exec=xpdf +Icon=xpdf +Type=Application +Terminal=false +StartupNotify=false +MimeType=application/pdf; +Categories=Office;Viewer;Graphics;2DGraphics;VectorGraphics; diff --git a/app-text/xpdf/metadata.xml b/app-text/xpdf/metadata.xml index aab31e840b14..89d3f9dff565 100644 --- a/app-text/xpdf/metadata.xml +++ b/app-text/xpdf/metadata.xml @@ -8,6 +8,7 @@ <use> <flag name="cmyk">Include support for CMYK rasterization</flag> <flag name="i18n">Enable support non-UTF8 national charsets</flag> + <flag name="icons">Generate desktop PNG icons using <pkg>media-gfx/inkscape</pkg></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> diff --git a/app-text/xpdf/xpdf-4.02-r1.ebuild b/app-text/xpdf/xpdf-4.02-r1.ebuild new file mode 100644 index 000000000000..e64446609706 --- /dev/null +++ b/app-text/xpdf/xpdf-4.02-r1.ebuild @@ -0,0 +1,140 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils desktop xdg + +DESCRIPTION="The PDF viewer and tools" +HOMEPAGE="https://www.xpdfreader.com" +SRC_URI="https://xpdfreader-dl.s3.amazonaws.com/${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 icons +libpaper metric opi png +textselect utils" + +BDEPEND=" + icons? ( media-gfx/inkscape ) +" +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 +) + +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_compile() { + cmake-utils_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 + inkscape xpdf-icon.svg -w $i -h $i -e $i/xpdf.png + done + fi +} + +src_install() { + cmake-utils_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 +} |