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