public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/2] texlive eclass updates, in preperation of TeX Live 2023 bump
@ 2024-01-16  9:26 Florian Schmaus
  2024-01-16  9:26 ` [gentoo-dev] [PATCH 1/2] profiles/thirdpartymirrors: add 'ctan' mirror Florian Schmaus
  2024-01-16  9:26 ` [gentoo-dev] [PATCH 2/2] texlive-{common,module}.eclass: update for TeX Live 2023 Florian Schmaus
  0 siblings, 2 replies; 5+ messages in thread
From: Florian Schmaus @ 2024-01-16  9:26 UTC (permalink / raw
  To: gentoo-dev; +Cc: Paul Zander, tex, Florian Schmaus

After negril and I worked for the past months on the TeX Live 2023
bump, it is now time to submit the eclass changes to the mailing list
for review.

Note that we tried to keep the changes to the eclasses to a minimum.
There are many more places where the code of the eclasses could be
improved. But bumping TeX Live is already a delicate matter and we do
not want to add more distraction from the actual changes to keep the
changes manageable and reviewable.

Once TeX Live 2023 hits ::gentoo, we will iteratively work on revising
the code of the eclasses.

Florian Schmaus (2):
  profiles/thirdpartymirrors: add 'ctan' mirror
  texlive-{common,module}.eclass: update for TeX Live 2023

 eclass/texlive-common.eclass | 113 +++++++++++++++++++++++++----------
 eclass/texlive-module.eclass |  77 ++++++++----------------
 profiles/thirdpartymirrors   |   1 +
 3 files changed, 109 insertions(+), 82 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [gentoo-dev] [PATCH 1/2] profiles/thirdpartymirrors: add 'ctan' mirror
  2024-01-16  9:26 [gentoo-dev] [PATCH 0/2] texlive eclass updates, in preperation of TeX Live 2023 bump Florian Schmaus
@ 2024-01-16  9:26 ` Florian Schmaus
  2024-01-16 15:16   ` Michael Orlitzky
  2024-01-16  9:26 ` [gentoo-dev] [PATCH 2/2] texlive-{common,module}.eclass: update for TeX Live 2023 Florian Schmaus
  1 sibling, 1 reply; 5+ messages in thread
From: Florian Schmaus @ 2024-01-16  9:26 UTC (permalink / raw
  To: gentoo-dev; +Cc: Paul Zander, tex, Florian Schmaus

Signed-off-by: Florian Schmaus <flow@gentoo.org>
---
 profiles/thirdpartymirrors | 1 +
 1 file changed, 1 insertion(+)

diff --git a/profiles/thirdpartymirrors b/profiles/thirdpartymirrors
index b890610255f5..1db91760893b 100644
--- a/profiles/thirdpartymirrors
+++ b/profiles/thirdpartymirrors
@@ -1,5 +1,6 @@
 apache		https://dlcdn.apache.org/ https://apache.mirror.iphh.net/ https://artfiles.org/apache.org/ https://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.apache.org/dist/ https://ftp.fau.de/apache/ https://apache.osuosl.org/
 cpan		https://cpan.metacpan.org https://www.cpan.org
+ctan		https://mirrors.ctan.org/ https://ftp.fau.de/ctan/ https://mirror.physik.tu-berlin.de/pub/CTAN/ https://ftp.sun.ac.za/ftp/CTAN/ https://mirror.math.princeton.edu/pub/CTAN/ https://mirrors.sjtug.sjtu.edu.cn/ctan/ https://mirrors.mit.edu/CTAN/ https://tug.ctan.org/
 debian		https://deb.debian.org/debian/ http://ftp.au.debian.org/debian/ http://ftp.at.debian.org/debian/ http://ftp.by.debian.org/debian/ http://ftp.be.debian.org/debian/ http://ftp.br.debian.org/debian/ http://ftp.bg.debian.org/debian/ http://ftp.ca.debian.org/debian/ http://ftp2.cn.debian.org/debian/ http://ftp.cn.debian.org/debian/ http://ftp.hr.debian.org/debian/ http://ftp.cz.debian.org/debian/ http://ftp.dk.debian.org/debian/ http://ftp.sv.debian.org/debian/ http://ftp.ee.debian.org/debian/ http://ftp.fi.debian.org/debian/ http://ftp.fr.debian.org/debian/ http://ftp2.de.debian.org/debian/ http://ftp.de.debian.org/debian/ http://ftp.gr.debian.org/debian/ http://ftp.hu.debian.org/debian/ http://ftp.is.debian.org/debian/ http://ftp.ie.debian.org/debian/ http://ftp.it.debian.org/debian/ http://ftp.jp.debian.org/debian/ http://ftp.lt.debian.org/debian/ http://ftp.mx.debian.org/debian/ http://ftp.md.debian.org/debian/ http://ftp.nl.debian.org/debian/ http://ftp.nc.debian.org/debian/ http://ftp.nz.debian.org/debian/ http://ftp.no.debian.org/debian/ http://ftp.pl.debian.org/debian/ http://ftp.pt.debian.org/debian/ http://ftp.ro.debian.org/debian/ http://ftp.ru.debian.org/debian/ http://ftp.sg.debian.org/debian/ http://ftp.sk.debian.org/debian/ http://ftp.si.debian.org/debian/ http://ftp.es.debian.org/debian/ http://ftp.se.debian.org/debian/ http://ftp.ch.debian.org/debian/ http://ftp.tw.debian.org/debian/ http://ftp.tr.debian.org/debian/ http://ftp.ua.debian.org/debian/ http://ftp.uk.debian.org/debian/ http://ftp.us.debian.org/debian/
 gentoo		https://distfiles.gentoo.org/distfiles https://gentoo.osuosl.org/distfiles https://ftp.halifax.rwth-aachen.de/gentoo/distfiles https://ftp.fau.de/gentoo/distfiles
 gcc		https://gcc.gnu.org/pub/gcc/ http://mirrors.concertpass.com/gcc/ https://mirrorservice.org/sites/sourceware.org/pub/gcc/ https://ftp.mpi-inf.mpg.de/mirrors/gnu/mirror/gcc.gnu.org/pub/gcc/ https://bigsearcher.com/mirrors/gcc/
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-dev] [PATCH 2/2] texlive-{common,module}.eclass: update for TeX Live 2023
  2024-01-16  9:26 [gentoo-dev] [PATCH 0/2] texlive eclass updates, in preperation of TeX Live 2023 bump Florian Schmaus
  2024-01-16  9:26 ` [gentoo-dev] [PATCH 1/2] profiles/thirdpartymirrors: add 'ctan' mirror Florian Schmaus
@ 2024-01-16  9:26 ` Florian Schmaus
  2024-01-16 10:35   ` Ulrich Mueller
  1 sibling, 1 reply; 5+ messages in thread
From: Florian Schmaus @ 2024-01-16  9:26 UTC (permalink / raw
  To: gentoo-dev; +Cc: Paul Zander, tex, Florian Schmaus

Update the texlive eclasses for the upcoming TeX Live 2023 bump. This
includes general cleanup of the eclasses, e.g., reducing the scope of
variables.

Notably changes include that installation of the TeX Live distribution
changes from /usr/share/texmf to /usr/share/texmf-dist, which is the
correct place, according to upstream.

Co-authored-by: Paul Zander <negril.nx+gentoo@gmail.com>
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Signed-off-by: Florian Schmaus <flow@gentoo.org>
---
 eclass/texlive-common.eclass | 113 +++++++++++++++++++++++++----------
 eclass/texlive-module.eclass |  77 ++++++++----------------
 2 files changed, 108 insertions(+), 82 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index f43d10926857..5de58300f2f3 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: texlive-common.eclass
@@ -6,7 +6,7 @@
 # tex@gentoo.org
 # @AUTHOR:
 # Original Author: Alexis Ballier <aballier@gentoo.org>
-# @SUPPORTED_EAPIS: 7
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: Provide various functions used by both texlive-core and texlive modules
 # @DESCRIPTION:
 # Purpose: Provide various functions used by both texlive-core and texlive
@@ -15,53 +15,66 @@
 # Note that this eclass *must* not assume the presence of any standard tex too
 
 case ${EAPI} in
-	7) inherit eapi8-dosym ;;
+	7)
+		inherit eapi8-dosym
+		dosym(){ dosym8 "$@"; }
+		;;
+	8) ;;
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
 if [[ -z ${_TEXLIVE_COMMON_ECLASS} ]]; then
 _TEXLIVE_COMMON_ECLASS=1
 
