• [gentoo-dev] [PATCH] texlive-module.eclass: install man pages in right

    From Florian Schmaus@21:1/5 to All on Tue Apr 30 11:00:01 2024
    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@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 401b75bc4d11..11d869a7fa7b 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
    --
    2.43.2

    --- SoupGate-Win32 v1.05
  • From Florian Schmaus@21:1/5 to All on Wed May 1 10:50:02 2024
    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.

    Having dev-texlive/* packages installing man pages requires that we
    filter man pages already installed by app-text/texlive-core to avoid
    file collisions. As a consequence, unfortunately, we have to hard code
    the list of man pages installed by texlive-core. Or, at least, folks
    from #-tex and myself could not come up with a solution that does not
    require hard coding that list.

    Signed-off-by: Florian Schmaus <flow@gentoo.org>
    ---
    eclass/texlive-module.eclass | 186 +++++++++++++++++++++++++++++++++++
    1 file changed, 186 insertions(+)

    diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
    index 401b75bc4d11..293b6591a6b1 100644
    --- a/eclass/texlive-module.eclass
    +++ b/eclass/texlive-module.eclass
    @@ -359,6 +359,192 @@ 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 + 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
    +
  • From Ulrich Mueller@21:1/5 to All on Wed May 1 11:10:01 2024
    On Wed, 01 May 2024, Florian Schmaus wrote:

    + local grep_expressions=()

    Declare f as local, too.

    + # 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 '$'

    "literarily"

    + # within the expression.
    + grep_expressions+=(-e "/${f//./\\.}$")

    Hm, bash seems to be o.k. with this final lone dollar sign, but maybe it
    would be cleaner to escape it as "\$".

    + done

    -----BEGIN PGP SIGNATURE-----

    iQFDBAEBCAAtFiEEtDnZ1O9xIP68rzDbUYgzUIhBXi4FAmYyBmkPHHVsbUBnZW50 b28ub3JnAAoJEFGIM1CIQV4u6AEIAMd43COJvOyp/tF17SfoCapWdDE7yofRp0IF Eo0c6eCsnOdbyiLn8K/yPTtS/PER9taKmhM9w4MVQXTgVB/Hddh86toTfb2IvyL3 1vsqoE6GvhlLM/TD8898WdCsW8aehqs2Kg7rk5NE8sORKG/CE4TaJbvup3CBbkc7 I6kH1wZJU9D3rVXcuF/LIbKp893A1duCiIPlaw6Os7iMIPLinGmQyD8vB9YwQuC5 nRQtwuKsR3MdrgC3gvKLveDyILxh961dPRXJu40VfCFYfsbQzh+lFUqyIIPgFAuT fd3yHhVu3LaXJweop0uP4dUfj7wrzzIDwcEdKAlBVDKvYU/c0bg=
    =invG
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)