From: "Florian Schmaus" <flow@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/tex-overlay:main commit in: eclass/
Date: Fri, 26 Jul 2024 07:47:19 +0000 (UTC) [thread overview]
Message-ID: <1721122363.4c0966cbf858a4cfa2c38b767571b948f8dc11a5.flow@gentoo> (raw)
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}"
next reply other threads:[~2024-07-26 7:47 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-26 7:47 Florian Schmaus [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-22 17:13 [gentoo-commits] proj/tex-overlay:main commit in: eclass/ Florian Schmaus
2024-11-22 17:13 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 21:12 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1721122363.4c0966cbf858a4cfa2c38b767571b948f8dc11a5.flow@gentoo \
--to=flow@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox