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, 03 Jun 2019 20:56:29
Message-Id: 1559595378.5d9b704ea9637bb3d4524910e8b41363f7c63d62.zlogene@gentoo
1 commit: 5d9b704ea9637bb3d4524910e8b41363f7c63d62
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 3 20:55:19 2019 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 3 20:56:18 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d9b704e
7
8 app-text/texlive-core: Drop more bundled scripts
9
10 Closes: https://bugs.gentoo.org/687304
11 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
12 Package-Manager: Portage-2.3.66, Repoman-2.3.11
13
14 app-text/texlive-core/Manifest | 1 +
15 app-text/texlive-core/texlive-core-2019-r1.ebuild | 348 ++++++++++++++++++++++
16 2 files changed, 349 insertions(+)
17
18 diff --git a/app-text/texlive-core/Manifest b/app-text/texlive-core/Manifest
19 index 9eb69184e4e..1285c05653f 100644
20 --- a/app-text/texlive-core/Manifest
21 +++ b/app-text/texlive-core/Manifest
22 @@ -3,6 +3,7 @@ DIST texlive-20170524-source.tar.xz 63483372 BLAKE2B 44669d1228f5be27e9d93672a4f
23 DIST texlive-20190410-source.tar.xz 53783408 BLAKE2B 8e34c7c2b74eab1c4d16ddbf7eddd8566593e6d68c42a2634760f11d86e68970698d8b9deddcf3297966968ede11ecf30e0b04ec19b708dc3e6d0a2abcc3799d SHA512 7759d8e668e53c0c73e48907096da9d8fb6384dd9c3342ddfb05e17d077054c5351d35256cf4e63a6da502de2f09f521979bede7209cdd5bd8ae80eba0efed2e
24 DIST texlive-core-2017-poppler076.tar.xz 9232 BLAKE2B 945e4f8e6f3230b78dc43560c664fbe4989fb32759b41c0ef83d656b43b008030cebdbf668718c4f22831d01c3fe1466f686f7f6b76183d3d1bb5e760f17140d SHA512 63fb2b426921be5f6d310b31e7fea6fc0edc0900f4790445fcaface9c931ca6c3e8f98b81a3bccfd1c877750e854c9410a59ff9a124aa2826d7b4187d54ed8ab
25 DIST texlive-core-patches-2019-1.tar.xz 11896 BLAKE2B f0c6283c4a1fd7158d9db26531db897c48d466dc32e60996221b70ebd799e702acb68760005fa4f8bbf60df8841b21e2117b5afad46c76e3cc749ed3de95da7c SHA512 eca8bce62ea47871da24371474ccd3c8d0d9431ef8d3b585e0811bd3d48606bf26bc88d45075e046c5b95860fc9482fe6b5d1e1914231363712b2a273e0fd7c6
26 +DIST texlive-core-patches-2019-2.tar.xz 11936 BLAKE2B b8ee1bbf2b2e58101b4e03c3d86b1c78d022f69e462fa652640d3f9feaa0672bddbf7ff9b7410ea9876f5e1cea50db0c43cf57898708cad3af550bbc1dad307f SHA512 50d24df7c2773c8a94676cc986bd15e0f9c652c68ec4df4ce0abec4e8cbfbf56386b59021bab348fb8e218cf67ff365295056712bee37c86a6ccdd7bcb8bc192
27 DIST texlive-core-patches-70.tar.xz 13068 BLAKE2B 011cf51af10d28ac9df7c9b9d7aea2cac3e562d393dcf09d57b3c2832fe6816cf926458417577f7c9d9414639a291c09240444145bdbb3d132170f51a8a16980 SHA512 fd26b92a03cd0446007728d0c16a8c7301e254515b997e6a0bd9b325db162bf3f2a2e96be0cb185f042038205c4b4dacf1785a216c8326328682f1c42da9079e
28 DIST texlive-module-a2ping-2017.tar.xz 31136 BLAKE2B cc0d99992cb780711a2a423fa26135845fa1f2cbbac76485d64a0b3184e338e7a60cdcfeaca129e6251f72110b0069c32164f9c4904d7f7c9c2edc6306f50411 SHA512 4711f184222fd95498a6d3ee94db19209c7836e6b775303926766d97921f2e8324b0aa2252a958fb619dbeca50729d2be4851a2add5503e7e8f4e713fc993e41
29 DIST texlive-module-a2ping-2019.tar.xz 30616 BLAKE2B 545abfdd3aa23b8d2bed608d7b7aef0f9578d5c4d6039880d435144c687014edb8c841afcb2d9ca1fc48a365b2bcb57832d49d1c6bb35480a01a813e40e18ea6 SHA512 983084ca3d70eff729d81d5d52a74e1bf1f95e384916bc81d17be81290f70c1da5ac891c1665a2451975f36fd56ea0036e1d0dc46b2e98b61ddc660ac044c23c
30
31 diff --git a/app-text/texlive-core/texlive-core-2019-r1.ebuild b/app-text/texlive-core/texlive-core-2019-r1.ebuild
32 new file mode 100644
33 index 00000000000..b0b2521e277
34 --- /dev/null
35 +++ b/app-text/texlive-core/texlive-core-2019-r1.ebuild
36 @@ -0,0 +1,348 @@
37 +# Copyright 1999-2019 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=7
41 +
42 +TL_SOURCE_VERSION=20190410
43 +
44 +inherit flag-o-matic toolchain-funcs libtool texlive-common
45 +
46 +MY_P=${PN%-core}-${TL_SOURCE_VERSION}-source
47 +
48 +PATCHLEVEL=2
49 +
50 +DESCRIPTION="A complete TeX distribution"
51 +HOMEPAGE="https://tug.org/texlive/"
52 +SLOT="0"
53 +LICENSE="GPL-2 LPPL-1.3c TeX"
54 +
55 +SRC_URI="mirror://gentoo/${MY_P}.tar.xz
56 + mirror://gentoo/${PN}-patches-${PV}-${PATCHLEVEL}.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 ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~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 + !dev-tex/luatex
122 + sys-libs/zlib
123 + >=media-libs/libpng-1.2.43-r2:0=
124 + media-libs/gd[png]
125 + >=app-text/poppler-0.58.0:=
126 + >=x11-libs/cairo-1.12
127 + >=x11-libs/pixman-0.18
128 + dev-libs/zziplib
129 + app-text/libpaper
130 + dev-libs/gmp:0
131 + dev-libs/mpfr:0=
132 + xetex? (
133 + >=media-libs/harfbuzz-1.4.5[icu,graphite]
134 + >=dev-libs/icu-50:=
135 + >=app-text/teckit-2.5.3
136 + media-libs/fontconfig
137 + media-gfx/graphite2
138 + )
139 + media-libs/freetype:2
140 + >=dev-libs/kpathsea-6.2.3
141 + cjk? ( >=dev-libs/ptexenc-1.3.7 )
142 + >=app-text/poppler-0.76.1:="
143 +
144 +BDEPEND="sys-apps/ed
145 + sys-devel/flex
146 + virtual/pkgconfig"
147 +
148 +DEPEND="${COMMON_DEPEND}"
149 +
150 +RDEPEND="${COMMON_DEPEND}
151 + >=app-text/ps2pkm-1.8_p20170524
152 + >=app-text/dvipsk-5.997
153 + >=dev-tex/bibtexu-3.71_p20170524
154 + virtual/perl-Getopt-Long
155 + tk? ( dev-perl/Tk )"
156 +
157 +S="${WORKDIR}/${P}_build"
158 +B="${WORKDIR}/${MY_P}"
159 +
160 +src_unpack() {
161 + unpack ${A}
162 + mkdir -p "${S}" || die "failed to create build dir"
163 +}
164 +
165 +RELOC_TARGET=texmf-dist
166 +
167 +src_prepare() {
168 + cd "${WORKDIR}" || die
169 + # From texlive-module.eclass.
170 + grep -H RELOC tlpkg/tlpobj/* | awk '{print $2}' | sed 's#^RELOC/##' > "${T}/reloclist"
171 + { for i in $(<"${T}/reloclist"); do dirname $i; done; } | uniq > "${T}/dirlist"
172 + for i in $(<"${T}/dirlist"); do
173 + [ -d "${RELOC_TARGET}/${i}" ] || mkdir -p "${RELOC_TARGET}/${i}"
174 + done
175 + for i in $(<"${T}/reloclist"); do
176 + mv "${i}" "${RELOC_TARGET}"/$(dirname "${i}") || die "failed to relocate ${i} to ${RELOC_TARGET}/$(dirname ${i})"
177 + done
178 +
179 + mv "${WORKDIR}"/texmf* "${B}" || die "failed to move texmf files"
180 +
181 + cd "${B}" || die
182 +
183 + default
184 +
185 + eapply "${WORKDIR}"/patches
186 +
187 + sed -i \
188 + -e "s,/usr/include /usr/local/include.*echo \$KPATHSEA_INCLUDES.*,${EPREFIX}/usr/include\"," \
189 + texk/web2c/configure || die
190 +
191 + elibtoolize
192 +}
193 +
194 +src_configure() {
195 + # It fails on alpha without this
196 + use alpha && append-ldflags "-Wl,--no-relax"
197 +
198 + # Too many regexps use A-Z a-z constructs, what causes problems with locales
199 + # that don't have the same alphabetical order than ascii. Bug #242430
200 + # So we set LC_ALL to C in order to avoid problems.
201 + export LC_ALL=C
202 + tc-export CC CXX AR RANLIB
203 + ECONF_SOURCE="${B}" \
204 + econf -C \
205 + --bindir="${EPREFIX}"/usr/bin \
206 + --datadir="${S}" \
207 + --with-system-freetype2 \
208 + --with-system-zlib \
209 + --with-system-libpng \
210 + --with-system-xpdf \
211 + --with-system-poppler \
212 + --with-system-teckit \
213 + --with-teckit-includes="${EPREFIX}"/usr/include/teckit \
214 + --with-system-kpathsea \
215 + --with-kpathsea-includes="${EPREFIX}"/usr/include \
216 + --with-system-icu \
217 + --with-system-ptexenc \
218 + --with-system-harfbuzz \
219 + --with-system-icu \
220 + --with-system-graphite2 \
221 + --with-system-cairo \
222 + --with-system-pixman \
223 + --with-system-zziplib \
224 + --with-system-libpaper \
225 + --with-system-gmp \
226 + --with-system-gd \
227 + --with-system-mpfr \
228 + --without-texinfo \
229 + --disable-dialog \
230 + --disable-multiplatform \
231 + --enable-epsfwin \
232 + --enable-mftalkwin \
233 + --enable-regiswin \
234 + --enable-tektronixwin \
235 + --enable-unitermwin \
236 + --with-ps=gs \
237 + --disable-psutils \
238 + --disable-t1utils \
239 + --enable-ipc \
240 + --disable-biber \
241 + --disable-bibtex-x \
242 + --disable-dvipng \
243 + --disable-dvipsk \
244 + --disable-chktex \
245 + --disable-lcdf-typetools \
246 + --disable-pdfopen \
247 + --disable-ps2eps \
248 + --disable-ps2pk \
249 + --disable-detex \
250 + --disable-ttf2pk2 \
251 + --disable-tex4htk \
252 + --disable-cjkutils \
253 + --disable-xdvik \
254 + --disable-xindy \
255 + --enable-luatex \
256 + --disable-dvi2tty \
257 + --disable-dvisvgm \
258 + --disable-vlna \
259 + --enable-shared \
260 + --disable-native-texlive-build \
261 + --disable-largefile \
262 + --disable-build-in-source-tree \
263 + $(use_enable luajittex) \
264 + $(use_enable luajittex mfluajit) \
265 + $(use_enable xetex) \
266 + $(use_enable cjk dviout-util) \
267 + $(use_enable cjk ptex) \
268 + $(use_enable cjk eptex) \
269 + $(use_enable cjk uptex) \
270 + $(use_enable cjk euptex) \
271 + $(use_enable cjk mendexk) \
272 + $(use_enable cjk makejvf) \
273 + $(use_enable cjk pmp) \
274 + $(use_enable cjk upmp) \
275 + $(use_enable tk texdoctk) \
276 + $(use_with X x)
277 +}
278 +
279 +src_compile() {
280 + tc-export CC CXX AR RANLIB
281 + emake SHELL="${EPREFIX}"/bin/sh texmf="${EPREFIX}"${TEXMF_PATH:-/usr/share/texmf-dist}
282 +
283 + cd "${B}" || die
284 + # Mimic updmap --syncwithtrees to enable only fonts installed
285 + # Code copied from updmap script
286 + for i in `egrep '^(Mixed|Kanji)?Map' "texmf-dist/web2c/updmap.cfg" | sed 's@.* @@'`; do
287 + texlive-common_is_file_present_in_texmf "$i" || echo "$i"
288 + done > "${T}/updmap_update"
289 + {
290 + sed 's@/@\\/@g; s@^@/^MixedMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
291 + sed 's@/@\\/@g; s@^@/^Map[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
292 + sed 's@/@\\/@g; s@^@/^KanjiMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
293 + } > "${T}/updmap_update2"
294 + sed -f "${T}/updmap_update2" "texmf-dist/web2c/updmap.cfg" > "${T}/updmap_update3"\
295 + && cat "${T}/updmap_update3" > "texmf-dist/web2c/updmap.cfg"
296 +}
297 +
298 +src_install() {
299 + dodir ${TEXMF_PATH:-/usr/share/texmf-dist}/web2c
300 + emake DESTDIR="${D}" texmf="${ED}${TEXMF_PATH:-/usr/share/texmf-dist}" run_texlinks="true" run_mktexlsr="true" install
301 +
302 + cd "${B}" || die
303 + dodir /usr/share # just in case
304 + cp -pR texmf-dist "${ED}/usr/share/" || die "failed to install texmf trees"
305 + cp -pR "${WORKDIR}"/tlpkg "${ED}/usr/share/" || die "failed to install tlpkg files"
306 +
307 + # When X is disabled mf-nowin doesn't exist but some scripts expect it to
308 + # exist. Instead, it is called mf, so we symlink it to please everything.
309 + use X || dosym mf /usr/bin/mf-nowin
310 +
311 + docinto texk
312 + cd "${B}/texk" || die
313 + dodoc ChangeLog README
314 +
315 + docinto dviljk || die
316 + cd "${B}/texk/dviljk"
317 + dodoc ChangeLog README NEWS
318 +
319 + docinto makeindexk || die
320 + cd "${B}/texk/makeindexk"
321 + dodoc ChangeLog NOTES README
322 +
323 + docinto web2c || die
324 + cd "${B}/texk/web2c"
325 + dodoc ChangeLog NEWS PROJECTS README
326 +
327 + use doc || rm -rf "${ED}/usr/share/texmf-dist/doc"
328 +
329 + dodir /etc/env.d
330 + 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"
331 + # populate /etc/texmf
332 + keepdir /etc/texmf/web2c
333 +
334 + # take care of updmap.cfg and language.d files
335 + keepdir /etc/texmf/{updmap.d,language.dat.d,language.def.d,language.dat.lua.d}
336 +
337 + mv "${ED}${TEXMF_PATH}/web2c/updmap.cfg" "${ED}/etc/texmf/updmap.d/00updmap.cfg" || die "moving updmap.cfg failed"
338 +
339 + # Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files
340 + # by texmf-update
341 + rm -f "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf"
342 + # Remove bundled and invalid updmap.cfg
343 + rm -f "${ED}/usr/share/texmf-dist/web2c/updmap.cfg"
344 +
345 + texlive-common_handle_config_files
346 +
347 + keepdir /usr/share/texmf-site
348 +
349 + # the virtex symlink is not installed
350 + # The links has to be relative, since the targets
351 + # is not present at this stage and MacOS doesn't
352 + # like non-existing targets
353 + dosym tex /usr/bin/virtex
354 + dosym pdftex /usr/bin/pdfvirtex
355 +
356 + # Rename mpost to leave room for mplib
357 + mv "${ED}/usr/bin/mpost" "${ED}/usr/bin/mpost-${P}"
358 + dosym "mpost-${P}" /usr/bin/mpost
359 +
360 + # Ditto for pdftex
361 + mv "${ED}/usr/bin/pdftex" "${ED}/usr/bin/pdftex-${P}"
362 + dosym "pdftex-${P}" /usr/bin/pdftex
363 +}
364 +
365 +pkg_postinst() {
366 + etexmf-update
367 +
368 + einfo "Regenerating TeX formats"
369 + fmtutil-sys --all &> /dev/null
370 +
371 + elog
372 + elog "If you have configuration files in ${EPREFIX}/etc/texmf to merge,"
373 + elog "please update them and run ${EPREFIX}/usr/sbin/texmf-update."
374 + elog
375 + ewarn "If you are migrating from an older TeX distribution"
376 + ewarn "Please make sure you have read:"
377 + ewarn "https://wiki.gentoo.org/wiki/Project:TeX/Tex_Live_Migration_Guide"
378 + ewarn "in order to avoid possible problems"
379 + elog
380 + elog "TeXLive has been split in various ebuilds. If you are missing a"
381 + elog "package to process your TeX documents, you can install"
382 + elog "dev-tex/texmfind to easily search for them."
383 + elog
384 +}