-TEXMF_PATH=/usr/share/texmf
-TEXMF_DIST_PATH=/usr/share/texmf-dist
-TEXMF_VAR_PATH=/var/lib/texmf
-
 # @FUNCTION: texlive-common_handle_config_files
 # @DESCRIPTION:
 # Has to be called in src_install after having installed the files in ${D}
-# This function will move the relevant files to /etc/texmf and symling them
+# This function will move the relevant files to /etc/texmf and symlink them
 # from their original location. This is to allow easy update of texlive's
-# configuration
-
+# configuration.
+# Called by app-text/texlive-core and texlive-module.eclass.
 texlive-common_handle_config_files() {
+	local texmf_path
+	# Starting with TeX Live 2023, we install in texmf-dist, where a
+	# distribution-provided TeX Live installation is supposed to be,
+	# instead of texmf.
+	if ver_test -ge 2023; then
+		texmf_path=/usr/share/texmf-dist
+	else
+		texmf_path=/usr/share/texmf
+	fi
+
 	# Handle config files properly
-	[[ -d ${ED}${TEXMF_PATH} ]] || return
-	cd "${ED}${TEXMF_PATH}" || die
+	[[ -d ${ED}${texmf_path} ]] || return
+	cd "${ED}${texmf_path}" || die
 
 	while read -r f; do
-		if [[ ${f#*config} != ${f} || ${f#doc} != ${f} || ${f#source} != ${f} || ${f#tex} != ${f} ]] ; then
+		if [[ ${f#*config} != "${f}" || ${f#doc} != "${f}" || ${f#source} != "${f}" || ${f#tex} != "${f}" ]] ; then
 			continue
 		fi
-		dodir /etc/texmf/$(dirname ${f}).d
-		einfo "Moving (and symlinking) ${EPREFIX}${TEXMF_PATH}/${f} to ${EPREFIX}/etc/texmf/$(dirname ${f}).d"
-		mv "${ED}/${TEXMF_PATH}/${f}" "${ED}/etc/texmf/$(dirname ${f}).d" || die "mv ${f} failed."
-		dosym8 -r /etc/texmf/$(dirname ${f}).d/$(basename ${f}) ${TEXMF_PATH}/${f}
-	done < <(find  -name '*.cnf' -type f -o -name '*.cfg' -type f | sed -e "s:\./::g")
+		local rel_dir
+		rel_dir="$(dirname "${f}")"
+
+		dodir "/etc/texmf/${rel_dir}.d"
+		einfo "Moving (and symlinking) ${EPREFIX}${texmf_path}/${f} to ${EPREFIX}/etc/texmf/${rel_dir}.d"
+		mv "${ED}/${texmf_path}/${f}" "${ED}/etc/texmf/${rel_dir}.d" || die "mv ${f} failed."
+		dosym -r "/etc/texmf/${rel_dir}.d/$(basename "${f}")" "${texmf_path}/${f}"
+	done < <(find . -name '*.cnf' -type f -o -name '*.cfg' -type f | sed -e "s:\./::g")
 }
 
 # @FUNCTION: texlive-common_is_file_present_in_texmf
 # @DESCRIPTION:
 # Return if a file is present in the texmf tree
 # Call it from the directory containing texmf and texmf-dist
-
+# Called by app-text/texlive-core.
 texlive-common_is_file_present_in_texmf() {
 	local mark="${T}/${1}.found"
 	if [[ -d texmf ]]; then
-		find texmf -name ${1} -exec touch ${mark} {} + || die
+		find texmf -name "${1}" -exec touch "${mark}" {} + || die
 	fi
 
 	if [[ -d texmf-dist ]]; then
-		find texmf-dist -name ${1} -exec touch ${mark} {} + || die
+		find texmf-dist -name "${1}" -exec touch "${mark}" {} + || die
 	fi
 	[ -f "${mark}" ]
 }
@@ -77,7 +90,7 @@ texlive-common_is_file_present_in_texmf() {
 # ( Arguments are switched because texlinks main function sends them switched )
 # This function should not be called from an ebuild, prefer etexlinks that will
 # also do the fmtutil file parsing.
-
+# Called by texlive-common.eclass and texlive-module.eclass.
 texlive-common_do_symlinks() {
 	while [[ ${#} != 0 ]]; do
 		case ${1} in
@@ -88,13 +101,13 @@ texlive-common_do_symlinks() {
 				einfo "Symlink ${1} -> ${2} skipped (texlive-core takes care of it)"
 				;;
 			*)
-				if [[ ${1} == ${2} ]]; then
+				if [[ ${1} == "${2}" ]]; then
 					einfo "Symlink ${1} -> ${2} skipped"
 				elif [[ -e ${ED}/usr/bin/${1} || -L ${ED}/usr/bin/${1} ]]; then
 					einfo "Symlink ${1} skipped (file exists)"
 				else
 					einfo "Making symlink from ${1} to ${2}"
-					dosym ${2} /usr/bin/${1}
+					dosym "${2}" "/usr/bin/${1}"
 				fi
 				;;
 		esac
@@ -114,7 +127,7 @@ texlive-common_do_symlinks() {
 # the same dir as the source)
 # Also, as this eclass must not depend on a tex distribution to be installed we
 # cannot use texlinks from here.
-
+# Called by texlive-module.eclass.
 etexlinks() {
 	# Install symlinks from formats to engines
 	texlive-common_do_symlinks $(sed '/^[      ]*#/d; /^[      ]*$/d' "$1" | awk '{print $1, $2}')
@@ -125,13 +138,14 @@ etexlinks() {
 # @DESCRIPTION:
 # Symlinks a script from the texmf tree to /usr/bin. Requires permissions to be
 # correctly set for the file that it will point to.
-
+# Called by app-text/epspdf and texlive-module.eclass.
 dobin_texmf_scripts() {
 	while [[ ${#} -gt 0 ]] ; do
-		local trg=$(basename ${1} | sed 's,\.[^/]*$,,' | tr '[:upper:]' '[:lower:]')
+		local trg
+		trg=$(basename "${1}" | sed 's,\.[^/]*$,,' | tr '[:upper:]' '[:lower:]')
 		einfo "Installing ${1} as ${trg} bin wrapper"
 		[[ -x ${ED}/usr/share/${1} ]] || die "Trying to install a non existing or non executable symlink to /usr/bin: ${1}"
-		dosym ../share/${1} /usr/bin/${trg}
+		dosym "../share/${1}" "/usr/bin/${trg}"
 		shift
 	done
 }
@@ -141,7 +155,8 @@ dobin_texmf_scripts() {
 # Runs texmf-update if it is available and prints a warning otherwise. This
 # function helps in factorizing some code.  Useful in ebuilds' pkg_postinst and
 # pkg_postrm phases.
-
+# Called by app-text/dvipsk, app-text/texlive-core, dev-libs/kpathsea, and
+# texlive-module.eclass.
 etexmf-update() {
 	if has_version 'app-text/texlive-core' ; then
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/sbin/texmf-update ]] ; then
@@ -159,7 +174,6 @@ etexmf-update() {
 # Runs fmtutil-sys if it is available and prints a warning otherwise. This
 # function helps in factorizing some code. Used in ebuilds' pkg_postinst to
 # force a rebuild of TeX formats.
-
 efmtutil-sys() {
 	if has_version 'app-text/texlive-core' ; then
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/bin/fmtutil-sys ]] ; then
@@ -173,4 +187,43 @@ efmtutil-sys() {
 	fi
 }
 
+# @FUNCTION: texlive-common_append_to_src_uri
+# @DESCRIPTION:
+# Takes the name of a variable as input.  The variable must contain a
+# list of texlive packages.  Every texlive package in the variable is
+# transformed to an URL and appended to SRC_URI.
+texlive-common_append_to_src_uri() {
+	local tl_uri=( ${!1} )
+
+	# Starting from TeX Live 2009, upstream provides .tar.xz modules.
+	local tl_pkgext=tar.xz
+
+	local tl_uri_prefix="https://dev.gentoo.org/~@dev@/distfiles/texlive/tl-"
+	local tl_2023_uri_prefix="https://dev.gentoo.org/~@dev@/distfiles/texlive/"
+
+	local tl_dev
+	# If the version is less than 2023 and the package is the
+	# dev-texlive category, we fallback to the old SRC_URI layout. With
+	# the 2023 bump, packages outside the dev-texlive category start to
+	# inherit texlive-common.eclass.
+	if ver_test -lt 2023 && [[ ${CATEGORY} == dev-texlive ]]; then
+		local texlive_lt_2023_devs=( zlogene dilfridge sam )
+		local tl_uri_suffix="-${PV}.${tl_pkgext}"
+
+		tl_uri=( "${tl_uri[@]/%/${tl_uri_suffix}}" )
+		for tl_dev in "${texlive_lt_2023_devs[@]}"; do
+			SRC_URI+=" ${tl_uri[*]/#/${tl_uri_prefix/@dev@/${tl_dev}}}"
+		done
+	else
+		local texlive_ge_2023_devs=( flow )
+		local tl_mirror="mirror://ctan/systems/texlive/tlnet/archive/"
+
+		tl_uri=( "${tl_uri[@]/%/.${tl_pkgext}}" )
+		SRC_URI+=" ${tl_uri[*]/#/${tl_mirror}}"
+		for tl_dev in "${texlive_ge_2023_devs[@]}"; do
+			SRC_URI+=" ${tl_uri[*]/#/${tl_2023_uri_prefix/@dev@/${tl_dev}}}"
+		done
+	fi
+}
+
 fi
diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 9e7e5db2e8f8..afcd4532975a 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: texlive-module.eclass
@@ -6,7 +6,7 @@
 # tex@gentoo.org
 # @AUTHOR:
 # Original Author: Alexis Ballier <aballier@gentoo.org>
-# @SUPPORTED_EAPIS: 7
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: Provide generic install functions so that modular texlive's texmf ebuild will only have to inherit this eclass
 # @DESCRIPTION:
 # Purpose: Provide generic install functions so that modular texlive's texmf ebuilds will
@@ -72,7 +72,7 @@
 # e.g. for enabling/disabling a feature
 
 case ${EAPI} in
-	7) ;;
+	7|8) ;;
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
@@ -83,59 +83,33 @@ inherit texlive-common
 
 HOMEPAGE="https://www.tug.org/texlive/"
 
-COMMON_DEPEND=">=app-text/texlive-core-${TL_PV:-${PV}}"
-
-IUSE="source"
-
-# Starting from TeX Live 2009, upstream provides .tar.xz modules.
-PKGEXT=tar.xz
-
-# Now where should we get these files?
-TEXLIVE_DEVS=${TEXLIVE_DEVS:- zlogene dilfridge sam }
+IUSE="doc source"
 
+RDEPEND=">=app-text/texlive-core-${TL_PV:-${PV}}"
 # We do not need anything from SYSROOT:
 #   Everything is built from the texlive install in /
 #   Generated files are noarch
-BDEPEND="${COMMON_DEPEND}
-	app-arch/xz-utils"
+BDEPEND="
+	${RDEPEND}
+	app-arch/xz-utils
+"
 
-tl_uri_prefix="https://dev.gentoo.org/~@dev@/distfiles/texlive/tl-"
-tl_uri_suffix="-${PV}.${PKGEXT}"
-
-tl_uri=( ${TEXLIVE_MODULE_CONTENTS} )
-tl_uri=( "${tl_uri[@]/%/${tl_uri_suffix}}" )
-for tldev in ${TEXLIVE_DEVS}; do
-	SRC_URI+=" ${tl_uri[*]/#/${tl_uri_prefix/@dev@/${tldev}}}"
-done
+texlive-common_append_to_src_uri TEXLIVE_MODULE_CONTENTS
 
 # Forge doc SRC_URI
 if [[ -n ${TEXLIVE_MODULE_DOC_CONTENTS} ]]; then
 	SRC_URI+=" doc? ("
-	tl_uri=( ${TEXLIVE_MODULE_DOC_CONTENTS} )
-	tl_uri=( "${tl_uri[@]/%/${tl_uri_suffix}}" )
-	for tldev in ${TEXLIVE_DEVS}; do
-		SRC_URI+=" ${tl_uri[*]/#/${tl_uri_prefix/@dev@/${tldev}}}"
-	done
+	texlive-common_append_to_src_uri TEXLIVE_MODULE_DOC_CONTENTS
 	SRC_URI+=" )"
 fi
 
 # Forge source SRC_URI
 if [[ -n ${TEXLIVE_MODULE_SRC_CONTENTS} ]]; then
 	SRC_URI+=" source? ("
-	tl_uri=( ${TEXLIVE_MODULE_SRC_CONTENTS} )
-	tl_uri=( "${tl_uri[@]/%/${tl_uri_suffix}}" )
-	for tldev in ${TEXLIVE_DEVS}; do
-		SRC_URI+=" ${tl_uri[*]/#/${tl_uri_prefix/@dev@/${tldev}}}"
-	done
+	texlive-common_append_to_src_uri TEXLIVE_MODULE_SRC_CONTENTS
 	SRC_URI+=" )"
 fi
 
-unset tldev tl_uri tl_uri_prefix tl_uri_suffix
-
-RDEPEND="${COMMON_DEPEND}"
-
-IUSE="${IUSE} doc"
-
 # @ECLASS_VARIABLE: TEXLIVE_MODULE_OPTIONAL_ENGINE
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -155,17 +129,16 @@ S="${WORKDIR}"
 # Only for TeX Live 2009 and later.
 # After unpacking, the files that need to be relocated are moved accordingly.
 
-RELOC_TARGET=texmf-dist
-
 texlive-module_src_unpack() {
 	unpack ${A}
+	local RELOC_TARGET=texmf-dist
 
 	sed -n -e 's:\s*RELOC/::p' tlpkg/tlpobj/* > "${T}/reloclist" || die
 	sed -e 's/\/[^/]*$//' -e "s:^:${RELOC_TARGET}/:" "${T}/reloclist" |
 		sort -u |
 		xargs mkdir -p || die
 	local i dir="" files=()
-	while read i; do
+	while read -r i; do
 		if [[ ${RELOC_TARGET}/${i%/*} != "${dir}" ]]; then
 			# new dir, do the previous move
 			[[ -z ${dir} ]] || mv "${files[@]}" "${dir}" || die
@@ -282,7 +255,7 @@ texlive-module_make_language_lua_lines() {
 	fi
 
 	if [[ -n ${luaspecial} ]]; then
-		printf "\t\tspecial = '%s',\n" "$luaspecial"                          >> "${dest}" || die
+		printf "\t\tspecial = '%s',\n" "${luaspecial}"                          >> "${dest}" || die
 	fi
 
 	printf "\t},\n"                                                                >> "${dest}" || die
@@ -310,7 +283,7 @@ texlive-module_src_compile() {
 
 	for i in $(<"${T}/jobs");
 	do
-		j="$(echo $i | tr '#' ' ')"
+		j="$(echo "${i}" | tr '#' ' ')"
 		command=${j%% *}
 		parameter=${j#* }
 		case ${command} in
@@ -325,16 +298,16 @@ texlive-module_src_compile() {
 			addDvipdfmMap)
 				echo "f	${parameter}" >> "${S}/${PN}-config";;
 			AddHyphen)
-				texlive-module_make_language_def_lines ${parameter}
-				texlive-module_make_language_dat_lines ${parameter}
-				texlive-module_make_language_lua_lines ${parameter}
+				texlive-module_make_language_def_lines "${parameter}"
+				texlive-module_make_language_dat_lines "${parameter}"
+				texlive-module_make_language_lua_lines "${parameter}"
 				;;
 			AddFormat)
-				texlive-module_add_format ${parameter};;
+				texlive-module_add_format "${parameter}";;
 			BuildFormat)
 				einfo "Format ${parameter} already built.";;
 			BuildLanguageDat)
-				einfo "Language file $parameter already generated.";;
+				einfo "Language file ${parameter} already generated.";;
 			*)
 				die "No rule to process ${command}. Please file a bug."
 		esac
@@ -355,7 +328,7 @@ texlive-module_src_compile() {
 				mkdir texmf-var/web2c || die
 			fi
 			VARTEXFONTS="${T}/fonts" TEXMFHOME="${S}/texmf:${S}/texmf-dist:${S}/texmf-var"\
-				env -u TEXINPUTS $fmt_call --cnffile "${i}" --fmtdir "${S}/texmf-var/web2c" --all\
+				env -u TEXINPUTS "${fmt_call}" --cnffile "${i}" --fmtdir "${S}/texmf-var/web2c" --all\
 				|| die "failed to build format ${i}"
 		fi
 	done
@@ -431,14 +404,14 @@ texlive-module_src_install() {
 
 	[[ -n ${TEXLIVE_MODULE_BINSCRIPTS} ]] && dobin_texmf_scripts ${TEXLIVE_MODULE_BINSCRIPTS}
 	if [[ -n ${TEXLIVE_MODULE_BINLINKS} ]] ; then
+		dodir "/usr/bin"
 		for i in ${TEXLIVE_MODULE_BINLINKS} ; do
-			[[ -f ${ED}/usr/bin/${i%:*} ]] || die "Trying to install an invalid	BINLINK. This should not happen. Please file a bug."
-			dosym ${i%:*} /usr/bin/${i#*:}
+			[[ -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
 	fi
 
 	texlive-common_handle_config_files
-	TEXMF_PATH=${TEXMF_DIST_PATH} texlive-common_handle_config_files
 }
 
 # @FUNCTION: texlive-module_pkg_postinst
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] [PATCH 2/2] texlive-{common,module}.eclass: update for TeX Live 2023
  2024-01-16  9:26 ` [gentoo-dev] [PATCH 2/2] texlive-{common,module}.eclass: update for TeX Live 2023 Florian Schmaus
@ 2024-01-16 10:35   ` Ulrich Mueller
  0 siblings, 0 replies; 5+ messages in thread
From: Ulrich Mueller @ 2024-01-16 10:35 UTC (permalink / raw
  To: Florian Schmaus; +Cc: gentoo-dev, Paul Zander, tex

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]

>>>>> On Tue, 16 Jan 2024, Florian Schmaus wrote:

>  case ${EAPI} in
> -	7) inherit eapi8-dosym ;;
> +	7)
> +		inherit eapi8-dosym
> +		dosym(){ dosym8 "$@"; }

For good reason, eapi-dosym.eclass doesn't override package manager
commands, and the texlive eclasses shouldn't do that either.

Does it even work? dosym8 calls dosym, so wouldn't redefining dosym in
terms of dosym8 cause an endless loop?

So, either add an EAPI conditional where dosym8 is currently used (I see
only one place), or define dosym8 as an alias for dosym in EAPI 8.

> +		;;
> +	8) ;;
>  	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
>  esac

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] [PATCH 1/2] profiles/thirdpartymirrors: add 'ctan' mirror
  2024-01-16  9:26 ` [gentoo-dev] [PATCH 1/2] profiles/thirdpartymirrors: add 'ctan' mirror Florian Schmaus
@ 2024-01-16 15:16   ` Michael Orlitzky
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Orlitzky @ 2024-01-16 15:16 UTC (permalink / raw
  To: gentoo-dev

On Tue, 2024-01-16 at 10:26 +0100, Florian Schmaus wrote:
> +ctan		https://mirrors.ctan.org/ https://ftp.fau.de/ctan/ https://mirror.physik.tu-berlin.de/pub/CTAN/ https://ftp.sun.ac.za/ftp/CTAN/ https://mirror.math.princeton.edu/pub/CTAN/ https://mirrors.sjtug.sjtu.edu.cn/ctan/ https://mirrors.mit.edu/CTAN/ https://tug.ctan.org/

Are any of these packages mirror-restricted? If you visit ctan in a
browser, the download links it presents are via mirrors.ctan.org. I
think that would be considered the "primary download location" in
satisfaction of

https://devmanual.gentoo.org/ebuild-writing/variables/index.html#third-party-mirrors

We already mirror everything onto Gentoo infrastructure (unless it's
mirror-restricted!), so I think it would be simpler to avoid the
indirection here and simply use mirrors.ctan.org.

Anyway, thanks you for this usually thankless work on TeX.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-16 15:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16  9:26 [gentoo-dev] [PATCH 0/2] texlive eclass updates, in preperation of TeX Live 2023 bump Florian Schmaus
2024-01-16  9:26 ` [gentoo-dev] [PATCH 1/2] profiles/thirdpartymirrors: add 'ctan' mirror Florian Schmaus
2024-01-16 15:16   ` Michael Orlitzky
2024-01-16  9:26 ` [gentoo-dev] [PATCH 2/2] texlive-{common,module}.eclass: update for TeX Live 2023 Florian Schmaus
2024-01-16 10:35   ` Ulrich Mueller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox