diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-07 21:34:55 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-19 16:38:22 +0100 |
commit | fdcd5dc33d1e2d60c9ae85704971c3e9b7893d9b (patch) | |
tree | 423568528c2e773f56925ecb01330fb9b980141e /main/py-pygments | |
parent | f830ff756aaedda68fdebecac2aecd3ed6531c18 (diff) | |
download | aports-fdcd5dc33d1e2d60c9ae85704971c3e9b7893d9b.tar.bz2 aports-fdcd5dc33d1e2d60c9ae85704971c3e9b7893d9b.tar.xz |
main/py-pygments: upgrade to 2.1.3 and add py2/py3 subpackages
Diffstat (limited to 'main/py-pygments')
-rw-r--r-- | main/py-pygments/APKBUILD | 63 | ||||
-rw-r--r-- | main/py-pygments/CVE-2015-8557.patch | 29 |
2 files changed, 33 insertions, 59 deletions
diff --git a/main/py-pygments/APKBUILD b/main/py-pygments/APKBUILD index e92dbb7f1a..6448585ffd 100644 --- a/main/py-pygments/APKBUILD +++ b/main/py-pygments/APKBUILD @@ -2,43 +2,49 @@ # Maintainer: Matt Smith <mcs@darkregion.net> pkgname=py-pygments _pkgname=Pygments -pkgver=2.0.2 -pkgrel=3 +pkgver=2.1.3 +pkgrel=0 pkgdesc="A syntax highlighting package written in Python." url="http://pygments.org/" arch="noarch" license="BSD" -depends="python2 py-setuptools" -makedepends="" -install="" -subpackages="$pkgname-doc" -source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz - CVE-2015-8557.patch - " - -_builddir="$srcdir"/$_pkgname-$pkgver - -prepare() { - cd "$_builddir" - for i in $source; do - case "$i" in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +depends="" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-doc" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" build() { - cd "$_builddir" + cd "$builddir" python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python2 setup.py install --root "$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" } doc() { - cd "$_builddir" + cd "$builddir" mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1 for _doc in AUTHORS CHANGES LICENSE TODO; do @@ -63,9 +69,6 @@ doc() { default_doc } -md5sums="238587a1370d62405edabd0794b3ec4a Pygments-2.0.2.tar.gz -3e5190427dd4ac1a52f27c1f7d1b1d90 CVE-2015-8557.patch" -sha256sums="7320919084e6dac8f4540638a46447a3bd730fca172afc17d2c03eed22cf4f51 Pygments-2.0.2.tar.gz -c56bc3b911ece2d79bb1b7dd4d952d0139216161a0f7f95ff6143daccd24daf6 CVE-2015-8557.patch" -sha512sums="b58e2cc535ba3f1fda7cb147e12af128bc2755de56cf465f8f1d642730eaef50c06551cc4cc44f25f726b00f3f1c9c2078977233b11c0b6a7e1add6a4069c27e Pygments-2.0.2.tar.gz -14d0fe27195cae53dd6b998fd05c32938078bf4de0845ce388b22729e5633e5f810b738ce672de0d023099b54ac7ca44ab4273d46313e2e30138a2fb023e5add CVE-2015-8557.patch" +md5sums="ed3fba2467c8afcda4d317e4ef2c6150 Pygments-2.1.3.tar.gz" +sha256sums="88e4c8a91b2af5962bfa5ea2447ec6dd357018e86e94c7d14bd8cacbc5b55d81 Pygments-2.1.3.tar.gz" +sha512sums="f6885abfa0033dc2b8894649c7a4626165af01e69268344f002efdfc536c776a9af86be4e76e5905bd31cb78096e1ed3c16d9dd4b29c6a97b4c9cc1bfd7a5b67 Pygments-2.1.3.tar.gz" diff --git a/main/py-pygments/CVE-2015-8557.patch b/main/py-pygments/CVE-2015-8557.patch deleted file mode 100644 index 0a23adce33..0000000000 --- a/main/py-pygments/CVE-2015-8557.patch +++ /dev/null @@ -1,29 +0,0 @@ -# HG changeset patch -# User Javantea <jvoss@altsci.com> -# Date 1443460403 25200 -# Node ID 6b4baae517b6aaff7142e66f1dbadf7b9b871f61 -# Parent 655dbebddc23943b8047b3c139c51c22ef18fd91 -Fix Shell Injection in FontManager._get_nix_font_path - -diff --git a/pygments/formatters/img.py b/pygments/formatters/img.py ---- a/pygments/formatters/img.py -+++ b/pygments/formatters/img.py -@@ -10,6 +10,7 @@ - """ - - import sys -+import shlex - - from pygments.formatter import Formatter - from pygments.util import get_bool_opt, get_int_opt, get_list_opt, \ -@@ -79,8 +80,8 @@ - from commands import getstatusoutput - except ImportError: - from subprocess import getstatusoutput -- exit, out = getstatusoutput('fc-list "%s:style=%s" file' % -- (name, style)) -+ exit, out = getstatusoutput('fc-list %s file' % -+ shlex.quote("%s:style=%s" % (name, style))) - if not exit: - lines = out.splitlines() - if lines: |