mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-07 04:44:57 +02:00
42 lines
1.2 KiB
Text
42 lines
1.2 KiB
Text
# Maintainer: Donoban <donoban@riseup.net>
|
|
pkgname=pdfjs
|
|
pkgver=5.3.31
|
|
pkgrel=0
|
|
pkgdesc="A general-purpose, web standards-based platform for parsing and rendering PDFs."
|
|
url="https://mozilla.github.io/pdf.js/"
|
|
arch="noarch"
|
|
license="Apache-2.0"
|
|
source="https://github.com/mozilla/pdf.js/releases/download/v$pkgver/pdfjs-$pkgver-dist.zip"
|
|
options="!check" # No tests
|
|
subpackages="$pkgname-dbg"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
#disable bundled fonts
|
|
sed -i "s|\"../web/standard_fonts/\",|null,|" web/viewer.mjs
|
|
}
|
|
|
|
package() {
|
|
# Remove bundled fonts and weird pdf included
|
|
rm "$srcdir/web/compressed.tracemonkey-pldi-09.pdf"
|
|
rm -fr "$srcdir/web/cmaps"
|
|
rm -fr "$srcdir/web/standard_fonts"
|
|
|
|
mkdir -p "$pkgdir/usr/share/pdf.js"
|
|
cp -R "$srcdir"/build "$pkgdir"/usr/share/pdf.js
|
|
cp -R "$srcdir"/web "$pkgdir"/usr/share/pdf.js
|
|
|
|
# Workaround for apps reyling in pdf.js
|
|
cd "$pkgdir"/usr/share/pdf.js/build
|
|
ln -s pdf.mjs pdf.js
|
|
}
|
|
|
|
dbg() {
|
|
amove /usr/share/pdf.js/*/*.mjs.map
|
|
amove /usr/share/pdf.js/*/debugger*
|
|
}
|
|
|
|
sha512sums="
|
|
59f02dfa4e971d33e2b342a31d7b858cc8c43e044891567960943b2a7677adc4b18a118e62eafcc0a42634b4134e8edf1b3b427696aeee61faa34c17d44cf968 pdfjs-5.3.31-dist.zip
|
|
"
|