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