From 875833497bc1c790b4f268cf466a26158fefbab4 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 16 Jul 2024 11:04:47 +0200 Subject: app-text/texlive-core: add texlive-core-2023-r10 Signed-off-by: Florian Schmaus --- app-text/texlive-core/Manifest | 3 +- app-text/texlive-core/texlive-core-2023-r10.ebuild | 495 +++++++++++++++++++++ app-text/texlive-core/texlive-core-2023-r6.ebuild | 484 -------------------- 3 files changed, 497 insertions(+), 485 deletions(-) create mode 100644 app-text/texlive-core/texlive-core-2023-r10.ebuild delete mode 100644 app-text/texlive-core/texlive-core-2023-r6.ebuild diff --git a/app-text/texlive-core/Manifest b/app-text/texlive-core/Manifest index 02aecd9..1dfdf14 100644 --- a/app-text/texlive-core/Manifest +++ b/app-text/texlive-core/Manifest @@ -17,7 +17,7 @@ DIST dvipdfmx.doc.r69127.tar.xz 3125132 BLAKE2B b29cc6a2f1934fdeab678a5246154b1b DIST dvipdfmx.r69127.tar.xz 26704 BLAKE2B 7d2790d9aa6b994ab3619bd96ea6880e9243105001224d7bbadd130b03c7b8335fe751bdcbb90ef5ad92d60d3a80e63f0f152d50725a80cf1c78e45ab5c9245d SHA512 75703f600365c90379c5d009e00d35d2e514a76b2556c96c84fc2a717287441af419a26fc9ef087d111f2e77c7180f6371ca2ec33b66052ab63ca3d11f48e788 DIST dvipos.doc.r66186.tar.xz 28764 BLAKE2B 7bc90b21109d52375ffdfef601722d0d3bb36932556f8f29ae62cd4f62c2171da2cf08f9bec72f368711dea071cd15b09f3d3661a91013a086c3a6621abc8794 SHA512 254a1db41636608a133e7807a8d4ea8ddd99ac646f35b66a43205ac7fdaf4a15c21eafbb85e23a182506e509895776d1fcbe63b3b8a7f197d577c6405ece5c44 DIST dvipos.r66186.tar.xz 296 BLAKE2B 1560c5a795df9c095c8115e7f0296ffa3206dd2630a8cf2df9dd76aa2ae1c6b5f044d327c44d026bd94bf80d6bab12cf7da04ef5b7ccb3291762a495d8a4764c SHA512 9e949fb402facda9c30fa2f388b80f2cfc530670b33cbd78559e4449fa6004c5d4082e4fb895ea397a334a333e5d5ae1a4f66fde3885f0a9eb28c9d9ebbecd0a -DIST gentoo-tex-patches-3.tar.bz2 3860 BLAKE2B 048d1fb59909f0f319f7a77ca424dd48d1f879d7c97be5c683e6c76142d1a878705adfd3cd734e401bbf2cf319c7e539540781bd9ab0fc937b2c93e129e3ceac SHA512 6976ddf60b6b61fb04c04ddae1fcc98372047b7186a34cd531f0a5011b69310b598db89f216265d91e9a465fd4a4e7410920ae1373b378495beeeb537c73a17a +DIST gentoo-tex-patches-5.tar.bz2 4975 BLAKE2B fbf4115fe462cf7b5e1bf36b30e6c52ee0a8c32896f63b04684d43c768c26ce04dfcd4d8dee671afc480df8c83daeaa6625e58c22bc400f0fbfadbd7ff31ff8c SHA512 be93e7a1aa233ee40c10dcaafd0ff3d0dbd2b0211758187201de6433867249b8a807450cc57c89cf18df8e672f47a3ae36b39032145e56531dc1da19b557bf7a DIST gsftopk.doc.r52851.tar.xz 27540 BLAKE2B c6f3e6f01bf63616a66318fc652ae0e7cf08ac0e94eb9d31ec98058da77215fc8c84be7e885960eea70ff82d72533c5011a96136758f0159b7c17430aa835fc6 SHA512 0a597e2908438fc00fc2bafa7ec635a82b70aad9d7f7e86851a654c0b72b719b8c550be0c20ecf6c8d96627863a48e6a387156ad2c7e71d1e296dd4937d60805 DIST gsftopk.r52851.tar.xz 3548 BLAKE2B 65e455587ba7b014be3f7668225fd0f5b4816406896209929001cab5b61dd6b748120970dca79207117b6a5b07ff7c00f96aab6e540397405d075425f8a79a2b SHA512 cb9aebd7428d10b627d80ea40d297f3e6de006859c7dd713478ff193458494f90017ecd0737376ac1f47638b059e02e8a46ea53a7c56b8561af75f770e214413 DIST hyphen-base.r68321.tar.xz 22604 BLAKE2B b11b688304c3622c71ddbb38e9095e550871360418d176ab717bdc59954c0648636e5627f55180980e789efed918dfdbab55c25b1b95c8ab0467398b1b2592c4 SHA512 d3f2749cc6946702ff0d51c1d823531bc92b77c1106aec252c84cc8649aa56048556c90e9792f1b0749bba0b86b7c34aa2b04fe2946d1226315dbc73add36913 @@ -32,6 +32,7 @@ DIST pmx.r65926.tar.xz 10184 BLAKE2B 550140955d4033c258c7793c56846d8a0d235fcb2de DIST texdoctk.doc.r62186.tar.xz 30728 BLAKE2B 4878654c60e2fb3a1415f492894a3d956d86cdd6f8ebc337e4ec928a55ccd2b8c202a3c06b3c8687530a505f45e740eb33005e2cd4c2f65aa68ec77e3990ed31 SHA512 fb403dc17ad839ea64bcf6da84e59288a8745b5eb731051d7df8593138aa5d3b6891d56f52bdbe5c9a41e590f1f36db390e7e7a825d9aaf00d4fbc01c8dc16ba DIST texdoctk.r62186.tar.xz 26712 BLAKE2B 4076b8b227dc08762cd7880165fd4b1780f3ed34e0ba68b1b04ce542efd47aefc3f893d71da7dbc8122ebb45107480974da0631f16f849d2990a14cd2db74ce6 SHA512 f3300a088f5ecedfe66ca277f793d3565b5b0f111721a0d73a788d65b72f09d0103a11edda13679fb9e919f11ce9ed3662717c18e46be99a83b744a1f7ec88fe DIST texlive-20230311-source.tar.xz 68359984 BLAKE2B 6263e8d3e066db96f071138f2442b1ed7e1f3db7e6d261cdeb9a7e6e636c6e6ed45305c6bda3ab6f9a439c92eabf32a79bf6e371d16b747eebbc05ee47b85035 SHA512 93ac43f3055fee0103a6cfceea18d39ece63984914f3af9ad76da218f2d568852d9b987d1c9647c1497b985e4ffa297ef97dc2d50d3e90f62b03ad685af31d96 +DIST texlive-core-2023-pdflatex-big-endian-fix.patch 1162 BLAKE2B a440115cb804a9a9e48c068853fd38ab87d50ab23177283ea20304ea4c7a9f3ee3a4ae35ae2c95dd2a0c339352aeed91cb436bc461db2983d6911d6417c48bb6 SHA512 b17b209b09884f78fe47f2a5e5afd09bc7c7ca8a67a5b67c0ac0e9977ac352b7867ed8e35ff97925ff2af1c67f2c716f513ecd9389fb99c3ad9bf5d3bdebc570 DIST texlive-scripts-extra.doc.r62517.tar.xz 197196 BLAKE2B 80d2fd7b53ffbe21f975156cf0d5f52826faebc422d3e66c342c8237d7da27ba58b1ffc56f83a040ae4b4e870c8063c0d53392f9cc7e3bb3da30ebe5a258a40a SHA512 22cf59bf4dafc7ad9425086bc0aaedb2bf5f7d8aa6ea9c65abde2d523be37665b9c9bee4acb399857eae03613e7241ca1d6099f43cab77a95c10eced8813ad80 DIST texlive-scripts-extra.r62517.tar.xz 23540 BLAKE2B 85762b7a74f5132ec550033e08caef5f6fd145ef367475a1b3ebaccfefdcfb426f2e12e647e45a35daa2a44cf0c2fba8d6ed8afec88ed6fccee0cf7eb52c2c50 SHA512 46ac37826d3c60de6c9260bf83d6275d49a35cbde88fb03481a050f92e87b698e9a94b2e520a74edc0417419f5a2dee53000a529b9c81ea6f6244a83480e56e7 DIST texlive-scripts.doc.r69754.tar.xz 432212 BLAKE2B a1597fea1443974012eac8b0b060c770e5421ee08b8a8aea8c32c94abf153ae22cac29015e074ffd164e0c5c355034c0fefb673fa917ccf98afebb511492ccc5 SHA512 0a319e6864787c0b62a7f0fb389497a94449c6b420573805a1ba49fb11d0453f5727d2f44a935468cb6c7945d177a5ca828ef4209f717aeb5b21d2b523f21b82 diff --git a/app-text/texlive-core/texlive-core-2023-r10.ebuild b/app-text/texlive-core/texlive-core-2023-r10.ebuild new file mode 100644 index 0000000..4f20ff1 --- /dev/null +++ b/app-text/texlive-core/texlive-core-2023-r10.ebuild @@ -0,0 +1,495 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TL_SOURCE_VERSION=20230311 +inherit flag-o-matic toolchain-funcs libtool texlive-common + +MY_P=${PN%-core}-${TL_SOURCE_VERSION}-source + +DESCRIPTION="A complete TeX distribution" +HOMEPAGE="https://tug.org/texlive/" +SLOT="0" +LICENSE="BSD GPL-1+ GPL-2 GPL-2+ GPL-3+ MIT TeX-other-free" +GENTOO_TEX_PATCHES_NUM=5 +SRC_URI=" + https://mirrors.ctan.org/systems/texlive/Source/${MY_P}.tar.xz + https://gitweb.gentoo.org/proj/tex-patches.git/snapshot/tex-patches-${GENTOO_TEX_PATCHES_NUM}.tar.bz2 + -> gentoo-tex-patches-${GENTOO_TEX_PATCHES_NUM}.tar.bz2 + https://raw.githubusercontent.com/debian-tex/texlive-bin/58a00e704a15ec3dd8abbf3826f28207eb095251/debian/patches/1054218.patch + -> texlive-core-2023-pdflatex-big-endian-fix.patch +" + +# Macros that are not a part of texlive-sources or or pulled in from collection-binextra +# but still needed for other packages during installation. +TL_CORE_EXTRA_CONTENTS=" + autosp.r58211 + axodraw2.r58155 + chktex.r64797 + detex.r66186 + dvi2tty.r66186 + dvidvi.r65952 + dviljk.r66186 + dvipdfmx.r69127 + dvipos.r66186 + gsftopk.r52851 + hyphen-base.r68321 + lacheck.r66186 + m-tx.r64182 + makeindex.r62517 + pmx.r65926 + texdoctk.r62186 + texlive-scripts.r69754 + texlive-scripts-extra.r62517 + texlive.infra.r69740 + tpic2pdftex.r52851 + upmendex.r66381 + velthuis.r66186 + vlna.r66186 + xindy.r65958 + xml2pmx.r57972 +" +TL_CORE_EXTRA_DOC_CONTENTS=" + autosp.doc.r58211 + axodraw2.doc.r58155 + chktex.doc.r64797 + detex.doc.r66186 + dvi2tty.doc.r66186 + dvidvi.doc.r65952 + dviljk.doc.r66186 + dvipdfmx.doc.r69127 + dvipos.doc.r66186 + gsftopk.doc.r52851 + lacheck.doc.r66186 + m-tx.doc.r64182 + makeindex.doc.r62517 + pmx.doc.r65926 + texdoctk.doc.r62186 + texlive-scripts.doc.r69754 + texlive-scripts-extra.doc.r62517 + texlive.infra.doc.r69740 + tpic2pdftex.doc.r52851 + upmendex.doc.r66381 + velthuis.doc.r66186 + vlna.doc.r66186 + xindy.doc.r65958 + xml2pmx.doc.r57972 +" +TL_CORE_EXTRA_SRC_CONTENTS=" + axodraw2.source.r58155 +" + +TEXLIVE_MODULE_BINSCRIPTS=" + texmf-dist/scripts/m-tx/m-tx.lua + texmf-dist/scripts/texlive/fmtutil-sys.sh + texmf-dist/scripts/texlive/fmtutil-user.sh + texmf-dist/scripts/texlive/fmtutil.pl + texmf-dist/scripts/texlive/mktexlsr + texmf-dist/scripts/texlive/mktexmf + texmf-dist/scripts/texlive/mktexpk + texmf-dist/scripts/texlive/mktextfm + texmf-dist/scripts/texlive/rungs.lua + texmf-dist/scripts/texlive/tlmgr.pl + texmf-dist/scripts/texlive/updmap-sys.sh + texmf-dist/scripts/texlive/updmap-user.sh + texmf-dist/scripts/texlive/updmap.pl + texmf-dist/scripts/texlive-extra/allcm.sh + texmf-dist/scripts/texlive-extra/allneeded.sh + texmf-dist/scripts/texlive-extra/dvi2fax.sh + texmf-dist/scripts/texlive-extra/dvired.sh + texmf-dist/scripts/texlive-extra/e2pall.pl + texmf-dist/scripts/texlive-extra/kpsetool.sh + texmf-dist/scripts/texlive-extra/kpsewhere.sh + texmf-dist/scripts/texlive-extra/ps2frag.sh + texmf-dist/scripts/texlive-extra/pslatex.sh + texmf-dist/scripts/texlive-extra/texconfig-dialog.sh + texmf-dist/scripts/texlive-extra/texconfig-sys.sh + texmf-dist/scripts/texlive-extra/texconfig.sh + texmf-dist/scripts/texlive-extra/texlinks.sh +" + +TEXLIVE_MODULE_BINLINKS=" + fmtutil:mktexfmt + mktexlsr:texhash + allcm:allec + kpsetool:kpsexpand + kpsetool:kpsepath +" +texlive-common_append_to_src_uri TL_CORE_EXTRA_CONTENTS + +SRC_URI+=" doc? ( " +texlive-common_append_to_src_uri TL_CORE_EXTRA_DOC_CONTENTS +SRC_URI+=" )" + +SRC_URI+=" source? ( " +texlive-common_append_to_src_uri TL_CORE_EXTRA_SRC_CONTENTS +SRC_URI+=" )" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="cjk X doc source tk +luajittex xetex xindy" + +TEXMF_PATH=/usr/share/texmf-dist +MODULAR_X_DEPEND=" + X? ( + x11-libs/libX11 + x11-libs/libXmu + )" + +COMMON_DEPEND=" + ${MODULAR_X_DEPEND} + sys-libs/zlib + >=media-libs/harfbuzz-1.4.5:=[icu,graphite] + >=media-libs/libpng-1.2.43-r2:0= + media-libs/gd[png] + media-gfx/graphite2:= + media-gfx/potrace:= + >=x11-libs/cairo-1.12 + >=x11-libs/pixman-0.18 + dev-libs/zziplib:= + app-text/libpaper:= + dev-libs/gmp:= + dev-libs/mpfr:= + >=dev-libs/ptexenc-1.4.3 + xetex? ( + >=app-text/teckit-2.5.10 + media-libs/fontconfig + ) + xindy? ( dev-lisp/clisp:= ) + media-libs/freetype:2 + >=dev-libs/icu-50:= + >=dev-libs/kpathsea-6.3.5:= +" + +BDEPEND=" + sys-apps/ed + sys-devel/flex + virtual/pkgconfig +" + +DEPEND=" + ${COMMON_DEPEND} +" + +# ! "${T}/reloclist" || die + sed -e 's/\/[^/]*$//' -e "s:^:${RELOC_TARGET}/:" "${T}/reloclist" | + sort -u | + xargs mkdir -p || die + local i + while read -r i; do + mv "${i}" "${RELOC_TARGET}/${i%/*}" || die + done < "${T}/reloclist" + mv "${WORKDIR}"/texmf* "${S}" || die "failed to move texmf files" + + cd "${S}" || die + + TL_KPATHSEA_INCLUDES=$($(tc-getPKG_CONFIG) kpathsea --variable=includedir || die "failed to invoke pkg-config") + sed -i \ + -e "s,/usr/include /usr/local/include.*echo \$KPATHSEA_INCLUDES.*,${TL_KPATHSEA_INCLUDES}\"," \ + texk/web2c/configure || die + + local patch_dir="${WORKDIR}/tex-patches-${GENTOO_TEX_PATCHES_NUM}" + eapply "${patch_dir}" + + # Can be dropped in texlive 2024 + # https://git.texlive.info/texlive/commit/?id=c45afdc843154fcb09b583f54a2f802c6069b50e + eapply "${DISTDIR}"/texlive-core-2023-pdflatex-big-endian-fix.patch + + default + + elibtoolize + + # Drop this once cairo's autoconf patches are gone. See + # https://bugs.gentoo.org/927714#c4 and https://bugs.gentoo.org/853121. + "${S}"/reautoconf libs/cairo || die +} + +src_configure() { + # TODO: report upstream + # bug #915223 + append-flags -fno-strict-aliasing + filter-lto + + # It fails on alpha without this + use alpha && append-ldflags "-Wl,--no-relax" + + # Too many regexps use A-Z a-z constructs, what causes problems with locales + # that don't have the same alphabetical order than ascii. Bug #242430 + # So we set LC_ALL to C in order to avoid problems. + export LC_ALL=C + + # Disable freetype-config as this is considered obsolete. + # Also only pkg-config works for prefix as described in bug #690094 + export ac_cv_prog_ac_ct_FT2_CONFIG=no + + local my_conf=( + --bindir="${EPREFIX}"/usr/bin + --datadir="${BUILDDIR}" + --with-system-freetype2 + --with-system-zlib + --with-system-libpng + --with-system-teckit + --with-system-kpathsea + --with-kpathsea-includes="${TL_KPATHSEA_INCLUDES}" + --with-system-icu + --with-system-ptexenc + --with-system-harfbuzz + --with-system-graphite2 + --with-system-cairo + --with-system-pixman + --with-system-zziplib + --with-system-libpaper + --with-system-gmp + --with-system-gd + --with-system-mpfr + --with-system-potrace + --disable-multiplatform + --enable-chktex + --enable-epsfwin + --enable-detex + --enable-dvi2tty + --enable-mftalkwin + --enable-regiswin + --enable-shared + --enable-tektronixwin + --enable-unitermwin + --enable-vlna + --disable-psutils + --disable-t1utils + --enable-ipc + --disable-bibtex-x + --disable-dvipng + --disable-dvipsk + --disable-lcdf-typetools + --disable-ps2pk + --disable-ttf2pk2 + --disable-tex4htk + --disable-cjkutils + --disable-xdvik + --enable-luatex + --disable-dvisvgm + --disable-ps2eps + --disable-static + --disable-native-texlive-build + --disable-largefile + --disable-xindy-docs + --disable-xindy-rules + --with-banner-add=" Gentoo Linux" + $(use_enable luajittex) + $(use_enable luajittex luajithbtex) + $(use_enable luajittex mfluajit) + $(use_enable xetex) + $(use_enable cjk dviout-util) + $(use_enable cjk ptex) + $(use_enable cjk eptex) + $(use_enable cjk uptex) + $(use_enable cjk euptex) + $(use_enable cjk mendexk) + $(use_enable cjk makejvf) + $(use_enable cjk pmp) + $(use_enable cjk upmp) + $(use_enable tk texdoctk) + $(use_with X x) + $(use_enable xindy) + --enable-ptex=no + --enable-autosp=yes + --enable-axodraw2=yes + --enable-devnag=yes + --enable-lacheck=yes + --enable-m-tx=yes + --enable-pmx=yes + --enable-tpic2pdftex=yes + --with-clisp-runtime=system + --enable-xml2pmx=yes + $(use_enable X xpdfopen) + --enable-web2c=yes + --enable-afm2pl=yes + --enable-dvidvi=yes + --enable-dviljk=yes + --enable-dvipdfm-x + --enable-dvipos=yes + --enable-gregorio=yes + --enable-gsftopk=yes + --enable-makeindexk=yes + --enable-musixtnt=yes + --enable-seetexk=yes + --enable-ttfdump=yes + --enable-upmendex=yes + --enable-texlive=yes + --enable-linked-scripts=no + # web2c afm2pl chktex dtl dvi2tty dvidvi dviljk dviout-util dvipdfm-x gregorio + ) + + # Enable the following on version bumps. While it makes the build + # always fail, presumably because texlive passes these configure + # options to sub-configures, it still points out dropped + # options. See https://bugs.gentoo.org/828591 + my_conf+=( + # --enable-option-checking=fatal + ) + + tc-export CC CXX AR RANLIB + cd "${BUILDDIR}" || die + ECONF_SOURCE="${S}" \ + econf -C "${my_conf[@]}" +} + +src_compile() { + cd "${BUILDDIR}" || die + tc-export CC CXX AR RANLIB + + emake AR="$(tc-getAR)" SHELL="${EPREFIX}"/bin/sh texmf="${EPREFIX}"${TEXMF_PATH:-/usr/share/texmf-dist} + + cd "${S}" || die + # Mimic updmap --syncwithtrees to enable only fonts installed + # Code copied from updmap script + while read -r i; do + texlive-common_is_file_present_in_texmf "${i}" || echo "${i}" + done > "${T}/updmap_update" < <(grep -E '^(Mixed|Kanji)?Map' "texmf-dist/web2c/updmap.cfg" | sed 's@.* @@') + { + sed 's@/@\\/@g; s@^@/^MixedMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update" + sed 's@/@\\/@g; s@^@/^Map[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update" + sed 's@/@\\/@g; s@^@/^KanjiMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update" + } > "${T}/updmap_update2" + sed -f "${T}/updmap_update2" "texmf-dist/web2c/updmap.cfg" > "${T}/updmap_update3"\ + && cat "${T}/updmap_update3" > "texmf-dist/web2c/updmap.cfg" +} + +src_test() { + cd "${BUILDDIR}" || die + + sed -i \ + -e 's;uptexdir/nissya.test;;' \ + -e 's;uptexdir/upbibtex.test;;' \ + texk/web2c/Makefile || die + sed -i \ + -e 's;dvispc.test;;' \ + texk/dviout-util/Makefile || die + + emake check +} + +src_install() { + cd "${BUILDDIR}" || die + dodir ${TEXMF_PATH:-/usr/share/texmf-dist}/web2c + + emake DESTDIR="${D}" texmf="${ED}${TEXMF_PATH:-/usr/share/texmf-dist}" run_texlinks="true" run_mktexlsr="true" install + + cd "${S}" || die + dodir /usr/share # just in case + cp -pR texmf-dist "${ED}/usr/share/" || die "failed to install texmf trees" + cp -pR "${WORKDIR}"/tlpkg "${ED}/usr/share/" || die "failed to install tlpkg files" + + # When X is disabled mf-nowin doesn't exist but some scripts expect it to + # exist. Instead, it is called mf, so we symlink it to please everything. + use X || dosym mf /usr/bin/mf-nowin + + docinto texk + cd "${S}/texk" || die + dodoc ChangeLog README + + docinto dviljk + cd "${S}/texk/dviljk" || die + dodoc ChangeLog README NEWS + + docinto makeindexk + cd "${S}/texk/makeindexk" || die + dodoc ChangeLog NOTES README + + docinto web2c + cd "${S}/texk/web2c" || die + dodoc ChangeLog NEWS PROJECTS README + + use doc || rm -rf "${ED}/usr/share/texmf-dist/doc" + + dodir /etc/env.d + 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" + # populate /etc/texmf + keepdir /etc/texmf/web2c + + # take care of updmap.cfg and language.d files + keepdir /etc/texmf/{updmap.d,language.dat.d,language.def.d,language.dat.lua.d} + + mv "${ED}${TEXMF_PATH}/web2c/updmap.cfg" "${ED}/etc/texmf/updmap.d/00updmap.cfg" || die "moving updmap.cfg failed" + + # Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files + # by texmf-update + rm "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf" || die + + if use cjk; then + rm "${ED}/usr/bin/"{,u}ptex || die + fi + + if ! use xindy; then + rm -rf "${ED}{TEXMF_PATH}"/{,scripts,doc}/xindy + rm "${ED}"/usr/share/tlpkg/tlpobj/xindy.* || die + fi + + dobin_texmf_scripts ${TEXLIVE_MODULE_BINSCRIPTS} + + dodir "/usr/bin" + for i in ${TEXLIVE_MODULE_BINLINKS} ; do + [[ -f ${ED}/usr/bin/${i%:*} ]] || die "Trying to install an invalid BINLINK ${i%:*}. This should not happen. Please file a bug." + + dosym "${i%:*}" "/usr/bin/${i#*:}" + done + + texlive-common_handle_config_files + + # the virtex symlink is not installed + # The links has to be relative, since the targets + # is not present at this stage and MacOS doesn't + # like non-existing targets + dosym tex /usr/bin/virtex + dosym pdftex /usr/bin/pdfvirtex + + find "${ED}" -name '*.la' -delete || die +} + +pkg_postinst() { + # Note that the etexmf-update and efmtutil-sys use nonfatal. We are + # pkg_postinst, so invoking die will merely print an error message + # but not abort the installation as it already happened. However, + # unlike the texlive modules, we observed fmtutil-sys failures in + # texlive-core. + + # TODO: Research the rationale of calling etexmf-update and + # eftmutil-sys here and the reasons why it sometimes fails. + nonfatal etexmf-update + nonfatal efmtutil-sys + + texlive-common_update_tlpdb +} + +pkg_postrm() { + texlive-common_update_tlpdb +} diff --git a/app-text/texlive-core/texlive-core-2023-r6.ebuild b/app-text/texlive-core/texlive-core-2023-r6.ebuild deleted file mode 100644 index 4c3cc6a..0000000 --- a/app-text/texlive-core/texlive-core-2023-r6.ebuild +++ /dev/null @@ -1,484 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" - -TL_SOURCE_VERSION=20230311 -inherit flag-o-matic toolchain-funcs libtool texlive-common - -MY_P=${PN%-core}-${TL_SOURCE_VERSION}-source - -DESCRIPTION="A complete TeX distribution" -HOMEPAGE="https://tug.org/texlive/" -SLOT="0" -LICENSE="BSD GPL-1 GPL-2 GPL-2+ GPL-3+ MIT TeX-other-free" -GENTOO_TEX_PATCHES_NUM=3 -SRC_URI=" - https://mirrors.ctan.org/systems/texlive/Source/${MY_P}.tar.xz - https://gitweb.gentoo.org/proj/tex-patches.git/snapshot/tex-patches-${GENTOO_TEX_PATCHES_NUM}.tar.bz2 - -> gentoo-tex-patches-${GENTOO_TEX_PATCHES_NUM}.tar.bz2 -" - -# Macros that are not a part of texlive-sources or or pulled in from collection-binextra -# but still needed for other packages during installation. -TL_CORE_EXTRA_CONTENTS=" - autosp.r58211 - axodraw2.r58155 - chktex.r64797 - detex.r66186 - dvi2tty.r66186 - dvidvi.r65952 - dviljk.r66186 - dvipdfmx.r69127 - dvipos.r66186 - gsftopk.r52851 - hyphen-base.r68321 - lacheck.r66186 - m-tx.r64182 - makeindex.r62517 - pmx.r65926 - texdoctk.r62186 - texlive-scripts.r69754 - texlive-scripts-extra.r62517 - texlive.infra.r69740 - tpic2pdftex.r52851 - upmendex.r66381 - velthuis.r66186 - vlna.r66186 - xindy.r65958 - xml2pmx.r57972 -" -TL_CORE_EXTRA_DOC_CONTENTS=" - autosp.doc.r58211 - axodraw2.doc.r58155 - chktex.doc.r64797 - detex.doc.r66186 - dvi2tty.doc.r66186 - dvidvi.doc.r65952 - dviljk.doc.r66186 - dvipdfmx.doc.r69127 - dvipos.doc.r66186 - gsftopk.doc.r52851 - lacheck.doc.r66186 - m-tx.doc.r64182 - makeindex.doc.r62517 - pmx.doc.r65926 - texdoctk.doc.r62186 - texlive-scripts.doc.r69754 - texlive-scripts-extra.doc.r62517 - texlive.infra.doc.r69740 - tpic2pdftex.doc.r52851 - upmendex.doc.r66381 - velthuis.doc.r66186 - vlna.doc.r66186 - xindy.doc.r65958 - xml2pmx.doc.r57972 -" -TL_CORE_EXTRA_SRC_CONTENTS=" - axodraw2.source.r58155 -" - -TEXLIVE_MODULE_BINSCRIPTS=" - texmf-dist/scripts/m-tx/m-tx.lua - texmf-dist/scripts/texlive/fmtutil-sys.sh - texmf-dist/scripts/texlive/fmtutil-user.sh - texmf-dist/scripts/texlive/fmtutil.pl - texmf-dist/scripts/texlive/mktexlsr - texmf-dist/scripts/texlive/mktexlsr.pl - texmf-dist/scripts/texlive/mktexmf - texmf-dist/scripts/texlive/mktexpk - texmf-dist/scripts/texlive/mktextfm - texmf-dist/scripts/texlive/rungs.lua - texmf-dist/scripts/texlive/tlmgr.pl - texmf-dist/scripts/texlive/updmap-sys.sh - texmf-dist/scripts/texlive/updmap-user.sh - texmf-dist/scripts/texlive/updmap.pl - texmf-dist/scripts/texlive-extra/allcm.sh - texmf-dist/scripts/texlive-extra/allneeded.sh - texmf-dist/scripts/texlive-extra/dvi2fax.sh - texmf-dist/scripts/texlive-extra/dvired.sh - texmf-dist/scripts/texlive-extra/e2pall.pl - texmf-dist/scripts/texlive-extra/kpsetool.sh - texmf-dist/scripts/texlive-extra/kpsewhere.sh - texmf-dist/scripts/texlive-extra/ps2frag.sh - texmf-dist/scripts/texlive-extra/pslatex.sh - texmf-dist/scripts/texlive-extra/texconfig-dialog.sh - texmf-dist/scripts/texlive-extra/texconfig-sys.sh - texmf-dist/scripts/texlive-extra/texconfig.sh - texmf-dist/scripts/texlive-extra/texlinks.sh -" - -TEXLIVE_MODULE_BINLINKS=" - fmtutil:mktexfmt - mktexlsr:texhash - allcm:allec - kpsetool:kpsexpand - kpsetool:kpsepath -" -texlive-common_append_to_src_uri TL_CORE_EXTRA_CONTENTS - -SRC_URI+=" doc? ( " -texlive-common_append_to_src_uri TL_CORE_EXTRA_DOC_CONTENTS -SRC_URI+=" )" - -SRC_URI+=" source? ( " -texlive-common_append_to_src_uri TL_CORE_EXTRA_SRC_CONTENTS -SRC_URI+=" )" - -KEYWORDS="~amd64 ~arm64 ~ppc ~riscv ~x86" -IUSE="cjk X doc source tk +luajittex xetex xindy" - -TEXMF_PATH=/usr/share/texmf-dist -MODULAR_X_DEPEND=" - X? ( - x11-libs/libX11 - x11-libs/libXmu - )" - -COMMON_DEPEND=" - ${MODULAR_X_DEPEND} - !app-text/epspdf - !app-text/pdfjam - sys-libs/zlib - >=media-libs/harfbuzz-1.4.5:=[icu,graphite] - >=media-libs/libpng-1.2.43-r2:0= - media-libs/gd[png] - media-gfx/graphite2:= - media-gfx/potrace:= - >=x11-libs/cairo-1.12 - >=x11-libs/pixman-0.18 - dev-libs/zziplib:= - app-text/libpaper:= - dev-libs/gmp:= - dev-libs/mpfr:= - >=dev-libs/ptexenc-1.4.3 - xetex? ( - >=app-text/teckit-2.5.10 - media-libs/fontconfig - ) - xindy? ( dev-lisp/clisp:= ) - media-libs/freetype:2 - >=dev-libs/icu-50:= - >=dev-libs/kpathsea-6.3.5:= -" - -BDEPEND=" - sys-apps/ed - sys-devel/flex - virtual/pkgconfig -" - -DEPEND=" - ${COMMON_DEPEND} -" - -# ! "${T}/reloclist" || die - sed -e 's/\/[^/]*$//' -e "s:^:${RELOC_TARGET}/:" "${T}/reloclist" | - sort -u | - xargs mkdir -p || die - local i - while read -r i; do - mv "${i}" "${RELOC_TARGET}/${i%/*}" || die - done < "${T}/reloclist" - mv "${WORKDIR}"/texmf* "${S}" || die "failed to move texmf files" - - cd "${S}" || die - - TL_KPATHSEA_INCLUDES=$($(tc-getPKG_CONFIG) kpathsea --variable=includedir || die "failed to invoke pkg-config") - sed -i \ - -e "s,/usr/include /usr/local/include.*echo \$KPATHSEA_INCLUDES.*,${TL_KPATHSEA_INCLUDES}\"," \ - texk/web2c/configure || die - - local patch_dir="${WORKDIR}/tex-patches-${GENTOO_TEX_PATCHES_NUM}" - eapply "${patch_dir}" - - default - - elibtoolize - - # Drop this once cairo's autoconf patches are gone. See - # https://bugs.gentoo.org/927714#c4 and https://bugs.gentoo.org/853121. - "${S}"/reautoconf libs/cairo || die -} - -src_configure() { - # TODO: report upstream - # bug #915223 - append-flags -fno-strict-aliasing - filter-lto - - # It fails on alpha without this - use alpha && append-ldflags "-Wl,--no-relax" - - # Too many regexps use A-Z a-z constructs, what causes problems with locales - # that don't have the same alphabetical order than ascii. Bug #242430 - # So we set LC_ALL to C in order to avoid problems. - export LC_ALL=C - - # Disable freetype-config as this is considered obsolete. - # Also only pkg-config works for prefix as described in bug #690094 - export ac_cv_prog_ac_ct_FT2_CONFIG=no - - local my_conf=( - --bindir="${EPREFIX}"/usr/bin - --datadir="${BUILDDIR}" - --with-system-freetype2 - --with-system-zlib - --with-system-libpng - --with-system-teckit - --with-system-kpathsea - --with-kpathsea-includes="${TL_KPATHSEA_INCLUDES}" - --with-system-icu - --with-system-ptexenc - --with-system-harfbuzz - --with-system-graphite2 - --with-system-cairo - --with-system-pixman - --with-system-zziplib - --with-system-libpaper - --with-system-gmp - --with-system-gd - --with-system-mpfr - --with-system-potrace - --disable-multiplatform - --enable-chktex - --enable-epsfwin - --enable-detex - --enable-dvi2tty - --enable-mftalkwin - --enable-regiswin - --enable-shared - --enable-tektronixwin - --enable-unitermwin - --enable-vlna - --disable-psutils - --disable-t1utils - --enable-ipc - --disable-bibtex-x - --disable-dvipng - --disable-dvipsk - --disable-lcdf-typetools - --disable-ps2pk - --disable-ttf2pk2 - --disable-tex4htk - --disable-cjkutils - --disable-xdvik - --enable-luatex - --disable-dvisvgm - --disable-ps2eps - --disable-static - --disable-native-texlive-build - --disable-largefile - --disable-xindy-docs - --disable-xindy-rules - --with-banner-add=" Gentoo Linux" - $(use_enable luajittex) - $(use_enable luajittex luajithbtex) - $(use_enable luajittex mfluajit) - $(use_enable xetex) - $(use_enable cjk dviout-util) - $(use_enable cjk ptex) - $(use_enable cjk eptex) - $(use_enable cjk uptex) - $(use_enable cjk euptex) - $(use_enable cjk mendexk) - $(use_enable cjk makejvf) - $(use_enable cjk pmp) - $(use_enable cjk upmp) - $(use_enable tk texdoctk) - $(use_with X x) - $(use_enable xindy) - --enable-ptex=no - --enable-autosp=yes - --enable-axodraw2=yes - --enable-devnag=yes - --enable-lacheck=yes - --enable-m-tx=yes - --enable-pmx=yes - --enable-tpic2pdftex=yes - --with-clisp-runtime=system - --enable-xml2pmx=yes - $(use_enable X xpdfopen) - --enable-web2c=yes - --enable-afm2pl=yes - --enable-dvidvi=yes - --enable-dviljk=yes - --enable-dvipdfm-x - --enable-dvipos=yes - --enable-gregorio=yes - --enable-gsftopk=yes - --enable-makeindexk=yes - --enable-musixtnt=yes - --enable-seetexk=yes - --enable-ttfdump=yes - --enable-upmendex=yes - --enable-texlive=yes - --enable-linked-scripts=no - # web2c afm2pl chktex dtl dvi2tty dvidvi dviljk dviout-util dvipdfm-x gregorio - ) - - # Enable the following on version bumps. While it makes the build - # always fail, presumably because texlive passes these configure - # options to sub-configures, it still points out dropped - # options. See https://bugs.gentoo.org/828591 - my_conf+=( - # --enable-option-checking=fatal - ) - - tc-export CC CXX AR RANLIB - cd "${BUILDDIR}" || die - ECONF_SOURCE="${S}" \ - econf -C "${my_conf[@]}" -} - -src_compile() { - cd "${BUILDDIR}" || die - tc-export CC CXX AR RANLIB - - emake AR="$(tc-getAR)" SHELL="${EPREFIX}"/bin/sh texmf="${EPREFIX}"${TEXMF_PATH:-/usr/share/texmf-dist} - - cd "${S}" || die - # Mimic updmap --syncwithtrees to enable only fonts installed - # Code copied from updmap script - while read -r i; do - texlive-common_is_file_present_in_texmf "${i}" || echo "${i}" - done > "${T}/updmap_update" < <(grep -E '^(Mixed|Kanji)?Map' "texmf-dist/web2c/updmap.cfg" | sed 's@.* @@') - { - sed 's@/@\\/@g; s@^@/^MixedMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update" - sed 's@/@\\/@g; s@^@/^Map[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update" - sed 's@/@\\/@g; s@^@/^KanjiMap[ ]*@; s@$@$/s/^/#! /@' <"${T}/updmap_update" - } > "${T}/updmap_update2" - sed -f "${T}/updmap_update2" "texmf-dist/web2c/updmap.cfg" > "${T}/updmap_update3"\ - && cat "${T}/updmap_update3" > "texmf-dist/web2c/updmap.cfg" -} - -src_install() { - cd "${BUILDDIR}" || die - dodir ${TEXMF_PATH:-/usr/share/texmf-dist}/web2c - - emake DESTDIR="${D}" texmf="${ED}${TEXMF_PATH:-/usr/share/texmf-dist}" run_texlinks="true" run_mktexlsr="true" install - - cd "${S}" || die - dodir /usr/share # just in case - cp -pR texmf-dist "${ED}/usr/share/" || die "failed to install texmf trees" - cp -pR "${WORKDIR}"/tlpkg "${ED}/usr/share/" || die "failed to install tlpkg files" - - # When X is disabled mf-nowin doesn't exist but some scripts expect it to - # exist. Instead, it is called mf, so we symlink it to please everything. - use X || dosym mf /usr/bin/mf-nowin - - docinto texk - cd "${S}/texk" || die - dodoc ChangeLog README - - docinto dviljk - cd "${S}/texk/dviljk" || die - dodoc ChangeLog README NEWS - - docinto makeindexk - cd "${S}/texk/makeindexk" || die - dodoc ChangeLog NOTES README - - docinto web2c - cd "${S}/texk/web2c" || die - dodoc ChangeLog NEWS PROJECTS README - - use doc || rm -rf "${ED}/usr/share/texmf-dist/doc" - - dodir /etc/env.d - 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" - # populate /etc/texmf - keepdir /etc/texmf/web2c - - # take care of updmap.cfg and language.d files - keepdir /etc/texmf/{updmap.d,language.dat.d,language.def.d,language.dat.lua.d} - - mv "${ED}${TEXMF_PATH}/web2c/updmap.cfg" "${ED}/etc/texmf/updmap.d/00updmap.cfg" || die "moving updmap.cfg failed" - - # Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files - # by texmf-update - rm "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf" || die - - if use cjk; then - rm "${ED}/usr/bin/"{,u}ptex || die - fi - - if ! use xindy; then - rm -rf "${ED}{TEXMF_PATH}"/{,scripts,doc}/xindy - rm "${ED}"/usr/share/tlpkg/tlpobj/xindy.* || die - fi - - dobin_texmf_scripts ${TEXLIVE_MODULE_BINSCRIPTS} - - dodir "/usr/bin" - for i in ${TEXLIVE_MODULE_BINLINKS} ; do - [[ -f ${ED}/usr/bin/${i%:*} ]] || die "Trying to install an invalid BINLINK ${i%:*}. This should not happen. Please file a bug." - - dosym "${i%:*}" "/usr/bin/${i#*:}" - done - - # https://bugs.gentoo.org/832139 - rm "${ED}"/usr/bin/tlmgr || die - - texlive-common_handle_config_files - - # the virtex symlink is not installed - # The links has to be relative, since the targets - # is not present at this stage and MacOS doesn't - # like non-existing targets - dosym tex /usr/bin/virtex - dosym pdftex /usr/bin/pdfvirtex - - find "${ED}" -name '*.la' -delete || die -} - -pkg_postinst() { - # Note that the etexmf-update and efmtutil-sys use nonfatal. We are - # pkg_postinst, so invoking die will merely print an error message - # but not abort the installation as it already happened. However, - # unlike the texlive modules, we observed fmtutil-sys failures in - # texlive-core. - - # TODO: Research the rationale of calling etexmf-update and - # eftmutil-sys here and the reasons why it sometimes fails. - nonfatal etexmf-update - nonfatal efmtutil-sys - - texlive-common_update_tlpdb -} - -pkg_postrm() { - texlive-common_update_tlpdb -} -- cgit v1.2.3-65-gdbad