diff options
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 91 | ||||
-rw-r--r-- | tllocalmgr-2022.patch | 13 | ||||
-rw-r--r-- | tllocalmgr-better-conflicts.patch | 21 | ||||
-rw-r--r-- | tllocalmgr-enhance.patch | 58 | ||||
-rw-r--r-- | tllocalmgr-fix-texlive-local-match.patch | 13 | ||||
-rw-r--r-- | tllocalmgr-mirror-opt.patch | 13 | ||||
-rw-r--r-- | tllocalmgr-pkgs-nicer-error.patch | 39 |
8 files changed, 241 insertions, 36 deletions
@@ -1,22 +1,33 @@ pkgbase = texlive-localmanager-git pkgdesc = A shell and command-line utility to manage TeXLive on Arch Linux - pkgver = 0.7 - pkgrel = 1 - url = http://wiki.archlinux.org/index.php?title=TeXLive#TeXLive_Local_Manager - install = tllocalmgr.install + pkgver = r84.bbd8488 + pkgrel = 5 + url = https://gitlab.archlinux.org/remy/texlive-localmanager.git arch = any license = GPL makedepends = git - depends = texlive-core>=2011 + depends = texlive-core>=2016 + depends = texlive-core<2023 depends = perl-libwww depends = perl-term-shellui depends = perl-term-readline-gnu depends = perl-list-moreutils - provides = texlive-localmanager=0.7 + depends = perl-lwp-protocol-https + provides = texlive-localmanager=r84.bbd8488 conflicts = texlive-localmanager - source = texlive-localmanager::git://projects.archlinux.org/users/remy/texlive-localmanager.git - md5sums = SKIP + source = texlive-localmanager::git+https://gitlab.archlinux.org/remy/texlive-localmanager.git + source = tllocalmgr-2022.patch + source = tllocalmgr-enhance.patch + source = tllocalmgr-fix-texlive-local-match.patch + source = tllocalmgr-pkgs-nicer-error.patch + source = tllocalmgr-mirror-opt.patch + source = tllocalmgr-better-conflicts.patch sha256sums = SKIP + sha256sums = 7eb0982890b2d4de29d391db59dd4a8c6308bca2327433f08da265bf69ca71ca + sha256sums = 22222ff329919ee6a16ffd489b0213b14f8169d9daf6ef1a82aa5ab37538c236 + sha256sums = a7698d0076f4e1a7ef401899c174ed9a290674a7e89e9c818ba078e17548c6e7 + sha256sums = 23f103c606eb595d8c114aee2ca3006a09588370087b959419f86a4a8ce25a43 + sha256sums = d7064657f6336bed7be230fc05df800e6bdcee31d10c718b4b9b1b55f7f26c8a + sha256sums = 380cdb0dd8531dcab13b8da70506214bccb7252ddd19ad50a5be25fac3b39ea2 pkgname = texlive-localmanager-git - @@ -1,45 +1,82 @@ -# Maintainer: XZS <d dot f dot fischer at web dot de> +# Maintainer: Hans-Nikolai Viessmann <hans at viess dot mn> +# Contributor: XZS <d dot f dot fischer at web dot de> # Contributor: Stefan Husmann <stefan-husmann@t-online.de> # Contributor: Rémy Oudompheng <remy@archlinux.org> # Contributor: Firmicus <francois . archlinux . org> pkgname=texlive-localmanager-git -pkgver=0.7 -pkgrel=1 -pkgdesc="A shell and command-line utility to manage TeXLive on Arch Linux" +_pkgname="${pkgname%-git}" +pkgver=r84.bbd8488 +pkgrel=5 +pkgdesc='A shell and command-line utility to manage TeXLive on Arch Linux' arch=('any') -url="http://wiki.archlinux.org/index.php?title=TeXLive#TeXLive_Local_Manager" +url='https://gitlab.archlinux.org/remy/texlive-localmanager.git' license=('GPL') -depends=('texlive-core>=2011' +provides=("texlive-localmanager=$pkgver") +conflicts=('texlive-localmanager') +depends=('texlive-core>=2016' + 'texlive-core<2023' 'perl-libwww' 'perl-term-shellui' 'perl-term-readline-gnu' - 'perl-list-moreutils') -install='tllocalmgr.install' - -_giturl="git://projects.archlinux.org/users/remy/${pkgname%-git}.git" -makedepends+=('git') -source+=("${_gitname:=${pkgname%-git}}::${_giturl:-git+$url}") -for integ in $(get_integlist) -do - typeset -n array="${integ}sums" - array+=('SKIP') -done -provides+=("$_gitname=$pkgver") -conflicts+=("$_gitname") + 'perl-list-moreutils' + 'perl-lwp-protocol-https') +makedepends=('git') + +source=("${_pkgname}::git+https://gitlab.archlinux.org/remy/texlive-localmanager.git" + 'tllocalmgr-2022.patch' + 'tllocalmgr-enhance.patch' + 'tllocalmgr-fix-texlive-local-match.patch' + 'tllocalmgr-pkgs-nicer-error.patch' + 'tllocalmgr-mirror-opt.patch' + 'tllocalmgr-better-conflicts.patch') +sha256sums=('SKIP' + '7eb0982890b2d4de29d391db59dd4a8c6308bca2327433f08da265bf69ca71ca' + '22222ff329919ee6a16ffd489b0213b14f8169d9daf6ef1a82aa5ab37538c236' + 'a7698d0076f4e1a7ef401899c174ed9a290674a7e89e9c818ba078e17548c6e7' + '23f103c606eb595d8c114aee2ca3006a09588370087b959419f86a4a8ce25a43' + 'd7064657f6336bed7be230fc05df800e6bdcee31d10c718b4b9b1b55f7f26c8a' + '380cdb0dd8531dcab13b8da70506214bccb7252ddd19ad50a5be25fac3b39ea2') + pkgver() { - cd ${_gitname:-$pkgname} - git describe --long --tags 2>/dev/null | sed 's/[^[:digit:]]*\(.\+\)-\([[:digit:]]\+\)-g\([[:xdigit:]]\{7\}\)/\1.r\2.g\3/;t;q1' - [ ${PIPESTATUS[0]} -ne 0 ] && \ -printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "$_pkgname" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +prepare() { + cd "$_pkgname" + + # update to handle texlive-2022 releases + patch -p1 < "$srcdir/tllocalmgr-2022.patch" + + # enhances the tllocalmgr script a bit + # thanks: @sharethewisdom and @cobaltspace + patch -p1 < "$srcdir/tllocalmgr-enhance.patch" + + # fix missing exclusion of matches for texlive local packages + # thanks: @CaptainBern + patch -p1 < "$srcdir/tllocalmgr-fix-texlive-local-match.patch" + + # make error on missing 'pkgs' file non-fatal, improve error msg + patch -p1 < "$srcdir/tllocalmgr-pkgs-nicer-error.patch" + + # correctly pass --mirror option + patch -p1 < "$srcdir/tllocalmgr-mirror-opt.patch" + + # some CTAN packages are not in any texlive collection, so there is + # no need to set a conflict within PKGBUILD + patch -p1 < "$srcdir/tllocalmgr-better-conflicts.patch" } package() { - cd "$_gitname" - install -d $pkgdir/usr/{bin,share/texmf/arch/tlpkg/TeXLive} - install -m755 tllocalmgr $pkgdir/usr/bin/ + cd "$_pkgname" + install -d "$pkgdir/usr/"{bin,share/texmf/arch/tlpkg/TeXLive} + install -m755 tllocalmgr "$pkgdir/usr/bin/" cd tlpkg/TeXLive for _f in *; do - install -m644 $_f $pkgdir/usr/share/texmf/arch/tlpkg/TeXLive/ + install -m644 "$_f" "$pkgdir/usr/share/texmf/arch/tlpkg/TeXLive/" done } diff --git a/tllocalmgr-2022.patch b/tllocalmgr-2022.patch new file mode 100644 index 000000000000..92af3ec1a54e --- /dev/null +++ b/tllocalmgr-2022.patch @@ -0,0 +1,13 @@ +diff --git a/tlpkg/TeXLive/TLConfig.pm b/tlpkg/TeXLive/TLConfig.pm +index e27f70b..b6e5101 100644 +--- a/tlpkg/TeXLive/TLConfig.pm ++++ b/tlpkg/TeXLive/TLConfig.pm +@@ -57,7 +57,7 @@ BEGIN { + + # the year of our release, will be used in the location of the + # network packages, and in menu names, and other places. +-$ReleaseYear = 2019; ++$ReleaseYear = 2022; + + # users can upgrade from this year to the current year; might be the + # same as the release year, or any number of releases earlier. diff --git a/tllocalmgr-better-conflicts.patch b/tllocalmgr-better-conflicts.patch new file mode 100644 index 000000000000..293c898c319e --- /dev/null +++ b/tllocalmgr-better-conflicts.patch @@ -0,0 +1,21 @@ +--- a/tllocalmgr 2022-04-30 12:51:53.267184213 +0200 ++++ b/tllocalmgr 2022-04-30 12:54:50.636930181 +0200 +@@ -639,6 +639,9 @@ + open PKGBUILD, "> $ROOT/builds/$pkg/PKGBUILD"; + my $newver = $tlpkg->revision; + my $col = $collectionsbypkg{$pkg}; ++ my $conflict = (defined $col and $col ne '') ++ ? "conflicts=('texlive-$col>=$YEAR.$newver')" ++ : "conflicts=()"; + my $pkgsha512 = $tlpkg->containerchecksum; + #TODO download it first and compare the checksum + # if it differs ask the user if the PKGBUILD +@@ -653,7 +656,7 @@ + arch=('any') + groups=('texlive-local') + depends=('texlive-core') +-conflicts=('texlive-$col>=$YEAR.$newver') ++$conflict + url='http://tug.org/texlive/' + source=('$TLARCHIVE/$pkg.tar.xz') + sha512sums=($pkgsha512) diff --git a/tllocalmgr-enhance.patch b/tllocalmgr-enhance.patch new file mode 100644 index 000000000000..a949ea909313 --- /dev/null +++ b/tllocalmgr-enhance.patch @@ -0,0 +1,58 @@ +diff --git a/tllocalmgr b/tllocalmgr +index b947ed2..e238263 100755 +--- a/tllocalmgr ++++ b/tllocalmgr +@@ -227,6 +227,7 @@ my @updatedpkgs; # pkgs for which updates are available + foreach my $col (sort keys %installedcol_versions) { + #my $installedver = `pacman -Q texlive-$col`; + #$installedver =~ s/texlive-$col $YEAR\.([0-9]+)-.+/$1/; ++ next if ( $col eq "tlpdb" ) ; + next unless ( $installedcol_versions{$col} < $versions{$col} ) ; + foreach my $pkg (sort @{$tlpackages{$col}}) { + my $tlpkg = $tlpdb->get_package($pkg); +@@ -636,6 +637,7 @@ pkgrel=1 + pkgdesc="TeX Live - local installation of CTAN package $pkg" + license=('GPL') + arch=('any') ++groups=('texlive-local') + depends=('texlive-core') + conflicts=('texlive-$col>=$YEAR.$newver') + url='http://tug.org/texlive/' +@@ -670,11 +672,12 @@ EOF + # open INSTALL, "> $ROOT/builds/$pkg/texlive.install"; + # print INSTALL $TLINSTALL; + # close INSTALL; +- print LOG "* Running makepkg -ci on $ROOT/builds/$pkg/PKGBUILD\n"; ++ system( "makepkg --printsrcinfo > .SRCINFO" ); ++ print LOG "* Running makepkg -i on $ROOT/builds/$pkg/PKGBUILD\n"; + chdir "$ROOT/builds/$pkg"; + system( "test -f $pkg.tar.xz && rm $pkg.tar.xz" ); + # TODO : catch error if makepkg fails +- system( "makepkg -ci" ); ++ system( "makepkg -i" ); + } + + print "\n>>> Finished. Don't forget to run 'texhash' to update your file database.\n"; +@@ -729,6 +732,7 @@ pkgrel=1 + pkgdesc="TeX Live - local installation of CTAN package $pkg (documentation and sources)" + license=('GPL') + arch=('any') ++groups=('texlive-local') + depends=('texlive-core') + url='http://tug.org/texlive/' + EOF +@@ -773,11 +777,12 @@ EOF + # open INSTALL, "> $ROOT/builds/$pkg/texlive.install"; + # print INSTALL $TLINSTALL; + # close INSTALL; +- print LOG "* Running makepkg -ci on $ROOT/builds/$pkg-doc/PKGBUILD\n"; ++ system( "makepkg --printsrcinfo > .SRCINFO" ); ++ print LOG "* Running makepkg -i on $ROOT/builds/$pkg-doc/PKGBUILD\n"; + chdir "$ROOT/builds/$pkg-doc"; + system( "test -f $pkg-*.tar.xz && rm $pkg-*.tar.xz" ); + # TODO : catch error if makepkg fails +- system( "makepkg -ci" ); ++ system( "makepkg -i" ); + } + + diff --git a/tllocalmgr-fix-texlive-local-match.patch b/tllocalmgr-fix-texlive-local-match.patch new file mode 100644 index 000000000000..d6f707510ad4 --- /dev/null +++ b/tllocalmgr-fix-texlive-local-match.patch @@ -0,0 +1,13 @@ +diff --git a/tllocalmgr b/tllocalmgr +index b947ed2..b8d75dc 100755 +--- a/tllocalmgr ++++ b/tllocalmgr +@@ -140,7 +140,7 @@ chomp(my @pacman = `pacman -Qs ^texlive- | egrep ^local | cut -d'/' -f2`); + my @localpacman = grep { /^texlive-local-/ } @pacman; + # To have the standard collections we get rid of + # texlive-local-<pkg> and texlive-localmanager: +-my @collpacman = grep { !/^texlive-local/ } @pacman; ++my @collpacman = grep { !/^(texlive-local|tllocalmgr)/ } @pacman; + + if (@localpacman) { + foreach (@localpacman) { diff --git a/tllocalmgr-mirror-opt.patch b/tllocalmgr-mirror-opt.patch new file mode 100644 index 000000000000..59876ed7a592 --- /dev/null +++ b/tllocalmgr-mirror-opt.patch @@ -0,0 +1,13 @@ +diff --git a/tllocalmgr b/tllocalmgr +index b947ed2..8724243 100755 +--- a/tllocalmgr ++++ b/tllocalmgr +@@ -34,7 +34,7 @@ GetOptions( $opts, + 'forceupdate', + 'localsearch', #TODO + 'location', #TODO ? +- 'mirror', ++ 'mirror=s', + 'nocolor', + 'help|h', + 'version|v' diff --git a/tllocalmgr-pkgs-nicer-error.patch b/tllocalmgr-pkgs-nicer-error.patch new file mode 100644 index 000000000000..eaca84219081 --- /dev/null +++ b/tllocalmgr-pkgs-nicer-error.patch @@ -0,0 +1,39 @@ +--- a/tllocalmgr 2021-10-26 20:36:35.893293400 +0200 ++++ b/tllocalmgr 2021-10-26 20:37:50.127537318 +0200 +@@ -171,7 +171,13 @@ + $installedcol_versions{$col} = $ver; + my @list = (); + unless ( -f "$INSTALLEDPKGS/texlive-$col\_$ver.pkgs" ) { +- die "Cannot open $INSTALLEDPKGS/texlive-$col\_$ver.pkgs\n" ++ print BOLD RED "Cannot open $INSTALLEDPKGS/texlive-$col\_$ver.pkgs!\n"; ++ print RED "-- Likely the package texlive-$col does not create the '*.pkgs' file.\n"; ++ print RED "-- We will not process it further; please contact upstream maintainer\n"; ++ print RED "-- to have this fixed.\n"; ++ delete $installedcol_versions{$col}; ++ print LOG "Cannot open $INSTALLEDPKGS/texlive-$col\_$ver.pkgs!\n"; ++ next; + }; + open INST, "<$INSTALLEDPKGS/texlive-$col\_$ver.pkgs" ; + while (<INST>) { +@@ -415,6 +421,10 @@ + sub run_install { + foreach (@_) { + my $tlpkg = $tlpdb->get_package($_); ++ if (! $tlpkg) { ++ warning "$_ is unknown" ; ++ next ; ++ } + my $pkgrev = $tlpkg->revision; + if ( $locallyinstalledpkg_versions{$_} ) { + echo "$_ is already installed with texlive-local-$_"; +@@ -451,6 +461,10 @@ + sub run_installdoc { + foreach (@_) { + my $tlpkg = $tlpdb->get_package($_); ++ if (! $tlpkg) { ++ warning "$_ is unknown" ; ++ next ; ++ } + my $pkgrev = $tlpkg->revision; + if ( $locallyinstalleddoc_versions{$_} ) { + echo "$_ is already installed with texlive-local-$_-doc"; |