public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2023-11-17  9:44 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2023-11-17  9:44 UTC (permalink / raw
  To: gentoo-commits

commit:     fa5c5b306d3b7282af1e575a08d5f74ca5ff6cd5
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 17 09:31:34 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Nov 17 09:31:34 2023 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=fa5c5b30

texlive-module.elcass: fuse EAPI case

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-module.eclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 6fa40aa..0ecab81 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -72,8 +72,7 @@
 # e.g. for enabling/disabling a feature
 
 case ${EAPI} in
-	7) ;;
-	8) ;;
+	7|8) ;;
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2023-11-17  9:44 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2023-11-17  9:44 UTC (permalink / raw
  To: gentoo-commits

commit:     13ea75aeff018cb119264c9a5935ba91f7ce495a
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 17 09:40:04 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Nov 17 09:43:42 2023 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=13ea75ae

texlive-{common,module}.eclass: reduce diff and cleanup

In preperation for the review of the eclass changes on the gentoo-dev
mailing list, cleanup the code and reduce the diff to the current
eclasses.

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 60 ++++++++++++++++++++++----------------------
 eclass/texlive-module.eclass | 11 +++++---
 2 files changed, 37 insertions(+), 34 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 9d6e959..7cab06f 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -18,7 +18,7 @@ case ${EAPI} in
 	7)
 		inherit eapi8-dosym
 		dosym(){ dosym8 "$@"; }
-		;; # BUG
+		;;
 	8) ;;
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
@@ -26,37 +26,39 @@ esac
 if [[ -z ${_TEXLIVE_COMMON_ECLASS} ]]; then
 _TEXLIVE_COMMON_ECLASS=1
 
-# BUG
-TEXMF_PATH=/usr/share/texmf-dist
-# TEXMF_DIST_PATH=/usr/share/texmf-dist
-# TEXMF_VAR_PATH=/var/lib/texmf
-
-TEXDIR=
-TEXMFDIST=
-TEXMFSYSVAR=
-TEXMFSYSCONFIG=
-TEXMFLOCAL=
-TEXMFVAR=
-
 # @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 symlink them from their original location.
-# This is to allow easy update of texlive's configuration
-# VIA app-text/texlive-core eclass/texlive-module.eclass
+# 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.
+# 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
 			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."
-		dosym -r "/etc/texmf/$(dirname "${f}").d/$(basename "${f}")" "${TEXMF_PATH}/${f}"
+		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")
 }
 
