From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 3DB031382C5 for ; Wed, 14 Apr 2021 22:03:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5A109E091D; Wed, 14 Apr 2021 22:03:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 27C0DE091B for ; Wed, 14 Apr 2021 22:03:06 +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 CDC30335D74 for ; Wed, 14 Apr 2021 22:03:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2CFBB64C for ; Wed, 14 Apr 2021 22:03:03 +0000 (UTC) From: "Sam James" 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" Message-ID: <1618437616.179ae2aff7affd4cc9e273ae1c7ec4ef3b443578.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-text/mupdf/files/mupdf-1.18.0-darwin.patch app-text/mupdf/mupdf-1.18.0-r3.ebuild X-VCS-Directories: app-text/mupdf/files/ app-text/mupdf/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 179ae2aff7affd4cc9e273ae1c7ec4ef3b443578 X-VCS-Branch: master Date: Wed, 14 Apr 2021 22:03:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2d3aaea3-ffdf-491d-9c02-3b63293c2523 X-Archives-Hash: 081fe58c1fa493845c79b2a557956765 commit: 179ae2aff7affd4cc9e273ae1c7ec4ef3b443578 Author: Sam James gentoo org> AuthorDate: Wed Apr 14 21:37:36 2021 +0000 Commit: Sam James gentoo org> CommitDate: Wed Apr 14 22:00:16 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=179ae2af app-text/mupdf: improve build on Darwin, ${ED} usage, libressl-- Not quite there on Darwin, need to fix -soname usage, but a lot further than before. We also fix incorrect ${ED} usage, export ${PKG_CONFIG}, and drop USE=libressl. Signed-off-by: Sam James gentoo.org> app-text/mupdf/files/mupdf-1.18.0-darwin.patch | 41 +++++++++++++++++++++++ app-text/mupdf/mupdf-1.18.0-r3.ebuild | 45 +++++++++++++++----------- 2 files changed, 67 insertions(+), 19 deletions(-) diff --git a/app-text/mupdf/files/mupdf-1.18.0-darwin.patch b/app-text/mupdf/files/mupdf-1.18.0-darwin.patch new file mode 100644 index 00000000000..cdd8ccf0f40 --- /dev/null +++ b/app-text/mupdf/files/mupdf-1.18.0-darwin.patch @@ -0,0 +1,41 @@ +--- a/Makerules ++++ b/Makerules +@@ -117,11 +117,11 @@ ifeq ($(OS),MINGW) + else ifeq ($(OS),MACOS) + HAVE_GLUT := yes + SYS_GLUT_CFLAGS := -Wno-deprecated-declarations +- SYS_GLUT_LIBS := -framework GLUT -framework OpenGL +- CC = xcrun cc +- AR = xcrun ar +- LD = xcrun ld +- RANLIB = xcrun ranlib ++ SYS_GLUT_LIBS ?= -framework GLUT -framework OpenGL ++ CC ?= xcrun cc ++ AR ?= xcrun ar ++ LD ?= xcrun ld ++ RANLIB ?= xcrun ranlib + + else ifeq ($(OS),Linux) + HAVE_OBJCOPY := yes +--- a/Makerules ++++ b/Makerules +@@ -122,9 +122,7 @@ else ifeq ($(OS),MACOS) + AR ?= xcrun ar + LD ?= xcrun ld + RANLIB ?= xcrun ranlib +- +-else ifeq ($(OS),Linux) +- HAVE_OBJCOPY := yes ++endif + + ifeq ($(shell $(PKG_CONFIG) --exists freetype2 && echo yes),yes) + SYS_FREETYPE_CFLAGS := $(shell $(PKG_CONFIG) --cflags freetype2) +@@ -197,8 +195,6 @@ else ifeq ($(OS),Linux) + PTHREAD_LIBS := -lpthread + endif + +-endif +- + # The following section has various cross compilation configurations. + # + # Invoke these as: diff --git a/app-text/mupdf/mupdf-1.18.0-r3.ebuild b/app-text/mupdf/mupdf-1.18.0-r3.ebuild index 8c96cdb6255..60145d9c3d3 100644 --- a/app-text/mupdf/mupdf-1.18.0-r3.ebuild +++ b/app-text/mupdf/mupdf-1.18.0-r3.ebuild @@ -8,18 +8,17 @@ inherit desktop flag-o-matic toolchain-funcs xdg DESCRIPTION="A lightweight PDF viewer and toolkit written in portable C" HOMEPAGE="https://mupdf.com/ https://git.ghostscript.com/?p=mupdf.git" SRC_URI="https://mupdf.com/downloads/archive/${P}-source.tar.xz" -S="${WORKDIR}/${P}-source" +S="${WORKDIR}"/${P}-source LICENSE="AGPL-3" SLOT="0/${PV}" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~s390 x86" -IUSE="+javascript libressl opengl ssl X" +IUSE="+javascript opengl ssl X" 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 # install system's freeglut. -BDEPEND="virtual/pkgconfig" RDEPEND=" dev-libs/gumbo media-libs/freetype:2= @@ -30,21 +29,20 @@ RDEPEND=" virtual/jpeg javascript? ( >=dev-lang/mujs-1.0.7:= ) opengl? ( >=media-libs/freeglut-3.0.0 ) - ssl? ( - libressl? ( >=dev-libs/libressl-3.1.4:0= ) - !libressl? ( >=dev-libs/openssl-1.1:0= ) - ) + ssl? ( >=dev-libs/openssl-1.1:0= ) X? ( x11-libs/libX11 x11-libs/libXext ) " DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" PATCHES=( "${FILESDIR}"/${PN}-1.15-CFLAGS.patch "${FILESDIR}"/${PN}-1.18-Makefile.patch "${FILESDIR}"/${PN}-1.10a-add-desktop-pc-xpm-files.patch + "${FILESDIR}"/${PN}-1.18.0-darwin.patch # See bugs #662352 "${FILESDIR}"/${PN}-1.15-openssl-x11.patch # General cross fixes from Debian (refreshed) @@ -69,14 +67,12 @@ src_prepare() { -e "1iAR = $(tc-getAR)" \ -e "1iverbose = yes" \ -e "1ibuild = debug" \ - -e "1iprefix = ${ED}/usr" \ - -e "1ilibdir = ${ED}/usr/$(get_libdir)" \ - -e "1idocdir = ${ED}/usr/share/doc/${PF}" \ -i Makerules || die } _emake() { # When HAVE_OBJCOPY is yes, we end up with a lot of QA warnings. + # # Bundled libs # * General # Note that USE_SYSTEM_LIBS=yes is a metaoption which will set to upstream's @@ -100,19 +96,24 @@ _emake() { # # [0] https://git.ghostscript.com/?p=mupdf.git;a=blob;f=Makethird;h=c4c540fa4a075df0db85e6fdaab809099881f35a;hb=HEAD#l9 # [1] https://www.ghostscript.com/doc/lcms2mt/doc/WhyThisFork.txt - emake \ - GENTOO_PV=${PF} \ - HAVE_GLUT=$(usex opengl) \ - HAVE_LIBCRYPTO=$(usex ssl) \ - HAVE_X11=$(usex X) \ - USE_SYSTEM_LIBS=yes \ - USE_SYSTEM_MUJS=$(usex javascript) \ - USE_SYSTEM_GLUT=no \ - HAVE_OBJCOPY=no \ + local myemakeargs=( + GENTOO_PV=${PF} + HAVE_GLUT=$(usex opengl) + HAVE_LIBCRYPTO=$(usex ssl) + HAVE_X11=$(usex X) + USE_SYSTEM_LIBS=yes + USE_SYSTEM_MUJS=$(usex javascript) + USE_SYSTEM_GLUT=no + HAVE_OBJCOPY=no "$@" + ) + + emake "${myemakeargs[@]}" } src_compile() { + tc-export PKG_CONFIG + _emake XCFLAGS="-fPIC" } @@ -124,6 +125,12 @@ src_install() { rm docs/man/${PN}.1 || die fi + sed -i \ + -e "1iprefix = ${ED}/usr" \ + -e "1ilibdir = ${ED}/usr/$(get_libdir)" \ + -e "1idocdir = ${ED}/usr/share/doc/${PF}" \ + -i Makerules || die + _emake install dosym libmupdf.so.${PV} /usr/$(get_libdir)/lib${PN}.so