Gentoo Archives: gentoo-commits

From: "Anthony G. Basile (blueness)" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/texlive-core: texlive-core-2014-r2.ebuild texlive-core-2012-r2.ebuild texlive-core-2013-r2.ebuild ChangeLog
Date: Sat, 28 Feb 2015 17:45:11
Message-Id: 20150228174507.F135A12C0F@oystercatcher.gentoo.org
1 blueness 15/02/28 17:45:07
2
3 Modified: ChangeLog
4 Added: texlive-core-2014-r2.ebuild
5 texlive-core-2012-r2.ebuild
6 texlive-core-2013-r2.ebuild
7 Log:
8 Bump 2012/2013/2014 for bug #510770
9
10 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
11
12 Revision Changes Path
13 1.219 app-text/texlive-core/ChangeLog
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/ChangeLog?rev=1.219&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/ChangeLog?rev=1.219&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/ChangeLog?r1=1.218&r2=1.219
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/app-text/texlive-core/ChangeLog,v
22 retrieving revision 1.218
23 retrieving revision 1.219
24 diff -u -r1.218 -r1.219
25 --- ChangeLog 4 Nov 2014 10:50:58 -0000 1.218
26 +++ ChangeLog 28 Feb 2015 17:45:07 -0000 1.219
27 @@ -1,6 +1,15 @@
28 # ChangeLog for app-text/texlive-core
29 -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/app-text/texlive-core/ChangeLog,v 1.218 2014/11/04 10:50:58 aballier Exp $
31 +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
32 +# $Header: /var/cvsroot/gentoo-x86/app-text/texlive-core/ChangeLog,v 1.219 2015/02/28 17:45:07 blueness Exp $
33 +
34 +*texlive-core-2014-r2 (28 Feb 2015)
35 +*texlive-core-2013-r2 (28 Feb 2015)
36 +*texlive-core-2012-r2 (28 Feb 2015)
37 +
38 + 28 Feb 2015; Anthony G. Basile <blueness@g.o>
39 + +texlive-core-2012-r2.ebuild, +texlive-core-2013-r2.ebuild,
40 + +texlive-core-2014-r2.ebuild:
41 + Bump 2012/2013/2014 for bug #510770
42
43 04 Nov 2014; Alexis Ballier <aballier@g.o>
44 -texlive-core-2011-r6.ebuild, -texlive-core-2011-r7.ebuild:
45
46
47
48 1.1 app-text/texlive-core/texlive-core-2014-r2.ebuild
49
50 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/texlive-core-2014-r2.ebuild?rev=1.1&view=markup
51 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/texlive-core-2014-r2.ebuild?rev=1.1&content-type=text/plain
52
53 Index: texlive-core-2014-r2.ebuild
54 ===================================================================
55 # Copyright 1999-2015 Gentoo Foundation
56 # Distributed under the terms of the GNU General Public License v2
57 # $Header: /var/cvsroot/gentoo-x86/app-text/texlive-core/texlive-core-2014-r2.ebuild,v 1.1 2015/02/28 17:45:07 blueness Exp $
58
59 EAPI=5
60
61 #TL_UPSTREAM_PATCHLEVEL="1"
62 PATCHLEVEL="45"
63 TL_SOURCE_VERSION=20140525
64
65 inherit eutils flag-o-matic toolchain-funcs libtool texlive-common
66
67 MY_PV=${PN%-core}-${TL_SOURCE_VERSION}-source
68
69 DESCRIPTION="A complete TeX distribution"
70 HOMEPAGE="http://tug.org/texlive/"
71 SLOT="0"
72 LICENSE="GPL-2 LPPL-1.3c TeX"
73
74 SRC_URI="mirror://gentoo/${MY_PV}.tar.xz"
75
76 # Fetch patches
77 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.xz"
78 # mirror://gentoo/texlive-core-upstream-patches-${TL_UPSTREAM_PATCHLEVEL}.tar.xz"
79
80 TL_CORE_BINEXTRA_MODULES="
81 a2ping adhocfilelist asymptote bundledoc ctanify ctanupload ctie cweb
82 de-macro dtl dtxgen dvi2tty dviasm dvicopy dvidvi dviljk dvipos findhyph
83 fragmaster hyphenex installfont lacheck latex-git-log latex2man
84 latexfileversion latexpand latexindent ltxfileinfo ltximg listings-ext
85 match_parens mkjobtexmf patgen pdfcrop pdftools pfarrei pkfix pkfix-helper
86 purifyeps seetexk sty2dtx synctex texcount texdef texdiff texdirflatten
87 texdoc texliveonfly texloganalyser texware tie tpic2pdftex typeoutfileinfo
88 web collection-binextra
89 "
90 TL_CORE_BINEXTRA_DOC_MODULES="
91 a2ping.doc adhocfilelist.doc asymptote.doc bundledoc.doc ctanify.doc
92 ctanupload.doc ctie.doc cweb.doc de-macro.doc dtxgen.doc dvi2tty.doc
93 dvicopy.doc dviljk.doc dvipos.doc findhyph.doc fragmaster.doc
94 installfont.doc latex-git-log.doc latex2man.doc latexfileversion.doc
95 latexpand.doc latexindent.doc ltxfileinfo.doc ltximg.doc listings-ext.doc
96 match_parens.doc mkjobtexmf.doc patgen.doc pdfcrop.doc pdftools.doc
97 pfarrei.doc pkfix.doc pkfix-helper.doc purifyeps.doc sty2dtx.doc synctex.doc
98 texcount.doc texdef.doc texdiff.doc texdirflatten.doc texdoc.doc
99 texliveonfly.doc texloganalyser.doc texware.doc tie.doc tpic2pdftex.doc
100 typeoutfileinfo.doc web.doc
101 "
102 TL_CORE_BINEXTRA_SRC_MODULES="
103 adhocfilelist.source hyphenex.source listings-ext.source mkjobtexmf.source
104 pfarrei.source texdef.source
105 "
106
107 TL_CORE_EXTRA_MODULES="tetex hyphen-base texconfig gsftopk texlive.infra ${TL_CORE_BINEXTRA_MODULES}"
108 TL_CORE_EXTRA_DOC_MODULES="tetex.doc texconfig.doc gsftopk.doc texlive.infra.doc ${TL_CORE_BINEXTRA_DOC_MODULES}"
109 TL_CORE_EXTRA_SRC_MODULES="${TL_CORE_BINEXTRA_SRC_MODULES}"
110
111 for i in ${TL_CORE_EXTRA_MODULES}; do
112 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
113 done
114
115 SRC_URI="${SRC_URI} doc? ( "
116 for i in ${TL_CORE_EXTRA_DOC_MODULES}; do
117 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
118 done
119 SRC_URI="${SRC_URI} )"
120 SRC_URI="${SRC_URI} source? ( "
121 for i in ${TL_CORE_EXTRA_SRC_MODULES}; do
122 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
123 done
124 SRC_URI="${SRC_URI} )"
125
126 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
127 IUSE="cjk X doc source tk xetex"
128
129 TEXMF_PATH=/usr/share/texmf-dist
130
131 MODULAR_X_DEPEND="X? (
132 x11-libs/libXmu
133 x11-libs/libXp
134 x11-libs/libXpm
135 x11-libs/libICE
136 x11-libs/libSM
137 x11-libs/libXaw
138 x11-libs/libXfont
139 )"
140
141 COMMON_DEPEND="${MODULAR_X_DEPEND}
142 !app-text/ptex
143 !app-text/tetex
144 !<app-text/texlive-2007
145 !app-text/xetex
146 !<dev-texlive/texlive-basic-2014
147 !<dev-texlive/texlive-metapost-2011
148 !app-text/dvibook
149 !dev-tex/luatex
150 !app-text/dvipdfm
151 !app-text/dvipdfmx
152 !app-text/xdvipdfmx
153 sys-libs/zlib
154 >=media-libs/libpng-1.2.43-r2:0=
155 >=app-text/poppler-0.12.3-r3:=
156 >=x11-libs/cairo-1.12
157 >=x11-libs/pixman-0.18
158 dev-libs/zziplib
159 app-text/libpaper
160 xetex? (
161 >=media-libs/harfbuzz-0.9.20[icu,graphite]
162 >=dev-libs/icu-50:=
163 app-text/teckit
164 media-libs/fontconfig
165 media-gfx/graphite2
166 )
167 media-libs/freetype:2
168 >=dev-libs/kpathsea-6.2.0
169 cjk? ( >=dev-libs/ptexenc-1.3.2_p20140525-r1 )"
170
171 DEPEND="${COMMON_DEPEND}
172 virtual/pkgconfig
173 sys-apps/ed
174 sys-devel/flex
175 app-arch/xz-utils"
176
177 RDEPEND="${COMMON_DEPEND}
178 >=app-text/ps2pkm-1.5_p20130530
179 >=app-text/dvipsk-5.993_p20130530
180 >=dev-tex/bibtexu-3.71_p20130530
181 virtual/perl-Getopt-Long
182 tk? ( dev-perl/perl-tk )"
183
184 S="${WORKDIR}/${P}_build"
185 B="${WORKDIR}/${MY_PV}"
186
187 src_unpack() {
188 unpack ${A}
189 mkdir -p "${S}" || die "failed to create build dir"
190 }
191
192 RELOC_TARGET=texmf-dist
193
194 src_prepare() {
195 cd "${WORKDIR}"
196 # From texlive-module.eclass.
197 grep -H RELOC tlpkg/tlpobj/* | awk '{print $2}' | sed 's#^RELOC/##' > "${T}/reloclist"
198 { for i in $(<"${T}/reloclist"); do dirname $i; done; } | uniq > "${T}/dirlist"
199 for i in $(<"${T}/dirlist"); do
200 [ -d "${RELOC_TARGET}/${i}" ] || mkdir -p "${RELOC_TARGET}/${i}"
201 done
202 for i in $(<"${T}/reloclist"); do
203 mv "${i}" "${RELOC_TARGET}"/$(dirname "${i}") || die "failed to relocate ${i} to ${RELOC_TARGET}/$(dirname ${i})"
204 done
205
206 mv "${WORKDIR}"/texmf* "${B}" || die "failed to move texmf files"
207
208 cd "${B}"
209 #EPATCH_MULTI_MSG="Applying patches from upstream bugfix branch..." EPATCH_SUFFIX="patch" epatch "${WORKDIR}/gentoo_branch2011_patches"
210 EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
211
212 elibtoolize
213 }
214
215 src_configure() {
216 # It fails on alpha without this
217 use alpha && append-ldflags "-Wl,--no-relax"
218
219 # Too many regexps use A-Z a-z constructs, what causes problems with locales
220 # that don't have the same alphabetical order than ascii. Bug #242430
221 # So we set LC_ALL to C in order to avoid problems.
222 export LC_ALL=C
223 tc-export CC CXX AR RANLIB
224 ECONF_SOURCE="${B}" \
225 econf -C \
226 --bindir="${EPREFIX}"/usr/bin \
227 --datadir="${S}" \
228 --with-system-freetype2 \
229 --with-system-zlib \
230 --with-system-libpng \
231 --with-system-xpdf \
232 --with-system-poppler \
233 --with-system-teckit \
234 --with-teckit-includes="${EPREFIX}"/usr/include/teckit \
235 --with-system-kpathsea \
236 --with-kpathsea-includes="${EPREFIX}"/usr/include \
237 --with-system-icu \
238 --with-system-ptexenc \
239 --with-system-harfbuzz \
240 --with-system-icu \
241 --with-system-graphite2 \
242 --with-system-cairo \
243 --with-system-pixman \
244 --with-system-zziplib \
245 --with-system-libpaper \
246 --without-texinfo \
247 --disable-dialog \
248 --disable-multiplatform \
249 --enable-epsfwin \
250 --enable-mftalkwin \
251 --enable-regiswin \
252 --enable-tektronixwin \
253 --enable-unitermwin \
254 --with-ps=gs \
255 --disable-psutils \
256 --disable-t1utils \
257 --enable-ipc \
258 --disable-biber \
259 --disable-bibtex-x \
260 --disable-dvipng \
261 --disable-dvipsk \
262 --disable-chktex \
263 --disable-lcdf-typetools \
264 --disable-pdfopen \
265 --disable-ps2eps \
266 --disable-ps2pkm \
267 --disable-detex \
268 --disable-ttf2pk2 \
269 --disable-tex4htk \
270 --disable-cjkutils \
271 --disable-xdvik \
272 --disable-xindy \
273 --enable-luatex \
274 --disable-dvi2tty \
275 --disable-dvisvgm \
276 --disable-vlna \
277 --enable-shared \
278 --disable-native-texlive-build \
279 --disable-largefile \
280 $(use_enable xetex) \
281 $(use_enable cjk ptex) \
282 $(use_enable cjk eptex) \
283 $(use_enable cjk uptex) \
284 $(use_enable cjk euptex) \
285 $(use_enable cjk mendexk) \
286 $(use_enable cjk makejvf) \
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} || die "emake failed"
294
295 cd "${B}"
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 || die "install failed"
313
314 cd "${B}"
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 || die "failed to install texk docs"
326
327 docinto dviljk
328 cd "${B}/texk/dviljk"
329 dodoc ChangeLog README NEWS || die "failed to install dviljk docs"
330
331 docinto makeindexk
332 cd "${B}/texk/makeindexk"
333 dodoc ChangeLog NOTES README || die "failed to install makeindexk docs"
334
335 docinto web2c
336 cd "${B}/texk/web2c"
337 dodoc ChangeLog NEWS PROJECTS README || die "failed to install web2c docs"
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 "http://www.gentoo.org/proj/en/tex/texlive-migration-guide.xml"
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 }
394
395
396
397 1.1 app-text/texlive-core/texlive-core-2012-r2.ebuild
398
399 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/texlive-core-2012-r2.ebuild?rev=1.1&view=markup
400 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/texlive-core-2012-r2.ebuild?rev=1.1&content-type=text/plain
401
402 Index: texlive-core-2012-r2.ebuild
403 ===================================================================
404 # Copyright 1999-2015 Gentoo Foundation
405 # Distributed under the terms of the GNU General Public License v2
406 # $Header: /var/cvsroot/gentoo-x86/app-text/texlive-core/texlive-core-2012-r2.ebuild,v 1.1 2015/02/28 17:45:07 blueness Exp $
407
408 EAPI=5
409
410 #TL_UPSTREAM_PATCHLEVEL="1"
411 PATCHLEVEL="43"
412 TL_SOURCE_VERSION=20120701
413
414 inherit eutils flag-o-matic toolchain-funcs libtool texlive-common
415
416 MY_PV=${PN%-core}-${TL_SOURCE_VERSION}-source
417
418 DESCRIPTION="A complete TeX distribution"
419 HOMEPAGE="http://tug.org/texlive/"
420 SLOT="0"
421 LICENSE="GPL-2 LPPL-1.3c TeX"
422
423 SRC_URI="mirror://gentoo/${MY_PV}.tar.xz"
424
425 # Fetch patches
426 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.xz"
427 # mirror://gentoo/texlive-core-upstream-patches-${TL_UPSTREAM_PATCHLEVEL}.tar.xz"
428
429 TL_CORE_BINEXTRA_MODULES="
430 a2ping asymptote bibtex8 bundledoc ctanify ctanupload ctie cweb de-macro dtl
431 dvi2tty dviasm dvicopy dvidvi dviljk dvipng dvipos findhyph fragmaster
432 hyphenex installfont lacheck latex2man latexfileversion latexpand
433 listings-ext match_parens mkjobtexmf patgen pdfcrop pdftools pkfix
434 pkfix-helper purifyeps seetexk sty2dtx synctex texcount texdef texdiff
435 texdirflatten texdoc texliveonfly texloganalyser texware tie tpic2pdftex
436 typeoutfileinfo web collection-binextra
437 "
438 TL_CORE_BINEXTRA_DOC_MODULES="
439 a2ping.doc asymptote.doc bibtex8.doc bundledoc.doc ctanify.doc
440 ctanupload.doc ctie.doc cweb.doc de-macro.doc dvi2tty.doc dvicopy.doc
441 dviljk.doc dvipng.doc dvipos.doc findhyph.doc fragmaster.doc installfont.doc
442 latex2man.doc latexfileversion.doc latexpand.doc listings-ext.doc
443 match_parens.doc mkjobtexmf.doc patgen.doc pdfcrop.doc pdftools.doc
444 pkfix.doc pkfix-helper.doc purifyeps.doc sty2dtx.doc synctex.doc
445 texcount.doc texdef.doc texdiff.doc texdirflatten.doc texdoc.doc
446 texliveonfly.doc texloganalyser.doc texware.doc tie.doc tpic2pdftex.doc
447 typeoutfileinfo web.doc
448 "
449 TL_CORE_BINEXTRA_SRC_MODULES="hyphenex.source listings-ext.source mkjobtexmf.source texdef.source"
450
451 TL_CORE_EXTRA_MODULES="tetex hyphen-base texconfig gsftopk texlive.infra ${TL_CORE_BINEXTRA_MODULES}"
452 TL_CORE_EXTRA_DOC_MODULES="tetex.doc texconfig.doc gsftopk.doc texlive.infra.doc ${TL_CORE_BINEXTRA_DOC_MODULES}"
453 TL_CORE_EXTRA_SRC_MODULES="${TL_CORE_BINEXTRA_SRC_MODULES}"
454
455 for i in ${TL_CORE_EXTRA_MODULES}; do
456 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
457 done
458
459 SRC_URI="${SRC_URI} doc? ( "
460 for i in ${TL_CORE_EXTRA_DOC_MODULES}; do
461 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
462 done
463 SRC_URI="${SRC_URI} )"
464 SRC_URI="${SRC_URI} source? ( "
465 for i in ${TL_CORE_EXTRA_SRC_MODULES}; do
466 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
467 done
468 SRC_URI="${SRC_URI} )"
469
470 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
471 IUSE="cjk X doc source tk xetex"
472
473 MODULAR_X_DEPEND="X? (
474 x11-libs/libXmu
475 x11-libs/libXp
476 x11-libs/libXpm
477 x11-libs/libICE
478 x11-libs/libSM
479 x11-libs/libXaw
480 x11-libs/libXfont
481 )"
482
483 COMMON_DEPEND="${MODULAR_X_DEPEND}
484 !app-text/ptex
485 !app-text/tetex
486 !<app-text/texlive-2007
487 !app-text/xetex
488 !<dev-texlive/texlive-basic-2009
489 !<dev-texlive/texlive-metapost-2011
490 !app-text/dvibook
491 sys-libs/zlib
492 >=media-libs/libpng-1.2.43-r2:0=
493 >=app-text/poppler-0.12.3-r3:=
494 xetex? (
495 app-text/teckit
496 media-libs/fontconfig
497 media-libs/freetype:2
498 media-libs/silgraphite
499 )
500 >=dev-libs/kpathsea-6.1.0_p20120701
501 cjk? ( >=dev-libs/ptexenc-1.2.0_p20120701 )"
502
503 DEPEND="${COMMON_DEPEND}
504 virtual/pkgconfig
505 sys-apps/ed
506 sys-devel/flex
507 app-arch/xz-utils"
508
509 RDEPEND="${COMMON_DEPEND}
510 >=app-text/ps2pkm-1.5_p20120701
511 >=app-text/dvipsk-5.992_p20120701
512 >=dev-tex/bibtexu-3.71_p20120701
513 virtual/perl-Getopt-Long
514 xetex? ( >=app-text/xdvipdfmx-0.7.8_p20120701 )
515 tk? ( dev-perl/perl-tk )"
516
517 # texdoc needs luatex.
518 PDEPEND=">=dev-tex/luatex-0.70"
519
520 S="${WORKDIR}/${P}_build"
521 B="${WORKDIR}/${MY_PV}"
522
523 src_unpack() {
524 unpack ${A}
525 mkdir -p "${S}" || die "failed to create build dir"
526 }
527
528 src_prepare() {
529 mv "${WORKDIR}"/texmf* "${B}" || die "failed to move texmf files"
530
531 cd "${B}"
532 #EPATCH_MULTI_MSG="Applying patches from upstream bugfix branch..." EPATCH_SUFFIX="patch" epatch "${WORKDIR}/gentoo_branch2011_patches"
533 EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
534
535 elibtoolize
536 }
537
538 src_configure() {
539 # It fails on alpha without this
540 use alpha && append-ldflags "-Wl,--no-relax"
541
542 # Bug #265232 and bug #414271:
543 if use hppa; then
544 append-cppflags "-DU_IS_BIG_ENDIAN=1"
545 fi
546
547 # Too many regexps use A-Z a-z constructs, what causes problems with locales
548 # that don't have the same alphabetical order than ascii. Bug #242430
549 # So we set LC_ALL to C in order to avoid problems.
550 export LC_ALL=C
551 tc-export CC CXX AR RANLIB
552 ECONF_SOURCE="${B}" \
553 econf -C \
554 --bindir=/usr/bin \
555 --datadir="${S}" \
556 --with-system-freetype2 \
557 --with-freetype2-include=/usr/include \
558 --with-system-zlib \
559 --with-system-libpng \
560 --with-system-xpdf \
561 --with-system-poppler \
562 --with-system-teckit \
563 --with-teckit-includes=/usr/include/teckit \
564 --with-system-graphite \
565 --with-system-kpathsea \
566 --with-system-icu \
567 --with-system-ptexenc \
568 --without-texinfo \
569 --disable-dialog \
570 --disable-multiplatform \
571 --enable-epsfwin \
572 --enable-mftalkwin \
573 --enable-regiswin \
574 --enable-tektronixwin \
575 --enable-unitermwin \
576 --with-ps=gs \
577 --disable-psutils \
578 --disable-t1utils \
579 --enable-ipc \
580 --disable-biber \
581 --disable-bibtexu \
582 --disable-dvipng \
583 --disable-dvipsk \
584 --disable-dvipdfmx \
585 --disable-chktex \
586 --disable-lcdf-typetools \
587 --disable-pdfopen \
588 --disable-ps2eps \
589 --disable-ps2pkm \
590 --disable-detex \
591 --disable-ttf2pk \
592 --disable-tex4htk \
593 --disable-cjkutils \
594 --disable-xdvik \
595 --disable-xindy \
596 --disable-luatex \
597 --disable-dvi2tty \
598 --disable-dvisvgm \
599 --disable-vlna \
600 --disable-xdvipdfmx \
601 --enable-shared \
602 --disable-native-texlive-build \
603 --disable-largefile \
604 $(use_enable xetex) \
605 $(use_enable cjk ptex) \
606 $(use_enable cjk eptex) \
607 $(use_enable cjk uptex) \
608 $(use_enable cjk euptex) \
609 $(use_enable cjk mendexk) \
610 $(use_enable cjk makejvf) \
611 $(use_with X x)
612 }
613
614 src_compile() {
615 emake SHELL=/bin/sh texmf=${TEXMF_PATH:-/usr/share/texmf} || die "emake failed"
616
617 cd "${B}"
618 # Mimic updmap --syncwithtrees to enable only fonts installed
619 # Code copied from updmap script
620 for i in `egrep '^(Mixed)?Map' "texmf/web2c/updmap.cfg" | sed 's@.* @@'`; do
621 texlive-common_is_file_present_in_texmf "$i" || echo "$i"
622 done > "${T}/updmap_update"
623 {
624 sed 's@/@\\/@g; s@^@/^MixedMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
625 sed 's@/@\\/@g; s@^@/^Map[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
626 } > "${T}/updmap_update2"
627 sed -f "${T}/updmap_update2" "texmf/web2c/updmap.cfg" > "${T}/updmap_update3"\
628 && cat "${T}/updmap_update3" > "texmf/web2c/updmap.cfg"
629 }
630
631 src_test() {
632 ewarn "Due to modular layout of texlive ebuilds,"
633 ewarn "It would not make much sense to use tests into the ebuild"
634 ewarn "And tests would fail anyway"
635 ewarn "Alternatively you can try to compile any tex file"
636 ewarn "Tex warnings should be considered as errors and reported"
637 ewarn "You can also run fmtutil-sys --all and check for errors/warnings there"
638 }
639
640 src_install() {
641 dodir ${TEXMF_PATH:-/usr/share/texmf}/web2c
642 emake DESTDIR="${D}" texmf="${D}${TEXMF_PATH:-/usr/share/texmf}" run_texlinks="true" run_mktexlsr="true" install || die "install failed"
643
644 cd "${B}"
645 dodir /usr/share # just in case
646 cp -pR texmf{,-dist} "${D}/usr/share/" || die "failed to install texmf trees"
647 cp -pR "${WORKDIR}"/tlpkg "${D}/usr/share/" || die "failed to install tlpkg files"
648
649 newsbin "${FILESDIR}/texmf-update2010" texmf-update
650
651 # When X is disabled mf-nowin doesn't exist but some scripts expect it to
652 # exist. Instead, it is called mf, so we symlink it to please everything.
653 use X || dosym mf /usr/bin/mf-nowin
654
655 docinto texk
656 cd "${B}/texk"
657 dodoc ChangeLog README || die "failed to install texk docs"
658
659 docinto dviljk
660 cd "${B}/texk/dviljk"
661 dodoc ChangeLog README NEWS || die "failed to install dviljk docs"
662
663 docinto makeindexk
664 cd "${B}/texk/makeindexk"
665 dodoc ChangeLog NOTES README || die "failed to install makeindexk docs"
666
667 docinto web2c
668 cd "${B}/texk/web2c"
669 dodoc ChangeLog NEWS PROJECTS README || die "failed to install web2c docs"
670
671 use doc || rm -rf "${D}/usr/share/texmf/doc"
672 use doc || rm -rf "${D}/usr/share/texmf-dist/doc"
673
674 dodir /etc/env.d
675 echo 'CONFIG_PROTECT_MASK="/etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d"' > "${D}/etc/env.d/98texlive"
676 # populate /etc/texmf
677 keepdir /etc/texmf/web2c
678
679 # take care of updmap.cfg and language.d files
680 keepdir /etc/texmf/{updmap.d,language.dat.d,language.def.d,language.dat.lua.d}
681
682 mv "${D}${TEXMF_PATH}/web2c/updmap.cfg" "${D}/etc/texmf/updmap.d/00updmap.cfg" || die "moving updmap.cfg failed"
683
684 # Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files
685 # by texmf-update
686 rm -f "${D}${TEXMF_PATH}/web2c/fmtutil.cnf"
687 # Remove bundled and invalid updmap.cfg
688 rm -f "${D}/usr/share/texmf-dist/web2c/updmap.cfg"
689
690 texlive-common_handle_config_files
691
692 keepdir /usr/share/texmf-site
693
694 # the virtex symlink is not installed
695 # The links has to be relative, since the targets
696 # is not present at this stage and MacOS doesn't
697 # like non-existing targets
698 dosym tex /usr/bin/virtex
699 dosym pdftex /usr/bin/pdfvirtex
700
701 # Remove texdoctk if we don't want it
702 if ! use tk ; then
703 rm -f "${D}/usr/bin/texdoctk" "${D}/usr/share/texmf/scripts/tetex/texdoctk.pl" "${D}/usr/share/man/man1/texdoctk.1" || die "failed to remove texdoc tk!"
704 fi
705
706 # Rename mpost to leave room for mplib
707 mv "${D}/usr/bin/mpost" "${D}/usr/bin/mpost-${P}"
708 dosym "mpost-${P}" /usr/bin/mpost
709
710 # Ditto for pdftex
711 mv "${D}/usr/bin/pdftex" "${D}/usr/bin/pdftex-${P}"
712 dosym "pdftex-${P}" /usr/bin/pdftex
713 }
714
715 pkg_preinst() {
716 # Remove stray files to keep the upgrade path sane
717 if has_version =app-text/texlive-core-2007* ; then
718 for i in pdftex/pdflatex aleph/aleph aleph/lamed omega/lambda omega/omega xetex/xetex xetex/xelatex tex/tex pdftex/etex pdftex/pdftex pdftex/pdfetex ; do
719 for j in log fmt ; do
720 local file="${ROOT}/var/lib/texmf/web2c/${i}.${j}"
721 if [ -f "${file}" ] ; then
722 elog "Removing stray ${file} from TeXLive 2007 install."
723 rm -f "${file}"
724 fi
725 done
726 done
727 for j in base log ; do
728 local file="${ROOT}/var/lib/texmf/web2c/metafont/mf.${j}"
729 if [ -f "${file}" ] ; then
730 elog "Removing stray ${file} from TeXLive 2007 install."
731 rm -f "${file}"
732 fi
733 done
734 fi
735 }
736
737 pkg_postinst() {
738 etexmf-update
739
740 elog
741 elog "If you have configuration files in /etc/texmf to merge,"
742 elog "please update them and run /usr/sbin/texmf-update."
743 elog
744 ewarn "If you are migrating from an older TeX distribution"
745 ewarn "Please make sure you have read:"
746 ewarn "http://www.gentoo.org/proj/en/tex/texlive-migration-guide.xml"
747 ewarn "in order to avoid possible problems"
748 elog
749 elog "TeXLive has been split in various ebuilds. If you are missing a"
750 elog "package to process your TeX documents, you can install"
751 elog "dev-tex/texmfind to easily search for them."
752 elog
753 }
754
755
756
757 1.1 app-text/texlive-core/texlive-core-2013-r2.ebuild
758
759 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/texlive-core-2013-r2.ebuild?rev=1.1&view=markup
760 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/texlive-core-2013-r2.ebuild?rev=1.1&content-type=text/plain
761
762 Index: texlive-core-2013-r2.ebuild
763 ===================================================================
764 # Copyright 1999-2015 Gentoo Foundation
765 # Distributed under the terms of the GNU General Public License v2
766 # $Header: /var/cvsroot/gentoo-x86/app-text/texlive-core/texlive-core-2013-r2.ebuild,v 1.1 2015/02/28 17:45:07 blueness Exp $
767
768 EAPI=5
769
770 #TL_UPSTREAM_PATCHLEVEL="1"
771 PATCHLEVEL="44"
772 TL_SOURCE_VERSION=20130530
773
774 inherit eutils flag-o-matic toolchain-funcs libtool texlive-common
775
776 MY_PV=${PN%-core}-${TL_SOURCE_VERSION}-source
777
778 DESCRIPTION="A complete TeX distribution"
779 HOMEPAGE="http://tug.org/texlive/"
780 SLOT="0"
781 LICENSE="GPL-2 LPPL-1.3c TeX"
782
783 SRC_URI="mirror://gentoo/${MY_PV}.tar.xz"
784
785 # Fetch patches
786 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.xz"
787 # mirror://gentoo/texlive-core-upstream-patches-${TL_UPSTREAM_PATCHLEVEL}.tar.xz"
788
789 TL_CORE_BINEXTRA_MODULES="
790 a2ping adhocfilelist asymptote bundledoc ctanify ctanupload ctie cweb
791 de-macro dtl dtxgen dvi2tty dviasm dvicopy dvidvi dviljk dvipos findhyph
792 fragmaster hyphenex installfont lacheck latex2man latexfileversion
793 latexpand ltxfileinfo listings-ext match_parens mkjobtexmf patgen pdfcrop
794 pdftools pfarrei pkfix pkfix-helper purifyeps seetexk sty2dtx synctex
795 texcount texdef texdiff texdirflatten texdoc texliveonfly texloganalyser
796 texware tie tpic2pdftex typeoutfileinfo web collection-binextra
797 "
798 TL_CORE_BINEXTRA_DOC_MODULES="
799 a2ping.doc adhocfilelist.doc asymptote.doc bundledoc.doc ctanify.doc
800 ctanupload.doc ctie.doc cweb.doc de-macro.doc dtxgen.doc dvi2tty.doc
801 dvicopy.doc dviljk.doc dvipos.doc findhyph.doc fragmaster.doc
802 installfont.doc latex2man.doc latexfileversion.doc latexpand.doc
803 ltxfileinfo.doc listings-ext.doc match_parens.doc mkjobtexmf.doc patgen.doc
804 pdfcrop.doc pdftools.doc pfarrei.doc pkfix.doc pkfix-helper.doc
805 purifyeps.doc sty2dtx.doc synctex.doc texcount.doc texdef.doc texdiff.doc
806 texdirflatten.doc texdoc.doc texliveonfly.doc texloganalyser.doc texware.doc
807 tie.doc tpic2pdftex.doc typeoutfileinfo web.doc
808 "
809 TL_CORE_BINEXTRA_SRC_MODULES="
810 adhocfilelist.source hyphenex.source listings-ext.source mkjobtexmf.source
811 pfarrei.source texdef.source
812 "
813
814 TL_CORE_EXTRA_MODULES="tetex hyphen-base texconfig gsftopk texlive.infra ${TL_CORE_BINEXTRA_MODULES}"
815 TL_CORE_EXTRA_DOC_MODULES="tetex.doc texconfig.doc gsftopk.doc texlive.infra.doc ${TL_CORE_BINEXTRA_DOC_MODULES}"
816 TL_CORE_EXTRA_SRC_MODULES="${TL_CORE_BINEXTRA_SRC_MODULES}"
817
818 for i in ${TL_CORE_EXTRA_MODULES}; do
819 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
820 done
821
822 SRC_URI="${SRC_URI} doc? ( "
823 for i in ${TL_CORE_EXTRA_DOC_MODULES}; do
824 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
825 done
826 SRC_URI="${SRC_URI} )"
827 SRC_URI="${SRC_URI} source? ( "
828 for i in ${TL_CORE_EXTRA_SRC_MODULES}; do
829 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
830 done
831 SRC_URI="${SRC_URI} )"
832
833 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
834 IUSE="cjk X doc source tk xetex"
835
836 TEXMF_PATH=/usr/share/texmf-dist
837
838 MODULAR_X_DEPEND="X? (
839 x11-libs/libXmu
840 x11-libs/libXp
841 x11-libs/libXpm
842 x11-libs/libICE
843 x11-libs/libSM
844 x11-libs/libXaw
845 x11-libs/libXfont
846 )"
847
848 COMMON_DEPEND="${MODULAR_X_DEPEND}
849 !app-text/ptex
850 !app-text/tetex
851 !<app-text/texlive-2007
852 !app-text/xetex
853 !<dev-texlive/texlive-basic-2013
854 !<dev-texlive/texlive-metapost-2011
855 !app-text/dvibook
856 sys-libs/zlib
857 >=media-libs/libpng-1.2.43-r2:0=
858 >=app-text/poppler-0.12.3-r3:=
859 >=x11-libs/cairo-1.12
860 >=x11-libs/pixman-0.18
861 xetex? (
862 >=media-libs/harfbuzz-0.9.20[icu,graphite]
863 >=dev-libs/icu-50:=
864 app-text/teckit
865 media-libs/fontconfig
866 media-gfx/graphite2
867 media-libs/freetype:2
868 )
869 >=dev-libs/kpathsea-6.1.1_p20130530
870 cjk? ( >=dev-libs/ptexenc-1.3.1_p20130530 )"
871
872 DEPEND="${COMMON_DEPEND}
873 virtual/pkgconfig
874 sys-apps/ed
875 sys-devel/flex
876 app-arch/xz-utils"
877
878 RDEPEND="${COMMON_DEPEND}
879 >=app-text/ps2pkm-1.5_p20130530
880 >=app-text/dvipsk-5.993_p20130530
881 >=dev-tex/bibtexu-3.71_p20130530
882 virtual/perl-Getopt-Long
883 xetex? ( >=app-text/xdvipdfmx-0.7.9_p20130530 )
884 tk? ( dev-perl/perl-tk )"
885
886 # texdoc needs luatex.
887 PDEPEND=">=dev-tex/luatex-0.76"
888
889 S="${WORKDIR}/${P}_build"
890 B="${WORKDIR}/${MY_PV}"
891
892 src_unpack() {
893 unpack ${A}
894 mkdir -p "${S}" || die "failed to create build dir"
895 }
896
897 RELOC_TARGET=texmf-dist
898
899 src_prepare() {
900 cd "${WORKDIR}"
901 # From texlive-module.eclass.
902 grep -H RELOC tlpkg/tlpobj/* | awk '{print $2}' | sed 's#^RELOC/##' > "${T}/reloclist"
903 { for i in $(<"${T}/reloclist"); do dirname $i; done; } | uniq > "${T}/dirlist"
904 for i in $(<"${T}/dirlist"); do
905 [ -d "${RELOC_TARGET}/${i}" ] || mkdir -p "${RELOC_TARGET}/${i}"
906 done
907 for i in $(<"${T}/reloclist"); do
908 mv "${i}" "${RELOC_TARGET}"/$(dirname "${i}") || die "failed to relocate ${i} to ${RELOC_TARGET}/$(dirname ${i})"
909 done
910
911 mv "${WORKDIR}"/texmf* "${B}" || die "failed to move texmf files"
912
913 cd "${B}"
914 #EPATCH_MULTI_MSG="Applying patches from upstream bugfix branch..." EPATCH_SUFFIX="patch" epatch "${WORKDIR}/gentoo_branch2011_patches"
915 EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
916
917 elibtoolize
918 }
919
920 src_configure() {
921 # It fails on alpha without this
922 use alpha && append-ldflags "-Wl,--no-relax"
923
924 # Too many regexps use A-Z a-z constructs, what causes problems with locales
925 # that don't have the same alphabetical order than ascii. Bug #242430
926 # So we set LC_ALL to C in order to avoid problems.
927 export LC_ALL=C
928 tc-export CC CXX AR RANLIB
929 ECONF_SOURCE="${B}" \
930 econf -C \
931 --bindir="${EPREFIX}"/usr/bin \
932 --datadir="${S}" \
933 --with-system-freetype2 \
934 --with-system-zlib \
935 --with-system-libpng \
936 --with-system-xpdf \
937 --with-system-poppler \
938 --with-system-teckit \
939 --with-teckit-includes="${EPREFIX}"/usr/include/teckit \
940 --with-system-kpathsea \
941 --with-kpathsea-includes="${EPREFIX}"/usr/include \
942 --with-system-icu \
943 --with-system-ptexenc \
944 --with-system-harfbuzz \
945 --with-system-icu \
946 --with-system-graphite2 \
947 --with-system-cairo \
948 --with-system-pixman \
949 --without-texinfo \
950 --disable-dialog \
951 --disable-multiplatform \
952 --enable-epsfwin \
953 --enable-mftalkwin \
954 --enable-regiswin \
955 --enable-tektronixwin \
956 --enable-unitermwin \
957 --with-ps=gs \
958 --disable-psutils \
959 --disable-t1utils \
960 --enable-ipc \
961 --disable-biber \
962 --disable-bibtex-x \
963 --disable-dvipng \
964 --disable-dvipsk \
965 --disable-dvipdfmx \
966 --disable-chktex \
967 --disable-lcdf-typetools \
968 --disable-pdfopen \
969 --disable-ps2eps \
970 --disable-ps2pkm \
971 --disable-detex \
972 --disable-ttf2pk \
973 --disable-tex4htk \
974 --disable-cjkutils \
975 --disable-xdvik \
976 --disable-xindy \
977 --disable-luatex \
978 --disable-dvi2tty \
979 --disable-dvisvgm \
980 --disable-vlna \
981 --disable-xdvipdfmx \
982 --enable-shared \
983 --disable-native-texlive-build \
984 --disable-largefile \
985 $(use_enable xetex) \
986 $(use_enable cjk ptex) \
987 $(use_enable cjk eptex) \
988 $(use_enable cjk uptex) \
989 $(use_enable cjk euptex) \
990 $(use_enable cjk mendexk) \
991 $(use_enable cjk makejvf) \
992 $(use_enable tk texdoctk) \
993 $(use_with X x)
994 }
995
996 src_compile() {
997 tc-export CC CXX AR RANLIB
998 emake SHELL="${EPREFIX}"/bin/sh texmf="${EPREFIX}"${TEXMF_PATH:-/usr/share/texmf-dist} || die "emake failed"
999
1000 cd "${B}"
1001 # Mimic updmap --syncwithtrees to enable only fonts installed
1002 # Code copied from updmap script
1003 for i in `egrep '^(Mixed|Kanji)?Map' "texmf-dist/web2c/updmap.cfg" | sed 's@.* @@'`; do
1004 texlive-common_is_file_present_in_texmf "$i" || echo "$i"
1005 done > "${T}/updmap_update"
1006 {
1007 sed 's@/@\\/@g; s@^@/^MixedMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
1008 sed 's@/@\\/@g; s@^@/^Map[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
1009 sed 's@/@\\/@g; s@^@/^KanjiMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
1010 } > "${T}/updmap_update2"
1011 sed -f "${T}/updmap_update2" "texmf-dist/web2c/updmap.cfg" > "${T}/updmap_update3"\
1012 && cat "${T}/updmap_update3" > "texmf-dist/web2c/updmap.cfg"
1013 }
1014
1015 src_install() {
1016 dodir ${TEXMF_PATH:-/usr/share/texmf-dist}/web2c
1017 emake DESTDIR="${D}" texmf="${ED}${TEXMF_PATH:-/usr/share/texmf-dist}" run_texlinks="true" run_mktexlsr="true" install || die "install failed"
1018
1019 cd "${B}"
1020 dodir /usr/share # just in case
1021 cp -pR texmf-dist "${ED}/usr/share/" || die "failed to install texmf trees"
1022 cp -pR "${WORKDIR}"/tlpkg "${ED}/usr/share/" || die "failed to install tlpkg files"
1023
1024 # When X is disabled mf-nowin doesn't exist but some scripts expect it to
1025 # exist. Instead, it is called mf, so we symlink it to please everything.
1026 use X || dosym mf /usr/bin/mf-nowin
1027
1028 docinto texk
1029 cd "${B}/texk"
1030 dodoc ChangeLog README || die "failed to install texk docs"
1031
1032 docinto dviljk
1033 cd "${B}/texk/dviljk"
1034 dodoc ChangeLog README NEWS || die "failed to install dviljk docs"
1035
1036 docinto makeindexk
1037 cd "${B}/texk/makeindexk"
1038 dodoc ChangeLog NOTES README || die "failed to install makeindexk docs"
1039
1040 docinto web2c
1041 cd "${B}/texk/web2c"
1042 dodoc ChangeLog NEWS PROJECTS README || die "failed to install web2c docs"
1043
1044 use doc || rm -rf "${ED}/usr/share/texmf-dist/doc"
1045
1046 dodir /etc/env.d
1047 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"
1048 # populate /etc/texmf
1049 keepdir /etc/texmf/web2c
1050
1051 # take care of updmap.cfg and language.d files
1052 keepdir /etc/texmf/{updmap.d,language.dat.d,language.def.d,language.dat.lua.d}
1053
1054 mv "${ED}${TEXMF_PATH}/web2c/updmap.cfg" "${ED}/etc/texmf/updmap.d/00updmap.cfg" || die "moving updmap.cfg failed"
1055
1056 # Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files
1057 # by texmf-update
1058 rm -f "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf"
1059 # Remove bundled and invalid updmap.cfg
1060 rm -f "${ED}/usr/share/texmf-dist/web2c/updmap.cfg"
1061
1062 texlive-common_handle_config_files
1063
1064 keepdir /usr/share/texmf-site
1065
1066 # the virtex symlink is not installed
1067 # The links has to be relative, since the targets
1068 # is not present at this stage and MacOS doesn't
1069 # like non-existing targets
1070 dosym tex /usr/bin/virtex
1071 dosym pdftex /usr/bin/pdfvirtex
1072
1073 # Rename mpost to leave room for mplib
1074 mv "${ED}/usr/bin/mpost" "${ED}/usr/bin/mpost-${P}"
1075 dosym "mpost-${P}" /usr/bin/mpost
1076
1077 # Ditto for pdftex
1078 mv "${ED}/usr/bin/pdftex" "${ED}/usr/bin/pdftex-${P}"
1079 dosym "pdftex-${P}" /usr/bin/pdftex
1080 }
1081
1082 pkg_preinst() {
1083 # Remove stray files to keep the upgrade path sane
1084 if has_version =app-text/texlive-core-2007* ; then
1085 for i in pdftex/pdflatex aleph/aleph aleph/lamed omega/lambda omega/omega xetex/xetex xetex/xelatex tex/tex pdftex/etex pdftex/pdftex pdftex/pdfetex ; do
1086 for j in log fmt ; do
1087 local file="${EROOT}/var/lib/texmf/web2c/${i}.${j}"
1088 if [ -f "${file}" ] ; then
1089 elog "Removing stray ${file} from TeXLive 2007 install."
1090 rm -f "${file}"
1091 fi
1092 done
1093 done
1094 for j in base log ; do
1095 local file="${EROOT}/var/lib/texmf/web2c/metafont/mf.${j}"
1096 if [ -f "${file}" ] ; then
1097 elog "Removing stray ${file} from TeXLive 2007 install."
1098 rm -f "${file}"
1099 fi
1100 done
1101 fi
1102 }
1103
1104 pkg_postinst() {
1105 etexmf-update
1106
1107 elog
1108 elog "If you have configuration files in ${EPREFIX}/etc/texmf to merge,"
1109 elog "please update them and run ${EPREFIX}/usr/sbin/texmf-update."
1110 elog
1111 ewarn "If you are migrating from an older TeX distribution"
1112 ewarn "Please make sure you have read:"
1113 ewarn "http://www.gentoo.org/proj/en/tex/texlive-migration-guide.xml"
1114 ewarn "in order to avoid possible problems"
1115 elog
1116 elog "TeXLive has been split in various ebuilds. If you are missing a"
1117 elog "package to process your TeX documents, you can install"
1118 elog "dev-tex/texmfind to easily search for them."
1119 elog
1120 }