Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/texlive-core: ChangeLog texlive-core-2010-r4.ebuild texlive-core-2011-r1.ebuild texlive-core-2010-r3.ebuild texlive-core-2011.ebuild
Date: Sat, 30 Jul 2011 21:02:27
Message-Id: 20110730201124.EDAA32004B@flycatcher.gentoo.org
1 aballier 11/07/30 20:11:24
2
3 Modified: ChangeLog
4 Added: texlive-core-2010-r4.ebuild
5 texlive-core-2011-r1.ebuild
6 Removed: texlive-core-2010-r3.ebuild
7 texlive-core-2011.ebuild
8 Log:
9 push changes into new revisions
10
11 (Portage version: 2.2.0_alpha49/cvs/Linux x86_64)
12
13 Revision Changes Path
14 1.143 app-text/texlive-core/ChangeLog
15
16 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/ChangeLog?rev=1.143&view=markup
17 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/ChangeLog?rev=1.143&content-type=text/plain
18 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/ChangeLog?r1=1.142&r2=1.143
19
20 Index: ChangeLog
21 ===================================================================
22 RCS file: /var/cvsroot/gentoo-x86/app-text/texlive-core/ChangeLog,v
23 retrieving revision 1.142
24 retrieving revision 1.143
25 diff -u -r1.142 -r1.143
26 --- ChangeLog 30 Jul 2011 20:06:21 -0000 1.142
27 +++ ChangeLog 30 Jul 2011 20:11:24 -0000 1.143
28 @@ -1,6 +1,14 @@
29 # ChangeLog for app-text/texlive-core
30 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
31 -# $Header: /var/cvsroot/gentoo-x86/app-text/texlive-core/ChangeLog,v 1.142 2011/07/30 20:06:21 aballier Exp $
32 +# $Header: /var/cvsroot/gentoo-x86/app-text/texlive-core/ChangeLog,v 1.143 2011/07/30 20:11:24 aballier Exp $
33 +
34 +*texlive-core-2011-r1 (30 Jul 2011)
35 +*texlive-core-2010-r4 (30 Jul 2011)
36 +
37 + 30 Jul 2011; Alexis Ballier <aballier@g.o>
38 + -texlive-core-2010-r3.ebuild, +texlive-core-2010-r4.ebuild,
39 + -texlive-core-2011.ebuild, +texlive-core-2011-r1.ebuild:
40 + push changes into new revisions
41
42 30 Jul 2011; Alexis Ballier <aballier@g.o>
43 texlive-core-2010-r3.ebuild, texlive-core-2011.ebuild:
44
45
46
47 1.1 app-text/texlive-core/texlive-core-2010-r4.ebuild
48
49 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/texlive-core-2010-r4.ebuild?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/texlive-core-2010-r4.ebuild?rev=1.1&content-type=text/plain
51
52 Index: texlive-core-2010-r4.ebuild
53 ===================================================================
54 # Copyright 1999-2011 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 # $Header: /var/cvsroot/gentoo-x86/app-text/texlive-core/texlive-core-2010-r4.ebuild,v 1.1 2011/07/30 20:11:24 aballier Exp $
57
58 EAPI=3
59
60 inherit eutils flag-o-matic toolchain-funcs libtool texlive-common
61
62 PATCHLEVEL="28"
63 TL_SOURCE_VERSION=20100722
64 MY_PV=${PN%-core}-${TL_SOURCE_VERSION}-source
65
66 DESCRIPTION="A complete TeX distribution"
67 HOMEPAGE="http://tug.org/texlive/"
68 SLOT="0"
69 LICENSE="GPL-2 LPPL-1.3c TeX"
70
71 SRC_URI="mirror://gentoo/${MY_PV}.tar.xz"
72
73 # Fetch patches
74 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.xz"
75
76 TL_CORE_BINEXTRA_MODULES="a2ping asymptote bibtex8 bundledoc ctie cweb de-macro dtl dvi2tty dviasm dvicopy dvidvi dviljk dvipng dvipos findhyph fragmaster hyphenex installfont lacheck latex2man listings-ext mkjobtexmf patgen pdfcrop pdftools pkfix pkfix-helper purifyeps seetexk synctex texcount texdiff texdirflatten texdoc texloganalyser texware tie tpic2pdftex web collection-binextra"
77 TL_CORE_BINEXTRA_DOC_MODULES="
78 a2ping.doc asymptote.doc bibtex8.doc bundledoc.doc ctie.doc cweb.doc de-macro.doc dvicopy.doc dviljk.doc dvipng.doc dvipos.doc findhyph.doc fragmaster.doc installfont.doc latex2man.doc listings-ext.doc mkjobtexmf.doc patgen.doc pdfcrop.doc pdftools.doc pkfix.doc pkfix-helper.doc purifyeps.doc synctex.doc texcount.doc texdiff.doc texdirflatten.doc texdoc.doc texloganalyser.doc texware.doc tie.doc tpic2pdftex.doc web.doc
79 "
80 TL_CORE_BINEXTRA_SRC_MODULES="hyphenex.source listings-ext.source mkjobtexmf.source"
81
82 TL_CORE_EXTRA_MODULES="tetex hyphen-base texconfig gsftopk ${TL_CORE_BINEXTRA_MODULES}"
83 TL_CORE_EXTRA_DOC_MODULES="tetex.doc texconfig.doc gsftopk.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} mirror://gentoo/texlive-module-${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} mirror://gentoo/texlive-module-${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} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
98 done
99 SRC_URI="${SRC_URI} )"
100
101 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
102 IUSE="cjk X doc source tk xetex"
103
104 MODULAR_X_DEPEND="X? (
105 x11-libs/libXmu
106 x11-libs/libXp
107 x11-libs/libXpm
108 x11-libs/libICE
109 x11-libs/libSM
110 x11-libs/libXaw
111 x11-libs/libXfont
112 )"
113
114 COMMON_DEPEND="${MODULAR_X_DEPEND}
115 !app-text/ptex
116 !app-text/tetex
117 !<app-text/texlive-2007
118 !app-text/xetex
119 !<dev-texlive/texlive-basic-2009
120 !app-text/dvibook
121 sys-libs/zlib
122 >=media-libs/libpng-1.2.43-r2:0
123 >=app-text/poppler-0.12.3-r3
124 xetex? (
125 app-text/teckit
126 media-libs/fontconfig
127 media-libs/freetype:2
128 media-libs/silgraphite
129 )
130 >=dev-libs/kpathsea-6.0.1_p20110627
131 cjk? ( dev-libs/ptexenc )"
132
133 DEPEND="${COMMON_DEPEND}
134 dev-util/pkgconfig
135 sys-apps/ed
136 sys-devel/flex
137 app-arch/xz-utils"
138
139 RDEPEND="${COMMON_DEPEND}
140 app-text/ps2pkm
141 app-text/dvipsk
142 dev-tex/bibtexu
143 xetex? ( >=app-text/xdvipdfmx-0.7.8 )
144 tk? ( dev-perl/perl-tk )"
145
146 # texdoc needs luatex.
147 PDEPEND=">=dev-tex/luatex-0.63"
148
149 S="${WORKDIR}/${MY_PV}"
150
151 src_prepare() {
152 mv "${WORKDIR}"/texmf* "${S}" || die "failed to move texmf files"
153
154 EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
155
156 elibtoolize
157 }
158
159 src_configure() {
160 # Too many regexps use A-Z a-z constructs, what causes problems with locales
161 # that don't have the same alphabetical order than ascii. Bug #242430
162 # So we set LC_ALL to C in order to avoid problems.
163 export LC_ALL=C
164 tc-export CC CXX AR
165 econf -C \
166 --bindir=/usr/bin \
167 --datadir="${S}" \
168 --with-system-freetype2 \
169 --with-freetype2-include=/usr/include \
170 --with-system-zlib \
171 --with-system-libpng \
172 --with-system-xpdf \
173 --with-system-teckit \
174 --with-teckit-includes=/usr/include/teckit \
175 --with-system-graphite \
176 --with-system-kpathsea \
177 --with-system-icu \
178 --with-system-ptexenc \
179 --without-texinfo \
180 --disable-dialog \
181 --disable-multiplatform \
182 --enable-epsfwin \
183 --enable-mftalkwin \
184 --enable-regiswin \
185 --enable-tektronixwin \
186 --enable-unitermwin \
187 --with-ps=gs \
188 --disable-psutils \
189 --disable-t1utils \
190 --enable-ipc \
191 --disable-bibtexu \
192 --disable-dvipng \
193 --disable-dvipsk \
194 --disable-dvipdfmx \
195 --disable-chktex \
196 --disable-lcdf-typetools \
197 --disable-pdfopen \
198 --disable-ps2eps \
199 --disable-ps2pkm \
200 --disable-detex \
201 --disable-ttf2pk \
202 --disable-tex4htk \
203 --disable-cjkutils \
204 --disable-xdvik \
205 --disable-xindy \
206 --disable-luatex \
207 --disable-dvi2tty \
208 --disable-dvisvgm \
209 --disable-vlna \
210 --disable-xdvipdfmx \
211 --enable-shared \
212 --disable-native-texlive-build \
213 --disable-largefile \
214 $(use_enable xetex) \
215 $(use_enable cjk ptex) \
216 $(use_enable cjk mendexk) \
217 $(use_enable cjk makejvf) \
218 $(use_with X x)
219 }
220
221 src_compile() {
222 emake SHELL=/bin/sh texmf=${TEXMF_PATH:-/usr/share/texmf} || die "emake failed"
223
224 # Mimic updmap --syncwithtrees to enable only fonts installed
225 # Code copied from updmap script
226 for i in `egrep '^(Mixed)?Map' "texmf/web2c/updmap.cfg" | sed 's@.* @@'`; do
227 texlive-common_is_file_present_in_texmf "$i" || echo "$i"
228 done > "${T}/updmap_update"
229 {
230 sed 's@/@\\/@g; s@^@/^MixedMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
231 sed 's@/@\\/@g; s@^@/^Map[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
232 } > "${T}/updmap_update2"
233 sed -f "${T}/updmap_update2" "texmf/web2c/updmap.cfg" > "${T}/updmap_update3"\
234 && cat "${T}/updmap_update3" > "texmf/web2c/updmap.cfg"
235 }
236
237 src_test() {
238 ewarn "Due to modular layout of texlive ebuilds,"
239 ewarn "It would not make much sense to use tests into the ebuild"
240 ewarn "And tests would fail anyway"
241 ewarn "Alternatively you can try to compile any tex file"
242 ewarn "Tex warnings should be considered as errors and reported"
243 ewarn "You can also run fmtutil-sys --all and check for errors/warnings there"
244 }
245
246 src_install() {
247 dodir ${TEXMF_PATH:-/usr/share/texmf}/web2c
248 emake DESTDIR="${D}" texmf="${D}${TEXMF_PATH:-/usr/share/texmf}" run_texlinks="true" run_mktexlsr="true" install || die "install failed"
249
250 dodir /usr/share # just in case
251 cp -pR texmf{,-dist} "${D}/usr/share/" || die "failed to install texmf trees"
252 if use source ; then
253 cp -pR "${WORKDIR}"/tlpkg "${D}/usr/share/" || die "failed to install tlpkg files"
254 fi
255
256 newsbin "${FILESDIR}/texmf-update2010" texmf-update
257
258 # When X is disabled mf-nowin doesn't exist but some scripts expect it to
259 # exist. Instead, it is called mf, so we symlink it to please everything.
260 use X || dosym mf /usr/bin/mf-nowin
261
262 docinto texk
263 cd "${S}/texk"
264 dodoc ChangeLog README || die "failed to install texk docs"
265
266 docinto dviljk
267 cd "${S}/texk/dviljk"
268 dodoc ChangeLog README NEWS || die "failed to install dviljk docs"
269
270 docinto makeindexk
271 cd "${S}/texk/makeindexk"
272 dodoc ChangeLog NEWS NOTES README || die "failed to install makeindexk docs"
273
274 docinto web2c
275 cd "${S}/texk/web2c"
276 dodoc ChangeLog NEWS PROJECTS README || die "failed to install web2c docs"
277
278 use doc || rm -rf "${D}/usr/share/texmf/doc"
279 use doc || rm -rf "${D}/usr/share/texmf-dist/doc"
280
281 dodir /etc/env.d
282 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"
283 # populate /etc/texmf
284 keepdir /etc/texmf/web2c
285
286 # take care of updmap.cfg and language.d files
287 keepdir /etc/texmf/{updmap.d,language.dat.d,language.def.d,language.dat.lua.d}
288
289 mv "${D}${TEXMF_PATH}/web2c/updmap.cfg" "${D}/etc/texmf/updmap.d/00updmap.cfg" || die "moving updmap.cfg failed"
290
291 # Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files
292 # by texmf-update
293 rm -f "${D}${TEXMF_PATH}/web2c/fmtutil.cnf"
294
295 texlive-common_handle_config_files
296
297 keepdir /usr/share/texmf-site
298
299 dosym /etc/texmf/web2c/updmap.cfg ${TEXMF_PATH}/web2c/updmap.cfg
300
301 # the virtex symlink is not installed
302 # The links has to be relative, since the targets
303 # is not present at this stage and MacOS doesn't
304 # like non-existing targets
305 dosym tex /usr/bin/virtex
306 dosym pdftex /usr/bin/pdfvirtex
307
308 # Remove texdoctk if we don't want it
309 if ! use tk ; then
310 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!"
311 fi
312
313 # Rename mpost to leave room for mplib
314 mv "${D}/usr/bin/mpost" "${D}/usr/bin/mpost-${P}"
315 dosym "mpost-${P}" /usr/bin/mpost
316
317 # Ditto for pdftex
318 mv "${D}/usr/bin/pdftex" "${D}/usr/bin/pdftex-${P}"
319 dosym "pdftex-${P}" /usr/bin/pdftex
320 }
321
322 pkg_preinst() {
323 # Remove stray files to keep the upgrade path sane
324 if has_version =app-text/texlive-core-2007* ; then
325 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
326 for j in log fmt ; do
327 local file="${ROOT}/var/lib/texmf/web2c/${i}.${j}"
328 if [ -f "${file}" ] ; then
329 elog "Removing stray ${file} from TeXLive 2007 install."
330 rm -f "${file}"
331 fi
332 done
333 done
334 for j in base log ; do
335 local file="${ROOT}/var/lib/texmf/web2c/metafont/mf.${j}"
336 if [ -f "${file}" ] ; then
337 elog "Removing stray ${file} from TeXLive 2007 install."
338 rm -f "${file}"
339 fi
340 done
341 fi
342 }
343
344 pkg_postinst() {
345 etexmf-update
346
347 elog
348 elog "If you have configuration files in /etc/texmf to merge,"
349 elog "please update them and run /usr/sbin/texmf-update."
350 elog
351 ewarn "If you are migrating from an older TeX distribution"
352 ewarn "Please make sure you have read:"
353 ewarn "http://www.gentoo.org/proj/en/tex/texlive-migration-guide.xml"
354 ewarn "in order to avoid possible problems"
355 elog
356 elog "TeXLive has been split in various ebuilds. If you are missing a"
357 elog "package to process your TeX documents, you can install"
358 elog "dev-tex/texmfind to easily search for them."
359 elog
360 }
361
362
363
364 1.1 app-text/texlive-core/texlive-core-2011-r1.ebuild
365
366 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/texlive-core-2011-r1.ebuild?rev=1.1&view=markup
367 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/texlive-core/texlive-core-2011-r1.ebuild?rev=1.1&content-type=text/plain
368
369 Index: texlive-core-2011-r1.ebuild
370 ===================================================================
371 # Copyright 1999-2011 Gentoo Foundation
372 # Distributed under the terms of the GNU General Public License v2
373 # $Header: /var/cvsroot/gentoo-x86/app-text/texlive-core/texlive-core-2011-r1.ebuild,v 1.1 2011/07/30 20:11:24 aballier Exp $
374
375 EAPI=3
376
377 inherit eutils flag-o-matic toolchain-funcs libtool texlive-common
378
379 PATCHLEVEL="27"
380 TL_SOURCE_VERSION=20110705
381 MY_PV=${PN%-core}-${TL_SOURCE_VERSION}-source
382
383 DESCRIPTION="A complete TeX distribution"
384 HOMEPAGE="http://tug.org/texlive/"
385 SLOT="0"
386 LICENSE="GPL-2 LPPL-1.3c TeX"
387
388 SRC_URI="mirror://gentoo/${MY_PV}.tar.xz"
389
390 # Fetch patches
391 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.xz"
392
393 TL_CORE_BINEXTRA_MODULES="
394 a2ping asymptote bibtex8 bundledoc ctie cweb de-macro dtl dvi2tty dviasm
395 dvicopy dvidvi dviljk dvipng dvipos findhyph fragmaster hyphenex installfont
396 lacheck latex2man listings-ext mkjobtexmf patgen pdfcrop pdftools pkfix
397 pkfix-helper purifyeps seetexk sty2dtx synctex texcount texdef texdiff
398 texdirflatten texdoc texloganalyser texware tie tpic2pdftex web
399 collection-binextra
400 "
401 TL_CORE_BINEXTRA_DOC_MODULES="
402 a2ping.doc asymptote.doc bibtex8.doc bundledoc.doc ctie.doc cweb.doc
403 de-macro.doc dvi2tty.doc dvicopy.doc dviljk.doc dvipng.doc dvipos.doc
404 findhyph.doc fragmaster.doc installfont.doc latex2man.doc listings-ext.doc
405 mkjobtexmf.doc patgen.doc pdfcrop.doc pdftools.doc pkfix.doc
406 pkfix-helper.doc purifyeps.doc sty2dtx.doc synctex.doc texcount.doc
407 texdef.doc texdiff.doc texdirflatten.doc texdoc.doc texloganalyser.doc
408 texware.doc tie.doc tpic2pdftex.doc web.doc
409 "
410 TL_CORE_BINEXTRA_SRC_MODULES="hyphenex.source listings-ext.source mkjobtexmf.source"
411
412 TL_CORE_EXTRA_MODULES="tetex hyphen-base texconfig gsftopk ${TL_CORE_BINEXTRA_MODULES}"
413 TL_CORE_EXTRA_DOC_MODULES="tetex.doc texconfig.doc gsftopk.doc ${TL_CORE_BINEXTRA_DOC_MODULES}"
414 TL_CORE_EXTRA_SRC_MODULES="${TL_CORE_BINEXTRA_SRC_MODULES}"
415
416 for i in ${TL_CORE_EXTRA_MODULES}; do
417 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
418 done
419
420 SRC_URI="${SRC_URI} doc? ( "
421 for i in ${TL_CORE_EXTRA_DOC_MODULES}; do
422 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
423 done
424 SRC_URI="${SRC_URI} )"
425 SRC_URI="${SRC_URI} source? ( "
426 for i in ${TL_CORE_EXTRA_SRC_MODULES}; do
427 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
428 done
429 SRC_URI="${SRC_URI} )"
430
431 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
432 IUSE="cjk X doc source tk xetex"
433
434 MODULAR_X_DEPEND="X? (
435 x11-libs/libXmu
436 x11-libs/libXp
437 x11-libs/libXpm
438 x11-libs/libICE
439 x11-libs/libSM
440 x11-libs/libXaw
441 x11-libs/libXfont
442 )"
443
444 COMMON_DEPEND="${MODULAR_X_DEPEND}
445 !app-text/ptex
446 !app-text/tetex
447 !<app-text/texlive-2007
448 !app-text/xetex
449 !<dev-texlive/texlive-basic-2009
450 !<dev-texlive/texlive-metapost-2011
451 !app-text/dvibook
452 sys-libs/zlib
453 >=media-libs/libpng-1.2.43-r2:0
454 >=app-text/poppler-0.12.3-r3
455 xetex? (
456 app-text/teckit
457 media-libs/fontconfig
458 media-libs/freetype:2
459 media-libs/silgraphite
460 )
461 >=dev-libs/kpathsea-6.0.1_p20110705
462 cjk? ( >=dev-libs/ptexenc-1.2.0_p20110705 )"
463
464 DEPEND="${COMMON_DEPEND}
465 dev-util/pkgconfig
466 sys-apps/ed
467 sys-devel/flex
468 app-arch/xz-utils"
469
470 RDEPEND="${COMMON_DEPEND}
471 >=app-text/ps2pkm-1.5_p20110705
472 >=app-text/dvipsk-5.991_p20110705
473 >=dev-tex/bibtexu-3.71_p20110705
474 xetex? ( >=app-text/xdvipdfmx-0.7.8 )
475 tk? ( dev-perl/perl-tk )"
476
477 # texdoc needs luatex.
478 PDEPEND=">=dev-tex/luatex-0.63"
479
480 S="${WORKDIR}/${MY_PV}"
481
482 src_prepare() {
483 mv "${WORKDIR}"/texmf* "${S}" || die "failed to move texmf files"
484
485 EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
486
487 elibtoolize
488 }
489
490 src_configure() {
491 # Too many regexps use A-Z a-z constructs, what causes problems with locales
492 # that don't have the same alphabetical order than ascii. Bug #242430
493 # So we set LC_ALL to C in order to avoid problems.
494 export LC_ALL=C
495 tc-export CC CXX AR
496 econf -C \
497 --bindir=/usr/bin \
498 --datadir="${S}" \
499 --with-system-freetype2 \
500 --with-freetype2-include=/usr/include \
501 --with-system-zlib \
502 --with-system-libpng \
503 --with-system-xpdf \
504 --with-system-teckit \
505 --with-teckit-includes=/usr/include/teckit \
506 --with-system-graphite \
507 --with-system-kpathsea \
508 --with-system-icu \
509 --with-system-ptexenc \
510 --without-texinfo \
511 --disable-dialog \
512 --disable-multiplatform \
513 --enable-epsfwin \
514 --enable-mftalkwin \
515 --enable-regiswin \
516 --enable-tektronixwin \
517 --enable-unitermwin \
518 --with-ps=gs \
519 --disable-psutils \
520 --disable-t1utils \
521 --enable-ipc \
522 --disable-bibtexu \
523 --disable-dvipng \
524 --disable-dvipsk \
525 --disable-dvipdfmx \
526 --disable-chktex \
527 --disable-lcdf-typetools \
528 --disable-pdfopen \
529 --disable-ps2eps \
530 --disable-ps2pkm \
531 --disable-detex \
532 --disable-ttf2pk \
533 --disable-tex4htk \
534 --disable-cjkutils \
535 --disable-xdvik \
536 --disable-xindy \
537 --disable-luatex \
538 --disable-dvi2tty \
539 --disable-dvisvgm \
540 --disable-vlna \
541 --disable-xdvipdfmx \
542 --enable-shared \
543 --disable-native-texlive-build \
544 --disable-largefile \
545 $(use_enable xetex) \
546 $(use_enable cjk ptex) \
547 $(use_enable cjk eptex) \
548 $(use_enable cjk mendexk) \
549 $(use_enable cjk makejvf) \
550 $(use_with X x)
551 }
552
553 src_compile() {
554 emake SHELL=/bin/sh texmf=${TEXMF_PATH:-/usr/share/texmf} || die "emake failed"
555
556 # Mimic updmap --syncwithtrees to enable only fonts installed
557 # Code copied from updmap script
558 for i in `egrep '^(Mixed)?Map' "texmf/web2c/updmap.cfg" | sed 's@.* @@'`; do
559 texlive-common_is_file_present_in_texmf "$i" || echo "$i"
560 done > "${T}/updmap_update"
561 {
562 sed 's@/@\\/@g; s@^@/^MixedMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
563 sed 's@/@\\/@g; s@^@/^Map[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
564 } > "${T}/updmap_update2"
565 sed -f "${T}/updmap_update2" "texmf/web2c/updmap.cfg" > "${T}/updmap_update3"\
566 && cat "${T}/updmap_update3" > "texmf/web2c/updmap.cfg"
567 }
568
569 src_test() {
570 ewarn "Due to modular layout of texlive ebuilds,"
571 ewarn "It would not make much sense to use tests into the ebuild"
572 ewarn "And tests would fail anyway"
573 ewarn "Alternatively you can try to compile any tex file"
574 ewarn "Tex warnings should be considered as errors and reported"
575 ewarn "You can also run fmtutil-sys --all and check for errors/warnings there"
576 }
577
578 src_install() {
579 dodir ${TEXMF_PATH:-/usr/share/texmf}/web2c
580 emake DESTDIR="${D}" texmf="${D}${TEXMF_PATH:-/usr/share/texmf}" run_texlinks="true" run_mktexlsr="true" install || die "install failed"
581
582 dodir /usr/share # just in case
583 cp -pR texmf{,-dist} "${D}/usr/share/" || die "failed to install texmf trees"
584 if use source ; then
585 cp -pR "${WORKDIR}"/tlpkg "${D}/usr/share/" || die "failed to install tlpkg files"
586 fi
587
588 newsbin "${FILESDIR}/texmf-update2010" texmf-update
589
590 # When X is disabled mf-nowin doesn't exist but some scripts expect it to
591 # exist. Instead, it is called mf, so we symlink it to please everything.
592 use X || dosym mf /usr/bin/mf-nowin
593
594 docinto texk
595 cd "${S}/texk"
596 dodoc ChangeLog README || die "failed to install texk docs"
597
598 docinto dviljk
599 cd "${S}/texk/dviljk"
600 dodoc ChangeLog README NEWS || die "failed to install dviljk docs"
601
602 docinto makeindexk
603 cd "${S}/texk/makeindexk"
604 dodoc ChangeLog NEWS NOTES README || die "failed to install makeindexk docs"
605
606 docinto web2c
607 cd "${S}/texk/web2c"
608 dodoc ChangeLog NEWS PROJECTS README || die "failed to install web2c docs"
609
610 use doc || rm -rf "${D}/usr/share/texmf/doc"
611 use doc || rm -rf "${D}/usr/share/texmf-dist/doc"
612
613 dodir /etc/env.d
614 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"
615 # populate /etc/texmf
616 keepdir /etc/texmf/web2c
617
618 # take care of updmap.cfg and language.d files
619 keepdir /etc/texmf/{updmap.d,language.dat.d,language.def.d,language.dat.lua.d}
620
621 mv "${D}${TEXMF_PATH}/web2c/updmap.cfg" "${D}/etc/texmf/updmap.d/00updmap.cfg" || die "moving updmap.cfg failed"
622
623 # Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files
624 # by texmf-update
625 rm -f "${D}${TEXMF_PATH}/web2c/fmtutil.cnf"
626
627 texlive-common_handle_config_files
628
629 keepdir /usr/share/texmf-site
630
631 dosym /etc/texmf/web2c/updmap.cfg ${TEXMF_PATH}/web2c/updmap.cfg
632
633 # the virtex symlink is not installed
634 # The links has to be relative, since the targets
635 # is not present at this stage and MacOS doesn't
636 # like non-existing targets
637 dosym tex /usr/bin/virtex
638 dosym pdftex /usr/bin/pdfvirtex
639
640 # Remove texdoctk if we don't want it
641 if ! use tk ; then
642 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!"
643 fi
644
645 # Rename mpost to leave room for mplib
646 mv "${D}/usr/bin/mpost" "${D}/usr/bin/mpost-${P}"
647 dosym "mpost-${P}" /usr/bin/mpost
648
649 # Ditto for pdftex
650 mv "${D}/usr/bin/pdftex" "${D}/usr/bin/pdftex-${P}"
651 dosym "pdftex-${P}" /usr/bin/pdftex
652 }
653
654 pkg_preinst() {
655 # Remove stray files to keep the upgrade path sane
656 if has_version =app-text/texlive-core-2007* ; then
657 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
658 for j in log fmt ; do
659 local file="${ROOT}/var/lib/texmf/web2c/${i}.${j}"
660 if [ -f "${file}" ] ; then
661 elog "Removing stray ${file} from TeXLive 2007 install."
662 rm -f "${file}"
663 fi
664 done
665 done
666 for j in base log ; do
667 local file="${ROOT}/var/lib/texmf/web2c/metafont/mf.${j}"
668 if [ -f "${file}" ] ; then
669 elog "Removing stray ${file} from TeXLive 2007 install."
670 rm -f "${file}"
671 fi
672 done
673 fi
674 }
675
676 pkg_postinst() {
677 etexmf-update
678
679 elog
680 elog "If you have configuration files in /etc/texmf to merge,"
681 elog "please update them and run /usr/sbin/texmf-update."
682 elog
683 ewarn "If you are migrating from an older TeX distribution"
684 ewarn "Please make sure you have read:"
685 ewarn "http://www.gentoo.org/proj/en/tex/texlive-migration-guide.xml"
686 ewarn "in order to avoid possible problems"
687 elog
688 elog "TeXLive has been split in various ebuilds. If you are missing a"
689 elog "package to process your TeX documents, you can install"
690 elog "dev-tex/texmfind to easily search for them."
691 elog
692 }