From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1221181-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id A0C03138359
	for <garchives@archives.gentoo.org>; Tue, 10 Nov 2020 16:50:31 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id EC1AAE0809;
	Tue, 10 Nov 2020 16:50:30 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id A980BE0809
	for <gentoo-commits@lists.gentoo.org>; Tue, 10 Nov 2020 16:50:29 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id AE11A335C07
	for <gentoo-commits@lists.gentoo.org>; Tue, 10 Nov 2020 16:50:28 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id ECD20443
	for <gentoo-commits@lists.gentoo.org>; Tue, 10 Nov 2020 16:50:26 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1605027021.e1e1d1325170ef2d136d7d6bfc9497c8ae3fbc92.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-text/mupdf/mupdf-1.18.0-r2.ebuild
X-VCS-Directories: app-text/mupdf/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: e1e1d1325170ef2d136d7d6bfc9497c8ae3fbc92
X-VCS-Branch: master
Date: Tue, 10 Nov 2020 16:50:26 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: b6a0b2c5-6a1c-436e-b949-856c4493bb0c
X-Archives-Hash: b3ebc016f2a4ee22b32541d59cabf207

commit:     e1e1d1325170ef2d136d7d6bfc9497c8ae3fbc92
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 10 16:49:57 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 10 16:50:21 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1e1d132

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 <AT> gentoo.org>

 app-text/mupdf/mupdf-1.18.0-r2.ebuild | 7 +++----
 1 file 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 7c2796e99eb..dcce0f82d29 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 \
 		"$@"