commit:     fcf4ed88aa06db4717d827e5586b876fc10f739a
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Mon Dec  5 14:34:47 2016 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Mon Dec  5 14:35:01 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcf4ed88

app-text/texlive-core: apply debian patch to fix unsafe /tmp usage. Bug #432144.

Package-Manager: portage-2.3.3

 app-text/texlive-core/Manifest                    |   1 +
 app-text/texlive-core/texlive-core-2015-r1.ebuild | 347 ++++++++++++++++++++++
 2 files changed, 348 insertions(+)

diff --git a/app-text/texlive-core/Manifest b/app-text/texlive-core/Manifest
index b44459b..f9b5b41 100644
--- a/app-text/texlive-core/Manifest
+++ b/app-text/texlive-core/Manifest
@@ -11,6 +11,7 @@ DIST texlive-core-patches-48.tar.xz 3528 SHA256 
521bffc6a9d3a79fe157855f6a58954b
 DIST texlive-core-patches-49.tar.xz 2796 SHA256 
2c17e0b8d24dd007e86ff7fbe7ef14d42f1b5287e08c133ab2c5c82cedc16709 SHA512 
4faf0b9653b9a5335e4b210d15200b4118245687ff12e617f181bdece5d2b5cd827247fc72bdc304722f72d8f017804b8026300a9be18f7663749ddc82c7bb17
 WHIRLPOOL 
8145a9d5d4fa2713a1aaf0e51f546a20a844d1a12306d7f2b82e66ece961edafd34f9e6aebfc3f3110a23366dc1d43a13cc4fa7fc69c9f67fd300c55f7bb7b92
 DIST texlive-core-patches-50.tar.xz 4632 SHA256 
417d50014d1701bb75aee0cfcae95716926fefdc7d0057c9784ba68bd1eab2e4 SHA512 
f8fab7940b417b7065c9c467f7a9612e161a1a44db50a4523ee4a092ba381f7580adf1c3d75375165795dfc3f23d005028d67351815481dbdbd6edb13f376b64
 WHIRLPOOL 
9611be98c2fe494c1d354a23a1c1dfcaf30ca9e6f321056dbe34b99eef64dc8fbcc59428cf5ef8099584968b0b574d0e3e6acac87e37c5583e78eb87f87733b6
 DIST texlive-core-patches-51.tar.xz 3040 SHA256 
7edcc57ba831f040a5fcd07080c6e197955c9b979c81c6722c3914fff9ed9a03 SHA512 
a1b7132bf25ab0e374e232351cbe64f509a7aab4e795b2d1fb03cd59f7dd0ed87f34c4ee5058dcb544f4b6d7e50d1cf22db29fbb65bde8fe213963856cb486f2
 WHIRLPOOL 
2c5db621b11cc6c93d0f58aef0221f3a4ace13352fc2de86df89ceeb137edda53fa7f44cb1052570d7a1053417c60910c61b214a61713b9b10c9684fc1983f03
+DIST texlive-core-patches-52.tar.xz 3376 SHA256 
294f44d6b24801206eec23a497d0b17f68ed88f8ef3d33492efd75e889db309f SHA512 
fbc84217911d797373ad03e3da3bcb2277d74edf3a9fd77a5bf67bed7fb207d1cd3d9c9c7947c906ee10989fe6ceb6c263a4002a592217bce7e873db813dc367
 WHIRLPOOL 
e249a1aa3c563beb14ebe88f93c2b144dfa6de3b7d47b502a9a7e18a8a0f39ab399925a47bd7e4406ecf2010589791fee09a71b6db48a04beadac18294cb0474
 DIST texlive-module-a2ping-2012.tar.xz 31124 SHA256 
37b769091af7c7c9f95c52f92cbc26b22f72dc0de5ecb0e9e37cf1482438605a SHA512 
b4f74f037d1113d204d3f0e34c8418e354ae002ab09e8c326458bf7c9c9a9bfa3211317e03bb7e69d7f2e83a2b22851410287477176dab5288dacf5a9ec4a8a6
 WHIRLPOOL 
5e76ab0e818c3e20d8211c35230a9ee1084f1de830c988b1ed9707036481582540aa97c6ee9e31b0dd1ee2a8346dc3b81197d8c0489563122bba2dd7dffe5fe1
 DIST texlive-module-a2ping-2013.tar.xz 31124 SHA256 
a50f2714269e1725a05584d2e1b0b822f082c7291a989d37976b8666f69e8e09 SHA512 
bc05c8610e58bacb6001fd41f848d12f8e77837b5e24d32f7af1c9939778d92aeac7ee07969f22e86c72a8850650ad1d06341681503d8d8699dbf6db1de4be62
 WHIRLPOOL 
