Skip to content
Snippets Groups Projects

community/texmf-dist: allow installing duplicate man pages

2 unresolved threads
1 file
+ 9
58
Compare changes
  • Side-by-side
  • Inline
  • This tries to be a maintainable solution for the issue that both the
    source repo for the texlive package and the sources for texmf-dist
    contain man pages for the applications provided by the texlive
    package.
    
    It adds a postfix to the man pages of texmf-dist, so that they can
    be installed at the same time. This wastes storage space for the
    duplicates. Especially since the man pages provided by `texlive-doc`
    should be considered the single source of truth for the man pages, it
    is suboptimal to have the duplicates. However, is absence of any
    obvious clean way to remove the duplicates, this may be a sensible
    alternative.
@@ -3,7 +3,7 @@
pkgname=texmf-dist
pkgver=2024.0
_release=20240312
pkgrel=3
pkgrel=4
pkgdesc="TeX Live texmf core distribution"
url="https://tug.org/texlive/"
# texlive
@@ -20,9 +20,10 @@ makedepends="
"
subpackages="
texmf-dist-doc
texmf-dist-examples:_examples
texmf-dist-lang:_lang
texmf-dist-full:_full
texmf-dist-full-doc:_full_doc
texmf-dist-full-examples:_full_examples
texmf-dist-most:_most
"
@@ -83,7 +84,12 @@ builddir="$srcdir/texlive-$_release-texmf"
# in the db. The split function for the -doc subpackages will then only
# compress the man pages.
for collection in $_collections; do
subpackages="$subpackages $pkgname-$collection:_subpkg $pkgname-$collection-doc:_subpkgdoc:noarch"
# the runfiles and srcfiles go in here
subpackages="$subpackages $pkgname-$collection:_subpkg"
# the man pages go in here
subpackages="$subpackages $pkgname-$collection-doc:_subpkgdoc:noarch"
# the other documentation goes in here
subpackages="$subpackages $pkgname-$collection-examples:_subpkgexamples:noarch"
done
_tlpdb="$srcdir/texlive-$pkgver.tlpdb"
@@ -180,11 +186,11 @@ _pack_collection() {
;;
texmf-dist/doc/man/*.1)
mkdir -p "$docdir/usr/share/man/man1"
cp "$builddir/$path" "$docdir/usr/share/man/man1/"
cp "$builddir/$path" "$docdir/usr/share/man/man1/${path##*/}texmf-dist"
;;
texmf-dist/doc/man/*.5)
mkdir -p "$docdir/usr/share/man/man5"
cp "$builddir/$path" "$docdir/usr/share/man/man5/"
cp "$builddir/$path" "$docdir/usr/share/man/man5/${path##*/}texmf-dist"
    • Comment on lines -183 to +187
      Developer

      sorry, checked the build logs first now, is it this that gives

      -usr/share/man/man1/bbl2bib.1.gz
      +usr/share/man/man1/bbl2bib.1texmf-dist.gz

      for example? I think it would be better if it was

      +usr/share/man/man1/bbl2bib-texmf-dist.1.gz
      • Note that man bbl2bib does work with bbl2bib.1*.gz, but with bbl2bib-texmf-dist.1.gz one would have to use man bbl2bib-texmf-dist to view it.

      • Developer

        oh, I didn't know, I was just about to push a suggestion with

        @@ -171,6 +171,7 @@ _pack_collection() {
                                        cp "$builddir/$path" "$datadir/usr/share/$path"
                                done
                                paths="$(_tlpdb_get_docfiles "$pkgsnip")"
        +                       local origman
                                for path in $paths; do
                                        case "$path" in
                                        texmf-dist/doc/man/*.pdf)
        @@ -179,12 +180,14 @@ _pack_collection() {
                                                # pack the smaller troff file
                                                ;;
                                        texmf-dist/doc/man/*.1)
        +                                       origman="${path##*/}"
                                                mkdir -p "$docdir/usr/share/man/man1"
        -                                       cp "$builddir/$path" "$docdir/usr/share/man/man1/"
        +                                       cp "$builddir/$path" "$docdir/usr/share/man/man1/${origman%%.*}-texmf-dist.1"
                                                ;;
                                        texmf-dist/doc/man/*.5)
        +                                       origman="${path##*/}"
                                                mkdir -p "$docdir/usr/share/man/man5"
        -                                       cp "$builddir/$path" "$docdir/usr/share/man/man5/"
        +                                       cp "$builddir/$path" "$docdir/usr/share/man/man5/${origman%%.*}-texmf-dist.5"
                                                ;;

        but you mean, as it was, man will also choose bbl2bib.1.gz over bbl2bib.1*.gz?

        Edited by omni
      • Yes, if both are available it prefers the one that has no prefix

      • Please register or sign in to reply
