[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
125/232: gnu: texlive-polyglossia: Rename and fix package.
From: |
guix-commits |
Subject: |
125/232: gnu: texlive-polyglossia: Rename and fix package. |
Date: |
Sun, 24 Apr 2022 23:59:00 -0400 (EDT) |
apteryx pushed a commit to branch wip-ipython-polyglossia
in repository guix.
commit 30075c738fc5a4e17aa3ccf25dc867202725ff13
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
- 101/232: gnu: Add python-ipyparallel-bootstrap., (continued)
- 101/232: gnu: Add python-ipyparallel-bootstrap., guix-commits, 2022/04/24
- 102/232: gnu: python-nest-asyncio: Update to 1.5.5., guix-commits, 2022/04/24
- 103/232: gnu: python-jupyter-core: Update to 4.10.0., guix-commits, 2022/04/24
- 108/232: gnu: python-anyio: Update to 3.5.0., guix-commits, 2022/04/24
- 109/232: gnu: python-nbclient: Update to 0.6.0., guix-commits, 2022/04/24
- 114/232: gnu: Add python-jupyter-server-mathjax., guix-commits, 2022/04/24
- 115/232: gnu: python-nbval: Fix build., guix-commits, 2022/04/24
- 116/232: gnu: python-send2trash: Update to 1.8.0 and update home page., guix-commits, 2022/04/24
- 122/232: gnu: Add python-sphinx-theme-builder., guix-commits, 2022/04/24
- 123/232: gnu: Add python-sphinx-sitemap., guix-commits, 2022/04/24
- 125/232: gnu: texlive-polyglossia: Rename and fix package.,
guix-commits <=
- 124/232: gnu: texlive-fontspec: Add missing propagated inputs., guix-commits, 2022/04/24
- 127/232: gnu: Add texlive-cbfonts., guix-commits, 2022/04/24
- 129/232: gnu: texlive-latex-geometry: Propagate texlive-latex-graphics., guix-commits, 2022/04/24
- 132/232: gnu: python-ipython-documentation: Also build info and pdf targets., guix-commits, 2022/04/24
- 135/232: gnu: Add python-rfc3339-validator., guix-commits, 2022/04/24
- 137/232: gnu: Add python-openapi-spec-validator., guix-commits, 2022/04/24
- 147/232: gnu: Add python-pecan., guix-commits, 2022/04/24
- 142/232: gnu: python-httpx: Update to 0.22.0., guix-commits, 2022/04/24
- 143/232: gnu: python-uvicorn: Update to 0.17.6., guix-commits, 2022/04/24
- 149/232: gnu: python-fakeredis: Update to 1.7.1., guix-commits, 2022/04/24