summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Smedstad2023-07-24 22:00:09 +0200
committerCarl Smedstad2023-07-24 22:54:13 +0200
commita5349da9acb6d86de521699495f569fa0405e60a (patch)
tree711accf8e5b01d44cf5a29072a95757aedbf2fef
parent7bb6206c24e3aa41f4a4d7add9da7511e6255a9a (diff)
downloadaur-a5349da9acb6d86de521699495f569fa0405e60a.tar.gz
Publish version 0.2.11-3 - Fix documentation
-rw-r--r--.SRCINFO10
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD28
-rw-r--r--fix-sphinx-issues.patch31
-rw-r--r--latex-engine.patch (renamed from latex_engine.patch)0
5 files changed, 57 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e840c0e45778..b4d7b5cbcfb6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-xhtml2pdf
pkgdesc = A library for converting HTML into PDFs using ReportLab
pkgver = 0.2.11
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/xhtml2pdf/xhtml2pdf
arch = any
license = Apache
@@ -9,6 +9,10 @@ pkgbase = python-xhtml2pdf
makedepends = python-installer
makedepends = python-setuptools
makedepends = python-wheel
+ makedepends = python-sphinx_rtd_theme
+ makedepends = python-sphinxcontrib-pdfembed
+ makedepends = texlive-latexextra
+ makedepends = texlive-fontsextra
depends = python
depends = python-arabic-reshaper
depends = python-asn1crypto
@@ -21,8 +25,10 @@ pkgbase = python-xhtml2pdf
depends = python-reportlab
depends = python-svglib
source = python-xhtml2pdf-0.2.11.tar.gz::https://github.com/xhtml2pdf/xhtml2pdf/archive/refs/tags/v0.2.11.tar.gz
- source = latex_engine.patch
+ source = latex-engine.patch
+ source = fix-sphinx-issues.patch
sha256sums = 198a7c78d4233322802cf57a554a92db78f30c7fa485a25cdb93713812f1f9ad
sha256sums = 19d631ba04ae7d42e6c95962df1bc99edf84c80920539bb8aa2fc7f2f6c53589
+ sha256sums = a76ae6df2bc2103038a416e16f8eb41d2a3fcf4e813a075a6c0a5d38b50895d0
pkgname = python-xhtml2pdf
diff --git a/.gitignore b/.gitignore
index f71c635dafda..8838d091b40b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
!.gitignore
!PKGBUILD
!.SRCINFO
+!fix-sphinx-issues.patch
+!latex-engine.patch
diff --git a/PKGBUILD b/PKGBUILD
index 18d713d6c523..64fb8295bea2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=python-xhtml2pdf
_name=${pkgname#python-}
pkgver=0.2.11
-pkgrel=2
+pkgrel=3
pkgdesc="A library for converting HTML into PDFs using ReportLab"
arch=(any)
url="https://github.com/xhtml2pdf/xhtml2pdf"
@@ -28,19 +28,22 @@ makedepends=(
python-installer
python-setuptools
python-wheel
- # python-sphinx_rtd_theme
- # python-sphinxcontrib-pdfembed
- # texlive-latexextra
- # texlive-fontsextra
+
+ python-sphinx_rtd_theme
+ python-sphinxcontrib-pdfembed
+ texlive-latexextra
+ texlive-fontsextra
)
source=(
"$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v${pkgver}.tar.gz"
- "latex_engine.patch"
+ "latex-engine.patch"
+ "fix-sphinx-issues.patch"
)
sha256sums=(
'198a7c78d4233322802cf57a554a92db78f30c7fa485a25cdb93713812f1f9ad'
'19d631ba04ae7d42e6c95962df1bc99edf84c80920539bb8aa2fc7f2f6c53589'
+ 'a76ae6df2bc2103038a416e16f8eb41d2a3fcf4e813a075a6c0a5d38b50895d0'
)
_archive="$_name-$pkgver"
@@ -48,7 +51,8 @@ _archive="$_name-$pkgver"
prepare() {
cd "$_archive"
- patch --forward --strip=1 --input="${srcdir}/latex_engine.patch"
+ patch --forward --strip=1 --input="${srcdir}/latex-engine.patch"
+ patch --forward --strip=1 --input="${srcdir}/fix-sphinx-issues.patch"
}
build() {
@@ -56,8 +60,8 @@ build() {
python -m build --wheel --no-isolation
- #(cd docs && make html)
- #(cd docs && make latexpdf)
+ (cd docs && make html)
+ (cd docs && make man)
}
check() {
@@ -71,7 +75,7 @@ package() {
python -m installer --destdir="$pkgdir" dist/*.whl
- # mkdir -p ${pkgdir}/usr/share/doc/${pkgname}
- # cp ${srcdir}/${_name}-${pkgver}/docs/build/html ${pkgdir}/usr/share/doc/${pkgname} -R
- # cp ${srcdir}/${_name}-${pkgver}/docs/build/latex/${_name}.pdf ${pkgdir}/usr/share/doc/${_name}.pdf
+ install -dm755 "$pkgdir/usr/share/doc/$pkgname"
+ cp -R docs/build/html "$pkgdir/usr/share/doc/$pkgname"
+ install -Dm644 docs/build/man/xhtml2pdf.1 "$pkgdir/usr/share/man/man1/xhtml2pdf.1"
}
diff --git a/fix-sphinx-issues.patch b/fix-sphinx-issues.patch
new file mode 100644
index 000000000000..ace6063511d8
--- /dev/null
+++ b/fix-sphinx-issues.patch
@@ -0,0 +1,31 @@
+diff --unified --recursive --text xhtml2pdf-0.2.11.orig/docs/source/conf.py xhtml2pdf-0.2.11/docs/source/conf.py
+--- xhtml2pdf-0.2.11.orig/docs/source/conf.py 2023-07-24 21:56:50.661484433 +0200
++++ xhtml2pdf-0.2.11/docs/source/conf.py 2023-07-24 21:57:34.611687595 +0200
+@@ -44,8 +44,8 @@
+
+
+ # Shortening external links. Here: issue & PR tracker of GitHub
+-extlinks = {'issue': ('https://github.com/xhtml2pdf/xhtml2pdf/issues/%s', '#'),
+- 'pr': ('https://github.com/xhtml2pdf/xhtml2pdf/pull/%s', '#')}
++extlinks = {'issue': ('https://github.com/xhtml2pdf/xhtml2pdf/issues/%s', 'issue %s'),
++ 'pr': ('https://github.com/xhtml2pdf/xhtml2pdf/pull/%s', 'pr %s')}
+
+ # Add any paths that contain templates here, relative to this directory.
+ templates_path = ['_templates']
+@@ -82,7 +82,7 @@
+ #
+ # This is also used if you do content translation via gettext catalogs.
+ # Usually you set "language" from the command line for these cases.
+-language = None
++language = 'en'
+
+ # There are two options for replacing |today|: either, you set today to some
+ # non-false value, then it is used:
+@@ -443,6 +443,6 @@
+
+
+ # Example configuration for intersphinx: refer to the Python standard library.
+-intersphinx_mapping = {'https://docs.python.org/': None}
++intersphinx_mapping = {'python': ('https://docs.python.org/3/', None)}
+ import build_samples as bs
+ bs.build_resources()
diff --git a/latex_engine.patch b/latex-engine.patch
index 2048f46d3d6c..2048f46d3d6c 100644
--- a/latex_engine.patch
+++ b/latex-engine.patch