1 |
|
# Copyright 1999-2022 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
... | ... | |
10 |
10 |
|
11 |
11 |
DESCRIPTION="A lightweight PDF viewer and toolkit written in portable C"
|
12 |
12 |
HOMEPAGE="https://mupdf.com/ https://git.ghostscript.com/?p=mupdf.git"
|
13 |
|
SRC_URI="https://mupdf.com/downloads/archive/${P}-source.tar.xz"
|
|
13 |
SRC_URI="https://mupdf.com/downloads/archive/${P}-source.tar.gz"
|
14 |
14 |
S="${WORKDIR}"/${P}-source
|
15 |
15 |
|
16 |
16 |
LICENSE="AGPL-3"
|
17 |
17 |
SLOT="0/${PV}"
|
18 |
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 x86"
|
|
18 |
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 x86"
|
19 |
19 |
IUSE="+javascript opengl ssl X"
|
20 |
20 |
REQUIRED_USE="opengl? ( javascript )"
|
21 |
21 |
|
... | ... | |
24 |
24 |
# install system's freeglut.
|
25 |
25 |
RDEPEND="
|
26 |
26 |
dev-libs/gumbo
|
27 |
|
media-libs/freetype:2=
|
|
27 |
media-libs/freetype:2
|
28 |
28 |
media-libs/harfbuzz:=[truetype]
|
29 |
29 |
media-libs/jbig2dec:=
|
30 |
30 |
media-libs/libpng:0=
|
31 |
31 |
>=media-libs/openjpeg-2.1:2=
|
32 |
|
>=media-libs/libjpeg-turbo-1.5.3-r2:0
|
33 |
|
javascript? ( >=dev-lang/mujs-1.0.7:= )
|
|
32 |
>=media-libs/libjpeg-turbo-1.5.3-r2:0=
|
|
33 |
javascript? ( >=dev-lang/mujs-1.2.0:= )
|
34 |
34 |
opengl? ( >=media-libs/freeglut-3.0.0 )
|
35 |
35 |
ssl? ( >=dev-libs/openssl-1.1:0= )
|
|
36 |
sys-libs/zlib
|
36 |
37 |
X? (
|
37 |
38 |
x11-libs/libX11
|
38 |
39 |
x11-libs/libXext
|
... | ... | |
45 |
46 |
PATCHES=(
|
46 |
47 |
"${FILESDIR}"/${PN}-1.15-CFLAGS.patch
|
47 |
48 |
"${FILESDIR}"/${PN}-1.19.0-Makefile.patch
|
48 |
|
"${FILESDIR}"/${PN}-1.10a-add-desktop-pc-xpm-files.patch
|
|
49 |
"${FILESDIR}"/${P}-add-desktop-pc-files.patch
|
49 |
50 |
"${FILESDIR}"/${PN}-1.19.0-darwin.patch
|
50 |
51 |
# See bugs #662352
|
51 |
52 |
"${FILESDIR}"/${PN}-1.15-openssl-x11.patch
|
... | ... | |
68 |
69 |
-e "1iverbose = yes" \
|
69 |
70 |
-e "1ibuild = debug" \
|
70 |
71 |
-i Makerules || die "Failed adding build variables to Makerules in src_prepare()"
|
|
72 |
|
|
73 |
# Adjust MuPDF version in .pc file created by the
|
|
74 |
# mupdf-1.10a-add-desktop-pc-xpm-files.patch file
|
|
75 |
sed -e "s/Version: \(.*\)/Version: ${PV}/" \
|
|
76 |
-i platform/debian/${PN}.pc || die "Failed substituting version in ${PN}.pc"
|
71 |
77 |
}
|
72 |
78 |
|
73 |
79 |
_emake() {
|
... | ... | |
120 |
126 |
src_install() {
|
121 |
127 |
if use opengl || use X ; then
|
122 |
128 |
domenu platform/debian/${PN}.desktop
|
123 |
|
doicon platform/debian/${PN}.xpm
|
|
129 |
doicon -s scalable docs/logo/new-${PN}-icon.svg
|
124 |
130 |
else
|
125 |
131 |
rm docs/man/${PN}.1 || die "Failed to remove man page in src_install()"
|
126 |
132 |
fi
|