diff options
author | jkoshy <jkoshy@FreeBSD.org> | 2006-06-16 21:50:45 +0800 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 2006-06-16 21:50:45 +0800 |
commit | 05550cc7c543ed189fab86594a6387a670388bd7 (patch) | |
tree | 9340fafeed59288bd81ddc471cb2c153987e8817 | |
parent | 065448c1325a6670952dcc48077fb93fdedb76d0 (diff) | |
download | freebsd-ports-gnome-05550cc7c543ed189fab86594a6387a670388bd7.tar.gz freebsd-ports-gnome-05550cc7c543ed189fab86594a6387a670388bd7.tar.zst freebsd-ports-gnome-05550cc7c543ed189fab86594a6387a670388bd7.zip |
Fix a ZeroDivisionError on FreeBSD 4, by bringing in a vendor
patch [SVN#168 at pyyaml.org].
Bump PORTREVISION.
PR: ports/99009
Submitted by: jkoshy
Approved by: Neal Nelson (neal at nelson dot name) [MAINTAINER]
-rw-r--r-- | devel/py-yaml/Makefile | 1 | ||||
-rw-r--r-- | devel/py-yaml/files/patch-lib_yaml_constructor.py | 12 | ||||
-rw-r--r-- | devel/py-yaml/files/patch-lib_yaml_representer.py | 20 |
3 files changed, 33 insertions, 0 deletions
diff --git a/devel/py-yaml/Makefile b/devel/py-yaml/Makefile index 96aed5927396..5e4048db29d6 100644 --- a/devel/py-yaml/Makefile +++ b/devel/py-yaml/Makefile @@ -8,6 +8,7 @@ PORTNAME= yaml PORTVERSION= 3.02 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= http://pyyaml.org/download/pyyaml/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/devel/py-yaml/files/patch-lib_yaml_constructor.py b/devel/py-yaml/files/patch-lib_yaml_constructor.py new file mode 100644 index 000000000000..896ae5da0565 --- /dev/null +++ b/devel/py-yaml/files/patch-lib_yaml_constructor.py @@ -0,0 +1,12 @@ +Index: lib/yaml/constructor.py +=================================================================== +--- pyyaml/trunk/lib/yaml/constructor.py (revision 147) ++++ pyyaml/trunk/lib/yaml/constructor.py (revision 168) +@@ -232,5 +232,7 @@ + return sign*int(value) + +- inf_value = 1e300000 ++ inf_value = 1e300 ++ while repr(inf_value) != repr(inf_value*inf_value): ++ inf_value *= inf_value + nan_value = inf_value/inf_value diff --git a/devel/py-yaml/files/patch-lib_yaml_representer.py b/devel/py-yaml/files/patch-lib_yaml_representer.py new file mode 100644 index 000000000000..3a2ce8ff842b --- /dev/null +++ b/devel/py-yaml/files/patch-lib_yaml_representer.py @@ -0,0 +1,20 @@ +Index: lib/yaml/representer.py +=================================================================== +--- pyyaml/trunk/lib/yaml/representer.py (revision 152) ++++ pyyaml/trunk/lib/yaml/representer.py (revision 168) +@@ -193,7 +193,12 @@ + return self.represent_scalar(u'tag:yaml.org,2002:int', unicode(data)) + +- repr_pos_inf = repr(1e300000) +- repr_neg_inf = repr(-1e300000) +- repr_nan = repr(1e300000/1e300000) ++ inf_value = 1e300 ++ while repr(inf_value) != repr(inf_value*inf_value): ++ inf_value *= inf_value ++ nan_value = inf_value/inf_value ++ ++ repr_pos_inf = repr(inf_value) ++ repr_neg_inf = repr(-inf_value) ++ repr_nan = repr(inf_value/inf_value) + + def represent_float(self, data): |