/[gentoo-x86]/app-text/texlive-core/texlive-core-2012-r3.ebuild
Gentoo

Contents of /app-text/texlive-core/texlive-core-2012-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Apr 28 10:35:48 2015 UTC (3 years ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Fix bump 2012/2013/2014 for bug #510770.

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $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 $
4
5 EAPI=5
6
7 #TL_UPSTREAM_PATCHLEVEL="1"
8 PATCHLEVEL="48"
9 TL_SOURCE_VERSION=20120701
10
11 inherit eutils flag-o-matic toolchain-funcs libtool texlive-common
12
13 MY_PV=${PN%-core}-${TL_SOURCE_VERSION}-source
14
15 DESCRIPTION="A complete TeX distribution"
16 HOMEPAGE="http://tug.org/texlive/"
17 SLOT="0"
18 LICENSE="GPL-2 LPPL-1.3c TeX"
19
20 SRC_URI="mirror://gentoo/${MY_PV}.tar.xz"
21
22 # Fetch patches
23 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.xz"
24 # mirror://gentoo/texlive-core-upstream-patches-${TL_UPSTREAM_PATCHLEVEL}.tar.xz"
25
26 TL_CORE_BINEXTRA_MODULES="
27 a2ping asymptote bibtex8 bundledoc ctanify ctanupload ctie cweb de-macro dtl
28 dvi2tty dviasm dvicopy dvidvi dviljk dvipng dvipos findhyph fragmaster
29 hyphenex installfont lacheck latex2man latexfileversion latexpand
30 listings-ext match_parens mkjobtexmf patgen pdfcrop pdftools pkfix
31 pkfix-helper purifyeps seetexk sty2dtx synctex texcount texdef texdiff
32 texdirflatten texdoc texliveonfly texloganalyser texware tie tpic2pdftex
33 typeoutfileinfo web collection-binextra
34 "
35 TL_CORE_BINEXTRA_DOC_MODULES="
36 a2ping.doc asymptote.doc bibtex8.doc bundledoc.doc ctanify.doc
37 ctanupload.doc ctie.doc cweb.doc de-macro.doc dvi2tty.doc dvicopy.doc
38 dviljk.doc dvipng.doc dvipos.doc findhyph.doc fragmaster.doc installfont.doc
39 latex2man.doc latexfileversion.doc latexpand.doc listings-ext.doc
40 match_parens.doc mkjobtexmf.doc patgen.doc pdfcrop.doc pdftools.doc
41 pkfix.doc pkfix-helper.doc purifyeps.doc sty2dtx.doc synctex.doc
42 texcount.doc texdef.doc texdiff.doc texdirflatten.doc texdoc.doc
43 texliveonfly.doc texloganalyser.doc texware.doc tie.doc tpic2pdftex.doc
44 typeoutfileinfo web.doc
45 "
46 TL_CORE_BINEXTRA_SRC_MODULES="hyphenex.source listings-ext.source mkjobtexmf.source texdef.source"
47
48 TL_CORE_EXTRA_MODULES="tetex hyphen-base texconfig gsftopk texlive.infra ${TL_CORE_BINEXTRA_MODULES}"
49 TL_CORE_EXTRA_DOC_MODULES="tetex.doc texconfig.doc gsftopk.doc texlive.infra.doc ${TL_CORE_BINEXTRA_DOC_MODULES}"
50 TL_CORE_EXTRA_SRC_MODULES="${TL_CORE_BINEXTRA_SRC_MODULES}"
51
52 for i in ${TL_CORE_EXTRA_MODULES}; do
53 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
54 done
55
56 SRC_URI="${SRC_URI} doc? ( "
57 for i in ${TL_CORE_EXTRA_DOC_MODULES}; do
58 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
59 done
60 SRC_URI="${SRC_URI} )"
61 SRC_URI="${SRC_URI} source? ( "
62 for i in ${TL_CORE_EXTRA_SRC_MODULES}; do
63 SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
64 done
65 SRC_URI="${SRC_URI} )"
66
67 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
68 IUSE="cjk X doc source tk xetex"
69
70 MODULAR_X_DEPEND="X? (
71 x11-libs/libXmu
72 x11-libs/libXp
73 x11-libs/libXpm
74 x11-libs/libICE
75 x11-libs/libSM
76 x11-libs/libXaw
77 x11-libs/libXfont
78 )"
79
80 COMMON_DEPEND="${MODULAR_X_DEPEND}
81 !app-text/ptex
82 !app-text/tetex
83 !<app-text/texlive-2007
84 !app-text/xetex
85 !<dev-texlive/texlive-basic-2009
86 !<dev-texlive/texlive-metapost-2011
87 !app-text/dvibook
88 sys-libs/zlib
89 >=media-libs/libpng-1.2.43-r2:0=
90 >=app-text/poppler-0.12.3-r3:=
91 xetex? (
92 app-text/teckit
93 media-libs/fontconfig
94 media-libs/freetype:2
95 media-libs/silgraphite
96 )
97 >=dev-libs/kpathsea-6.1.0_p20120701
98 cjk? ( >=dev-libs/ptexenc-1.2.0_p20120701 )"
99
100 DEPEND="${COMMON_DEPEND}
101 virtual/pkgconfig
102 sys-apps/ed
103 sys-devel/flex
104 app-arch/xz-utils"
105
106 RDEPEND="${COMMON_DEPEND}
107 >=app-text/ps2pkm-1.5_p20120701
108 >=app-text/dvipsk-5.992_p20120701
109 >=dev-tex/bibtexu-3.71_p20120701
110 virtual/perl-Getopt-Long
111 xetex? ( >=app-text/xdvipdfmx-0.7.8_p20120701 )
112 tk? ( dev-perl/perl-tk )"
113
114 # texdoc needs luatex.
115 PDEPEND=">=dev-tex/luatex-0.70"
116
117 S="${WORKDIR}/${P}_build"
118 B="${WORKDIR}/${MY_PV}"
119
120 src_unpack() {
121 unpack ${A}
122 mkdir -p "${S}" || die "failed to create build dir"
123 }
124
125 src_prepare() {
126 mv "${WORKDIR}"/texmf* "${B}" || die "failed to move texmf files"
127
128 cd "${B}"
129 #EPATCH_MULTI_MSG="Applying patches from upstream bugfix branch..." EPATCH_SUFFIX="patch" epatch "${WORKDIR}/gentoo_branch2011_patches"
130 EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
131
132 elibtoolize
133 }
134
135 src_configure() {
136 # It fails on alpha without this
137 use alpha && append-ldflags "-Wl,--no-relax"
138
139 # Bug #265232 and bug #414271:
140 if use hppa; then
141 append-cppflags "-DU_IS_BIG_ENDIAN=1"
142 fi
143
144 # Too many regexps use A-Z a-z constructs, what causes problems with locales
145 # that don't have the same alphabetical order than ascii. Bug #242430
146 # So we set LC_ALL to C in order to avoid problems.
147 export LC_ALL=C
148 tc-export CC CXX AR RANLIB
149 ECONF_SOURCE="${B}" \
150 econf -C \
151 --bindir=/usr/bin \
152 --datadir="${S}" \
153 --with-system-freetype2 \
154 --with-freetype2-include=/usr/include \
155 --with-system-zlib \
156 --with-system-libpng \
157 --with-system-xpdf \
158 --with-system-poppler \
159 --with-system-teckit \
160 --with-teckit-includes=/usr/include/teckit \
161 --with-system-graphite \
162 --with-system-kpathsea \
163 --with-system-icu \
164 --with-system-ptexenc \
165 --without-texinfo \
166 --disable-dialog \
167 --disable-multiplatform \
168 --enable-epsfwin \
169 --enable-mftalkwin \
170 --enable-regiswin \
171 --enable-tektronixwin \
172 --enable-unitermwin \
173 --with-ps=gs \
174 --disable-psutils \
175 --disable-t1utils \
176 --enable-ipc \
177 --disable-biber \
178 --disable-bibtexu \
179 --disable-dvipng \
180 --disable-dvipsk \
181 --disable-dvipdfmx \
182 --disable-chktex \
183 --disable-lcdf-typetools \
184 --disable-pdfopen \
185 --disable-ps2eps \
186 --disable-ps2pkm \
187 --disable-detex \
188 --disable-ttf2pk \
189 --disable-tex4htk \
190 --disable-cjkutils \
191 --disable-xdvik \
192 --disable-xindy \
193 --disable-luatex \
194 --disable-dvi2tty \
195 --disable-dvisvgm \
196 --disable-vlna \
197 --disable-xdvipdfmx \
198 --enable-shared \
199 --disable-native-texlive-build \
200 --disable-largefile \
201 $(use_enable xetex) \
202 $(use_enable cjk ptex) \
203 $(use_enable cjk eptex) \
204 $(use_enable cjk uptex) \
205 $(use_enable cjk euptex) \
206 $(use_enable cjk mendexk) \
207 $(use_enable cjk makejvf) \
208 $(use_with X x)
209 }
210
211 src_compile() {
212 emake SHELL=/bin/sh texmf=${TEXMF_PATH:-/usr/share/texmf} || die "emake failed"
213
214 cd "${B}"
215 # Mimic updmap --syncwithtrees to enable only fonts installed
216 # Code copied from updmap script
217 for i in `egrep '^(Mixed)?Map' "texmf/web2c/updmap.cfg" | sed 's@.* @@'`; do
218 texlive-common_is_file_present_in_texmf "$i" || echo "$i"
219 done > "${T}/updmap_update"
220 {
221 sed 's@/@\\/@g; s@^@/^MixedMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
222 sed 's@/@\\/@g; s@^@/^Map[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
223 } > "${T}/updmap_update2"
224 sed -f "${T}/updmap_update2" "texmf/web2c/updmap.cfg" > "${T}/updmap_update3"\
225 && cat "${T}/updmap_update3" > "texmf/web2c/updmap.cfg"
226 }
227
228 src_test() {
229 ewarn "Due to modular layout of texlive ebuilds,"
230 ewarn "It would not make much sense to use tests into the ebuild"
231 ewarn "And tests would fail anyway"
232 ewarn "Alternatively you can try to compile any tex file"
233 ewarn "Tex warnings should be considered as errors and reported"
234 ewarn "You can also run fmtutil-sys --all and check for errors/warnings there"
235 }
236
237 src_install() {
238 dodir ${TEXMF_PATH:-/usr/share/texmf}/web2c
239 emake DESTDIR="${D}" texmf="${D}${TEXMF_PATH:-/usr/share/texmf}" run_texlinks="true" run_mktexlsr="true" install || die "install failed"
240
241 cd "${B}"
242 dodir /usr/share # just in case
243 cp -pR texmf{,-dist} "${D}/usr/share/" || die "failed to install texmf trees"
244 cp -pR "${WORKDIR}"/tlpkg "${D}/usr/share/" || die "failed to install tlpkg files"
245
246 newsbin "${FILESDIR}/texmf-update2010" texmf-update
247
248 # When X is disabled mf-nowin doesn't exist but some scripts expect it to
249 # exist. Instead, it is called mf, so we symlink it to please everything.
250 use X || dosym mf /usr/bin/mf-nowin
251
252 docinto texk
253 cd "${B}/texk"
254 dodoc ChangeLog README || die "failed to install texk docs"
255
256 docinto dviljk
257 cd "${B}/texk/dviljk"
258 dodoc ChangeLog README NEWS || die "failed to install dviljk docs"
259
260 docinto makeindexk
261 cd "${B}/texk/makeindexk"
262 dodoc ChangeLog NOTES README || die "failed to install makeindexk docs"
263
264 docinto web2c
265 cd "${B}/texk/web2c"
266 dodoc ChangeLog NEWS PROJECTS README || die "failed to install web2c docs"
267
268 use doc || rm -rf "${D}/usr/share/texmf/doc"
269 use doc || rm -rf "${D}/usr/share/texmf-dist/doc"
270
271 dodir /etc/env.d
272 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"
273 # populate /etc/texmf
274 keepdir /etc/texmf/web2c
275
276 # take care of updmap.cfg and language.d files
277 keepdir /etc/texmf/{updmap.d,language.dat.d,language.def.d,language.dat.lua.d}
278
279 mv "${D}${TEXMF_PATH}/web2c/updmap.cfg" "${D}/etc/texmf/updmap.d/00updmap.cfg" || die "moving updmap.cfg failed"
280
281 # Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files
282 # by texmf-update
283 rm -f "${D}${TEXMF_PATH}/web2c/fmtutil.cnf"
284 # Remove bundled and invalid updmap.cfg
285 rm -f "${D}/usr/share/texmf-dist/web2c/updmap.cfg"
286
287 texlive-common_handle_config_files
288
289 keepdir /usr/share/texmf-site
290
291 # the virtex symlink is not installed
292 # The links has to be relative, since the targets
293 # is not present at this stage and MacOS doesn't
294 # like non-existing targets
295 dosym tex /usr/bin/virtex
296 dosym pdftex /usr/bin/pdfvirtex
297
298 # Remove texdoctk if we don't want it
299 if ! use tk ; then
300 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!"
301 fi
302
303 # Rename mpost to leave room for mplib
304 mv "${D}/usr/bin/mpost" "${D}/usr/bin/mpost-${P}"
305 dosym "mpost-${P}" /usr/bin/mpost
306
307 # Ditto for pdftex
308 mv "${D}/usr/bin/pdftex" "${D}/usr/bin/pdftex-${P}"
309 dosym "pdftex-${P}" /usr/bin/pdftex
310 }
311
312 pkg_preinst() {
313 # Remove stray files to keep the upgrade path sane
314 if has_version =app-text/texlive-core-2007* ; then
315 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
316 for j in log fmt ; do
317 local file="${ROOT}/var/lib/texmf/web2c/${i}.${j}"
318 if [ -f "${file}" ] ; then
319 elog "Removing stray ${file} from TeXLive 2007 install."
320 rm -f "${file}"
321 fi
322 done
323 done
324 for j in base log ; do
325 local file="${ROOT}/var/lib/texmf/web2c/metafont/mf.${j}"
326 if [ -f "${file}" ] ; then
327 elog "Removing stray ${file} from TeXLive 2007 install."
328 rm -f "${file}"
329 fi
330 done
331 fi
332 }
333
334 pkg_postinst() {
335 etexmf-update
336
337 elog
338 elog "If you have configuration files in /etc/texmf to merge,"
339 elog "please update them and run /usr/sbin/texmf-update."
340 elog
341 ewarn "If you are migrating from an older TeX distribution"
342 ewarn "Please make sure you have read:"
343 ewarn "http://www.gentoo.org/proj/en/tex/texlive-migration-guide.xml"
344 ewarn "in order to avoid possible problems"
345 elog
346 elog "TeXLive has been split in various ebuilds. If you are missing a"
347 elog "package to process your TeX documents, you can install"
348 elog "dev-tex/texmfind to easily search for them."
349 elog
350 }

  ViewVC Help
Powered by ViewVC 1.1.20