summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2020-11-10 16:49:57 +0000
committerSam James <sam@gentoo.org>2020-11-10 16:50:21 +0000
commite1e1d1325170ef2d136d7d6bfc9497c8ae3fbc92 (patch)
treea1a8b0d00b4217dce4b22065e32e213e722cde52
parentsys-apps/flashrom-1.2-r3: fix raw-access dependencies (diff)
downloadgentoo-e1e1d1325170ef2d136d7d6bfc9497c8ae3fbc92.tar.gz
gentoo-e1e1d1325170ef2d136d7d6bfc9497c8ae3fbc92.tar.bz2
gentoo-e1e1d1325170ef2d136d7d6bfc9497c8ae3fbc92.zip
app-text/mupdf: fix build with USE=-javascript
* Upstream confirmed the opengl frontend needs mujs * We add "conditional" system mujs usage because this avoids a spurious linker failure if mujs isn't installed. The bundled version isn't actually used in this case. * Add a failsafe define anyway to enable mujs/mujs globally. Closes: https://bugs.gentoo.org/753803 Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--app-text/mupdf/mupdf-1.18.0-r2.ebuild7
1 files changed, 3 insertions, 4 deletions
diff --git a/app-text/mupdf/mupdf-1.18.0-r2.ebuild b/app-text/mupdf/mupdf-1.18.0-r2.ebuild
index 7c2796e99ebc..dcce0f82d29a 100644
--- a/app-text/mupdf/mupdf-1.18.0-r2.ebuild
+++ b/app-text/mupdf/mupdf-1.18.0-r2.ebuild
@@ -14,6 +14,7 @@ LICENSE="AGPL-3"
SLOT="0/${PV}"
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc ppc64 x86"
IUSE="X +javascript libressl opengl ssl"
+REQUIRED_USE="opengl? ( javascript )"
# Although we use the bundled, patched version of freeglut in mupdf (because of
# bug #653298), the best way to ensure that its dependencies are present is to
@@ -57,9 +58,7 @@ src_prepare() {
use hppa && append-cflags -ffunction-sections
- use javascript || \
- sed -e '/* #define FZ_ENABLE_JS/ a\#define FZ_ENABLE_JS 0' \
- -i include/mupdf/fitz/config.h || die
+ append-cflags "-DFZ_ENABLE_JS=$(usex javascript 1 0)"
sed -e "1iOS = Linux" \
-e "1iCC = $(tc-getCC)" \
@@ -105,7 +104,7 @@ _emake() {
HAVE_LIBCRYPTO=$(usex ssl) \
HAVE_X11=$(usex X) \
USE_SYSTEM_LIBS=yes \
- USE_SYSTEM_MUJS=yes \
+ USE_SYSTEM_MUJS=$(usex javascript) \
USE_SYSTEM_GLUT=no \
HAVE_OBJCOPY=no \
"$@"