~dricottone/huttese-apk

ref: d51c495478847c4412f8dbd8985d8d35f782ad79 huttese-apk/pkgsrc/py3-pygments/APKBUILD -rw-r--r-- 1.6 KiB
d51c4954Dominic Ricottone Batch of updates 2 years ago
                                                                                
b7c90e6f Drew DeVault
b7c90e6f Drew DeVault
30bc5713 Sebastian
b7c90e6f Drew DeVault
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=py3-pygments
_pkgname=Pygments
pkgver=2.13.0
pkgrel=0
pkgdesc="Syntax highlighting package written in Python"
url="https://pygments.org/"
arch="noarch"
license="BSD-2-Clause"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-lxml py3-wcag-contrast-ratio"
subpackages="$pkgname-doc"
source="
	https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-$pkgver.tar.gz
	0001-lexers-add-Hare.patch
"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-pygments" # Backwards compatibility
provides="py-pygments=$pkgver-r$pkgrel" # Backwards compatibility

# secfixes:
#   2.7.4-r0:
#     - CVE-2021-20270

build() {
	python3 setup.py build
}

check() {
	python3 -m pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	mkdir -p "$pkgdir"/usr/bin
	ln -s pygmentize "$pkgdir"/usr/bin/pygmentize-3
}

doc() {
	local destdir="$subpkgdir/usr/share/doc/$pkgname"

	cd "$builddir"

	install -m 644 -D doc/pygmentize.1 \
		"$subpkgdir"/usr/share/man/man1/pygmentize.1

	mkdir -p "$destdir"
	cp AUTHORS CHANGES LICENSE "$destdir"/

	# Note: The documentation in the doc directory needs to be generated
	# by py-sphinx
	cp -R ./doc/docs/* "$destdir"/

	default_doc
}

sha512sums="
d492acf112423fa997f35d6d3cae18b89bf11619c696879c6df49697dca933b6d54d7cb22907e06812e0a562f03e8ed5ccefde5247bc1c51cf2d3d69e7d65422  Pygments-2.13.0.tar.gz
9787753652d4ae322d8fdb11464a6b1682e77070284a2b173e0087435a6aeb10b7320b327a957363a7eb94ff763446ee451e04dd91b25f901a72128fb2e2bb56  0001-lexers-add-Hare.patch
"