Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/texlive-core/
Date: Fri, 27 Dec 2019 12:25:00
Message-Id: 1577449490.75e4bc8cb364d941d1cb1278bb736db57ed024a2.zlogene@gentoo
1 commit: 75e4bc8cb364d941d1cb1278bb736db57ed024a2
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 27 12:24:05 2019 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 27 12:24:50 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75e4bc8c
7
8 app-text/texlive-core: fix building with poppler-0.83
9
10 Fixes: https://bugs.gentoo.org/703788
11 Package-Manager: Portage-2.3.79, Repoman-2.3.16
12 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
13
14 app-text/texlive-core/Manifest | 1 +
15 app-text/texlive-core/texlive-core-2019-r5.ebuild | 359 ++++++++++++++++++++++
16 2 files changed, 360 insertions(+)
17
18 diff --git a/app-text/texlive-core/Manifest b/app-text/texlive-core/Manifest
19 index df1ef569acd..4c344d4b23c 100644
20 --- a/app-text/texlive-core/Manifest
21 +++ b/app-text/texlive-core/Manifest
22 @@ -1,5 +1,6 @@
23 DIST texlive-20190410-source.tar.xz 53783408 BLAKE2B 8e34c7c2b74eab1c4d16ddbf7eddd8566593e6d68c42a2634760f11d86e68970698d8b9deddcf3297966968ede11ecf30e0b04ec19b708dc3e6d0a2abcc3799d SHA512 7759d8e668e53c0c73e48907096da9d8fb6384dd9c3342ddfb05e17d077054c5351d35256cf4e63a6da502de2f09f521979bede7209cdd5bd8ae80eba0efed2e
24 DIST texlive-core-patches-2019-4.tar.xz 11932 BLAKE2B 5e73e2bd3afeb904f2b8898081ffd770c9ab152368ae5a8699d5f63507e3c0584901d7d6f8fece7724b8e744d7816fe31db4b96962c0550491a57a6d51adb296 SHA512 fce31563f8c7e8f1f0bdcba9c5108d9f5d14529c22c110e33f32a6367560f7f255e51a1e86f1d5c8fb275085ff3ba6d0f5f474acd79ff61d67be795dfb330708
25 +DIST texlive-core-patches-2019-5.tar.xz 12444 BLAKE2B 0b6b24897a1fd5d6cb22dc126161c4da39a652249a1c9fde8fe771b196332b40af677c8128c561e404c81d5a0e6835d1cf246661957367ac94fce3fc4036b0fc SHA512 ce3b37423c89ba605608158a46e69e7a8aff29034be9583e0c09d41e16176544fda02a9a60071b3744b2b6004ad3f5986a116bb8e01acc1402e94d5cc6203d5c
26 DIST texlive-module-a2ping-2019.tar.xz 30616 BLAKE2B 545abfdd3aa23b8d2bed608d7b7aef0f9578d5c4d6039880d435144c687014edb8c841afcb2d9ca1fc48a365b2bcb57832d49d1c6bb35480a01a813e40e18ea6 SHA512 983084ca3d70eff729d81d5d52a74e1bf1f95e384916bc81d17be81290f70c1da5ac891c1665a2451975f36fd56ea0036e1d0dc46b2e98b61ddc660ac044c23c
27 DIST texlive-module-a2ping.doc-2019.tar.xz 39740 BLAKE2B 1a9cf6e4cf4dd4dd7677efddafc9da191ab3c34eea3b7bd0f51937f6946e1696b858aa9d53e7599c220933b06bc0332869a0bd596ca66b9801b48adb5ab1aa2b SHA512 daeefb01a0197e3b7751614cb84e2926f670d36b7e8a389bfbbe39cbd941c4d10ef5112593bfb88e11fa15f7f7bb07f2538c7d0a68cefe1482bbdaf02d475512
28 DIST texlive-module-adhocfilelist-2019.tar.xz 3600 BLAKE2B cf6e37b1b3ce64ee7033f43677416c3de6abf2859bb2d985795608f8ccbfc09f842cd3d2664840ff64a7352f179abe4e5fec096b25326a47bd074cbd26bce78d SHA512 57436dae1489c0f614c4b002f83d34a711398a762ac532b44b1d91a51d068462aaedb5b034923629f7630f039988452eb833d1e98af389c788091517bbee8954
29
30 diff --git a/app-text/texlive-core/texlive-core-2019-r5.ebuild b/app-text/texlive-core/texlive-core-2019-r5.ebuild
31 new file mode 100644
32 index 00000000000..57d09338eae
33 --- /dev/null
34 +++ b/app-text/texlive-core/texlive-core-2019-r5.ebuild
35 @@ -0,0 +1,359 @@
36 +# Copyright 1999-2019 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=7
40 +
41 +TL_SOURCE_VERSION=20190410
42 +
43 +inherit flag-o-matic toolchain-funcs libtool texlive-common
44 +
45 +MY_P=${PN%-core}-${TL_SOURCE_VERSION}-source
46 +
47 +PATCHLEVEL=5
48 +
49 +DESCRIPTION="A complete TeX distribution"
50 +HOMEPAGE="https://tug.org/texlive/"
51 +SLOT="0"
52 +LICENSE="GPL-2 LPPL-1.3c TeX"
53 +
54 +SRC_URI="mirror://gentoo/${MY_P}.tar.xz
55 + mirror://gentoo/${PN}-patches-${PV}-${PATCHLEVEL}.tar.xz
56 + mirror://gentoo/texlive-tlpdb-${PV}.tar.xz"
57 +
58 +TL_CORE_BINEXTRA_MODULES="
59 + a2ping adhocfilelist arara asymptote bundledoc checklistings ctan_chk
60 + ctanify ctanupload ctie cweb de-macro dtl dtxgen dvi2tty dviasm dvicopy
61 + dvidvi dviljk dvipos findhyph fragmaster hook-pre-commit-pkg hyphenex
62 + installfont lacheck latex-git-log latex-papersize latex2man latex2nemeth
63 + latexfileversion latexpand latexindent ltxfileinfo ltximg listings-ext make4ht
64 + match_parens mflua mkjobtexmf patgen pdfbook2 pdfcrop pdflatexpicscale pdftools
65 + pdfxup pfarrei pkfix pkfix-helper purifyeps seetexk srcredact sty2dtx
66 + synctex tex4ebook texcount texdef texdiff texdirflatten texdoc texfot
67 + texliveonfly texloganalyser texosquery texware tie tpic2pdftex typeoutfileinfo
68 + web collection-binextra
69 + "
70 +TL_CORE_BINEXTRA_DOC_MODULES="
71 + a2ping.doc adhocfilelist.doc arara.doc asymptote.doc bundledoc.doc
72 + checklistings.doc ctan_chk.doc ctanify.doc ctanupload.doc ctie.doc
73 + cweb.doc de-macro.doc dtl.doc dtxgen.doc dvi2tty.doc dviasm.doc dvicopy.doc
74 + dvidvi.doc dviljk.doc dvipos.doc findhyph.doc fragmaster.doc
75 + hook-pre-commit-pkg.doc installfont.doc lacheck.doc latex-git-log.doc
76 + latex-papersize.doc latex2man.doc latex2nemeth.doc latexfileversion.doc
77 + latexpand.doc latexindent.doc ltxfileinfo.doc ltximg.doc listings-ext.doc
78 + make4ht.doc match_parens.doc mkjobtexmf.doc patgen.doc pdfbook2.doc pdfcrop.doc
79 + pdflatexpicscale.doc pdftools.doc pdfxup.doc pfarrei.doc pkfix.doc
80 + pkfix-helper.doc purifyeps.doc pythontex.doc seetexk.doc srcredact.doc
81 + sty2dtx.doc synctex.doc tex4ebook.doc texcount.doc texdef.doc texdiff.doc
82 + texdirflatten.doc texdoc.doc texfot.doc texliveonfly.doc texloganalyser.doc
83 + texosquery.doc texware.doc tie.doc tpic2pdftex.doc typeoutfileinfo.doc web.doc
84 +"
85 +TL_CORE_BINEXTRA_SRC_MODULES="
86 + adhocfilelist.source arara.source checklistings.source hyphenex.source
87 + listings-ext.source mkjobtexmf.source pfarrei.source pythontex.source
88 + texdef.source texosquery.source
89 +"
90 +
91 +TL_CORE_EXTRA_MODULES="tetex hyphen-base gsftopk texlive.infra ${TL_CORE_BINEXTRA_MODULES}"
92 +TL_CORE_EXTRA_DOC_MODULES="tetex.doc gsftopk.doc texlive.infra.doc ${TL_CORE_BINEXTRA_DOC_MODULES}"
93 +TL_CORE_EXTRA_SRC_MODULES="${TL_CORE_BINEXTRA_SRC_MODULES}"
94 +
95 +for i in ${TL_CORE_EXTRA_MODULES}; do
96 + SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
97 +done
98 +
99 +SRC_URI="${SRC_URI} doc? ( "
100 +for i in ${TL_CORE_EXTRA_DOC_MODULES}; do
101 + SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
102 +done
103 +SRC_URI="${SRC_URI} )"
104 +SRC_URI="${SRC_URI} source? ( "
105 +for i in ${TL_CORE_EXTRA_SRC_MODULES}; do
106 + SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
107 +done
108 +SRC_URI="${SRC_URI} )"
109 +
110 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
111 +IUSE="cjk X doc source tk +luajittex xetex"
112 +
113 +TEXMF_PATH=/usr/share/texmf-dist
114 +
115 +MODULAR_X_DEPEND="X? (
116 + x11-libs/libX11
117 + x11-libs/libXmu
118 + )"
119 +
120 +COMMON_DEPEND="${MODULAR_X_DEPEND}
121 + sys-libs/zlib
122 + >=media-libs/libpng-1.2.43-r2:0=
123 + media-libs/gd[png]
124 + >=x11-libs/cairo-1.12
125 + >=x11-libs/pixman-0.18
126 + dev-libs/zziplib
127 + app-text/libpaper
128 + dev-libs/gmp:0
129 + dev-libs/mpfr:0=
130 + xetex? (
131 + >=media-libs/harfbuzz-1.4.5[icu,graphite]
132 + >=app-text/teckit-2.5.3
133 + media-libs/fontconfig
134 + media-gfx/graphite2
135 + )
136 + media-libs/freetype:2
137 + >=dev-libs/icu-50:=
138 + >=dev-libs/kpathsea-6.2.3
139 + cjk? ( >=dev-libs/ptexenc-1.3.7 )
140 + >=app-text/poppler-0.76.1:="
141 +
142 +BDEPEND="sys-apps/ed
143 + sys-devel/flex
144 + virtual/pkgconfig"
145 +
146 +DEPEND="${COMMON_DEPEND}"
147 +
148 +RDEPEND="${COMMON_DEPEND}
149 + >=app-text/ps2pkm-1.8_p20170524
150 + >=app-text/dvipsk-5.997
151 + >=dev-tex/bibtexu-3.71_p20170524
152 + virtual/perl-Getopt-Long
153 + tk? ( dev-perl/Tk )"
154 +
155 +S="${WORKDIR}/${P}_build"
156 +B="${WORKDIR}/${MY_P}"
157 +
158 +src_unpack() {
159 + unpack ${A}
160 + mkdir -p "${S}" || die "failed to create build dir"
161 +}
162 +
163 +RELOC_TARGET=texmf-dist
164 +
165 +src_prepare() {
166 + cd "${WORKDIR}" || die
167 +
168 + mv texlive.tlpdb tlpkg/ || die "failed to move texlive.tlpdb"
169 +
170 + # From texlive-module.eclass.
171 + grep -H RELOC tlpkg/tlpobj/* | awk '{print $2}' | sed 's#^RELOC/##' > "${T}/reloclist"
172 + { for i in $(<"${T}/reloclist"); do dirname $i; done; } | uniq > "${T}/dirlist"
173 + for i in $(<"${T}/dirlist"); do
174 + [ -d "${RELOC_TARGET}/${i}" ] || mkdir -p "${RELOC_TARGET}/${i}"
175 + done
176 + for i in $(<"${T}/reloclist"); do
177 + mv "${i}" "${RELOC_TARGET}"/$(dirname "${i}") || die "failed to relocate ${i} to ${RELOC_TARGET}/$(dirname ${i})"
178 + done
179 +
180 + mv "${WORKDIR}"/texmf* "${B}" || die "failed to move texmf files"
181 +
182 + cd "${B}" || die
183 +
184 + default
185 +
186 + # These we need unconditionally
187 + eapply "${WORKDIR}"/patches/{0001..0006}*.patch
188 +
189 + # Conditional poppler patching
190 + if has_version ">=app-text/poppler-0.83.0"; then
191 + eapply "${WORKDIR}"/patches/${P}-poppler083.patch
192 + else
193 + eapply "${WORKDIR}"/patches/${P}-poppler076.patch
194 + fi
195 +
196 + sed -i \
197 + -e "s,/usr/include /usr/local/include.*echo \$KPATHSEA_INCLUDES.*,${EPREFIX}/usr/include\"," \
198 + texk/web2c/configure || die
199 +
200 + elibtoolize
201 +}
202 +
203 +src_configure() {
204 + # It fails on alpha without this
205 + use alpha && append-ldflags "-Wl,--no-relax"
206 +
207 + # Too many regexps use A-Z a-z constructs, what causes problems with locales
208 + # that don't have the same alphabetical order than ascii. Bug #242430
209 + # So we set LC_ALL to C in order to avoid problems.
210 + export LC_ALL=C
211 +
212 + # Disable freetype-config as this is considered obsolete.
213 + # Also only pkg-config works for prefix as described in bug #690094
214 + export ac_cv_prog_ac_ct_FT2_CONFIG=no
215 +
216 + tc-export CC CXX AR RANLIB
217 + ECONF_SOURCE="${B}" \
218 + econf -C \
219 + --bindir="${EPREFIX}"/usr/bin \
220 + --datadir="${S}" \
221 + --with-system-freetype2 \
222 + --with-system-zlib \
223 + --with-system-libpng \
224 + --with-system-xpdf \
225 + --with-system-poppler \
226 + --with-system-teckit \
227 + --with-teckit-includes="${EPREFIX}"/usr/include/teckit \
228 + --with-system-kpathsea \
229 + --with-kpathsea-includes="${EPREFIX}"/usr/include \
230 + --with-system-icu \
231 + --with-system-ptexenc \
232 + --with-system-harfbuzz \
233 + --with-system-icu \
234 + --with-system-graphite2 \
235 + --with-system-cairo \
236 + --with-system-pixman \
237 + --with-system-zziplib \
238 + --with-system-libpaper \
239 + --with-system-gmp \
240 + --with-system-gd \
241 + --with-system-mpfr \
242 + --without-texinfo \
243 + --disable-dialog \
244 + --disable-multiplatform \
245 + --enable-epsfwin \
246 + --enable-mftalkwin \
247 + --enable-regiswin \
248 + --enable-tektronixwin \
249 + --enable-unitermwin \
250 + --with-ps=gs \
251 + --disable-psutils \
252 + --disable-t1utils \
253 + --enable-ipc \
254 + --disable-biber \
255 + --disable-bibtex-x \
256 + --disable-dvipng \
257 + --disable-dvipsk \
258 + --disable-chktex \
259 + --disable-lcdf-typetools \
260 + --disable-pdfopen \
261 + --disable-ps2eps \
262 + --disable-ps2pk \
263 + --disable-detex \
264 + --disable-ttf2pk2 \
265 + --disable-tex4htk \
266 + --disable-cjkutils \
267 + --disable-xdvik \
268 + --disable-xindy \
269 + --enable-luatex \
270 + --disable-dvi2tty \
271 + --disable-dvisvgm \
272 + --disable-vlna \
273 + --enable-shared \
274 + --disable-native-texlive-build \
275 + --disable-largefile \
276 + --disable-build-in-source-tree \
277 + --with-banner-add=" Gentoo Linux" \
278 + $(use_enable luajittex) \
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 +}
293 +
294 +src_compile() {
295 + tc-export CC CXX AR RANLIB
296 + emake AR="$(tc-getAR)" SHELL="${EPREFIX}"/bin/sh texmf="${EPREFIX}"${TEXMF_PATH:-/usr/share/texmf-dist}
297 +
298 + cd "${B}" || die
299 + # Mimic updmap --syncwithtrees to enable only fonts installed
300 + # Code copied from updmap script
301 + for i in `egrep '^(Mixed|Kanji)?Map' "texmf-dist/web2c/updmap.cfg" | sed 's@.* @@'`; do
302 + texlive-common_is_file_present_in_texmf "$i" || echo "$i"
303 + done > "${T}/updmap_update"
304 + {
305 + sed 's@/@\\/@g; s@^@/^MixedMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
306 + sed 's@/@\\/@g; s@^@/^Map[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
307 + sed 's@/@\\/@g; s@^@/^KanjiMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update"
308 + } > "${T}/updmap_update2"
309 + sed -f "${T}/updmap_update2" "texmf-dist/web2c/updmap.cfg" > "${T}/updmap_update3"\
310 + && cat "${T}/updmap_update3" > "texmf-dist/web2c/updmap.cfg"
311 +}
312 +
313 +src_install() {
314 + dodir ${TEXMF_PATH:-/usr/share/texmf-dist}/web2c
315 + emake DESTDIR="${D}" texmf="${ED}${TEXMF_PATH:-/usr/share/texmf-dist}" run_texlinks="true" run_mktexlsr="true" install
316 +
317 + cd "${B}" || die
318 + dodir /usr/share # just in case
319 + cp -pR texmf-dist "${ED}/usr/share/" || die "failed to install texmf trees"
320 + cp -pR "${WORKDIR}"/tlpkg "${ED}/usr/share/" || die "failed to install tlpkg files"
321 +
322 + # When X is disabled mf-nowin doesn't exist but some scripts expect it to
323 + # exist. Instead, it is called mf, so we symlink it to please everything.
324 + use X || dosym mf /usr/bin/mf-nowin
325 +
326 + docinto texk
327 + cd "${B}/texk" || die
328 + dodoc ChangeLog README
329 +
330 + docinto dviljk
331 + cd "${B}/texk/dviljk" || die
332 + dodoc ChangeLog README NEWS
333 +
334 + docinto makeindexk
335 + cd "${B}/texk/makeindexk" || die
336 + dodoc ChangeLog NOTES README
337 +
338 + docinto web2c
339 + cd "${B}/texk/web2c" || die
340 + dodoc ChangeLog NEWS PROJECTS README
341 +
342 + use doc || rm -rf "${ED}/usr/share/texmf-dist/doc"
343 +
344 + dodir /etc/env.d
345 + 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"
346 + # populate /etc/texmf
347 + keepdir /etc/texmf/web2c
348 +
349 + # take care of updmap.cfg and language.d files
350 + keepdir /etc/texmf/{updmap.d,language.dat.d,language.def.d,language.dat.lua.d}
351 +
352 + mv "${ED}${TEXMF_PATH}/web2c/updmap.cfg" "${ED}/etc/texmf/updmap.d/00updmap.cfg" || die "moving updmap.cfg failed"
353 +
354 + # Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files
355 + # by texmf-update
356 + rm -f "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf"
357 + # Remove bundled and invalid updmap.cfg
358 + rm -f "${ED}/usr/share/texmf-dist/web2c/updmap.cfg"
359 +
360 + texlive-common_handle_config_files
361 +
362 + keepdir /usr/share/texmf-site
363 +
364 + # the virtex symlink is not installed
365 + # The links has to be relative, since the targets
366 + # is not present at this stage and MacOS doesn't
367 + # like non-existing targets
368 + dosym tex /usr/bin/virtex
369 + dosym pdftex /usr/bin/pdfvirtex
370 +
371 + # Rename mpost to leave room for mplib
372 + mv "${ED}/usr/bin/mpost" "${ED}/usr/bin/mpost-${P}" || die
373 + dosym "mpost-${P}" /usr/bin/mpost
374 +
375 + # Ditto for pdftex
376 + mv "${ED}/usr/bin/pdftex" "${ED}/usr/bin/pdftex-${P}" || die
377 + dosym "pdftex-${P}" /usr/bin/pdftex
378 +}
379 +
380 +pkg_postinst() {
381 + etexmf-update
382 +
383 + einfo "Regenerating TeX formats"
384 + fmtutil-sys --all &> /dev/null
385 +
386 + elog
387 + elog "If you have configuration files in ${EPREFIX}/etc/texmf to merge,"
388 + elog "please update them and run ${EPREFIX}/usr/sbin/texmf-update."
389 + elog
390 + ewarn "If you are migrating from an older TeX distribution"
391 + ewarn "Please make sure you have read:"
392 + ewarn "https://wiki.gentoo.org/wiki/Project:TeX/Tex_Live_Migration_Guide"
393 + ewarn "in order to avoid possible problems"
394 +}