pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/pkgsrc-2018Q2]: pkgsrc/graphics Pullup ticket #5782 - requested by bs...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f46bbc5d25e9
branches:  pkgsrc-2018Q2
changeset: 310339:f46bbc5d25e9
user:      spz <spz%pkgsrc.org@localhost>
date:      Thu Jul 12 19:47:37 2018 +0000

description:
Pullup ticket #5782 - requested by bsiegert
graphics/py-matplotlib: functionality patch
graphics/py-matplotlib-gtk2: functionality patch
graphics/py-matplotlib-tk: functionality patch


Revisions pulled up:
- graphics/py-matplotlib-gtk2/Makefile                          1.67
- graphics/py-matplotlib-tk/Makefile                            1.34
- graphics/py-matplotlib/Makefile                               1.53
- graphics/py-matplotlib/distinfo                               1.31
- graphics/py-matplotlib/patches/patch-src_file__compat.h       1.1

-------------------------------------------------------------------
   Module Name:   pkgsrc
   Committed By:  gson
   Date:          Wed Jul 11 16:19:32 UTC 2018

   Modified Files:
          pkgsrc/graphics/py-matplotlib: Makefile distinfo
          pkgsrc/graphics/py-matplotlib-gtk2: Makefile
          pkgsrc/graphics/py-matplotlib-tk: Makefile
   Added Files:
          pkgsrc/graphics/py-matplotlib/patches: patch-src_file__compat.h

   Log Message:
   py-matplotlib: fix PR 53425

   Don't call fflush() on a read-only file pointer; it is an error on BSD
   systems and causes the import of matplotlib.pyplot to fail.


   To generate a diff of this commit:
   cvs rdiff -u -r1.52 -r1.53 pkgsrc/graphics/py-matplotlib/Makefile
   cvs rdiff -u -r1.30 -r1.31 pkgsrc/graphics/py-matplotlib/distinfo
   cvs rdiff -u -r1.66 -r1.67 pkgsrc/graphics/py-matplotlib-gtk2/Makefile
   cvs rdiff -u -r1.33 -r1.34 pkgsrc/graphics/py-matplotlib-tk/Makefile
   cvs rdiff -u -r0 -r1.1 \
       pkgsrc/graphics/py-matplotlib/patches/patch-src_file__compat.h

diffstat:

 graphics/py-matplotlib-gtk2/Makefile                    |   4 +-
 graphics/py-matplotlib-tk/Makefile                      |   3 +-
 graphics/py-matplotlib/Makefile                         |   3 +-
 graphics/py-matplotlib/distinfo                         |   3 +-
 graphics/py-matplotlib/patches/patch-src_file__compat.h |  29 +++++++++++++++++
 5 files changed, 37 insertions(+), 5 deletions(-)

diffs (84 lines):

diff -r 82be08a6ae12 -r f46bbc5d25e9 graphics/py-matplotlib-gtk2/Makefile
--- a/graphics/py-matplotlib-gtk2/Makefile      Thu Jul 05 08:46:04 2018 +0000
+++ b/graphics/py-matplotlib-gtk2/Makefile      Thu Jul 12 19:47:37 2018 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.66 2018/04/16 14:34:40 wiz Exp $
+# $NetBSD: Makefile,v 1.66.2.1 2018/07/12 19:47:37 spz Exp $
 
-PKGREVISION= 1
+PKGREVISION= 2
 .include "../../graphics/py-matplotlib/Makefile.common"
 
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/-/-gtk-/}
diff -r 82be08a6ae12 -r f46bbc5d25e9 graphics/py-matplotlib-tk/Makefile
--- a/graphics/py-matplotlib-tk/Makefile        Thu Jul 05 08:46:04 2018 +0000
+++ b/graphics/py-matplotlib-tk/Makefile        Thu Jul 12 19:47:37 2018 +0000
@@ -1,5 +1,6 @@
-# $NetBSD: Makefile,v 1.33 2018/04/14 12:52:56 adam Exp $
+# $NetBSD: Makefile,v 1.33.2.1 2018/07/12 19:47:37 spz Exp $
 
+PKGREVISION= 1
 .include "../../graphics/py-matplotlib/Makefile.common"
 
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/-/-tk-/}
diff -r 82be08a6ae12 -r f46bbc5d25e9 graphics/py-matplotlib/Makefile
--- a/graphics/py-matplotlib/Makefile   Thu Jul 05 08:46:04 2018 +0000
+++ b/graphics/py-matplotlib/Makefile   Thu Jul 12 19:47:37 2018 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.52 2018/04/14 12:52:56 adam Exp $
+# $NetBSD: Makefile,v 1.52.2.1 2018/07/12 19:47:37 spz Exp $
 
 .include "Makefile.common"
 
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION=   1
 COMMENT=       Matlab-style plotting package for Python
 
 DEPENDS+=      ${PYPKGPREFIX}-cairo-[0-9]*:../../graphics/py-cairo
diff -r 82be08a6ae12 -r f46bbc5d25e9 graphics/py-matplotlib/distinfo
--- a/graphics/py-matplotlib/distinfo   Thu Jul 05 08:46:04 2018 +0000
+++ b/graphics/py-matplotlib/distinfo   Thu Jul 12 19:47:37 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.30 2018/04/14 12:52:56 adam Exp $
+$NetBSD: distinfo,v 1.30.2.1 2018/07/12 19:47:37 spz Exp $
 
 SHA1 (matplotlib-2.2.2.tar.gz) = dac0d6b9d7eee31e6240d454cb2ff896215429e4
 RMD160 (matplotlib-2.2.2.tar.gz) = ffc08d6f14856079653aece2068b99396ab5f9f4
@@ -6,3 +6,4 @@
 Size (matplotlib-2.2.2.tar.gz) = 37317332 bytes
 SHA1 (patch-setup.py) = 0088019e1296d245021fb592915226618d91495d
 SHA1 (patch-src___macosx.m) = 5b46ec15d2f66ae1ee489b6714c2731dd476d50c
+SHA1 (patch-src_file__compat.h) = 5785353fb66c1f5036752e2975dc36a65112a0a6
diff -r 82be08a6ae12 -r f46bbc5d25e9 graphics/py-matplotlib/patches/patch-src_file__compat.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/py-matplotlib/patches/patch-src_file__compat.h   Thu Jul 12 19:47:37 2018 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-src_file__compat.h,v 1.1.2.2 2018/07/12 19:47:37 spz Exp $
+
+Do not call the flush method on a file object opened for reading,
+bcause it returns an error on BSD systems, with the end result
+that importing matplotlib fails as reported in PR pkg/53425.
+
+--- src/file_compat.h.orig     2018-03-06 04:47:09.000000000 +0000
++++ src/file_compat.h
+@@ -60,12 +60,15 @@ static NPY_INLINE FILE *mpl_PyFile_Dup(P
+     mpl_off_t pos;
+     FILE *handle;
+ 
+-    /* Flush first to ensure things end up in the file in the correct order */
+-    ret = PyObject_CallMethod(file, (char *)"flush", (char *)"");
+-    if (ret == NULL) {
+-        return NULL;
++    if (mode[0] != 'r') {
++        /* Flush first to ensure things end up in the file in the correct order */
++        ret = PyObject_CallMethod(file, (char *)"flush", (char *)"");
++        if (ret == NULL) {
++            return NULL;
++        }
++        Py_DECREF(ret);
+     }
+-    Py_DECREF(ret);
++
+     fd = PyObject_AsFileDescriptor(file);
+     if (fd == -1) {
+         return NULL;



Home | Main Index | Thread Index | Old Index