gnu: biber -> texlive-biber.

Build from sources provided by TeX Live distribution, so they always match
BibLaTeX version.

* gnu/packages/patches/biber-adapt-perl-5.36.patch: Delete file.
* gnu/local.mk: Apply removal.
* gnu/packages/tex.scm (texlive-biber): New variable.
(biber): Deprecate variable.
(perl-text-bibtex): Move from here...
* gnu/packages/perl.scm (perl-text-bibtex): ... to here.
This commit is contained in:
Nicolas Goaziou 2023-06-19 14:43:56 +02:00
parent aea0d94bc1
commit 3aeca58073
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D
4 changed files with 95 additions and 122 deletions

View file

@ -957,7 +957,6 @@ dist_patch_DATA = \
%D%/packages/patches/bsd-games-stdio.h.patch \
%D%/packages/patches/beancount-disable-googleapis-fonts.patch \
%D%/packages/patches/beignet-correct-file-names.patch \
%D%/packages/patches/biber-adapt-perl-5.36.patch \
%D%/packages/patches/bidiv-update-fribidi.patch \
%D%/packages/patches/binutils-boot-2.20.1a.patch \
%D%/packages/patches/binutils-loongson-workaround.patch \

View file

@ -1,40 +0,0 @@
From d9e961710074d266ad6bdf395c98868d91952088 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 25 May 2022 12:41:59 +0200
Subject: [PATCH] Adapt to Perl 5.36
A developmental release of Perl 5.36.0 fails to run tests with:
$ perl -Ilib t/basic-misc.t
1..72
Can't modify undef operator in scalar assignment at lib/Biber/Section.pm line 433, near "undef;"
Compilation failed in require at lib/Biber.pm line 24.
BEGIN failed--compilation aborted at lib/Biber.pm line 24.
Compilation failed in require at t/basic-misc.t line 11.
BEGIN failed--compilation aborted at t/basic-misc.t line 11.
# Looks like your test exited with 255 before it could output anything.
This is because of a missing semicolon between commands in
del_everykeys(). The new perl is more strict and raises a compile-time
error:
$ perl -e '$a = undef $b = undef;'
Can't modify undef operator in scalar assignment at -e line 1, near "undef;"
Execution of -e aborted due to compilation errors.
---
lib/Biber/Section.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Biber/Section.pm b/lib/Biber/Section.pm
index 03ed69a51..a78942f57 100644
--- a/lib/Biber/Section.pm
+++ b/lib/Biber/Section.pm
@@ -429,7 +429,7 @@ sub add_everykey {
sub del_everykeys {
my $self = shift;
- $self->{everykey} = undef
+ $self->{everykey} = undef;
$self->{everykey_lc} = undef;
return;
}

View file

@ -10631,6 +10631,46 @@ (define-public perl-text-balanced
text sequences from strings.")
(license (package-license perl))))
(define-public perl-text-bibtex
(package
(name "perl-text-bibtex")
(version "0.88")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-"
version ".tar.gz"))
(sha256
(base32
"0b7lmjvfmypps1nw6nsdikgaakm0n0g4186glaqazg5xd1p5h55h"))))
(build-system perl-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'add-output-directory-to-rpath
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "inc/MyBuilder.pm"
(("-Lbtparse" line)
(string-append "-Wl,-rpath="
(assoc-ref outputs "out") "/lib " line)))
#t))
(add-after 'unpack 'install-libraries-to-/lib
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Build.PL"
(("lib64") "lib"))
#t)))))
(native-inputs
(list perl-capture-tiny perl-config-autoconf perl-extutils-libbuilder
perl-module-build))
(home-page "https://metacpan.org/release/Text-BibTeX")
(synopsis "Interface to read and parse BibTeX files")
(description "@code{Text::BibTeX} is a Perl library for reading, parsing,
and processing BibTeX files. @code{Text::BibTeX} gives you access to the data
at many different levels: you may work with BibTeX entries as simple field to
string mappings, or get at the original form of the data as a list of simple
values (strings, macros, or numbers) pasted together.")
(license license:perl-license)))
(define-public perl-text-charwidth
(package
(name "perl-text-charwidth")

View file

@ -9515,78 +9515,56 @@ (define-public texlive
(license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
(home-page "https://www.tug.org/texlive/")))
(define-public perl-text-bibtex
(define-public texlive-biber
(package
(name "perl-text-bibtex")
(version "0.88")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-"
version ".tar.gz"))
(sha256
(base32
"0b7lmjvfmypps1nw6nsdikgaakm0n0g4186glaqazg5xd1p5h55h"))))
(build-system perl-build-system)
(name "texlive-biber")
(version (number->string %texlive-revision))
(source (texlive-origin
name version
(list "doc/bibtex/biber/" "source/bibtex/biber/")
(base32
"0i1hqr9zb7b9d1zjlyg4awa6mkyq6wnrb6z4689j1rg07vnbd7mw")))
(outputs '("out" "doc"))
(build-system texlive-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'add-output-directory-to-rpath
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "inc/MyBuilder.pm"
(("-Lbtparse" line)
(string-append "-Wl,-rpath="
(assoc-ref outputs "out") "/lib " line)))
#t))
(add-after 'unpack 'install-libraries-to-/lib
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Build.PL"
(("lib64") "lib"))
#t)))))
(list
#:tests? #true
#:imported-modules `(,@%texlive-build-system-modules
(guix build perl-build-system))
#:modules '((guix build texlive-build-system)
((guix build perl-build-system) #:prefix perl:)
(guix build utils))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'unpack-biber-source
(lambda _
(mkdir-p "build")
(with-directory-excursion "build"
(invoke "tar" "xvf"
"../source/bibtex/biber/biblatex-biber.tar.gz"
"--strip-components=1"))))
(add-after 'unpack-biber-source 'build-biber
(lambda args
(with-directory-excursion "build"
(for-each (lambda (phase)
(apply (assoc-ref perl:%standard-phases phase) args))
'(configure build check install)))))
(add-after 'install 'wrap-programs
(lambda _
(let ((perl5lib (getenv "PERL5LIB")))
(wrap-program (string-append #$output "/bin/biber")
`("PERL5LIB" ":" prefix
(,(string-append perl5lib ":"
#$output "/lib/perl5/site_perl"))))))))))
(native-inputs
(list perl-capture-tiny perl-config-autoconf perl-extutils-libbuilder
perl-module-build))
(home-page "https://metacpan.org/release/Text-BibTeX")
(synopsis "Interface to read and parse BibTeX files")
(description "@code{Text::BibTeX} is a Perl library for reading, parsing,
and processing BibTeX files. @code{Text::BibTeX} gives you access to the data
at many different levels: you may work with BibTeX entries as simple field to
string mappings, or get at the original form of the data as a list of simple
values (strings, macros, or numbers) pasted together.")
(license license:perl-license)))
(define-public biber
(package
;; Note: When updating Biber, make sure it matches our BibLaTeX version by
;; checking the Biber/BibLaTeX compatibility matrix in the BibLaTeX manual
;; at <https://ctan.org/pkg/biblatex>.
(name "biber")
(version "2.16")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/plk/biber/")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0586q8y1f2k23mvb02ccm3qsb35cwskafksixsjaih7a7xcf5gxx"))
(patches (search-patches "biber-adapt-perl-5.36.patch"))))
(build-system perl-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'install 'wrap-programs
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(perl5lib (getenv "PERL5LIB")))
(wrap-program (string-append out "/bin/biber")
`("PERL5LIB" ":" prefix
(,(string-append perl5lib ":" out
"/lib/perl5/site_perl")))))
#t)))))
(list perl-config-autoconf
perl-extutils-libbuilder
perl-file-which
perl-module-build
perl-test-differences))
(inputs
(list perl-autovivification
(list perl
perl-autovivification
perl-class-accessor
perl-data-dump
perl-data-compare
@ -9625,19 +9603,15 @@ (define-public biber
perl-business-issn
perl-business-ismn
perl-lingua-translit))
(native-inputs
`(("perl-config-autoconf" ,perl-config-autoconf)
("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
("perl-module-build" ,perl-module-build)
;; for tests
("perl-file-which" ,perl-file-which)
("perl-test-more" ,perl-test-most) ; FIXME: "more" would be sufficient
("perl-test-differences" ,perl-test-differences)))
(home-page "https://biblatex-biber.sourceforge.net/")
(synopsis "Backend for the BibLaTeX citation management tool")
(description "Biber is a BibTeX replacement for users of biblatex. Among
other things it comes with full Unicode support.")
(license license:artistic2.0)))
(home-page "https://ctan.org/pkg/biber")
(synopsis "BibTeX replacement for users of BibLaTeX")
(description
"Biber is a BibTeX replacement for users of BibLaTeX. It supports full
UTF-8, can (re)-encode input and output, supports highly configurable sorting,
dynamic bibliography sets and many other features.")
(license license:gpl3+)))
(define-deprecated-package biber texlive-biber)
(define-public rubber
(package