@@ -64,7 +66,7 @@ texlive-common_handle_config_files() {
 # @DESCRIPTION:
 # Return if a file is present in the texmf tree
 # Call it from the directory containing texmf and texmf-dist
-# VIA app-text/texlive-core
+# Called by app-text/texlive-core.
 texlive-common_is_file_present_in_texmf() {
 	local mark="${T}/${1}.found"
 	if [[ -d texmf ]]; then
@@ -88,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.
-# VIA eclass/texlive-common.eclass eclass/texlive-module.eclass
+# Called by texlive-common.eclass and texlive-module.eclass.
 texlive-common_do_symlinks() {
 	while [[ ${#} != 0 ]]; do
 		case ${1} in
@@ -125,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.
-# VIA eclass/texlive-module.eclass
+# Called by texlive-module.eclass.
 etexlinks() {
 	# Install symlinks from formats to engines
 	texlive-common_do_symlinks $(sed '/^[      ]*#/d; /^[      ]*$/d' "$1" | awk '{print $1, $2}')
@@ -136,7 +138,7 @@ 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.
-# VIA app-text/epspdf eclass/texlive-module.eclass
+# Called by app-text/epspdf and texlive-module.eclass.
 dobin_texmf_scripts() {
 	while [[ ${#} -gt 0 ]] ; do
 		local trg
@@ -153,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.
-# VIA app-text/dvipsk app-text/texlive-core dev-libs/kpathsea eclass/texlive-module.eclass
+# 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
@@ -171,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.
-# VIA
 efmtutil-sys() {
 	if has_version 'app-text/texlive-core' ; then
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/bin/fmtutil-sys ]] ; then
@@ -225,5 +227,3 @@ texlive-common_append_to_src_uri() {
 }
 
 fi
-
-unset TEXDIR TEXMFDIST TEXMFSYSVAR TEXMFSYSCONFIG TEXMFLOCAL TEXMFVAR

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 0ecab81..2a1d7bb 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -155,7 +155,8 @@ texlive-module_src_unpack() {
 # @DESCRIPTION:
 # Creates/appends to a format.${PN}.cnf file for fmtutil.
 # It parses the AddFormat directive of tlpobj files to create it.
-# This will make fmtutil generate the formats when asked and allow the remaining src_compile phase to build the formats.
+# This will make fmtutil generate the formats when asked and allow the remaining
+# src_compile phase to build the formats.
 
 texlive-module_add_format() {
 	local name engine mode patterns options
@@ -405,7 +406,7 @@ texlive-module_src_install() {
 	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."
+			[[ -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
@@ -416,7 +417,8 @@ texlive-module_src_install() {
 # @FUNCTION: texlive-module_pkg_postinst
 # @DESCRIPTION:
 # exported function:
-# Run texmf-update to ensure the tex installation is consistent with the installed texmf trees.
+# Run texmf-update to ensure the tex installation is consistent with the
+# installed texmf trees.
 
 texlive-module_pkg_postinst() {
 	etexmf-update
@@ -426,7 +428,8 @@ texlive-module_pkg_postinst() {
 # @FUNCTION: texlive-module_pkg_postrm
 # @DESCRIPTION:
 # exported function:
-# Run texmf-update to ensure the tex installation is consistent with the installed texmf trees.
+# Run texmf-update to ensure the tex installation is consistent with the
+# installed texmf trees.
 
 texlive-module_pkg_postrm() {
 	etexmf-update


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2023-12-29 10:31 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2023-12-29 10:31 UTC (permalink / raw
  To: gentoo-commits

commit:     02a45ff97b50eb0ecffa7532bf1697b065b71925
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 29 10:30:20 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Dec 29 10:30:20 2023 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=02a45ff9

texlive-common.eclass: fix stray ')'

Thanks to François Bissey for reporting this.

Bug: https://bugs.gentoo.org/836779
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 7cab06f..d6c381a 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -58,7 +58,7 @@ texlive-common_handle_config_files() {
 		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}"
+		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")
 }
 


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-01-16 11:37 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-01-16 11:37 UTC (permalink / raw
  To: gentoo-commits

commit:     bb9ec7d4bafd5daad4d6e4897fc09dab7ee5a197
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 16 11:37:25 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Jan 16 11:37:25 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=bb9ec7d4

eclass: reduce diff, minor changes

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass |  4 ++--
 eclass/texlive-module.eclass | 38 +++++++++++++++++++-------------------
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index d6c381a..5de5830 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
@@ -36,7 +36,7 @@ _TEXLIVE_COMMON_ECLASS=1
 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,
+	# distribution-provided TeX Live installation is supposed to be,
 	# instead of texmf.
 	if ver_test -ge 2023; then
 		texmf_path=/usr/share/texmf-dist

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 2a1d7bb..afcd453 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
@@ -118,7 +118,7 @@ fi
 
 if [[ -n ${TEXLIVE_MODULE_OPTIONAL_ENGINE} ]] ; then
 	for engine in ${TEXLIVE_MODULE_OPTIONAL_ENGINE} ; do
-		IUSE="${IUSE} +${engine}" # TODO
+		IUSE="${IUSE} +${engine}"
 	done
 fi
 
@@ -161,19 +161,19 @@ texlive-module_src_unpack() {
 texlive-module_add_format() {
 	local name engine mode patterns options
 	eval $@
-	einfo "Appending to format.${PN}.cnf for $*"
+	einfo "Appending to format.${PN}.cnf for $@"
 
 	if [[ ! -d texmf-dist/fmtutil ]]; then
 		mkdir -p texmf-dist/fmtutil || die
 	fi
 
-	[[ -f texmf-dist/fmtutil/format.${PN}.cnf ]] || { echo "# Generated for ${PN}	by texlive-module.eclass" > "texmf-dist/fmtutil/format.${PN}.cnf"; }
-	[[ -n ${TEXLIVE_MODULE_OPTIONAL_ENGINE} ]] && has "${engine}" "${TEXLIVE_MODULE_OPTIONAL_ENGINE}" && use "!${engine}" && mode="disabled"
+	[[ -f texmf-dist/fmtutil/format.${PN}.cnf ]] || { echo "# Generated for ${PN}	by texlive-module.eclass" > texmf-dist/fmtutil/format.${PN}.cnf; }
+	[[ -n ${TEXLIVE_MODULE_OPTIONAL_ENGINE} ]] && has ${engine} ${TEXLIVE_MODULE_OPTIONAL_ENGINE} && use !${engine} && mode="disabled"
 	if [[ ${mode} = disabled ]]; then
-		printf "#! " >> "texmf-dist/fmtutil/format.${PN}.cnf" || die
+		printf "#! " >> texmf-dist/fmtutil/format.${PN}.cnf || die
 	fi
 	[[ -z ${patterns} ]] && patterns="-"
-	printf "%s\t%s\t%s\t%s\n" "${name}" "${engine}" "${patterns}" "${options}" >> "texmf-dist/fmtutil/format.${PN}.cnf" || die
+	printf "${name}\t${engine}\t${patterns}\t${options}\n" >> texmf-dist/fmtutil/format.${PN}.cnf || die
 }
 
 # @FUNCTION: texlive-module_make_language_def_lines
@@ -184,14 +184,14 @@ texlive-module_add_format() {
 texlive-module_make_language_def_lines() {
 	local lefthyphenmin righthyphenmin synonyms name file file_patterns file_exceptions luaspecial
 	eval $@
-	einfo "Generating language.def entry for $*"
+	einfo "Generating language.def entry for $@"
 	[[ -z ${lefthyphenmin} ]] && lefthyphenmin="2"
 	[[ -z ${righthyphenmin} ]] && righthyphenmin="3"
-	printf "\\addlanguage{%s}{%s}{}{%s}{%s}" "${name}" "${file}" "${lefthyphenmin}" "${righthyphenmin}" >> "${S}/language.${PN}.def" || die
+	echo "\\addlanguage{$name}{$file}{}{$lefthyphenmin}{$righthyphenmin}" >> "${S}/language.${PN}.def" || die
 	if [[ -n ${synonyms} ]]; then
-		for i in $(echo "${synonyms}" | tr ',' ' ') ; do
-			einfo "Generating language.def synonym ${i} for $*"
-			printf "\\addlanguage{%s}{%s}{}{%s}{%s}" "${i}" "${file}" "${lefthyphenmin}" "${righthyphenmin}" >> "${S}/language.${PN}.def" || die
+		for i in $(echo $synonyms | tr ',' ' ') ; do
+			einfo "Generating language.def synonym $i for $@"
+			echo "\\addlanguage{$i}{$file}{}{$lefthyphenmin}{$righthyphenmin}" >> "${S}/language.${PN}.def" || die
 		done
 	fi
 }
@@ -204,11 +204,11 @@ texlive-module_make_language_def_lines() {
 texlive-module_make_language_dat_lines() {
 	local lefthyphenmin righthyphenmin synonyms name file file_patterns file_exceptions luaspecial
 	eval $@
-	einfo "Generating language.dat entry for $*"
-	echo "${name} ${file}" >> "${S}/language.${PN}.dat" || die
+	einfo "Generating language.dat entry for $@"
+	echo "$name $file" >> "${S}/language.${PN}.dat" || die
 	if [[ -n ${synonyms} ]]; then
-		for i in $(echo "${synonyms}" | tr ',' ' ') ; do
-			einfo "Generating language.dat synonym ${i} for $*"
+		for i in $(echo ${synonyms} | tr ',' ' ') ; do
+			einfo "Generating language.dat synonym ${i} for $@"
 			echo "=${i}" >> "${S}/language.${PN}.dat" || die
 		done
 	fi
@@ -221,8 +221,8 @@ texlive-module_make_language_dat_lines() {
 
 texlive-module_synonyms_to_language_lua_line() {
 	local prev=""
-	for i in $(echo "$@" | tr ',' ' ') ; do
-		printf "${prev} '%s'" "${i}"
+	for i in $(echo $@ | tr ',' ' ') ; do
+		printf "${prev} '%s'" ${i}
 		prev=","
 	done
 }
@@ -240,7 +240,7 @@ texlive-module_make_language_lua_lines() {
 	eval $@
 	[[ -z ${lefthyphenmin}  ]] && lefthyphenmin="2"
 	[[ -z ${righthyphenmin} ]] && righthyphenmin="3"
-	einfo "Generating language.dat.lua entry for $*"
+	einfo "Generating language.dat.lua entry for $@"
 	printf "\t['%s'] = {\n" "${name}"                                                                   >> "${dest}" || die
 	printf "\t\tloader = '%s',\n" "${file}"                                                             >> "${dest}" || die
 	printf "\t\tlefthyphenmin = %s,\n\t\trighthyphenmin = %s,\n" "${lefthyphenmin}" "${righthyphenmin}" >> "${dest}" || die


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-01-16 11:42 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-01-16 11:42 UTC (permalink / raw
  To: gentoo-commits

commit:     2ecb4d1e62ccd0ad0e14419233d5c4ca424d1547
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 16 11:42:19 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Jan 16 11:42:19 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=2ecb4d1e

texlive-common.eclass: fix dosym usage

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 5de5830..066a8f4 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -17,7 +17,6 @@
 case ${EAPI} in
 	7)
 		inherit eapi8-dosym
-		dosym(){ dosym8 "$@"; }
 		;;
 	8) ;;
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
@@ -58,7 +57,10 @@ texlive-common_handle_config_files() {
 		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}"
+
+		local dosym=dosym
+		[[ ${EAPI} == 7 ]] && dosym=dosym8
+		${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")
 }
 


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-01-18 14:21 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-01-18 14:21 UTC (permalink / raw
  To: gentoo-commits

commit:     593d033f6b1af46842a0513e1c053516de69c01e
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 18 14:21:17 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Jan 18 14:21:17 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=593d033f

texlive-common.eclass: add CTAN_MIRROR_URL eclass variable

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 55f3f8d..fab6ff6 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -25,6 +25,21 @@ esac
 if [[ -z ${_TEXLIVE_COMMON_ECLASS} ]]; then
 _TEXLIVE_COMMON_ECLASS=1
 
+# @ECLASS_VARIABLE: CTAN_MIRROR_URL
+# @USER_VARIABLE
+# @DESCRIPTION:
+# This variable can be used to set the CTAN mirror that will be used to fetch
+# CTAN artifacts. Note that this mirror is usually only used as fallback
+# in case the Gentoo mirrors do not hold the requested files.
+#
+# Only Gentoo TeX developers may want to set this.
+#
+# Example:
+# @CODE
+# CTAN_MIRROR_URL='https://ftp.fau.de/ctan/' emerge -1v app-text/texlive-core
+# @CODE
+: "${CTAN_MIRROR_URL:="https://mirrors.ctan.org"}"
+
 # @FUNCTION: texlive-common_handle_config_files
 # @DESCRIPTION:
 # Has to be called in src_install after having installed the files in ${D}
@@ -218,7 +233,7 @@ texlive-common_append_to_src_uri() {
 		done
 	else
 		local texlive_ge_2023_devs=( flow )
-		local tl_mirror="https://mirrors.ctan.org/systems/texlive/tlnet/archive/"
+		local tl_mirror="${CTAN_MIRROR_URL%/}/systems/texlive/tlnet/archive/"
 
 		tl_uri=( "${tl_uri[@]/%/.${tl_pkgext}}" )
 		SRC_URI+=" ${tl_uri[*]/#/${tl_mirror}}"


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-01-31 15:11 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-01-31 15:11 UTC (permalink / raw
  To: gentoo-commits

commit:     05d9e59a30cdfc56705cb12d0472cc71bc82cf62
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 31 15:10:31 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Jan 31 15:10:31 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=05d9e59a

texlive-module.eclass: do not require TL_PV for dev-texlive/* packages

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-module.eclass | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index afcd453..d1bf0f8 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -85,6 +85,12 @@ HOMEPAGE="https://www.tug.org/texlive/"
 
 IUSE="doc source"
 
+if [[ -z ${TL_PV} ]] \
+	   && [[ ${EAPI} -ge 8 ]] \
+	   && [[ ${CATEGORY} == dev-texlive ]]; then
+	TL_PV=$(ver_cut 1)
+fi
+
 RDEPEND=">=app-text/texlive-core-${TL_PV:-${PV}}"
 # We do not need anything from SYSROOT:
 #   Everything is built from the texlive install in /


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-02-11 11:28 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-02-11 11:28 UTC (permalink / raw
  To: gentoo-commits

commit:     067dab6059c794daae87c6f397459532af6f93fb
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 11 11:12:58 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Feb 11 11:12:58 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=067dab60

texlive-common.eclass: add 'die' when invoking "texmf-update"

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index fab6ff6..eb012f2 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -177,7 +177,7 @@ dobin_texmf_scripts() {
 etexmf-update() {
 	if has_version 'app-text/texlive-core' ; then
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/sbin/texmf-update ]] ; then
-			"${EPREFIX}"/usr/sbin/texmf-update
+			"${EPREFIX}"/usr/sbin/texmf-update || die
 		else
 			ewarn "Cannot run texmf-update for some reason."
 			ewarn "Your texmf tree might be inconsistent with your configuration"


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-02-12 15:02 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-02-12 15:02 UTC (permalink / raw
  To: gentoo-commits

commit:     97b43be4c50c34648fddc478146fed66dcd3458b
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 12 10:04:41 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Feb 12 10:04:41 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=97b43be4

texlive-common.eclass: add --ignore-errors to etexmf-update and efmtutil-sys

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index eb012f2..adfb7da 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -168,16 +168,23 @@ dobin_texmf_scripts() {
 }
 
 # @FUNCTION: etexmf-update
+# @USAGE: [--ignore-errors]
 # @DESCRIPTION:
 # 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.
+# If --ignore-errors is provided, then a non-zero exit status of texmf-update does not
+# cause die to be invoked.
 # 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
-			"${EPREFIX}"/usr/sbin/texmf-update || die
+			"${EPREFIX}"/usr/sbin/texmf-update
+			local res="${?}"
+			if [[ "${?}" -ne 0 && "${#}" -ne 1 && "${1}" != "--ignore-errors" ]] && ver_test -ge 2023; then
+				die "texmf-update returned non-zero exit status ${res}"
+			fi
 		else
 			ewarn "Cannot run texmf-update for some reason."
 			ewarn "Your texmf tree might be inconsistent with your configuration"
@@ -187,15 +194,22 @@ etexmf-update() {
 }
 
 # @FUNCTION: efmtutil-sys
+# @USAGE: [--ignore-errors]
 # @DESCRIPTION:
 # 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.
+# If --ignore-errors is provided, then a non-zero exit status of fmtutil-sys does not
+# cause die to be invoked.
 efmtutil-sys() {
 	if has_version 'app-text/texlive-core' ; then
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/bin/fmtutil-sys ]] ; then
 			einfo "Rebuilding formats"
-			"${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null || die
+			"${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null
+			local res="${?}"
+			if [[ "${?}" -ne 0 && "${#}" -ne 1 && "${1}" != "--ignore-errors" ]]; then
+				die "fmtutil-sys returned non-zero exit status ${res}"
+			fi
 		else
 			ewarn "Cannot run fmtutil-sys for some reason."
 			ewarn "Your formats might be inconsistent with your installed ${PN} version"


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-02-29 17:46 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-02-29 17:46 UTC (permalink / raw
  To: gentoo-commits

commit:     5c53b0d8705844b07285212aba2de0be029c8064
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 29 17:46:10 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Feb 29 17:46:10 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=5c53b0d8

eclass: incorporate ML feedback

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 4 ++--
 eclass/texlive-module.eclass | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 85cdb8f..852f762 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -199,8 +199,8 @@ efmtutil-sys() {
 	if has_version 'app-text/texlive-core' ; then
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/bin/fmtutil-sys ]] ; then
 			einfo "Rebuilding formats"
-			"${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null \
-				|| die -n "fmtutil-sys returned non-zero exit status ${res}"
+			"${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null ||
+				die -n "fmtutil-sys returned non-zero exit status ${res}"
 		else
 			ewarn "Cannot run fmtutil-sys for some reason."
 			ewarn "Your formats might be inconsistent with your installed ${PN} version"

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index d1bf0f8..9fc4e61 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -86,7 +86,7 @@ HOMEPAGE="https://www.tug.org/texlive/"
 IUSE="doc source"
 
 if [[ -z ${TL_PV} ]] \
-	   && [[ ${EAPI} -ge 8 ]] \
+	   && [[ ${EAPI} != 7 ]] \
 	   && [[ ${CATEGORY} == dev-texlive ]]; then
 	TL_PV=$(ver_cut 1)
 fi


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-02-29 21:12 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-02-29 21:12 UTC (permalink / raw
  To: gentoo-commits

commit:     9f22daf0f154a07429fbbba80bd0f2bb2234fb9d
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 29 21:12:21 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Feb 29 21:12:21 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=9f22daf0

texlive-common.eclass: incorporate ML feedback, part 2

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 852f762..1e5c8a5 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -179,7 +179,7 @@ etexmf-update() {
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/sbin/texmf-update ]] ; then
 			"${EPREFIX}"/usr/sbin/texmf-update
 			local res="${?}"
-			if [[ "${?}" -ne 0 ]] && ver_test -ge 2023; then
+			if [[ "${res}" -ne 0 ]] && ver_test -ge 2023; then
 				die -n "texmf-update returned non-zero exit status ${res}"
 			fi
 		else
@@ -200,7 +200,7 @@ efmtutil-sys() {
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/bin/fmtutil-sys ]] ; then
 			einfo "Rebuilding formats"
 			"${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null ||
-				die -n "fmtutil-sys returned non-zero exit status ${res}"
+				die -n "fmtutil-sys returned non-zero exit status ${?}"
 		else
 			ewarn "Cannot run fmtutil-sys for some reason."
 			ewarn "Your formats might be inconsistent with your installed ${PN} version"


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-02  9:43 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-02  9:43 UTC (permalink / raw
  To: gentoo-commits

commit:     e240ede253109774a759c1ee7e1fd84bdca37410
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  2 09:43:26 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Apr  2 09:43:26 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=e240ede2

texlive-module.eclass: add texlive-module_update_tlpdb

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-module.eclass | 68 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 9fc4e61..08dd7e4 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -420,6 +420,72 @@ texlive-module_src_install() {
 	texlive-common_handle_config_files
 }
 
+# @FUNCTION: texlive-module_update_tlpdb
+# @DESCRIPTION:
+# Update the TexLive package database at /usr/share/tlpkg/texlive.tlpdb.
+
+texlive-module_update_tlpdb() {
+	[[ "${TL_PV}" -lt 2023 ]] && return
+
+	# If we are updating this package, then there is no need to update
+	# the tlpdb in postrm, as it will be again updated in postinst.
+	[[ -n "${REPLACING_VERSIONS}" && "${EBUILD_PHASE}" == postrm ]] && return
+
+	local tlpkg="${EROOT}"/usr/share/tlpkg
+	local tlpobj="${tlpkg}"/tlpobj
+	local tlpdb="${tlpkg}"/texlive.tlpdb
+
+	ebegin "Regenerating TexLive package database (${tlpdb}, ${EBUILD_PHASE})"
+
+	local new_tlpdb="${T}"/texlive.tlpdb
+
+	touch "${new_tlpdb}" || die
+
+	local f
+	local tlpobjs=()
+	for f in $(find "${tlpobj}" -maxdepth 1 -type f -name "*.tlpobj" | sort); do
+		tlpobjs+=( "${f}" )
+
+		if [[ ${#tlpobjs[@]} -lt 128 ]]; then
+			continue
+		fi
+
+		cat ${tlpobjs[@]} >> "${new_tlpdb}" || die
+		tlpobjs=()
+	done
+	if [[ ${#tlpobjs[@]} -gt 0 ]]; then
+		cat ${tlpobjs[@]} >> "${new_tlpdb}" || die
+	fi
+
+	if [[ -f "${tlpdb}" ]]; then
+		cmp -s "${new_tlpdb}" "${tlpdb}"
+		local ret=$?
+		case ${ret} in
+			# content equal
+			0)
+				# Nothing to do, return.
+				eend 0
+				return
+				;;
+			# content differs
+			1)
+				;;
+			# cmp failed with an error
+			*)
+				eend ${ret} "comparing new and existing tlpdb failed (exit status: ${ret})"
+				die
+				;;
+		esac
+	fi
+
+	mv "${new_tlpdb}" "${tlpdb}"
+	eend $? "moving tlpdb into position failed (exit status: ${?})" || die
+
+	if [[ ! -s "${tlpdb}" ]]; then
+		rm "${tlpdb}" || die
+	fi
+}
+
 # @FUNCTION: texlive-module_pkg_postinst
 # @DESCRIPTION:
 # exported function:
@@ -428,6 +494,7 @@ texlive-module_src_install() {
 
 texlive-module_pkg_postinst() {
 	etexmf-update
+	texlive-module_update_tlpdb
 	[[ -n ${TL_MODULE_INFORMATION} ]] && elog "${TL_MODULE_INFORMATION}"
 }
 
@@ -439,6 +506,7 @@ texlive-module_pkg_postinst() {
 
 texlive-module_pkg_postrm() {
 	etexmf-update
+	texlive-module_update_tlpdb
 }
 
 fi


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-02 13:58 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-02 13:58 UTC (permalink / raw
  To: gentoo-commits

commit:     0dc4e5e46353df7316b6ddf47f351a636423c620
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  2 13:57:48 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Apr  2 13:57:48 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=0dc4e5e4

texlive-module.eclass: improved texlive-common_append_to_src_uri

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-module.eclass | 27 ++++++++-------------------
 1 file changed, 8 insertions(+), 19 deletions(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 08dd7e4..1fb655b 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -425,11 +425,11 @@ texlive-module_src_install() {
 # Update the TexLive package database at /usr/share/tlpkg/texlive.tlpdb.
 
 texlive-module_update_tlpdb() {
-	[[ "${TL_PV}" -lt 2023 ]] && return
+	[[ ${TL_PV} -lt 2023 ]] && return
 
 	# If we are updating this package, then there is no need to update
 	# the tlpdb in postrm, as it will be again updated in postinst.
-	[[ -n "${REPLACING_VERSIONS}" && "${EBUILD_PHASE}" == postrm ]] && return
+	[[ -n ${REPLACING_VERSIONS} && ${EBUILD_PHASE} == postrm ]] && return
 
 	local tlpkg="${EROOT}"/usr/share/tlpkg
 	local tlpobj="${tlpkg}"/tlpobj
@@ -441,23 +441,12 @@ texlive-module_update_tlpdb() {
 
 	touch "${new_tlpdb}" || die
 
-	local f
-	local tlpobjs=()
-	for f in $(find "${tlpobj}" -maxdepth 1 -type f -name "*.tlpobj" | sort); do
-		tlpobjs+=( "${f}" )
+	find "${tlpobj}" -maxdepth 1 -type f -name "*.tlpobj" -print0 |
+		sort -z |
+		xargs -0 --no-run-if-empty cat >> "${new_tlpdb}"
+	assert "generating tlpdb failed"
 
-		if [[ ${#tlpobjs[@]} -lt 128 ]]; then
-			continue
-		fi
-
-		cat ${tlpobjs[@]} >> "${new_tlpdb}" || die
-		tlpobjs=()
-	done
-	if [[ ${#tlpobjs[@]} -gt 0 ]]; then
-		cat ${tlpobjs[@]} >> "${new_tlpdb}" || die
-	fi
-
-	if [[ -f "${tlpdb}" ]]; then
+	if [[ -f ${tlpdb} ]]; then
 		cmp -s "${new_tlpdb}" "${tlpdb}"
 		local ret=$?
 		case ${ret} in
@@ -481,7 +470,7 @@ texlive-module_update_tlpdb() {
 	mv "${new_tlpdb}" "${tlpdb}"
 	eend $? "moving tlpdb into position failed (exit status: ${?})" || die
 
-	if [[ ! -s "${tlpdb}" ]]; then
+	if [[ ! -s ${tlpdb} ]]; then
 		rm "${tlpdb}" || die
 	fi
 }


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-02 13:58 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-02 13:58 UTC (permalink / raw
  To: gentoo-commits

commit:     16ac66ae423a8ec84e2d4090695f1e739684b227
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  2 13:58:24 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Apr  2 13:58:24 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=16ac66ae

texlive-module.eclass: only invoke etexmf-update if not installing other version

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-module.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 1fb655b..15346a3 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -494,7 +494,7 @@ texlive-module_pkg_postinst() {
 # installed texmf trees.
 
 texlive-module_pkg_postrm() {
-	etexmf-update
+	[[ -z ${REPLACING_VERSIONS} ]] && etexmf-update
 	texlive-module_update_tlpdb
 }
 


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-03 16:20 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-03 16:20 UTC (permalink / raw
  To: gentoo-commits

commit:     c1639999f95c3b863b8e42cab56c91dbb3bdfb17
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  3 16:19:13 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Apr  3 16:20:03 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=c1639999

texlive-module.eclass: use REPLACED_BY_VERSION instead of REPLACING_VERSIONS in postrm

As pointed out by ulm, REPLACING_VERSIONS isn't defined in pkg_postrm,
but REPLACED_BY_VERSION is.

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-module.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 15346a3..a79b675 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -429,7 +429,7 @@ texlive-module_update_tlpdb() {
 
 	# If we are updating this package, then there is no need to update
 	# the tlpdb in postrm, as it will be again updated in postinst.
-	[[ -n ${REPLACING_VERSIONS} && ${EBUILD_PHASE} == postrm ]] && return
+	[[ ${EBUILD_PHASE} == postrm && -n ${REPLACED_BY_VERSION} ]] && return
 
 	local tlpkg="${EROOT}"/usr/share/tlpkg
 	local tlpobj="${tlpkg}"/tlpobj
@@ -494,7 +494,7 @@ texlive-module_pkg_postinst() {
 # installed texmf trees.
 
 texlive-module_pkg_postrm() {
-	[[ -z ${REPLACING_VERSIONS} ]] && etexmf-update
+	[[ -z ${REPLACED_BY_VERSION} ]] && etexmf-update
 	texlive-module_update_tlpdb
 }
 


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-04  8:39 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-04  8:39 UTC (permalink / raw
  To: gentoo-commits

commit:     e68d8092639d087b693dd26d80c688c697df19a2
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  3 17:11:49 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Apr  3 17:11:49 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=e68d8092

texlive-module.eclass: shorten ebegin message

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-module.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index a79b675..bfe5e12 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -435,7 +435,7 @@ texlive-module_update_tlpdb() {
 	local tlpobj="${tlpkg}"/tlpobj
 	local tlpdb="${tlpkg}"/texlive.tlpdb
 
-	ebegin "Regenerating TexLive package database (${tlpdb}, ${EBUILD_PHASE})"
+	ebegin "Regenerating TexLive package database"
 
 	local new_tlpdb="${T}"/texlive.tlpdb
 


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-04  8:39 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-04  8:39 UTC (permalink / raw
  To: gentoo-commits

commit:     1f7c05bcf94ecaec88e1bcccea022bd2e15106c9
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  4 08:39:22 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Apr  4 08:39:22 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=1f7c05bc

eclass: sync eclasses with ::gentoo

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 57 +++++++++++++++++++++++++++++++++++++++++-
 eclass/texlive-module.eclass | 59 ++------------------------------------------
 2 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 1e5c8a5..66d3999 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -179,7 +179,8 @@ etexmf-update() {
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/sbin/texmf-update ]] ; then
 			"${EPREFIX}"/usr/sbin/texmf-update
 			local res="${?}"
-			if [[ "${res}" -ne 0 ]] && ver_test -ge 2023; then
+			if [[ "${res}" -ne 0 ]] &&
+				   { [[ ${CATEGORY} != dev-texlive ]] || ver_test -ge 2023; } then
 				die -n "texmf-update returned non-zero exit status ${res}"
 			fi
 		else
@@ -248,4 +249,58 @@ texlive-common_append_to_src_uri() {
 	fi
 }
 
+# @FUNCTION: texlive-common_update_tlpdb
+# @DESCRIPTION:
+# Update the TexLive package database at /usr/share/tlpkg/texlive.tlpdb.
+texlive-common_update_tlpdb() {
+	[[ -v TL_PV && ${TL_PV} -lt 2023 ]] && return
+
+	# If we are updating this package, then there is no need to update
+	# the tlpdb in postrm, as it will be again updated in postinst.
+	[[ ${EBUILD_PHASE} == postrm && -n ${REPLACED_BY_VERSION} ]] && return
+
+	local tlpkg="${EROOT}"/usr/share/tlpkg
+	local tlpobj="${tlpkg}"/tlpobj
+	local tlpdb="${tlpkg}"/texlive.tlpdb
+
+	ebegin "Regenerating TexLive package database"
+
+	local new_tlpdb="${T}"/texlive.tlpdb
+
+	touch "${new_tlpdb}" || die
+
+	find "${tlpobj}" -maxdepth 1 -type f -name "*.tlpobj" -print0 |
+		sort -z |
+		xargs -0 --no-run-if-empty cat >> "${new_tlpdb}"
+	assert "generating tlpdb failed"
+
+	if [[ -f ${tlpdb} ]]; then
+		cmp -s "${new_tlpdb}" "${tlpdb}"
+		local ret=$?
+		case ${ret} in
+			# content equal
+			0)
+				# Nothing to do, return.
+				eend 0
+				return
+				;;
+			# content differs
+			1)
+				;;
+			# cmp failed with an error
+			*)
+				eend ${ret} "comparing new and existing tlpdb failed (exit status: ${ret})"
+				die
+				;;
+		esac
+	fi
+
+	mv "${new_tlpdb}" "${tlpdb}"
+	eend $? "moving tlpdb into position failed (exit status: ${?})" || die
+
+	if [[ ! -s ${tlpdb} ]]; then
+		rm "${tlpdb}" || die
+	fi
+}
+
 fi

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index bfe5e12..401b75b 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -420,61 +420,6 @@ texlive-module_src_install() {
 	texlive-common_handle_config_files
 }
 
-# @FUNCTION: texlive-module_update_tlpdb
-# @DESCRIPTION:
-# Update the TexLive package database at /usr/share/tlpkg/texlive.tlpdb.
-
-texlive-module_update_tlpdb() {
-	[[ ${TL_PV} -lt 2023 ]] && return
-
-	# If we are updating this package, then there is no need to update
-	# the tlpdb in postrm, as it will be again updated in postinst.
-	[[ ${EBUILD_PHASE} == postrm && -n ${REPLACED_BY_VERSION} ]] && return
-
-	local tlpkg="${EROOT}"/usr/share/tlpkg
-	local tlpobj="${tlpkg}"/tlpobj
-	local tlpdb="${tlpkg}"/texlive.tlpdb
-
-	ebegin "Regenerating TexLive package database"
-
-	local new_tlpdb="${T}"/texlive.tlpdb
-
-	touch "${new_tlpdb}" || die
-
-	find "${tlpobj}" -maxdepth 1 -type f -name "*.tlpobj" -print0 |
-		sort -z |
-		xargs -0 --no-run-if-empty cat >> "${new_tlpdb}"
-	assert "generating tlpdb failed"
-
-	if [[ -f ${tlpdb} ]]; then
-		cmp -s "${new_tlpdb}" "${tlpdb}"
-		local ret=$?
-		case ${ret} in
-			# content equal
-			0)
-				# Nothing to do, return.
-				eend 0
-				return
-				;;
-			# content differs
-			1)
-				;;
-			# cmp failed with an error
-			*)
-				eend ${ret} "comparing new and existing tlpdb failed (exit status: ${ret})"
-				die
-				;;
-		esac
-	fi
-
-	mv "${new_tlpdb}" "${tlpdb}"
-	eend $? "moving tlpdb into position failed (exit status: ${?})" || die
-
-	if [[ ! -s ${tlpdb} ]]; then
-		rm "${tlpdb}" || die
-	fi
-}
-
 # @FUNCTION: texlive-module_pkg_postinst
 # @DESCRIPTION:
 # exported function:
@@ -483,7 +428,7 @@ texlive-module_update_tlpdb() {
 
 texlive-module_pkg_postinst() {
 	etexmf-update
-	texlive-module_update_tlpdb
+	texlive-common_update_tlpdb
 	[[ -n ${TL_MODULE_INFORMATION} ]] && elog "${TL_MODULE_INFORMATION}"
 }
 
@@ -495,7 +440,7 @@ texlive-module_pkg_postinst() {
 
 texlive-module_pkg_postrm() {
 	[[ -z ${REPLACED_BY_VERSION} ]] && etexmf-update
-	texlive-module_update_tlpdb
+	texlive-common_update_tlpdb
 }
 
 fi


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-04 13:02 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-04 13:02 UTC (permalink / raw
  To: gentoo-commits

commit:     804e524453a37ddf30a749996ee6d79bce3fc738
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  4 12:45:04 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Apr  4 12:45:14 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=804e5244

efmtutil-sys: use ebegin/eend and log output

Use ebegin/eend and instead of redirecting the output to /dev/null
capture stdout and stderr under a file under $T.

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 66d3999..0cc61f7 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -199,9 +199,11 @@ etexmf-update() {
 efmtutil-sys() {
 	if has_version 'app-text/texlive-core' ; then
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/bin/fmtutil-sys ]] ; then
-			einfo "Rebuilding formats"
-			"${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null ||
-				die -n "fmtutil-sys returned non-zero exit status ${?}"
+			ebegin "Rebuilding TexLive formats"
+			"${EPREFIX}"/usr/bin/fmtutil-sys --all \
+						> "${T}"/fmutil-sys-all.log \
+						&> "${T}"/fmutil-sys-all.err.log
+			eend $? || die -n "fmtutil-sys returned non-zero exit status ${?}"
 		else
 			ewarn "Cannot run fmtutil-sys for some reason."
 			ewarn "Your formats might be inconsistent with your installed ${PN} version"


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-04 13:02 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-04 13:02 UTC (permalink / raw
  To: gentoo-commits

commit:     e4ac872fc8dc3e3c86431ee40acbffc7222e3959
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  4 12:45:04 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Apr  4 13:02:41 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=e4ac872f

texlive-common.eclass: efmtutil-sys: use ebegin/eend and log output

Use ebegin/eend and instead of redirecting the output to /dev/null
capture stdout and stderr under a file under $T.

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 66d3999..0cc61f7 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -199,9 +199,11 @@ etexmf-update() {
 efmtutil-sys() {
 	if has_version 'app-text/texlive-core' ; then
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/bin/fmtutil-sys ]] ; then
-			einfo "Rebuilding formats"
-			"${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null ||
-				die -n "fmtutil-sys returned non-zero exit status ${?}"
+			ebegin "Rebuilding TexLive formats"
+			"${EPREFIX}"/usr/bin/fmtutil-sys --all \
+						> "${T}"/fmutil-sys-all.log \
+						&> "${T}"/fmutil-sys-all.err.log
+			eend $? || die -n "fmtutil-sys returned non-zero exit status ${?}"
 		else
 			ewarn "Cannot run fmtutil-sys for some reason."
 			ewarn "Your formats might be inconsistent with your installed ${PN} version"


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-04 13:05 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-04 13:05 UTC (permalink / raw
  To: gentoo-commits

commit:     296d5d3a60efb93d3020a972bb9064c9376d4443
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  4 13:05:40 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Apr  4 13:05:50 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=296d5d3a

use 2> instead of &>

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 0cc61f7..9cbb81b 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -202,7 +202,7 @@ efmtutil-sys() {
 			ebegin "Rebuilding TexLive formats"
 			"${EPREFIX}"/usr/bin/fmtutil-sys --all \
 						> "${T}"/fmutil-sys-all.log \
-						&> "${T}"/fmutil-sys-all.err.log
+						2> "${T}"/fmutil-sys-all.err.log
 			eend $? || die -n "fmtutil-sys returned non-zero exit status ${?}"
 		else
 			ewarn "Cannot run fmtutil-sys for some reason."


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-30  8:16 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-30  8:16 UTC (permalink / raw
  To: gentoo-commits

commit:     d27a512b8f11a2aa7618046dc9aae04d486195b1
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 30 08:16:14 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Apr 30 08:16:44 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=d27a512b

texlive-common.eclass: sync

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 9cbb81b..15d4757 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -199,11 +199,9 @@ etexmf-update() {
 efmtutil-sys() {
 	if has_version 'app-text/texlive-core' ; then
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/bin/fmtutil-sys ]] ; then
-			ebegin "Rebuilding TexLive formats"
-			"${EPREFIX}"/usr/bin/fmtutil-sys --all \
-						> "${T}"/fmutil-sys-all.log \
-						2> "${T}"/fmutil-sys-all.err.log
-			eend $? || die -n "fmtutil-sys returned non-zero exit status ${?}"
+			einfo "Rebuilding formats"
+			"${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null ||
+				die -n "fmtutil-sys returned non-zero exit status ${?}"
 		else
 			ewarn "Cannot run fmtutil-sys for some reason."
 			ewarn "Your formats might be inconsistent with your installed ${PN} version"
@@ -271,10 +269,14 @@ texlive-common_update_tlpdb() {
 
 	touch "${new_tlpdb}" || die
 
-	find "${tlpobj}" -maxdepth 1 -type f -name "*.tlpobj" -print0 |
-		sort -z |
-		xargs -0 --no-run-if-empty cat >> "${new_tlpdb}"
-	assert "generating tlpdb failed"
+	if [[ -d "${tlpobj}" ]]; then
+		# The "sed -s '$G' below concatenates all tlpobj files separated
+		# by a newline.
+		find "${tlpobj}" -maxdepth 1 -type f -name "*.tlpobj" -print0 |
+			sort -z |
+			xargs -0 --no-run-if-empty sed -s '$G' >> "${new_tlpdb}"
+		assert "generating tlpdb failed"
+	fi
 
 	if [[ -f ${tlpdb} ]]; then
 		cmp -s "${new_tlpdb}" "${tlpdb}"


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-30  8:53 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-30  8:53 UTC (permalink / raw
  To: gentoo-commits

commit:     3712036188bab4a9c8cbb5734879a8f573a31b3e
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 30 08:51:25 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Apr 30 08:51:39 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=37120361

texlive-module.eclass: install man pages in right location

The TeX Live packages under dev-texlive/* currently do not install the
man pages in the right location. They are under
/usr/share/texmf-dist/doc/man.

Install them at the right location using doman.

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-module.eclass | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 401b75b..11d869a 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -79,7 +79,7 @@ esac
 if [[ -z ${_TEXLIVE_MODULE_ECLASS} ]]; then
 _TEXLIVE_MODULE_ECLASS=1
 
-inherit texlive-common
+inherit estack texlive-common
 
 HOMEPAGE="https://www.tug.org/texlive/"
 
@@ -359,6 +359,16 @@ texlive-module_src_install() {
 		if [[ -d texmf-doc ]]; then
 			cp -pR texmf-doc "${ED}/usr/share/" || die
 		fi
+
+		if ver_test -ge 2023 && [[ ${CATEGORY} == dev-texlive ]]; then
+			eshopts_push -s nullglob
+			local man_page
+			for man_page in texmf-dist/doc/man/man[1-8]/*.[1-8]; do
+				doman "${man_page}"
+				rm "${man_page}" || die
+			done
+			eshopts_pop
+		fi
 	else
 		if [[ -d texmf-dist/doc ]]; then
 			rm -rf texmf-dist/doc || die


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-30 10:05 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-30 10:05 UTC (permalink / raw
  To: gentoo-commits

commit:     facf304132678fa20281007a18adfaa1847a6120
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 30 10:04:59 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Apr 30 10:05:07 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=facf3041

avoid loop in man page installation

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-module.eclass | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 11d869a..8035322 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -362,11 +362,8 @@ texlive-module_src_install() {
 
 		if ver_test -ge 2023 && [[ ${CATEGORY} == dev-texlive ]]; then
 			eshopts_push -s nullglob
-			local man_page
-			for man_page in texmf-dist/doc/man/man[1-8]/*.[1-8]; do
-				doman "${man_page}"
-				rm "${man_page}" || die
-			done
+			doman texmf-dist/doc/man/man[0-9n]/*.[0-9n]
+			rm texmf-dist/doc/man/man[0-9n]/*.[0-9n] || die
 			eshopts_pop
 		fi
 	else


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-30 15:10 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-30 15:10 UTC (permalink / raw
  To: gentoo-commits

commit:     e02fd5a89532831e1cdef79dbc495151f009f838
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 30 15:09:44 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Apr 30 15:09:44 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=e02fd5a8

texlive-module.eclass: exclude texlive-core man pages from being installed

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-module.eclass | 184 +++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 179 insertions(+), 5 deletions(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 8035322..1ed039d 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -79,7 +79,7 @@ esac
 if [[ -z ${_TEXLIVE_MODULE_ECLASS} ]]; then
 _TEXLIVE_MODULE_ECLASS=1
 
-inherit estack texlive-common
+inherit texlive-common
 
 HOMEPAGE="https://www.tug.org/texlive/"
 
@@ -361,10 +361,184 @@ texlive-module_src_install() {
 		fi
 
 		if ver_test -ge 2023 && [[ ${CATEGORY} == dev-texlive ]]; then
-			eshopts_push -s nullglob
-			doman texmf-dist/doc/man/man[0-9n]/*.[0-9n]
-			rm texmf-dist/doc/man/man[0-9n]/*.[0-9n] || die
-			eshopts_pop
+			local texlive_core_man_pages=(
+				afm2pl.1
+				aleph.1
+				allcm.1
+				allec.1
+				allneeded.1
+				amstex.1
+				autosp.1
+				axohelp.1
+				bibtex.1
+				chkdvifont.1
+				chktex.1
+				chkweb.1
+				ctangle.1
+				ctie.1
+				ctwill.1
+				ctwill-refsort.1
+				ctwill-twinx.1
+				cweave.1
+				cweb.1
+				detex.1
+				devnag.1
+				deweb.1
+				disdvi.1
+				dt2dv.1
+				dv2dt.1
+				dvi2fax.1
+				dvi2tty.1
+				dvibook.1
+				dviconcat.1
+				dvicopy.1
+				dvidvi.1
+				dvihp.1
+				dvilj.1
+				dvilj2p.1
+				dvilj4.1
+				dvilj4l.1
+				dvilj6.1
+				dvilualatex-dev.1
+				dviluatex.1
+				dvipdfm.1
+				dvipdfmx.1
+				dvipdft.1
+				dvipos.1
+				dvired.1
+				dviselect.1
+				dvispc.1
+				dvitodvi.1
+				dvitomp.1
+				dvitype.1
+				e2pall.1
+				ebb.1
+				eptex.1
+				euptex.1
+				extractbb.1
+				fmtutil.1
+				fmtutil.cnf.5
+				fmtutil-sys.1
+				fontinst.1
+				gftodvi.1
+				gftopk.1
+				gftype.1
+				gsftopk.1
+				hishrink.1
+				histretch.1
+				hitex.1
+				inimf.1
+				initex.1
+				kpsepath.1
+				kpsetool.1
+				kpsewhere.1
+				kpsexpand.1
+				lacheck.1
+				latex.1
+				latex-dev.1
+				luahbtex.1
+				luajittex.1
+				lualatex-dev.1
+				luatex.1
+				makeindex.1
+				makejvf.1
+				mendex.1
+				mf.1
+				mf-nowin.1
+				mft.1
+				mkindex.1
+				mkocp.1
+				mkofm.1
+				mktexfmt.1
+				mktexlsr.1
+				mktexmf.1
+				mktexpk.1
+				mktextfm.1
+				mpost.1
+				msxlint.1
+				odvicopy.1
+				odvitype.1
+				ofm2opl.1
+				opl2ofm.1
+				otangle.1
+				otp2ocp.1
+				outocp.1
+				ovf2ovp.1
+				ovp2ovf.1
+				patgen.1
+				pbibtex.1
+				pdfclose.1
+				pdfetex.1
+				pdflatex.1
+				pdflatex-dev.1
+				pdfopen.1
+				pdftex.1
+				pdftosrc.1
+				pktogf.1
+				pktype.1
+				platex-dev.1
+				pltotf.1
+				pmxab.1
+				pooltype.1
+				ppltotf.1
+				prepmx.1
+				ps2frag.1
+				pslatex.1
+				ptex.1
+				ptftopl.1
+				rubibtex.1
+				rumakeindex.1
+				scor2prt.1
+				synctex.1
+				synctex.5
+				tangle.1
+				tex.1
+				tex2aspc.1
+				texconfig.1
+				texconfig-sys.1
+				texhash.1
+				texlinks.1
+				texlua.1
+				texluac.1
+				tftopl.1
+				tie.1
+				tpic2pdftex.1
+				ttf2afm.1
+				ttfdump.1
+				twill.1
+				upbibtex.1
+				updmap.1
+				updmap.cfg.5
+				updmap-sys.1
+				uplatex-dev.1
+				uppltotf.1
+				uptex.1
+				uptftopl.1
+				vftovp.1
+				vlna.1
+				vptovf.1
+				weave.1
+				xdvipdfmx.1
+				xelatex-dev.1
+				xetex.1
+				xml2pmx.1
+			)
+			local grep_expressions=()
+			for f in "${texlive_core_man_pages[@]}"; do
+				# Ensure that all dots are escaped so that they are
+				# matched lilterarily. Also wrap the file in '/' and '$'
+				# within the expression.
+				grep_expressions+=(-e "/${f//./\\.}$")
+			done
+
+			find texmf-dist/doc/man -type f -name '*.[0-9n]' -print |
+				grep -v "${grep_expressions[@]}" |
+				xargs -d '\n' --no-run-if-empty doman
+			assert "error installing man pages"
+
+			# Delete all man pages under texmf-dist/doc/man
+			find texmf-dist/doc/man -type f -name '*.[0-9n]' -delete ||
+				die "error deleting man pages under texmf-dist"
 		fi
 	else
 		if [[ -d texmf-dist/doc ]]; then


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-04-30 17:45 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-04-30 17:45 UTC (permalink / raw
  To: gentoo-commits

commit:     40d8b1156d94b469d2ffc00d2f5c6f0ce628bec3
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 30 17:45:41 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Apr 30 17:45:41 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=40d8b115

texlive-module.eclass: use ebegin and eend

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-module.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 1ed039d..b02b2b8 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -531,10 +531,12 @@ texlive-module_src_install() {
 				grep_expressions+=(-e "/${f//./\\.}$")
 			done
 
+			ebegin "Installing man pages"
 			find texmf-dist/doc/man -type f -name '*.[0-9n]' -print |
 				grep -v "${grep_expressions[@]}" |
 				xargs -d '\n' --no-run-if-empty doman
-			assert "error installing man pages"
+			nonfatal assert -n
+			eend $? || die "error installing man pages"
 
 			# Delete all man pages under texmf-dist/doc/man
 			find texmf-dist/doc/man -type f -name '*.[0-9n]' -delete ||


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-05-02 17:45 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-05-02 17:45 UTC (permalink / raw
  To: gentoo-commits

commit:     b40da5fa4427360df77633ea7ea1890057235c92
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu May  2 17:45:28 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu May  2 17:45:28 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=b40da5fa

texlive-module.eclass: sync with ::gentoo

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-module.eclass | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index b02b2b8..da33e25 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -523,19 +523,23 @@ texlive-module_src_install() {
 				xetex.1
 				xml2pmx.1
 			)
+			local f
 			local grep_expressions=()
+			# Transform texlive_core_man_pages into grep expressions
+			# that will be used to filter out any man page that is
+			# already installed by app-text/texlive-core.
 			for f in "${texlive_core_man_pages[@]}"; do
 				# Ensure that all dots are escaped so that they are
-				# matched lilterarily. Also wrap the file in '/' and '$'
+				# matched literarily. Also wrap the file in '/' and '$'
 				# within the expression.
-				grep_expressions+=(-e "/${f//./\\.}$")
+				grep_expressions+=(-e "/${f//./\\.}\$")
 			done
 
 			ebegin "Installing man pages"
 			find texmf-dist/doc/man -type f -name '*.[0-9n]' -print |
 				grep -v "${grep_expressions[@]}" |
 				xargs -d '\n' --no-run-if-empty doman
-			nonfatal assert -n
+			[[ "${PIPESTATUS[*]}" =~ ^0(" 0")*$ ]]
 			eend $? || die "error installing man pages"
 
 			# Delete all man pages under texmf-dist/doc/man


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-05-13  8:36 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-05-13  8:36 UTC (permalink / raw
  To: gentoo-commits

commit:     e49352c3f24dc3de7901a5fd5b644174c1fdb030
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Mon May 13 08:36:23 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon May 13 08:36:23 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=e49352c3

texlive-module.eclass: sync with ::gentoo

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-module.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index da33e25..0daca41 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -360,7 +360,7 @@ texlive-module_src_install() {
 			cp -pR texmf-doc "${ED}/usr/share/" || die
 		fi
 
-		if ver_test -ge 2023 && [[ ${CATEGORY} == dev-texlive ]]; then
+		if ver_test -ge 2023 && [[ -d texmf-dist/doc/man && ${CATEGORY} == dev-texlive ]]; then
 			local texlive_core_man_pages=(
 				afm2pl.1
 				aleph.1


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-05-14  8:21 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-05-14  8:21 UTC (permalink / raw
  To: gentoo-commits

commit:     c08a374e11c8659a65337fdcd9323a97c09ed5fe
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue May 14 08:21:41 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue May 14 08:21:41 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=c08a374e

texlive-common.eclass: sync with ::gentoo

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 15d4757..072581d 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -22,6 +22,8 @@ case ${EAPI} in
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
+inherit edo
+
 if [[ -z ${_TEXLIVE_COMMON_ECLASS} ]]; then
 _TEXLIVE_COMMON_ECLASS=1
 
@@ -199,9 +201,9 @@ etexmf-update() {
 efmtutil-sys() {
 	if has_version 'app-text/texlive-core' ; then
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/bin/fmtutil-sys ]] ; then
-			einfo "Rebuilding formats"
-			"${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null ||
-				die -n "fmtutil-sys returned non-zero exit status ${?}"
+			edob -m "Rebuilding TexLive formats" \
+				 -l fmtutils-sys-all \
+				 "${EPREFIX}"/usr/bin/fmtutil-sys --all
 		else
 			ewarn "Cannot run fmtutil-sys for some reason."
 			ewarn "Your formats might be inconsistent with your installed ${PN} version"


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

* [gentoo-commits] proj/tex-overlay:main commit in: eclass/
@ 2024-07-26  7:47 Florian Schmaus
  0 siblings, 0 replies; 29+ messages in thread
From: Florian Schmaus @ 2024-07-26  7:47 UTC (permalink / raw
  To: gentoo-commits

commit:     4c0966cbf858a4cfa2c38b767571b948f8dc11a5
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 15 19:55:13 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Jul 16 09:32:43 2024 +0000
URL:        https://gitweb.gentoo.org/proj/tex-overlay.git/commit/?id=4c0966cb

texlive-common.eclass: Add TEXLIVE_SCRIPTS_W_FILE_EXT variable

Some scripts are supposed to be installed with file extensions [1, 2]. Add
support for declaring those scripts in a new elcass variable
TEXLIVE_SCRIPTS_W_FILE_EXT.

Also use pure-bash functions to retrieve the basename and strip the file
extensions. And use "declare -l" to lowercase the value of 'trg',
instead of 'tr' [3].

1: https://tug.org/pipermail/tldistro/2024q3/000485.html
2: https://github.com/TeX-Live/texlive-source/blob/c087bab35570b1d5cb0afd272611a7a4ec3c9e38/texk/texlive/linked_scripts/Makefile.am#L332-L333
3: https://github.com/TeX-Live/texlive-source/blob/c087bab35570b1d5cb0afd272611a7a4ec3c9e38/texk/texlive/linked_scripts/Makefile.am#L330

Bug: https://bugs.gentoo.org/934975
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 eclass/texlive-common.eclass | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 072581d..36b90a3 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -42,6 +42,13 @@ _TEXLIVE_COMMON_ECLASS=1
 # @CODE
 : "${CTAN_MIRROR_URL:="https://mirrors.ctan.org"}"
 
+# @ECLASS_VARIABLE: TEXLIVE_SCRIPTS_W_FILE_EXT
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If set, contains a space separated list of script names that should be
+# linked including their file extensions, i.e., without stripping
+# potentially existing filename extensions from the link's name.
+
 # @FUNCTION: texlive-common_handle_config_files
 # @DESCRIPTION:
 # Has to be called in src_install after having installed the files in ${D}
@@ -160,8 +167,17 @@ etexlinks() {
 # Called by app-text/epspdf and texlive-module.eclass.
 dobin_texmf_scripts() {
 	while [[ ${#} -gt 0 ]] ; do
-		local trg
-		trg=$(basename "${1}" | sed 's,\.[^/]*$,,' | tr '[:upper:]' '[:lower:]')
+		# -l: TexLive target links are always lowercase.
+		local -l trg
+
+		# Get the basename of the script.
+		trg="${1##*/}"
+
+		# Only strip the filename extensions if trg is not listed in TEXLIVE_SCRIPTS_W_FILE_EXT.
+		if ! has "${trg}" ${TEXLIVE_SCRIPTS_W_FILE_EXT}; then
+			trg="${trg%.*}"
+		fi
+
 		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}"


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

end of thread, other threads:[~2024-07-26  7:47 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-29 21:12 [gentoo-commits] proj/tex-overlay:main commit in: eclass/ Florian Schmaus
  -- strict thread matches above, loose matches on Subject: below --
2024-07-26  7:47 Florian Schmaus
2024-05-14  8:21 Florian Schmaus
2024-05-13  8:36 Florian Schmaus
2024-05-02 17:45 Florian Schmaus
2024-04-30 17:45 Florian Schmaus
2024-04-30 15:10 Florian Schmaus
2024-04-30 10:05 Florian Schmaus
2024-04-30  8:53 Florian Schmaus
2024-04-30  8:16 Florian Schmaus
2024-04-04 13:05 Florian Schmaus
2024-04-04 13:02 Florian Schmaus
2024-04-04 13:02 Florian Schmaus
2024-04-04  8:39 Florian Schmaus
2024-04-04  8:39 Florian Schmaus
2024-04-03 16:20 Florian Schmaus
2024-04-02 13:58 Florian Schmaus
2024-04-02 13:58 Florian Schmaus
2024-04-02  9:43 Florian Schmaus
2024-02-29 17:46 Florian Schmaus
2024-02-12 15:02 Florian Schmaus
2024-02-11 11:28 Florian Schmaus
2024-01-31 15:11 Florian Schmaus
2024-01-18 14:21 Florian Schmaus
2024-01-16 11:42 Florian Schmaus
2024-01-16 11:37 Florian Schmaus
2023-12-29 10:31 Florian Schmaus
2023-11-17  9:44 Florian Schmaus
2023-11-17  9:44 Florian Schmaus

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