summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2013-06-27 15:08:32 +0000
committerAlexis Ballier <aballier@gentoo.org>2013-06-27 15:08:32 +0000
commit2838d4d4068cc29f9bd22799b4b97330c2e344f8 (patch)
tree2646d9534d805c074c07b15334ccd16beb801350
parentGenerate LASTCHANGE.blink (bug #474576 by Julien Sanchez). Also switch to htt... (diff)
downloadgentoo-2-2838d4d4068cc29f9bd22799b4b97330c2e344f8.tar.gz
gentoo-2-2838d4d4068cc29f9bd22799b4b97330c2e344f8.tar.bz2
gentoo-2-2838d4d4068cc29f9bd22799b4b97330c2e344f8.zip
Version bump. Block old texlive-core since the config files it installs will break it completely at runtime. Use this opportunity to move texmf-update here since it makes more sense.
(Portage version: 2.2.0_alpha185/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
-rw-r--r--dev-libs/kpathsea/ChangeLog10
-rw-r--r--dev-libs/kpathsea/files/texmf-update165
-rw-r--r--dev-libs/kpathsea/kpathsea-6.1.1_p20130530.ebuild108
3 files changed, 282 insertions, 1 deletions
diff --git a/dev-libs/kpathsea/ChangeLog b/dev-libs/kpathsea/ChangeLog
index 66f68d891f2d..6da98a51bad1 100644
--- a/dev-libs/kpathsea/ChangeLog
+++ b/dev-libs/kpathsea/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-libs/kpathsea
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/kpathsea/ChangeLog,v 1.41 2013/04/25 21:25:56 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/kpathsea/ChangeLog,v 1.42 2013/06/27 15:08:32 aballier Exp $
+
+*kpathsea-6.1.1_p20130530 (27 Jun 2013)
+
+ 27 Jun 2013; Alexis Ballier <aballier@gentoo.org>
+ +kpathsea-6.1.1_p20130530.ebuild, +files/texmf-update:
+ Version bump. Block old texlive-core since the config files it installs will
+ break it completely at runtime. Use this opportunity to move texmf-update
+ here since it makes more sense.
25 Apr 2013; Agostino Sarubbo <ago@gentoo.org>
kpathsea-6.1.0_p20120701.ebuild:
diff --git a/dev-libs/kpathsea/files/texmf-update b/dev-libs/kpathsea/files/texmf-update
new file mode 100644
index 000000000000..a877823e7c1e
--- /dev/null
+++ b/dev-libs/kpathsea/files/texmf-update
@@ -0,0 +1,165 @@
+#!/bin/bash
+#
+# Utility to update Gentoo TeXLive distribution configuration files
+#
+
+echo "Configuring TeXLive ..."
+
+PATH=/bin:/usr/bin
+
+# Fix for all those with altered umask for root
+umask 022
+
+# Make sure we have a correct environment, bug #30432
+# The list of env. vars is taken from the INSTALL file
+for texvar in AFMFONTS BIBINPUTS BSTINPUTS DVILJFONTS DVIPSFONTS \
+ DVIPSHEADERS GFFONTS GLYPHFONTS INDEXSTYLE MFBASES MFINPUTS \
+ MFPOOL MFTINPUTS MPINPUTS MPMEMS MPPOOL MPSUPPORT OCPINPUTS \
+ OFMFONTS OPLFONTS OTPINPUTS OVFFONTS OVPFONTS PKFONTS PSHEADERS \
+ T1FONTS T1INPUTS TEXBIB TEXCONFIG TEXDOCS TEXFONTMAPS TEXFONTS \
+ TEXFORMATS TEXINDEXSTYLE TEXINPUTS TEXMFCNF TEXMFDBS TEXMFINI \
+ TEXPICTS TEXPKS TEXPOOL TEXPSHEADERS TEXSOURCES TFMFONTS TRFONTS \
+ VFFONTS XDVIFONTS XDVIVFS ; do
+
+ if [ "${!texvar}" ]; then
+ if ! $(echo ${!texvar} | grep '^:\|::\|:$' &>/dev/null) ; then
+ export ${texvar}="${!texvar}:"
+ fi
+ fi
+done
+
+if [ "$TEXINPUTS" ]; then
+ if $(echo ${TEXINPUTS} | grep '/usr/share/texmf' &>/dev/null) ; then
+ export TEXINPUTS=$(echo ${TEXINPUTS} | sed -e 's|/usr/share/texmf/*:\?||g')
+ elif $(echo ${TEXINPUTS} | grep '/var/lib/texmf' &>/dev/null) ; then
+ export TEXINPUTS=$(echo ${TEXINPUTS} | sed -e 's|/var/lib/texmf/*:\?||g')
+ fi
+fi
+
+MKTEMP_COMMAND="mktemp -t tmp.XXXXXXXXXX"
+DIFF_COMMAND="cmp -s"
+TEMP_FILE="`${MKTEMP_COMMAND}`"
+
+if [ -z "${TEMP_FILE}" ]; then
+ exit
+fi
+
+# check whether config files for fmtutil and updmap have changed
+STATUS_FMTUTIL="0"
+STATUS_UPDMAP="0"
+
+if [ -d /etc/texmf/texmf.d ]; then
+ echo "Generating /etc/texmf/web2c/texmf.cnf from /etc/texmf/texmf.d ..."
+ cat /etc/texmf/texmf.d/*.cnf > "/etc/texmf/web2c/texmf.cnf"
+fi
+
+if [ -d /etc/texmf/fmtutil.d ]; then
+ echo "Generating /etc/texmf/web2c/fmtutil.cnf from /etc/texmf/fmtutil.d ..."
+ if [ -f /etc/texmf/web2c/fmtutil.cnf ]; then
+ cp -f /etc/texmf/web2c/fmtutil.cnf ${TEMP_FILE}
+ else
+ touch ${TEMP_FILE}
+ fi
+ cat /etc/texmf/fmtutil.d/*.cnf > "/etc/texmf/web2c/fmtutil.cnf"
+ ${DIFF_COMMAND} /etc/texmf/web2c/fmtutil.cnf ${TEMP_FILE}
+ STATUS_FMTUTIL="${STATUS_FMTUTIL}$?"
+else
+# if no regeneration took place:
+# always regenerate the formats to be on the safe side
+ STATUS_FMTUTIL="${STATUS_FMTUTIL}3"
+fi
+
+if [ -d /etc/texmf/updmap.d ]; then
+ if [ -f /etc/texmf/web2c/updmap.cfg ]; then
+ cp -f /etc/texmf/web2c/updmap.cfg ${TEMP_FILE}
+ else
+ touch ${TEMP_FILE}
+ fi
+ echo "Generating /etc/texmf/web2c/updmap.cfg from /etc/texmf/updmap.d ..."
+ cat /etc/texmf/updmap.d/*.cfg > "/etc/texmf/web2c/updmap.cfg"
+ ${DIFF_COMMAND} /etc/texmf/web2c/updmap.cfg ${TEMP_FILE}
+ STATUS_UPDMAP="${STATUS_UPDMAP}$?"
+else
+# if no regeneration could be done:
+# always regenerate the maps to be on the safe side
+ STATUS_UPDMAP="${STATUS_UPDMAP}3"
+fi
+
+echo "Generating ls-R files"
+mktexlsr &>/dev/null
+
+# Generate language.dat file, from texlive install-pkg.sh
+X=`kpsewhich language.dat`
+Z=`dirname $X`
+if [ -n "$X" -a -f "$Z/language.dat" -a -f "$Z/language.us" ] ; then
+ echo "Generating language.dat file"
+
+ # Save the old one, we will check if it has changed
+ cp -f "$Z/language.dat" "${TEMP_FILE}"
+
+ cat "$Z/language.us" > "$Z/language.dat"
+ for i in /etc/texmf/language.dat.d/language.*.dat; do
+ [ -f "$i" ] && cat "$i" >> "$Z/language.dat"
+ done
+
+ ${DIFF_COMMAND} "$Z/language.dat" "${TEMP_FILE}"
+ STATUS_FMTUTIL="${STATUS_FMTUTIL}$?"
+fi
+
+# Generate language.def file.
+if [ -n "$X" -a -f "$Z/language.def" -a -f "$Z/language.us.def" ] ; then
+ echo "Generating language.def file"
+
+ # Save the old one, we will check if it has changed
+ cp -f "$Z/language.def" "${TEMP_FILE}"
+
+ cat "$Z/language.us.def" > "$Z/language.def"
+ for i in /etc/texmf/language.def.d/language.*.def; do
+ [ -f "$i" ] && cat "$i" >> "$Z/language.def"
+ done
+ cat << EOF >> "$Z/language.def"
+%%% No changes may be made beyond this point.
+
+\uselanguage {USenglish} %%% This MUST be the last line of the file.
+EOF
+
+ ${DIFF_COMMAND} "$Z/language.def" "${TEMP_FILE}"
+ STATUS_FMTUTIL="${STATUS_FMTUTIL}$?"
+fi
+
+# Generate language.dat.lua file.
+if [ -n "$X" -a -f "$Z/language.dat.lua" -a -f "$Z/language.us.lua" ] ; then
+ echo "Generating language.dat.lua file"
+
+ # Save the old one, we will check if it has changed
+ cp -f "$Z/language.dat.lua" "${TEMP_FILE}"
+
+ cat "$Z/language.us.lua" > "$Z/language.dat.lua"
+ for i in /etc/texmf/language.dat.lua.d/language.*.dat.lua; do
+ [ -f "$i" ] && cat "$i" >> "$Z/language.dat.lua"
+ done
+ printf "}\n" >> "$Z/language.dat.lua"
+
+ ${DIFF_COMMAND} "$Z/language.dat.lua" "${TEMP_FILE}"
+ STATUS_FMTUTIL="${STATUS_FMTUTIL}$?"
+fi
+
+if [ "${STATUS_FMTUTIL}" -ne 0 ] ; then
+ echo "Generating format files ..."
+ fmtutil-sys --all &>/dev/null
+else
+ echo "Skipping format files, since they are unchanged"
+fi
+
+if [ "${STATUS_UPDMAP}" -ne 0 ] ; then
+ echo "Generating font maps..."
+ updmap-sys &>/dev/null
+else
+ echo "Skipping font maps, since they are unchanged"
+fi
+
+rm -f ${TEMP_FILE}
+
+echo
+echo "Use 'texconfig font ro'(rw) to disable (enable) font generation for users"
+echo
diff --git a/dev-libs/kpathsea/kpathsea-6.1.1_p20130530.ebuild b/dev-libs/kpathsea/kpathsea-6.1.1_p20130530.ebuild
new file mode 100644
index 000000000000..77e270f97a53
--- /dev/null
+++ b/dev-libs/kpathsea/kpathsea-6.1.1_p20130530.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/kpathsea/kpathsea-6.1.1_p20130530.ebuild,v 1.1 2013/06/27 15:08:32 aballier Exp $
+
+EAPI=5
+
+inherit texlive-common eutils libtool
+
+TEXMFD_VERSION="5"
+
+DESCRIPTION="Library implementing generic path searching, configuration, and TeX-specific file searching"
+HOMEPAGE="http://tug.org/texlive/"
+SRC_URI="mirror://gentoo/texlive-${PV#*_p}-source.tar.xz
+ mirror://gentoo/${PN}-texmf.d-${TEXMFD_VERSION}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+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="doc source static-libs"
+
+DEPEND="!<app-text/texlive-core-2013
+ !app-text/ptex"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/texlive-${PV#*_p}-source/texk/${PN}
+
+TL_VERSION=2013
+EXTRA_TL_MODULES="kpathsea"
+EXTRA_TL_DOC_MODULES="kpathsea.doc"
+
+for i in ${EXTRA_TL_MODULES} ; do
+ SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${TL_VERSION}.tar.xz"
+done
+
+SRC_URI="${SRC_URI} doc? ( "
+for i in ${EXTRA_TL_DOC_MODULES} ; do
+ SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${TL_VERSION}.tar.xz"
+done
+SRC_URI="${SRC_URI} ) "
+
+TEXMF_PATH=/usr/share/texmf-dist
+
+src_prepare() {
+ cd "${WORKDIR}/texlive-${PV#*_p}-source"
+ S="${WORKDIR}/texlive-${PV#*_p}-source" elibtoolize #sane .so versionning on gfbsd
+}
+
+src_configure() {
+ # 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 #347798
+ # So we set LC_ALL to C in order to avoid problems.
+ export LC_ALL=C
+
+ # Disable largefile because it seems to cause problems on big endian 32 bits
+ # systems...
+ econf \
+ --disable-largefile \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" web2cdir="${EPREFIX}/usr/share/texmf-dist/web2c" install
+ find "${D}" -name '*.la' -delete
+
+ dodir /usr/share # just in case
+ cp -pR "${WORKDIR}"/texmf-dist "${ED}/usr/share/" || die "failed to install texmf trees"
+ if use source ; then
+ cp -pR "${WORKDIR}"/tlpkg "${ED}/usr/share/" || die "failed to install tlpkg files"
+ fi
+
+ # The default configuration expects it to be world writable, bug #266680
+ # People can still change it with texconfig though.
+ dodir /var/cache/fonts
+ fperms 1777 /var/cache/fonts
+
+ # Take care of fmtutil.cnf and texmf.cnf
+ dodir /etc/texmf/{fmtutil.d,texmf.d}
+
+ # Remove default texmf.cnf to ship our own, greatly based on texlive dvd's
+ # texmf.cnf
+ # It will also be generated from /etc/texmf/texmf.d files by texmf-update
+ rm -f "${ED}${TEXMF_PATH}/web2c/texmf.cnf"
+
+ insinto /etc/texmf/texmf.d
+ doins "${WORKDIR}/texmf.d/"*.cnf
+
+ # Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files
+ # by texmf-update
+ rm -f "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf"
+
+ dosym /etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH}/web2c/fmtutil.cnf
+ dosym /etc/texmf/web2c/texmf.cnf ${TEXMF_PATH}/web2c/texmf.cnf
+
+ newsbin "${FILESDIR}/texmf-update" texmf-update
+
+ # Keep it as that's where the formats will go
+ keepdir /var/lib/texmf
+
+ dodoc BUGS ChangeLog NEWS PROJECTS README
+}
+
+pkg_postinst() {
+ etexmf-update
+}
+
+pkg_postrm() {
+ etexmf-update
+}