From 85ee7dbbf569580e615dcf571717798051f2c09b Mon Sep 17 00:00:00 2001 From: Sunpoet Po-Chuan Hsieh Date: Thu, 24 Nov 2016 15:34:24 +0000 Subject: - Update LICENSE - Add LICENSE_FILE - Add NO_ARCH - Allow build with Python 3 and relax USES=python - Allow concurrent installation (USE_PYTHON=concurrent) - Update WWW - Add GitHub repository to WWW --- misc/py-progressbar/Makefile | 9 +++-- .../files/patch-progressbar-widgets.py | 44 ++++++++++++++++++++++ misc/py-progressbar/pkg-descr | 3 +- 3 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 misc/py-progressbar/files/patch-progressbar-widgets.py diff --git a/misc/py-progressbar/Makefile b/misc/py-progressbar/Makefile index fa15ecee9265..a189430f0302 100644 --- a/misc/py-progressbar/Makefile +++ b/misc/py-progressbar/Makefile @@ -11,9 +11,12 @@ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= sunpoet@FreeBSD.org COMMENT= Text progressbar library for python -LICENSE= BSD3CLAUSE +LICENSE= BSD3CLAUSE LGPL21+ +LICENSE_COMB= dual +LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE.txt -USE_PYTHON= autoplist distutils -USES= python:2.7 +NO_ARCH= yes +USE_PYTHON= autoplist concurrent distutils +USES= python .include diff --git a/misc/py-progressbar/files/patch-progressbar-widgets.py b/misc/py-progressbar/files/patch-progressbar-widgets.py new file mode 100644 index 000000000000..2a450e7047a3 --- /dev/null +++ b/misc/py-progressbar/files/patch-progressbar-widgets.py @@ -0,0 +1,44 @@ +--- progressbar/widgets.py.orig 2011-05-15 23:08:48 UTC ++++ progressbar/widgets.py +@@ -84,8 +84,8 @@ class Timer(Widget): + __slots__ = ('format',) + TIME_SENSITIVE = True + +- def __init__(self, format='Elapsed Time: %s'): +- self.format = format ++ def __init__(self, _format='Elapsed Time: %s'): ++ self.format = _format + + @staticmethod + def format_time(seconds): +@@ -121,7 +121,7 @@ class ETA(Timer): + class FileTransferSpeed(Widget): + 'Widget for showing the transfer speed (useful for file transfers).' + +- format = '%6.2f %s%s/s' ++ _format = '%6.2f %s%s/s' + prefixes = ' kMGTPEZY' + __slots__ = ('unit', 'format') + +@@ -170,8 +170,8 @@ class Counter(Widget): + + __slots__ = ('format',) + +- def __init__(self, format='%d'): +- self.format = format ++ def __init__(self, _format='%d'): ++ self.format = _format + + def update(self, pbar): + return self.format % pbar.currval +@@ -198,8 +198,8 @@ class FormatLabel(Timer): + } + + __slots__ = ('format',) +- def __init__(self, format): +- self.format = format ++ def __init__(self, _format): ++ self.format = _format + + def update(self, pbar): + context = {} diff --git a/misc/py-progressbar/pkg-descr b/misc/py-progressbar/pkg-descr index 184956a810d2..fe02d2798e8b 100644 --- a/misc/py-progressbar/pkg-descr +++ b/misc/py-progressbar/pkg-descr @@ -13,4 +13,5 @@ There are three types of widget: - a ProgressBarWidgetHFill, which is like ProgressBarWidget, except it expands to fill the remaining width of the line. -WWW: http://code.google.com/p/python-progressbar +WWW: https://pypi.python.org/pypi/progressbar +WWW: https://github.com/niltonvolpato/python-progressbar -- cgit v1.2.3