summaryrefslogtreecommitdiff
path: root/eclass/texlive-common.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-08-07 12:37:21 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-08-07 12:37:21 +0100
commitb8c7370a682e4e29cda623222d17a790c01c3642 (patch)
treef6caa14689bd00a5760eadaa381ff41e50ef3c1b /eclass/texlive-common.eclass
parent8a4997a7e2d1e36c089d4d76935b5a902d98d3d0 (diff)
gentoo auto-resync : 07:08:2024 - 12:37:20
Diffstat (limited to 'eclass/texlive-common.eclass')
-rw-r--r--eclass/texlive-common.eclass20
1 files changed, 18 insertions, 2 deletions
diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 072581dde78e..36b90a327fde 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}"