c4ebb0c3bb4db9d176fbadfd06753509965aa7d1d89be69ded9cc4488b1629fbd7584f2fed70b9633ead1341fb88de006b7f840446f142ec25eaeeb8cd7577d5
 DIST texlive-module-a2ping-2014.tar.xz 31124 SHA256 
18c8686e9d443af0e3b6d4feaaa42996b1fa2f03a07dce0e19d10226b7bc8839 SHA512 
d5b65f04a96b7206624fd80fae4a04779fd31995247ed4b04d3ddb7197aeb3373d6b3679f674e29fb39e7022f37115fab2a3f5fc7304b3c6c133456242fef8bb
 WHIRLPOOL 
a6a8c93836825b07930a61c35d37b657479025d217b4d006021724a1b85c9afa4b6dffa0ba1d96bc0bdcaa3fd72274c11ea401d8387d1bcedbd20df2fde31cbd

diff --git a/app-text/texlive-core/texlive-core-2015-r1.ebuild 
b/app-text/texlive-core/texlive-core-2015-r1.ebuild
new file mode 100644
index 00000000..8b2d430
--- /dev/null
+++ b/app-text/texlive-core/texlive-core-2015-r1.ebuild
@@ -0,0 +1,347 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+#TL_UPSTREAM_PATCHLEVEL="1"
+PATCHLEVEL="52"
+TL_SOURCE_VERSION=20150521
+
+inherit eutils flag-o-matic toolchain-funcs libtool texlive-common
+
+MY_PV=${PN%-core}-${TL_SOURCE_VERSION}-source
+
+DESCRIPTION="A complete TeX distribution"
+HOMEPAGE="http://tug.org/texlive/";
+SLOT="0"
+LICENSE="GPL-2 LPPL-1.3c TeX"
+
+SRC_URI="mirror://gentoo/${MY_PV}.tar.xz"
+
+# Fetch patches
+SRC_URI="${SRC_URI} mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.xz"
+#      
mirror://gentoo/texlive-core-upstream-patches-${TL_UPSTREAM_PATCHLEVEL}.tar.xz"
+
+TL_CORE_BINEXTRA_MODULES="
+       a2ping adhocfilelist asymptote bundledoc ctanify ctanupload ctie cweb
+       de-macro dtl dtxgen dvi2tty dviasm dvicopy dvidvi dviljk dvipos findhyph
+       fragmaster hyphenex installfont lacheck latex-git-log latex2man
+       latexfileversion latexpand latexindent ltxfileinfo ltximg listings-ext
+       match_parens mkjobtexmf patgen pdfcrop pdftools pfarrei pkfix 
pkfix-helper
+       purifyeps seetexk sty2dtx synctex texcount texdef texdiff texdirflatten
+       texdoc texliveonfly texloganalyser texware tie tpic2pdftex 
typeoutfileinfo
+       web collection-binextra
+       "
+TL_CORE_BINEXTRA_DOC_MODULES="
+       a2ping.doc adhocfilelist.doc asymptote.doc bundledoc.doc ctanify.doc
+       ctanupload.doc ctie.doc cweb.doc de-macro.doc dtxgen.doc dvi2tty.doc
+       dvicopy.doc     dviljk.doc dvipos.doc findhyph.doc fragmaster.doc
+       installfont.doc latex-git-log.doc latex2man.doc latexfileversion.doc
+       latexpand.doc latexindent.doc ltxfileinfo.doc ltximg.doc 
listings-ext.doc
+       match_parens.doc mkjobtexmf.doc patgen.doc pdfcrop.doc pdftools.doc
+       pfarrei.doc pkfix.doc pkfix-helper.doc purifyeps.doc sty2dtx.doc 
synctex.doc
+       texcount.doc texdef.doc texdiff.doc texdirflatten.doc texdoc.doc
+       texliveonfly.doc texloganalyser.doc texware.doc tie.doc tpic2pdftex.doc
+       typeoutfileinfo.doc web.doc
+       "
+TL_CORE_BINEXTRA_SRC_MODULES="
+       adhocfilelist.source hyphenex.source listings-ext.source 
mkjobtexmf.source
+       pfarrei.source texdef.source
+       "
+
+TL_CORE_EXTRA_MODULES="tetex hyphen-base texconfig gsftopk texlive.infra 
${TL_CORE_BINEXTRA_MODULES}"
+TL_CORE_EXTRA_DOC_MODULES="tetex.doc texconfig.doc gsftopk.doc 
texlive.infra.doc ${TL_CORE_BINEXTRA_DOC_MODULES}"
+TL_CORE_EXTRA_SRC_MODULES="${TL_CORE_BINEXTRA_SRC_MODULES}"
+
+for i in ${TL_CORE_EXTRA_MODULES}; do
+       SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
+done
+
+SRC_URI="${SRC_URI} doc? ( "
+for i in ${TL_CORE_EXTRA_DOC_MODULES}; do
+       SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
+done
+SRC_URI="${SRC_URI} )"
+SRC_URI="${SRC_URI} source? ( "
+for i in ${TL_CORE_EXTRA_SRC_MODULES}; do
+       SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.tar.xz"
+done
+SRC_URI="${SRC_URI} )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc 
~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos 
~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="cjk X doc source tk +luajittex xetex"
+
+TEXMF_PATH=/usr/share/texmf-dist
+
+MODULAR_X_DEPEND="X? (
+                               x11-libs/libXmu
+                               x11-libs/libXp
+                               x11-libs/libXpm
+                               x11-libs/libXaw
+       )"
+
+COMMON_DEPEND="${MODULAR_X_DEPEND}
+       !app-text/ptex
+       !app-text/tetex
+       !<app-text/texlive-2007
+       !app-text/xetex
+       !<dev-texlive/texlive-basic-2014
+       !<dev-texlive/texlive-metapost-2011
+       !app-text/dvibook
+       !dev-tex/luatex
+       !app-text/dvipdfm
+       !app-text/dvipdfmx
+       !app-text/xdvipdfmx
+       sys-libs/zlib
+       >=media-libs/libpng-1.2.43-r2:0=
+       >=app-text/poppler-0.12.3-r3:=
+       >=x11-libs/cairo-1.12
+       >=x11-libs/pixman-0.18
+       dev-libs/zziplib
+       app-text/libpaper
+       dev-libs/gmp:0
+       dev-libs/mpfr:0
+       xetex? (
+               >=media-libs/harfbuzz-0.9.20[icu,graphite]
+               >=dev-libs/icu-50:=
+               >=app-text/teckit-2.5.3
+               media-libs/fontconfig
+               media-gfx/graphite2
+       )
+       media-libs/freetype:2
+       >=dev-libs/kpathsea-6.2.1
+       cjk? ( >=dev-libs/ptexenc-1.3.3_p20150521 )"
+
+DEPEND="${COMMON_DEPEND}
+       virtual/pkgconfig
+       sys-apps/ed
+       sys-devel/flex
+       app-arch/xz-utils"
+
+RDEPEND="${COMMON_DEPEND}
+       >=app-text/ps2pkm-1.7_p20150521
+       >=app-text/dvipsk-5.995_p20150521
+       >=dev-tex/bibtexu-3.71_p20150521
+       virtual/perl-Getopt-Long
+       tk? ( dev-perl/Tk )"
+
+S="${WORKDIR}/${P}_build"
+B="${WORKDIR}/${MY_PV}"
+
+src_unpack() {
+       unpack ${A}
+       mkdir -p "${S}" || die "failed to create build dir"
+}
+
+RELOC_TARGET=texmf-dist
+
+src_prepare() {
+       cd "${WORKDIR}"
+       # From texlive-module.eclass.
+       grep -H RELOC tlpkg/tlpobj/* | awk '{print $2}' | sed 's#^RELOC/##' > 
"${T}/reloclist"
+       { for i in $(<"${T}/reloclist"); do  dirname $i; done; } | uniq > 
"${T}/dirlist"
+       for i in $(<"${T}/dirlist"); do
+               [ -d "${RELOC_TARGET}/${i}" ] || mkdir -p "${RELOC_TARGET}/${i}"
+       done
+       for i in $(<"${T}/reloclist"); do
+               mv "${i}" "${RELOC_TARGET}"/$(dirname "${i}") || die "failed to 
relocate ${i} to ${RELOC_TARGET}/$(dirname ${i})"
+       done
+
+       mv "${WORKDIR}"/texmf* "${B}" || die "failed to move texmf files"
+
+       cd "${B}"
+       #EPATCH_MULTI_MSG="Applying patches from upstream bugfix branch..." 
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/gentoo_branch2011_patches"
+       EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+
+       sed -i \
+               -e "s,/usr/include /usr/local/include.*echo 
\$KPATHSEA_INCLUDES.*,${EPREFIX}/usr/include\"," \
+               texk/web2c/configure || die
+
+       elibtoolize
+}
+
+src_configure() {
+       # 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
+       tc-export CC CXX AR RANLIB
+       ECONF_SOURCE="${B}" \
+               econf -C \
+               --bindir="${EPREFIX}"/usr/bin \
+               --datadir="${S}" \
+               --with-system-freetype2 \
+               --with-system-zlib \
+               --with-system-libpng \
+               --with-system-xpdf \
+               --with-system-poppler \
+               --with-system-teckit \
+               --with-teckit-includes="${EPREFIX}"/usr/include/teckit \
+               --with-system-kpathsea \
+               --with-kpathsea-includes="${EPREFIX}"/usr/include \
+               --with-system-icu \
+               --with-system-ptexenc \
+               --with-system-harfbuzz \
+               --with-system-icu \
+               --with-system-graphite2 \
+               --with-system-cairo \
+               --with-system-pixman \
+               --with-system-zziplib \
+               --with-system-libpaper \
+               --with-system-gmp \
+               --with-system-mpfr \
+               --without-texinfo \
+               --disable-dialog \
+               --disable-multiplatform \
+               --enable-epsfwin \
+               --enable-mftalkwin \
+               --enable-regiswin \
+               --enable-tektronixwin \
+               --enable-unitermwin \
+               --with-ps=gs \
+               --disable-psutils \
+               --disable-t1utils \
+               --enable-ipc \
+               --disable-biber \
+               --disable-bibtex-x \
+               --disable-dvipng \
+               --disable-dvipsk \
+               --disable-chktex \
+               --disable-lcdf-typetools \
+               --disable-pdfopen \
+               --disable-ps2eps \
+               --disable-ps2pk \
+               --disable-detex \
+               --disable-ttf2pk2 \
+               --disable-tex4htk \
+               --disable-cjkutils \
+               --disable-xdvik \
+               --disable-xindy \
+               --enable-luatex \
+               --disable-dvi2tty \
+               --disable-dvisvgm \
+               --disable-vlna \
+               --enable-shared \
+               --disable-native-texlive-build \
+               --disable-largefile \
+               $(use_enable luajittex) \
+               $(use_enable xetex) \
+               $(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)
+}
+
+src_compile() {
+       tc-export CC CXX AR RANLIB
+       emake SHELL="${EPREFIX}"/bin/sh 
texmf="${EPREFIX}"${TEXMF_PATH:-/usr/share/texmf-dist}
+
+       cd "${B}" || die
+       # Mimic updmap --syncwithtrees to enable only fonts installed
+       # Code copied from updmap script
+       for i in `egrep '^(Mixed|Kanji)?Map' "texmf-dist/web2c/updmap.cfg" | 
sed 's@.* @@'`; do
+               texlive-common_is_file_present_in_texmf "$i" || echo "$i"
+       done > "${T}/updmap_update"
+       {
+               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() {
+       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 "${B}" || 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 "${B}/texk"
+       dodoc ChangeLog README
+
+       docinto dviljk
+       cd "${B}/texk/dviljk"
+       dodoc ChangeLog README NEWS
+
+       docinto makeindexk
+       cd "${B}/texk/makeindexk"
+       dodoc ChangeLog NOTES README
+
+       docinto web2c
+       cd "${B}/texk/web2c"
+       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 -f "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf"
+       # Remove bundled and invalid updmap.cfg
+       rm -f "${ED}/usr/share/texmf-dist/web2c/updmap.cfg"
+
+       texlive-common_handle_config_files
+
+       keepdir /usr/share/texmf-site
+
+       # 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
+
+       # Rename mpost to leave room for mplib
+       mv "${ED}/usr/bin/mpost" "${ED}/usr/bin/mpost-${P}"
+       dosym "mpost-${P}" /usr/bin/mpost
+
+       # Ditto for pdftex
+       mv "${ED}/usr/bin/pdftex" "${ED}/usr/bin/pdftex-${P}"
+       dosym "pdftex-${P}" /usr/bin/pdftex
+}
+
+pkg_postinst() {
+       etexmf-update
+
+       elog
+       elog "If you have configuration files in ${EPREFIX}/etc/texmf to merge,"
+       elog "please update them and run ${EPREFIX}/usr/sbin/texmf-update."
+       elog
+       ewarn "If you are migrating from an older TeX distribution"
+       ewarn "Please make sure you have read:"
+       ewarn 
"https://wiki.gentoo.org/wiki/Project:TeX/Tex_Live_Migration_Guide";
+       ewarn "in order to avoid possible problems"
+       elog
+       elog "TeXLive has been split in various ebuilds. If you are missing a"
+       elog "package to process your TeX documents, you can install"
+       elog "dev-tex/texmfind to easily search for them."
+       elog
+}

Reply via email to