49cb564d14
* par is kept at -Np0 ```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
62 lines
2 KiB
Bash
62 lines
2 KiB
Bash
# Template file for 'python-docutils'
|
|
pkgname=python-docutils
|
|
version=0.16
|
|
revision=3
|
|
wrksrc="docutils-${version}"
|
|
build_style=python-module
|
|
hostmakedepends="python-setuptools python3-setuptools"
|
|
# docutils/writers/odf_odt/pygmentsformatter.py
|
|
depends="python python-Pygments"
|
|
short_desc="Python2 documentation utilities"
|
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
|
license="custom:Public Domain, BSD-2-Clause, GPL-3.0-or-later, Python-2.0"
|
|
homepage="http://docutils.sourceforge.net"
|
|
distfiles="${PYPI_SITE}/d/docutils/docutils-${version}.tar.gz"
|
|
checksum=c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc
|
|
checkdepends+="$depends python3-Pygments"
|
|
|
|
alternatives="
|
|
docutils:rst2html:/usr/bin/rst2html.py2
|
|
docutils:rst2html4:/usr/bin/rst2html4.py2
|
|
docutils:rst2html5:/usr/bin/rst2html5.py2
|
|
docutils:rst2latex:/usr/bin/rst2latex.py2
|
|
docutils:rst2man:/usr/bin/rst2man.py2
|
|
docutils:rst2odt:/usr/bin/rst2odt.py2
|
|
docutils:rst2odt_prepstyles:/usr/bin/rst2odt_prepstyles.py2
|
|
docutils:rst2pseudoxml:/usr/bin/rst2pseudoxml.py2
|
|
docutils:rst2s5:/usr/bin/rst2s5.py2
|
|
docutils:rst2xetex:/usr/bin/rst2xetex.py2
|
|
docutils:rst2xml:/usr/bin/rst2xml.py2
|
|
docutils:rstpep2html:/usr/bin/rstpep2html.py2"
|
|
|
|
do_check() {
|
|
cd test
|
|
python3 alltests.py
|
|
}
|
|
|
|
post_install() {
|
|
vlicense COPYING.txt COPYING
|
|
}
|
|
|
|
python3-docutils_package() {
|
|
alternatives="
|
|
docutils:rst2html:/usr/bin/rst2html.py3
|
|
docutils:rst2html4:/usr/bin/rst2html4.py3
|
|
docutils:rst2html5:/usr/bin/rst2html5.py3
|
|
docutils:rst2latex:/usr/bin/rst2latex.py3
|
|
docutils:rst2man:/usr/bin/rst2man.py3
|
|
docutils:rst2odt:/usr/bin/rst2odt.py3
|
|
docutils:rst2odt_prepstyles:/usr/bin/rst2odt_prepstyles.py3
|
|
docutils:rst2pseudoxml:/usr/bin/rst2pseudoxml.py3
|
|
docutils:rst2s5:/usr/bin/rst2s5.py3
|
|
docutils:rst2xetex:/usr/bin/rst2xetex.py3
|
|
docutils:rst2xml:/usr/bin/rst2xml.py3
|
|
docutils:rstpep2html:/usr/bin/rstpep2html.py3"
|
|
depends="python3 python3-Pygments"
|
|
short_desc="${short_desc/Python2/Python3}"
|
|
pkg_install() {
|
|
vmove "usr/bin/*3"
|
|
vmove "usr/lib/python3*"
|
|
vlicense COPYING.txt COPYING
|
|
}
|
|
}
|