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