Please register or sign in to reply
;;
*)
mkdir -p "$docdir/usr/share/$(dirname "$path")"
@@ -276,60 +282,6 @@ package() {
mkdir -p "$pkgdir"/usr/share/tlpkg
cp -r "$srcdir/install-tl-$_release/tlpkg/TeXLive" \
"$pkgdir"/usr/share/tlpkg/
# Remove man pages already provided by texlive-doc.
local duplicates="
man1/afm2tfm.1
man1/bibtex.1
man1/dviluatex.1
man1/dvipdfm.1
man1/dvipdfmx.1
man1/dvipdft.1
man1/dvips.1
man1/ebb.1
man1/extractbb.1
man1/fmtutil-sys.1
man1/fmtutil.1
man1/gftodvi.1
man1/gftopk.1
man1/gftype.1
man1/inimf.1
man1/initex.1
man1/kpseaccess.1
man1/kpsereadlink.1
man1/kpsestat.1
man1/kpsewhich.1
man1/luahbtex.1
man1/luatex.1
man1/makeindex.1
man1/mf-nowin.1
man1/mf.1
man1/mft.1
man1/mkindex.1
man1/mktexfmt.1
man1/mktexlsr.1
man1/mktexmf.1
man1/mktexpk.1
man1/mktextfm.1
man1/pdfetex.1
man1/pdftex.1
man1/pktogf.1
man1/pktype.1
man1/tex.1
man1/texhash.1
man1/texlua.1
man1/texluac.1
man1/updmap-sys.1
man1/updmap.1
man1/xdvi.1
man1/xdvipdfmx.1
man5/fmtutil.cnf.5
man5/updmap.cfg.5
"
for duplicate in $duplicates; do
rm "${pkgdir%/}-doc/usr/share/man/$duplicate"
done
}
_subpkg() {
@@ -341,17 +293,33 @@ _subpkg() {
}
_subpkgdoc() {
local base
base="${subpkgname%-doc}"
local collection
collection="${base#texmf-dist-}"
# We cannot use default_doc, as this does not work for subpackges
pkgdesc="texmf-dist: $(_tlpdb_get_values "collection-$collection" shortdesc) (man pages)"
install_if="docs ${subpkgname%-doc}=$pkgver-r$pkgrel"
# compress man pages, if the doc packages contains some
# compress man pages, if the doc packages contains some uncompressed ones
if [ -d "$subpkgdir"/usr/share/man ]; then
find "$subpkgdir"/usr/share/man -type f ! -name "*.gz" \
-exec gzip -9 {} \;
fi
}
_subpkgexamples() {
local base
base="${subpkgname%-examples}"
local collection
collection="${base#texmf-dist-}"
pkgdesc="texmf-dist: $(_tlpdb_get_values "collection-$collection" shortdesc) (examples and documentation)"
depends="$base $base-doc"
mkdir -p "$subpkgdir"
}
_most() {
pkgdesc="TeX Live texmf distribution including most packages"
# everything but texmf-dist-lang* and texmf-dist-fontsextra
@@ -387,17 +355,24 @@ _lang() {
mkdir -p "$subpkgdir"
}
_examples() {
pkgdesc="$pkgdesc (examples and doc)"
depends="$pkgname $pkgname-doc"
mkdir -p "$subpkgdir"
}
_full() {
pkgdesc="Full TeX Live texmf distribution"
depends="$pkgname-most $pkgname-lang $pkgname-fontsextra"
mkdir -p "$subpkgdir"
}
_full_doc() {
pkgdesc="Full documentation for the TeX Live texmf distribution"
depends="$pkgname-doc"
_full_examples() {
pkgdesc="All examples and documentation for the TeX Live texmf distribution"
depends="$pkgname-examples"
for collection in $_collections; do
depends="$depends $pkgname-$collection-doc"
depends="$depends $pkgname-$collection-doc $pkgname-$collection-examples"
done
mkdir -p "$subpkgdir"
}
Loading