Gentoo Archives: gentoo-commits

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