Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/texlive-core/
Date: Sun, 07 Jan 2018 05:32:22
Message-Id: 1515303111.16a59ccf3cfd911e909cca40339b445c5eba1482.aballier@gentoo
1 commit: 16a59ccf3cfd911e909cca40339b445c5eba1482
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 7 05:31:51 2018 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 7 05:31:51 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16a59ccf
7
8 app-text/texlive-core: Add patch to build with latest poppler to texlive 2016.
9
10 Backport by Andreas K. Hüttel in bug #629710.
11
12 Closes: https://bugs.gentoo.org/643372
13 Package-Manager: Portage-2.3.19, Repoman-2.3.6
14
15 app-text/texlive-core/Manifest | 1 +
16 app-text/texlive-core/texlive-core-2016-r6.ebuild | 356 ++++++++++++++++++++++
17 2 files changed, 357 insertions(+)
18
19 diff --git a/app-text/texlive-core/Manifest b/app-text/texlive-core/Manifest
20 index 1ca46dda9bc..3a2cf28d284 100644
21 --- a/app-text/texlive-core/Manifest
22 +++ b/app-text/texlive-core/Manifest
23 @@ -9,6 +9,7 @@ DIST texlive-core-patches-48.tar.xz 3528 BLAKE2B 6f6fbb5c4c9add39957a98de3913b97
24 DIST texlive-core-patches-49.tar.xz 2796 BLAKE2B ed35c494ab5d97f5e44d19348de477c724a0209442a7267bd1bab4e6b3b140808d4a41c6320c64ef2db31c04bd2b31485c3b34c1a5623f8793420b6c6f46b1c4 SHA512 4faf0b9653b9a5335e4b210d15200b4118245687ff12e617f181bdece5d2b5cd827247fc72bdc304722f72d8f017804b8026300a9be18f7663749ddc82c7bb17
25 DIST texlive-core-patches-50.tar.xz 4632 BLAKE2B 8b5c5d46e820a568b0e47ba62d0e8c2cc874f2b2bebc8eb791470568659ff6e4115b65eea25eaad08923dfc4cd5e5808fe09289a58bd771f7211beef8b627dbe SHA512 f8fab7940b417b7065c9c467f7a9612e161a1a44db50a4523ee4a092ba381f7580adf1c3d75375165795dfc3f23d005028d67351815481dbdbd6edb13f376b64
26 DIST texlive-core-patches-52.tar.xz 3376 BLAKE2B 57cea2599e4c59e0dd7dc8b078b79e8b3ad4b310fd7d7749c39c9fecec872307ca5d3e0ec826b8c63bc050ac0eb195b2c2bc2a2b514e0db7f4ac02cdf3df1c80 SHA512 fbc84217911d797373ad03e3da3bcb2277d74edf3a9fd77a5bf67bed7fb207d1cd3d9c9c7947c906ee10989fe6ceb6c263a4002a592217bce7e873db813dc367
27 +DIST texlive-core-patches-65.1.tar.xz 12080 BLAKE2B b6a51d733198e42c06bc896bb55786166b9b034ae3025c3a9a5c3e81e3aafac4732515088248c0e195bf0b9fb88e67b2a0d4a94e4173aecdaf307fedb0d269d9 SHA512 fa4de81cb694050728146ad7ca9a2a0247af7b1aef16efcfccebf9d0beac11ddcc334f333e1e1267658743b16b666a285dab902c3e75aa3b21c60946a82871f5
28 DIST texlive-core-patches-65.tar.xz 4108 BLAKE2B da1f7f870c56fa7bf21186f6acdd495c0e1314e92fee9d546e3ef502307e68fc4482c362edd3bfa73aa9d0faec5363f90c2b2dd1ddefd2fc9085a046bfd6eefb SHA512 71ec54cce052ed60bd0d3c836901d5b2fdc8ab6190536056d617652953009b4645896e7d22ccb9d4ebf177aaefcdca30269600e0cb16daa8d395b036c679971c
29 DIST texlive-core-patches-68.tar.xz 5140 BLAKE2B 830a8da64151169cb68e55daaf8c3843980a9dcb85120862d0dec31a42508ff7eec24df1f2069a96a5a4ae7e9b8011ffdb50548f5f6ae722a23132624a77ea22 SHA512 225e7019c132b7e8185343c409cc2b6f418cb062127e916aa3b70db0c6f19d7957415056f2b526f1ea7b7ad13d4367822f34bb710f85ab7cc6bc757b21871d20
30 DIST texlive-core-patches-70.tar.xz 13068 BLAKE2B 011cf51af10d28ac9df7c9b9d7aea2cac3e562d393dcf09d57b3c2832fe6816cf926458417577f7c9d9414639a291c09240444145bdbb3d132170f51a8a16980 SHA512 fd26b92a03cd0446007728d0c16a8c7301e254515b997e6a0bd9b325db162bf3f2a2e96be0cb185f042038205c4b4dacf1785a216c8326328682f1c42da9079e
31
32 diff --git a/app-text/texlive-core/texlive-core-2016-r6.ebuild b/app-text/texlive-core/texlive-core-2016-r6.ebuild
33 new file mode 100644
34 index 00000000000..c9a53869116
35 --- /dev/null
36 +++ b/app-text/texlive-core/texlive-core-2016-r6.ebuild
37 @@ -0,0 +1,356 @@
38 +# Copyright 1999-2018 Gentoo Foundation
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=5
42 +
43 +#TL_UPSTREAM_PATCHLEVEL="1"
44 +PATCHLEVEL="65.1"
45 +TL_SOURCE_VERSION=20160523
46 +
47 +inherit eutils flag-o-matic toolchain-funcs libtool texlive-common
48 +
49 +MY_PV=${PN%-core}-${TL_SOURCE_VERSION}-source
50 +
51 +DESCRIPTION="A complete TeX distribution"
52 +HOMEPAGE="http://tug.org/texlive/"
53 +SLOT="0"
54 +LICENSE="GPL-2 LPPL-1.3c TeX"
55 +
56 +SRC_URI="mirror://gentoo/${MY_PV}.tar.xz"
57 +
58 +# Fetch patches
59 +SRC_URI="${SRC_URI} mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.xz"
60 +# mirror://gentoo/texlive-core-upstream-patches-${TL_UPSTREAM_PATCHLEVEL}.tar.xz"
61 +
62 +TL_CORE_BINEXTRA_MODULES="
63 + a2ping adhocfilelist arara asymptote bundledoc checklistings ctan_chk
64 + ctanify ctanupload ctie cweb de-macro dtl dtxgen dvi2tty dviasm dvicopy
65 + dvidvi dviljk dvipos findhyph fragmaster hook-pre-commit-pkg hyphenex
66 + installfont lacheck latex-git-log latex-papersize latex2man latex2nemeth
67 + latexfileversion latexpand latexindent ltxfileinfo ltximg listings-ext make4ht
68 + match_parens mflua mkjobtexmf patgen pdfbook2 pdfcrop pdflatexpicscale pdftools
69 + pdfxup pfarrei pkfix pkfix-helper purifyeps seetexk srcredact sty2dtx
70 + synctex tex4ebook texcount texdef texdiff texdirflatten texdoc texfot
71 + texliveonfly texloganalyser texosquery texware tie tpic2pdftex typeoutfileinfo
72 + web collection-binextra
73 + "
74 +TL_CORE_BINEXTRA_DOC_MODULES="
75 + a2ping.doc adhocfilelist.doc arara.doc asymptote.doc bundledoc.doc
76 + checklistings.doc ctan_chk.doc ctanify.doc ctanupload.doc ctie.doc
77 + cweb.doc de-macro.doc dtl.doc dtxgen.doc dvi2tty.doc dviasm.doc dvicopy.doc
78 + dvidvi.doc dviljk.doc dvipos.doc findhyph.doc fragmaster.doc
79 + hook-pre-commit-pkg.doc installfont.doc lacheck.doc latex-git-log.doc
80 + latex-papersize.doc latex2man.doc latex2nemeth.doc latexfileversion.doc
81 + latexpand.doc latexindent.doc ltxfileinfo.doc ltximg.doc listings-ext.doc
82 + make4ht.doc match_parens.doc mkjobtexmf.doc patgen.doc pdfbook2.doc pdfcrop.doc
83 + pdflatexpicscale.doc pdftools.doc pdfxup.doc pfarrei.doc pkfix.doc
84 + pkfix-helper.doc purifyeps.doc pythontex.doc seetexk.doc srcredact.doc
85 + sty2dtx.doc synctex.doc tex4ebook.doc texcount.doc texdef.doc texdiff.doc
86 + texdirflatten.doc texdoc.doc texfot.doc texliveonfly.doc texloganalyser.doc
87 + texosquery.doc texware.doc tie.doc tpic2pdftex.doc typeoutfileinfo.doc web.doc
88 +"
89 +TL_CORE_BINEXTRA_SRC_MODULES="
90 + adhocfilelist.source arara.source checklistings.source hyphenex.source
91 + listings-ext.source mkjobtexmf.source pfarrei.source pythontex.source
92 + texdef.source texosquery.source
93 +"
94 +
95 +TL_CORE_EXTRA_MODULES="tetex hyphen-base texconfig gsftopk texlive.infra ${TL_CORE_BINEXTRA_MODULES}"
96 +TL_CORE_EXTRA_DOC_MODULES="tetex.doc texconfig.doc gsftopk.doc texlive.infra.doc ${TL_CORE_BINEXTRA_DOC_MODULES}"
97 +TL_CORE_EXTRA_SRC_MODULES="${TL_CORE_BINEXTRA_SRC_MODULES}"
98 +
99 +for i in ${TL_CORE_EXTRA_MODULES}; do
100 + SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
101 +done
102 +
103 +SRC_URI="${SRC_URI} doc? ( "
104 +for i in ${TL_CORE_EXTRA_DOC_MODULES}; do
105 + SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
106 +done
107 +SRC_URI="${SRC_URI} )"
108 +SRC_URI="${SRC_URI} source? ( "
109 +for i in ${TL_CORE_EXTRA_SRC_MODULES}; do
110 + SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
111 +done
112 +SRC_URI="${SRC_URI} )"
113 +
114 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
115 +IUSE="cjk X doc source tk +luajittex xetex"
116 +
117 +TEXMF_PATH=/usr/share/texmf-dist
118 +
119 +MODULAR_X_DEPEND="X? (
120 + x11-libs/libXmu
121 + x11-libs/libXp
122 + x11-libs/libXpm
123 + x11-libs/libXaw
124 + )"
125 +
126 +COMMON_DEPEND="${MODULAR_X_DEPEND}
127 + !app-text/ptex
128 + !app-text/tetex
129 + !<app-text/texlive-2007
130 + !app-text/xetex
131 + !<dev-texlive/texlive-basic-2014
132 + !<dev-texlive/texlive-metapost-2011
133 + !app-text/dvibook
134 + !dev-tex/luatex
135 + !app-text/dvipdfm
136 + !app-text/dvipdfmx
137 + !app-text/xdvipdfmx
138 + sys-libs/zlib
139 + >=media-libs/libpng-1.2.43-r2:0=
140 + >=app-text/poppler-0.12.3-r3:=
141 + >=x11-libs/cairo-1.12
142 + >=x11-libs/pixman-0.18
143 + dev-libs/zziplib
144 + app-text/libpaper
145 + dev-libs/gmp:0
146 + dev-libs/mpfr:0
147 + xetex? (
148 + >=media-libs/harfbuzz-0.9.20[icu,graphite]
149 + >=dev-libs/icu-50:=
150 + >=app-text/teckit-2.5.3
151 + media-libs/fontconfig
152 + media-gfx/graphite2
153 + )
154 + media-libs/freetype:2
155 + >=dev-libs/kpathsea-6.2.1
156 + cjk? ( >=dev-libs/ptexenc-1.3.4_p20160523 )"
157 +
158 +DEPEND="${COMMON_DEPEND}
159 + virtual/pkgconfig
160 + sys-apps/ed
161 + sys-devel/flex
162 + app-arch/xz-utils"
163 +
164 +RDEPEND="${COMMON_DEPEND}
165 + >=app-text/ps2pkm-1.8_p20160523
166 + >=app-text/dvipsk-5.996_p20160523
167 + >=dev-tex/bibtexu-3.71_p20160523
168 + virtual/perl-Getopt-Long
169 + tk? ( dev-perl/Tk )"
170 +
171 +S="${WORKDIR}/${P}_build"
172 +B="${WORKDIR}/${MY_PV}"
173 +
174 +src_unpack() {
175 + unpack ${A}
176 + mkdir -p "${S}" || die "failed to create build dir"
177 +}
178 +
179 +RELOC_TARGET=texmf-dist
180 +
181 +src_prepare() {
182 + cd "${WORKDIR}"
183 + # From texlive-module.eclass.
184 + grep -H RELOC tlpkg/tlpobj/* | awk '{print $2}' | sed 's#^RELOC/##' > "${T}/reloclist"
185 + { for i in $(<"${T}/reloclist"); do dirname $i; done; } | uniq > "${T}/dirlist"
186 + for i in $(<"${T}/dirlist"); do
187 + [ -d "${RELOC_TARGET}/${i}" ] || mkdir -p "${RELOC_TARGET}/${i}"
188 + done
189 + for i in $(<"${T}/reloclist"); do
190 + mv "${i}" "${RELOC_TARGET}"/$(dirname "${i}") || die "failed to relocate ${i} to ${RELOC_TARGET}/$(dirname ${i})"
191 + done
192 +
193 + mv "${WORKDIR}"/texmf* "${B}" || die "failed to move texmf files"
194 +
195 + cd "${B}"
196 + #EPATCH_MULTI_MSG="Applying patches from upstream bugfix branch..." EPATCH_SUFFIX="patch" epatch "${WORKDIR}/gentoo_branch2011_patches"
197 + EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
198 +
199 + sed -i \
200 + -e "s,/usr/include /usr/local/include.*echo \$KPATHSEA_INCLUDES.*,${EPREFIX}/usr/include\"," \
201 + texk/web2c/configure || die
202 +
203 + elibtoolize
204 +}
205 +
206 +src_configure() {
207 + # It fails on alpha without this
208 + use alpha && append-ldflags "-Wl,--no-relax"
209 +
210 + # Required for newest icu, bug #618732
211 + append-cxxflags '-std=c++11'
212 +
213 + # Too many regexps use A-Z a-z constructs, what causes problems with locales
214 + # that don't have the same alphabetical order than ascii. Bug #242430
215 + # So we set LC_ALL to C in order to avoid problems.
216 + export LC_ALL=C
217 + tc-export CC CXX AR RANLIB
218 + ECONF_SOURCE="${B}" \
219 + econf -C \
220 + --bindir="${EPREFIX}"/usr/bin \
221 + --datadir="${S}" \
222 + --with-system-freetype2 \
223 + --with-system-zlib \
224 + --with-system-libpng \
225 + --with-system-xpdf \
226 + --with-system-poppler \
227 + --with-system-teckit \
228 + --with-teckit-includes="${EPREFIX}"/usr/include/teckit \
229 + --with-system-kpathsea \
230 + --with-kpathsea-includes="${EPREFIX}"/usr/include \
231 + --with-system-icu \
232 + --with-system-ptexenc \
233 + --with-system-harfbuzz \
234 + --with-system-icu \
235 + --with-system-graphite2 \
236 + --with-system-cairo \
237 + --with-system-pixman \
238 + --with-system-zziplib \
239 + --with-system-libpaper \
240 + --with-system-gmp \
241 + --with-system-mpfr \
242 + --without-texinfo \
243 + --disable-dialog \
244 + --disable-multiplatform \
245 + --enable-epsfwin \
246 + --enable-mftalkwin \
247 + --enable-regiswin \
248 + --enable-tektronixwin \
249 + --enable-unitermwin \
250 + --with-ps=gs \
251 + --disable-psutils \
252 + --disable-t1utils \
253 + --enable-ipc \
254 + --disable-biber \
255 + --disable-bibtex-x \
256 + --disable-dvipng \
257 + --disable-dvipsk \
258 + --disable-chktex \
259 + --disable-lcdf-typetools \
260 + --disable-pdfopen \
261 + --disable-ps2eps \
262 + --disable-ps2pk \
263 + --disable-detex \
264 + --disable-ttf2pk2 \
265 + --disable-tex4htk \
266 + --disable-cjkutils \
267 + --disable-xdvik \
268 + --disable-xindy \
269 + --enable-luatex \
270 + --disable-dvi2tty \
271 + --disable-dvisvgm \
272 + --disable-vlna \
273 + --enable-shared \
274 + --disable-native-texlive-build \
275 + --disable-largefile \
276 + $(use_enable luajittex) \
277 + $(use_enable luajittex mfluajit) \
278 + $(use_enable xetex) \
279 + $(use_enable cjk ptex) \
280 + $(use_enable cjk eptex) \
281 + $(use_enable cjk uptex) \
282 + $(use_enable cjk euptex) \
283 + $(use_enable cjk mendexk) \
284 + $(use_enable cjk makejvf) \
285 + $(use_enable cjk pmp) \
286 + $(use_enable cjk upmp) \
287 + $(use_enable tk texdoctk) \
288 + $(use_with X x)
289 +}
290 +
291 +src_compile() {
292 + tc-export CC CXX AR RANLIB
293 + emake SHELL="${EPREFIX}"/bin/sh texmf="${EPREFIX}"${TEXMF_PATH:-/usr/share/texmf-dist}
294 +
295 + cd "${B}" || die
296 + # Mimic updmap --syncwithtrees to enable only fonts installed
297 + # Code copied from updmap script
298 + for i in `egrep '^(Mixed|Kanji)?Map' "texmf-dist/web2c/updmap.cfg" | sed 's@.* @@'`; do
299 + texlive-common_is_file_present_in_texmf "$i" || echo "$i"
300 + done > "${T}/updmap_update"
301 + {
302 + sed 's@/@\\/@g; s@^@/^MixedMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
303 + sed 's@/@\\/@g; s@^@/^Map[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
304 + sed 's@/@\\/@g; s@^@/^KanjiMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
305 + } > "${T}/updmap_update2"
306 + sed -f "${T}/updmap_update2" "texmf-dist/web2c/updmap.cfg" > "${T}/updmap_update3"\
307 + && cat "${T}/updmap_update3" > "texmf-dist/web2c/updmap.cfg"
308 +}
309 +
310 +src_install() {
311 + dodir ${TEXMF_PATH:-/usr/share/texmf-dist}/web2c
312 + emake DESTDIR="${D}" texmf="${ED}${TEXMF_PATH:-/usr/share/texmf-dist}" run_texlinks="true" run_mktexlsr="true" install
313 +
314 + cd "${B}" || die
315 + dodir /usr/share # just in case
316 + cp -pR texmf-dist "${ED}/usr/share/" || die "failed to install texmf trees"
317 + cp -pR "${WORKDIR}"/tlpkg "${ED}/usr/share/" || die "failed to install tlpkg files"
318 +
319 + # When X is disabled mf-nowin doesn't exist but some scripts expect it to
320 + # exist. Instead, it is called mf, so we symlink it to please everything.
321 + use X || dosym mf /usr/bin/mf-nowin
322 +
323 + docinto texk
324 + cd "${B}/texk"
325 + dodoc ChangeLog README
326 +
327 + docinto dviljk
328 + cd "${B}/texk/dviljk"
329 + dodoc ChangeLog README NEWS
330 +
331 + docinto makeindexk
332 + cd "${B}/texk/makeindexk"
333 + dodoc ChangeLog NOTES README
334 +
335 + docinto web2c
336 + cd "${B}/texk/web2c"
337 + dodoc ChangeLog NEWS PROJECTS README
338 +
339 + use doc || rm -rf "${ED}/usr/share/texmf-dist/doc"
340 +
341 + dodir /etc/env.d
342 + echo 'CONFIG_PROTECT_MASK="/etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d"' > "${ED}/etc/env.d/98texlive"
343 + # populate /etc/texmf
344 + keepdir /etc/texmf/web2c
345 +
346 + # take care of updmap.cfg and language.d files
347 + keepdir /etc/texmf/{updmap.d,language.dat.d,language.def.d,language.dat.lua.d}
348 +
349 + mv "${ED}${TEXMF_PATH}/web2c/updmap.cfg" "${ED}/etc/texmf/updmap.d/00updmap.cfg" || die "moving updmap.cfg failed"
350 +
351 + # Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files
352 + # by texmf-update
353 + rm -f "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf"
354 + # Remove bundled and invalid updmap.cfg
355 + rm -f "${ED}/usr/share/texmf-dist/web2c/updmap.cfg"
356 +
357 + texlive-common_handle_config_files
358 +
359 + keepdir /usr/share/texmf-site
360 +
361 + # the virtex symlink is not installed
362 + # The links has to be relative, since the targets
363 + # is not present at this stage and MacOS doesn't
364 + # like non-existing targets
365 + dosym tex /usr/bin/virtex
366 + dosym pdftex /usr/bin/pdfvirtex
367 +
368 + # Rename mpost to leave room for mplib
369 + mv "${ED}/usr/bin/mpost" "${ED}/usr/bin/mpost-${P}"
370 + dosym "mpost-${P}" /usr/bin/mpost
371 +
372 + # Ditto for pdftex
373 + mv "${ED}/usr/bin/pdftex" "${ED}/usr/bin/pdftex-${P}"
374 + dosym "pdftex-${P}" /usr/bin/pdftex
375 +}
376 +
377 +pkg_postinst() {
378 + etexmf-update
379 +
380 + elog
381 + elog "If you have configuration files in ${EPREFIX}/etc/texmf to merge,"
382 + elog "please update them and run ${EPREFIX}/usr/sbin/texmf-update."
383 + elog
384 + ewarn "If you are migrating from an older TeX distribution"
385 + ewarn "Please make sure you have read:"
386 + ewarn "https://wiki.gentoo.org/wiki/Project:TeX/Tex_Live_Migration_Guide"
387 + ewarn "in order to avoid possible problems"
388 + elog
389 + elog "TeXLive has been split in various ebuilds. If you are missing a"
390 + elog "package to process your TeX documents, you can install"
391 + elog "dev-tex/texmfind to easily search for them."
392 + elog
393 +}