summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaetan Bisson2022-09-18 09:38:39 -1000
committerGaetan Bisson2022-09-18 09:38:39 -1000
commit7f6ad0f9abbe359760bcc90c760c03b0c629f4a4 (patch)
tree9c1888a8787d66ebb1425c9c1d0aeb5150ef5925
parent8aa0befcfe5be9b6df389ec3a689d88bb9531bc0 (diff)
parentdbd97d599488149c2a84d8a9c49134c1acdf3c32 (diff)
downloadaur-7f6ad0f9abbe359760bcc90c760c03b0c629f4a4.tar.gz
Merge branch 'master' of ssh://aur/mupdf-git
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD27
2 files changed, 8 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5f06ecc47300..cda0d84ff199 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -16,6 +16,7 @@ pkgbase = mupdf-git
depends = libjpeg-turbo
depends = openjpeg2
depends = gumbo-parser
+ depends = mujs
provides = mupdf
provides = mupdf-gl
provides = mupdf-tools
@@ -26,13 +27,11 @@ pkgbase = mupdf-git
source = git://git.ghostscript.com/thirdparty-extract.git
source = git://git.ghostscript.com/thirdparty-freeglut.git
source = git://git.ghostscript.com/thirdparty-lcms2.git
- source = git://git.ghostscript.com/mujs.git
source = desktop
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = SKIP
sha256sums = 3240d4ebda002cb2c4f42cd42793c6160f1701d349d0acb797819dfd10d4fedd
pkgname = mupdf-git
diff --git a/PKGBUILD b/PKGBUILD
index fd45836d1d10..f64f79ea78cc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,18 +11,16 @@ arch=('x86_64' 'armv7h' 'aarch64')
url='https://mupdf.com/'
license=('AGPL3')
makedepends=('git' 'libxi' 'glu')
-depends=('libxrandr' 'harfbuzz' 'jbig2dec' 'libjpeg-turbo' 'openjpeg2' 'gumbo-parser')
+depends=('libxrandr' 'harfbuzz' 'jbig2dec' 'libjpeg-turbo' 'openjpeg2' 'gumbo-parser' 'mujs')
source=('git://git.ghostscript.com/mupdf.git'
'git://git.ghostscript.com/thirdparty-extract.git'
'git://git.ghostscript.com/thirdparty-freeglut.git'
'git://git.ghostscript.com/thirdparty-lcms2.git'
- 'git://git.ghostscript.com/mujs.git'
'desktop')
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
- 'SKIP'
'3240d4ebda002cb2c4f42cd42793c6160f1701d349d0acb797819dfd10d4fedd')
conflicts=("${_pkgname}"{,-gl,-tools})
@@ -35,40 +33,29 @@ pkgver() {
prepare() {
cd "${srcdir}/${_pkgname}"
-
sed "/extract.git/c url = $(pwd)/../thirdparty-extract" -i .gitmodules
sed "/freeglut.git/c url = $(pwd)/../thirdparty-freeglut" -i .gitmodules
sed "/lcms2.git/c url = $(pwd)/../thirdparty-lcms2" -i .gitmodules
- sed "/mujs.git/c url = $(pwd)/../mujs" -i .gitmodules
git submodule update --init thirdparty/extract
git submodule update --init thirdparty/freeglut
git submodule update --init thirdparty/lcms2
- git submodule update --init thirdparty/mujs
-
- # embedding CJK fonts into binaries is madness...
- sed '/TOFU_CJK /c #define TOFU_CJK 1/' -i include/mupdf/fitz/config.h
-
- # force internal freeglut; see e.g. 06c999fec01863a90824ba2f9f3ce98ea1a967d3
- sed 's/USE_SYSTEM_GLUT :=/& no #/g' -i Makethird
}
build() {
cd "${srcdir}/${_pkgname}"
-
export USE_SYSTEM_LIBS=yes
+ export CFLAGS+=' -D TOFU_CJK -D TOFU_NOTO' # only embed Base14 fonts and Charis SIL
+ sed 's/$(HAVE_X11)/no/g' -i Makefile # prevent building useless binaries
+ sed 's/$(USE_SYSTEM_MUJS)/yes/g' -i Makethird
+ sed 's/$(USE_SYSTEM_GLUT)/no/g' -i Makethird Makefile
make release
}
package() {
cd "${srcdir}/${_pkgname}"
-
make install DESTDIR="${pkgdir}" prefix=/usr
mv "${pkgdir}"/usr/bin/mupdf{-gl,}
- rm "${pkgdir}"/usr/bin/mupdf-x11*
-
- install -Dm644 ../desktop "${pkgdir}"/usr/share/applications/mupdf.desktop
- find "${pkgdir}"/usr/share -type f -exec chmod 0644 {} +
-
- # prevent the static-linking disease from spreading...
rm -fr "${pkgdir}"/usr/{include,lib}
+ find "${pkgdir}"/usr/share -type f -exec chmod 0644 {} +
+ install -Dm644 ../desktop "${pkgdir}"/usr/share/applications/mupdf.desktop
}