[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
125/242: gnu: texlive-polyglossia: Rename and fix package.
From: |
guix-commits |
Subject: |
125/242: gnu: texlive-polyglossia: Rename and fix package. |
Date: |
Wed, 11 May 2022 18:03:11 -0400 (EDT) |
apteryx pushed a commit to branch wip-ipython-polyglossia
in repository guix.
commit 3f1a8b6f8717c499b537897ea5a8f0dfa459f66d
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Apr 9 13:07:33 2022 -0400
gnu: texlive-polyglossia: Rename and fix package.
Fixes <https://issues.guix.gnu.org/35780>.
* gnu/packages/tex.scm (texlive-latex-polyglossia): Rename to...
(texlive-polyglossia): ... this. Inherit from a simple-texlive-package
package.
[version, source, build-system]: Remove field, now inherited.
[outputs]: New field.
[arguments]: Add the #:tex-format and #:phases arguments.
[native-inputs, propagated-inputs]: New fields.
[description]: Expound description.
Reported-by: Josh Holland
---
gnu/packages/tex.scm | 147 +++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 130 insertions(+), 17 deletions(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 4bd65329c2..1840401ba1 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -58,6 +58,7 @@
#:use-module (gnu packages bash)
#:use-module (gnu packages boost)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages fonts)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gd)
#:use-module (gnu packages ghostscript)
@@ -5716,25 +5717,137 @@ running text or as separate paragraphs with a
preceding number or symbol. It
also provides compacted versions of enumerate and itemize.")
(license license:lppl1.0+)))
-(define-public texlive-latex-polyglossia
+(define-public texlive-polyglossia
(package
- (name "texlive-latex-polyglossia")
- (version (number->string %texlive-revision))
- (source (origin
- (method svn-fetch)
- (uri (texlive-ref "latex" "polyglossia"))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "1ci6hr8hx4g2x359n6wqvw6w8fv42cjjpzxxxd3pn6av5nkaiav3"))))
- (build-system texlive-build-system)
- (arguments '(#:tex-directory "latex/polyglossia"))
+ (inherit (simple-texlive-package
+ "texlive-polyglossia"
+ (list "source/latex/polyglossia/"
+ ;; These files are not part of polyglossia.dtx
+ "tex/latex/polyglossia/arabicnumbers.sty"
+ "tex/latex/polyglossia/xpg-cyrillicnumbers.sty")
+ (base32 "1p0hhclypv2zbs8h64c6sd689m9ym3vvpn966qpwpjxbymsrc49g")))
+ (outputs '("out" "doc"))
+ (arguments
+ (list
+ #:tex-directory "latex/polyglossia"
+ #:tex-format "xelatex"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'build-and-install-xelatex.fmt
+ (lambda* (#:key tex-format #:allow-other-keys)
+ (invoke "fmtutil-sys" "--byfmt" tex-format "--fmtdir=web2c")
+ ;; Extend the current TEXMF environment variable to make
+ ;; available the newly built formats.
+ (setenv "GUIX_TEXMF" (string-append (getcwd) ":"
+ (getenv "GUIX_TEXMF")))
+ ;; XXX: Extend the base (more limited) xelatex.fmt provided by
+ ;; texlive-latex-base, otherwise packages using Polyglossia
+ ;; would encounter the same lack of hyphenation support problem.
+ (install-file "web2c/xetex/xelatex.fmt"
+ (string-append #$output
+ "/share/texmf-dist/web2c/xetex"))))
+ (add-before 'build 'chdir
+ (lambda _
+ ;; This is so the build can find the files not part of the .dtx.
+ (setenv "TEXINPUTS" (string-append (getcwd)
+ "/tex/latex/polyglossia:"))
+ (chdir "source/latex/polyglossia")))
+ (add-after 'chdir 'substitute-nonfree-fonts
+ (lambda _
+ (substitute* "polyglossia.dtx"
+ (("\\{Serto Jerusalem}")
+ "{FreeSans}"))))
+ (add-after 'substitute-nonfree-fonts 'extract-dtx
+ (lambda* (#:key tex-format #:allow-other-keys)
+ (invoke tex-format "polyglossia.dtx")))
+ (add-after 'install 'install-doc
+ (lambda* (#:key outputs tex-directory #:allow-other-keys)
+ (let ((doc (string-append (assoc-ref outputs "doc")
+ "/share/texmf-dist/doc"
tex-directory)))
+ (install-file "README.md" doc)
+ (install-file "polyglossia.pdf" doc)))))))
+ (native-inputs (list fontconfig ;for XDG_DATA_DIRS (to locate fonts)
+ font-amiri
+ font-dejavu
+ font-gfs-ambrosia
+ font-gnu-freefont
+ font-linuxlibertine
+ font-sil-ezra
+ texlive-latex-base
+ texlive-babel
+ texlive-bin ;for fmtutil.cnf
+ texlive-bidi
+ texlive-booktabs
+ texlive-caption
+ texlive-context
+ texlive-latex-fancyvrb
+ texlive-etoolbox
+ texlive-fonts-latex
+ texlive-fontspec
+ texlive-hyperref
+ ;; TODO: Remove texlive-stringenc and
+ ;; texlive-zapfding after texlive-hyperref propagates
+ ;; them.
+ texlive-stringenc
+ texlive-zapfding
+ texlive-latex-graphics
+ texlive-kpathsea ;for cp227.tcx & friends
+ texlive-makecmds
+ texlive-metalogo
+ texlive-microtype
+ texlive-paralist
+ texlive-latex-tools
+ texlive-tex-ini-files)) ;for pdftexconfig
+ ;; polyglossia.sty \RequirePackage or \\usepackage these other TexLive
+ ;; packages.
+ (propagated-inputs
+ (list texlive-bidi
+ texlive-etoolbox
+ texlive-fontspec
+ texlive-hyperref
+ ;; TODO: Remove texlive-stringenc and
+ ;; texlive-zapfding after texlive-hyperref propagates
+ ;; them.
+ texlive-stringenc
+ texlive-zapfding
+ texlive-makecmds
+ texlive-latex-l3packages ;expl3, l3keys2e, xparse
+ texlive-latex-tools
+ texlive-latex-xkeyval))
(home-page "https://www.ctan.org/pkg/polyglossia")
- (synopsis "Alternative to babel for XeLaTeX and LuaLaTeX")
- (description
- "This package provides a complete Babel replacement for users of LuaLaTeX
-and XeLaTeX; it relies on the @code{fontspec} package, version 2.0 at least.")
- (license license:lppl1.3+)))
+ (synopsis "Alternative to Babel for XeLaTeX and LuaLaTeX")
+ (description "This package provides a complete Babel replacement for users
+of LuaLaTeX and XeLaTeX. It includes support for over 70 different languages,
+some of which in different regional or national varieties, or using a
+different writing system. It enables:
+@itemize
+@item
+Loading the appropriate hyphenation patterns.
+@item
+Setting the script and language tags of the current font (if possible and
+available), using the package fontspec.
+@item
+Switching to a font assigned by the user to a particular script or language.
+@item
+Adjusting some typographical conventions in function of the current language
+(such as afterindent, frenchindent, spaces before or after punctuation marks,
+etc.)
+@item
+Redefining the document strings (like @samp{chapter}, @samp{figure},
+@samp{bibliography}). Adapting the formatting of dates (for non-gregorian
+calendars via external packages bundled with polyglossia: currently the
+Hebrew, Islamic and Farsi calendars are supported).
+@item
+For languages that have their own numeration system, modifying the formatting
+of numbers appropriately.
+@item
+Ensuring the proper directionality if the document contains languages
+written from right to left (via the packages bidi and luabidi, available
+separately).
+@end itemize")
+ (license license:expat)))
+
+(define-deprecated-package texlive-latex-polyglossia texlive-polyglossia)
(define-public texlive-latex-supertabular
(package
- 97/242: gnu: Add python-debugpy., (continued)
- 97/242: gnu: Add python-debugpy., guix-commits, 2022/05/11
- 100/242: gnu: python-pytest-xdist-next: Update to 2.5.0., guix-commits, 2022/05/11
- 102/242: gnu: python-nest-asyncio: Update to 1.5.5., guix-commits, 2022/05/11
- 103/242: gnu: python-jupyter-core: Update to 4.10.0., guix-commits, 2022/05/11
- 104/242: gnu: python-jupyter-client: Update to 7.2.2., guix-commits, 2022/05/11
- 105/242: gnu: python-ipykernel: Update to 6.13.0., guix-commits, 2022/05/11
- 107/242: gnu: python-ipyparallel: Update to 8.2.1., guix-commits, 2022/05/11
- 108/242: gnu: python-anyio: Replace python-pytest-trio with python-trio., guix-commits, 2022/05/11
- 115/242: gnu: python-nbval: Fix build., guix-commits, 2022/05/11
- 120/242: gnu: python-sphinx: Propagate TexLive dependencies., guix-commits, 2022/05/11
- 125/242: gnu: texlive-polyglossia: Rename and fix package.,
guix-commits <=
- 126/242: gnu: Add texlive-cbfonts-fd., guix-commits, 2022/05/11
- 127/242: gnu: Add texlive-cbfonts., guix-commits, 2022/05/11
- 128/242: download: Add a mirror for CTAN., guix-commits, 2022/05/11
- 129/242: gnu: texlive-latex-geometry: Propagate texlive-latex-graphics., guix-commits, 2022/05/11
- 134/242: gnu: Add python-strict-rfc3339., guix-commits, 2022/05/11
- 132/242: gnu: python-ipython-documentation: Also build info and pdf targets., guix-commits, 2022/05/11
- 138/242: gnu: Add python-cbor2., guix-commits, 2022/05/11
- 136/242: gnu: Add python-openapi-schema-validator., guix-commits, 2022/05/11
- 140/242: gnu: Add python-httpcore-bootstrap., guix-commits, 2022/05/11
- 146/242: gnu: python-sqlalchemy: Update to 1.4.35., guix-commits, 2022/05/11