Gentoo Archives: gentoo-commits

From: Michael Weber <xmw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/
Date: Mon, 13 Feb 2017 17:05:14
Message-Id: 1487005493.f7f45315f7279b0a380dcb6728d5ffb033bd2c4e.xmw@gentoo
1 commit: f7f45315f7279b0a380dcb6728d5ffb033bd2c4e
2 Author: Michael Weber <xmw <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 13 17:04:53 2017 +0000
4 Commit: Michael Weber <xmw <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 13 17:04:53 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7f45315
7
8 app-text/mupdf: Remove old version (bug 608712, bug 608702).
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 app-text/mupdf/mupdf-1.10a.ebuild | 146 --------------------------------------
13 1 file changed, 146 deletions(-)
14
15 diff --git a/app-text/mupdf/mupdf-1.10a.ebuild b/app-text/mupdf/mupdf-1.10a.ebuild
16 deleted file mode 100644
17 index 7494abf2ef..0000000000
18 --- a/app-text/mupdf/mupdf-1.10a.ebuild
19 +++ /dev/null
20 @@ -1,146 +0,0 @@
21 -# Copyright 1999-2017 Gentoo Foundation
22 -# Distributed under the terms of the GNU General Public License v2
23 -# $Id$
24 -
25 -EAPI=6
26 -
27 -inherit flag-o-matic toolchain-funcs
28 -
29 -DESCRIPTION="a lightweight PDF viewer and toolkit written in portable C"
30 -HOMEPAGE="http://mupdf.com/"
31 -SRC_URI="http://mupdf.com/downloads/${P}-source.tar.gz"
32 -
33 -LICENSE="AGPL-3"
34 -SLOT="0/${PV}"
35 -KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ppc ppc64 ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
36 -IUSE="X +curl javascript libressl opengl +openssl static static-libs vanilla"
37 -
38 -LIB_DEPEND="
39 - !libressl? ( dev-libs/openssl:0[static-libs?] )
40 - libressl? ( dev-libs/libressl[static-libs?] )
41 - javascript? ( >=dev-lang/mujs-0_p20160504 )
42 - media-libs/freetype:2[static-libs?]
43 - media-libs/harfbuzz[static-libs?]
44 - media-libs/jbig2dec[static-libs?]
45 - media-libs/libpng:0[static-libs?]
46 - >=media-libs/openjpeg-2.1:2[static-libs?]
47 - net-misc/curl[static-libs?]
48 - virtual/jpeg[static-libs?]
49 - X? ( x11-libs/libX11[static-libs?]
50 - x11-libs/libXext[static-libs?] )
51 - opengl? ( >=media-libs/glfw-3 )"
52 -RDEPEND="${LIB_DEPEND}"
53 -DEPEND="${RDEPEND}
54 - virtual/pkgconfig
55 - static-libs? ( ${LIB_DEPEND} )
56 - static? ( ${LIB_DEPEND//?}
57 - app-arch/bzip2[static-libs]
58 - x11-libs/libXau[static-libs]
59 - x11-libs/libXdmcp[static-libs]
60 - x11-libs/libxcb[static-libs] )"
61 -
62 -REQUIRED_USE="opengl? ( X !static !static-libs )"
63 -
64 -S=${WORKDIR}/${P}-source
65 -
66 -PATCHES=(
67 - "${FILESDIR}"/${PN}-1.9a-CFLAGS.patch \
68 - "${FILESDIR}"/${PN}-1.9a-debug-build.patch \
69 - "${FILESDIR}"/${PN}-1.10a-add-desktop-pc-xpm-files.patch
70 - "${FILESDIR}"/${PN}-1.10a-Makerules-openssl-curl.patch \
71 - "${FILESDIR}"/${PN}-1.8-system-glfw.patch
72 -)
73 -
74 -src_prepare() {
75 - default
76 - use hppa && append-cflags -ffunction-sections
77 -
78 - rm -rf thirdparty || die
79 -
80 - if has_version ">=media-libs/openjpeg-2.1:2" ; then
81 - # Remove a switch, which prevents using shared libraries for openjpeg2.
82 - # See http://www.linuxfromscratch.org/blfs/view/cvs/pst/mupdf.html
83 - sed '/OPJ_STATIC$/d' -i source/fitz/load-jpx.c
84 - fi
85 -
86 - use javascript || \
87 - sed -e '/* #define FZ_ENABLE_JS/ a\#define FZ_ENABLE_JS 0' \
88 - -i include/mupdf/fitz/config.h
89 -
90 - sed -e "/^libdir=/s:/lib:/$(get_libdir):" \
91 - -e "/^prefix=/s:=.*:=${EROOT}/usr:" \
92 - -i platform/debian/${PN}.pc || die
93 -
94 - use vanilla || eapply \
95 - "${FILESDIR}"/${PN}-1.3-zoom-2.patch
96 -
97 - sed -e "1iOS = Linux" \
98 - -e "1iCC = $(tc-getCC)" \
99 - -e "1iLD = $(tc-getCC)" \
100 - -e "1iAR = $(tc-getAR)" \
101 - -e "1iverbose = yes" \
102 - -e "1ibuild = debug" \
103 - -e "1iprefix = ${ED}usr" \
104 - -e "1ilibdir = ${ED}usr/$(get_libdir)" \
105 - -e "1idocdir = ${ED}usr/share/doc/${PF}" \
106 - -e "1iHAVE_X11 = $(usex X)" \
107 - -e "1iWANT_OPENSSL = $(usex openssl)" \
108 - -e "1iWANT_CURL = $(usex curl)" \
109 - -e "1iHAVE_MUJS = $(usex javascript)" \
110 - -e "1iMUJS_LIBS = $(usex javascript -lmujs '')" \
111 - -e "1iMUJS_CFLAGS =" \
112 - -e "1iHAVE_GLFW = $(usex opengl yes no)" \
113 - -i Makerules || die
114 -
115 - if use static-libs || use static ; then
116 - cp -a "${S}" "${S}"-static || die
117 - #add missing Libs.private for xcb and freetype
118 - sed -e 's:\(pkg-config --libs\):\1 --static:' \
119 - -e '/^SYS_X11_LIBS = /s:\(.*\):\1 -lpthread:' \
120 - -e '/^SYS_FREETYPE_LIBS = /s:\(.*\):\1 -lbz2:' \
121 - -i "${S}"-static/Makerules || die
122 - fi
123 -
124 - my_soname=libmupdf.so.${PV}
125 - my_soname_js_none=libmupdf-js-none.so.${PV}
126 - sed -e "\$a\$(MUPDF_LIB): \$(MUPDF_JS_NONE_LIB)" \
127 - -e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname -Wl,${my_soname} -Wl,--no-undefined -o \$@ \$^ \$(MUPDF_JS_NONE_LIB) \$(LIBS)" \
128 - -e "/^MUPDF_LIB =/s:=.*:= \$(OUT)/${my_soname}:" \
129 - -e "\$a\$(MUPDF_JS_NONE_LIB):" \
130 - -e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname -Wl,${my_soname_js_none} -Wl,--no-undefined -o \$@ \$^ \$(LIBS)" \
131 - -e "/install/s: COPYING : :" \
132 - -i Makefile || die
133 -}
134 -
135 -src_compile() {
136 - emake XCFLAGS="-fpic"
137 - use static-libs && \
138 - emake -C "${S}"-static build/debug/lib${PN}{,-js-none}.a
139 - use static && \
140 - emake -C "${S}"-static XLIBS="-static"
141 -}
142 -
143 -src_install() {
144 - if use X ; then
145 - domenu platform/debian/${PN}.desktop
146 - doicon platform/debian/${PN}.xpm
147 - else
148 - rm docs/man/${PN}.1
149 - fi
150 -
151 - emake install
152 - dosym ${my_soname} /usr/$(get_libdir)/lib${PN}.so
153 -
154 - use static-libs && \
155 - dolib.a "${S}"-static/build/debug/lib${PN}{,-js-none}.a
156 - if use static ; then
157 - dobin "${S}"-static/build/debug/mu{tool,draw}
158 - use X && dobin "${S}"-static/build/debug/${PN}-x11
159 - fi
160 - use X && dosym ${PN}-x11 /usr/bin/${PN}
161 -
162 - insinto /usr/$(get_libdir)/pkgconfig
163 - doins platform/debian/${PN}.pc
164 -
165 - dodoc README docs/*.{txt,c}
166 -}