Ticket #44284: python-pil-pillow-openmaintainer.diff
File python-pil-pillow-openmaintainer.diff, 8.7 KB (added by Ionic (Mihai Moldovan), 10 years ago) |
---|
-
graphics/comix/Portfile
diff --git a/graphics/comix/Portfile b/graphics/comix/Portfile index f6a466f..5580ce1 100644
a b PortSystem 1.0 4 4 5 5 name comix 6 6 version 4.0.4 7 revision 27 revision 3 8 8 categories graphics 9 9 maintainers perry openmaintainer 10 10 platforms darwin … … livecheck.regex {Comix (.*) released} 22 22 livecheck.type regex 23 23 livecheck.url ${homepage} 24 24 25 depends_lib port:py26-pygtk port:py26-pil port:python26 port:unrar 25 patchfiles patch-pillow-compat.diff 26 27 set python.version 26 28 set python.branch "[string range ${python.version} 0 end-1].[string index ${python.version} end]" 29 30 depends_lib port:py${python.version}-pygtk \ 31 path:${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/PIL:py${python.version}-Pillow \ 32 port:python${python.version} \ 33 port:unrar 26 34 27 35 master_sites sourceforge 28 36 … … use_configure no 32 40 33 41 build {} 34 42 35 set python.bin ${prefix}/bin/python 2.643 set python.bin ${prefix}/bin/python${python.branch} 36 44 37 45 pre-destroot { 38 46 reinplace "s|^#!/usr/bin/env python\$|#!${python.bin}|" ${worksrcpath}/src/comix.py -
new file graphics/comix/files/patch-pillow-compat.diff
diff --git a/graphics/comix/files/patch-pillow-compat.diff b/graphics/comix/files/patch-pillow-compat.diff new file mode 100644 index 0000000..520cbbe
- + 1 --- install.py.old 2014-07-10 20:19:31.000000000 +0200 2 +++ install.py 2014-07-10 20:20:08.000000000 +0200 3 @@ -240,7 +240,7 @@ 4 print ' !!! PyGTK .................... Not found' 5 required_found = False 6 try: 7 - import Image 8 + from PIL import Image 9 assert Image.VERSION >= '1.1.5' 10 print ' Python Imaging Library ....... OK' 11 except ImportError: 12 --- mime/comicthumb.old 2014-07-10 20:19:32.000000000 +0200 13 +++ mime/comicthumb 2014-07-10 20:20:08.000000000 +0200 14 @@ -22,7 +22,7 @@ 15 import subprocess 16 17 try: 18 - import Image 19 + from PIL import Image 20 except ImportError: 21 print '! Could not import the Image module (PIL).' 22 print __doc__ 23 --- src/comix.py.old 2014-07-10 20:19:32.000000000 +0200 24 +++ src/comix.py 2014-07-10 20:20:08.000000000 +0200 25 @@ -49,7 +49,7 @@ 26 sys.exit(1) 27 28 try: 29 - import Image 30 + from PIL import Image 31 assert Image.VERSION >= '1.1.5' 32 except AssertionError: 33 print "You don't have the required version of the Python Imaging", 34 --- src/histogram.py.old 2014-07-10 20:19:32.000000000 +0200 35 +++ src/histogram.py 2014-07-10 20:20:08.000000000 +0200 36 @@ -1,9 +1,9 @@ 37 """histogram.py - Draw histograms (RGB) from pixbufs.""" 38 39 import gtk 40 -import Image 41 -import ImageDraw 42 -import ImageOps 43 +from PIL import Image 44 +from PIL import ImageDraw 45 +from PIL import ImageOps 46 47 import image 48 49 --- src/image.py.old 2014-07-10 20:19:32.000000000 +0200 50 +++ src/image.py 2014-07-10 20:20:08.000000000 +0200 51 @@ -1,10 +1,10 @@ 52 """image.py - Various image manipulations.""" 53 54 import gtk 55 -import Image 56 -import ImageEnhance 57 -import ImageOps 58 -import ImageStat 59 +from PIL import Image 60 +from PIL import ImageEnhance 61 +from PIL import ImageOps 62 +from PIL import ImageStat 63 64 from preferences import prefs 65 66 --- src/library.py.old 2014-07-10 20:19:32.000000000 +0200 67 +++ src/library.py 2014-07-10 20:20:08.000000000 +0200 68 @@ -8,8 +8,8 @@ 69 import gtk 70 import gobject 71 import pango 72 -import Image 73 -import ImageDraw 74 +from PIL import Image 75 +from PIL import ImageDraw 76 77 import archive 78 import encoding 79 --- src/thumbbar.py.old 2014-07-10 20:19:32.000000000 +0200 80 +++ src/thumbbar.py 2014-07-10 20:20:08.000000000 +0200 81 @@ -4,8 +4,8 @@ 82 83 import gtk 84 import gobject 85 -import Image 86 -import ImageDraw 87 +from PIL import Image 88 +from PIL import ImageDraw 89 90 import image 91 from preferences import prefs 92 --- src/thumbnail.py.old 2014-07-10 20:19:32.000000000 +0200 93 +++ src/thumbnail.py 2014-07-10 20:20:08.000000000 +0200 94 @@ -15,7 +15,7 @@ 95 import tempfile 96 97 import gtk 98 -import Image 99 +from PIL import Image 100 101 import archive 102 import constants 103 --- src/thumbremover.py.old 2014-07-10 20:19:32.000000000 +0200 104 +++ src/thumbremover.py 2014-07-10 20:20:08.000000000 +0200 105 @@ -7,7 +7,7 @@ 106 107 import gtk 108 import pango 109 -import Image 110 +from PIL import Image 111 112 import encoding 113 import labels -
graphics/ipe-tools/Portfile
diff --git a/graphics/ipe-tools/Portfile b/graphics/ipe-tools/Portfile index 7ed8452..0bf479b 100644
a b eval build.env CPPFLAGS+='${configure.cppflags}' \ 59 59 LDFLAGS+='${configure.cc_archflags}' \ 60 60 CC=${configure.cc} CXX=${configure.cxx} 61 61 62 set python.version "DUMMY_VALUE_WILL_BE_OVERWRITTEN" 63 set python.branch "DUMMY_VALUE_WILL_BE_OVERWRITTEN" 64 62 65 build { 63 66 system "cd ${workpath}/figtoipe-${figtoipe-vers} && ${build.env} ${build.cmd} ${build.target} CXX=${configure.cxx}" 64 67 system "cd ${workpath}/ipe5toxml && ${build.env} ${build.cmd}" … … variant python25 conflicts python24 python26 python27 description {Use PIL from 89 92 } 90 93 91 94 variant python26 conflicts python24 python25 python27 description {Use PIL from MacPorts Python 2.6} { 92 depends_lib-append port:py26-pil 95 set python.version 26 96 set python.branch "[string range ${python.version} 0 end-1].[string index ${python.version} end]" 97 98 depends_lib-append path:${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/PIL:py${python.version}-Pillow 93 99 post-patch { 94 reinplace "s|__MP_PYTHON_BIN__|${prefix}/bin/python 2.6|" ${workpath}/svgtoipe-${svgtoipe-vers}/svgtoipe.py100 reinplace "s|__MP_PYTHON_BIN__|${prefix}/bin/python${python.branch}|" ${workpath}/svgtoipe-${svgtoipe-vers}/svgtoipe.py 95 101 } 96 102 } 97 103 98 104 variant python27 conflicts python24 python25 python26 description {Use PIL from MacPorts Python 2.7} { 99 depends_lib-append port:py27-pil 105 set python.version 27 106 set python.branch "[string range ${python.version} 0 end-1].[string index ${python.version} end]" 107 108 depends_lib-append path:${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/PIL:py${python.version}-Pillow 100 109 post-patch { 101 reinplace "s|__MP_PYTHON_BIN__|${prefix}/bin/python 2.7|" ${workpath}/svgtoipe-${svgtoipe-vers}/svgtoipe.py110 reinplace "s|__MP_PYTHON_BIN__|${prefix}/bin/python${python.branch}|" ${workpath}/svgtoipe-${svgtoipe-vers}/svgtoipe.py 102 111 } 103 112 } 104 113 -
python/py-astlib/Portfile
diff --git a/python/py-astlib/Portfile b/python/py-astlib/Portfile index 373aa5d..c996ffb 100644
a b if {${name} ne ${subport}} { 31 31 port:py${python.version}-pyfits \ 32 32 port:py${python.version}-numpy \ 33 33 port:py${python.version}-scipy \ 34 port:py${python.version}-matplotlib 35 36 if {[expr ${python.branch} < 3]} { 37 depends_lib-append \ 38 port:py${python.version}-pil 39 } else { 40 depends_lib-append \ 41 port:py${python.version}-pillow 42 } 34 port:py${python.version}-matplotlib \ 35 path:${python.pkgd}/PIL:py${python.version}-Pillow 43 36 44 37 } 45 38 -
python/py-spyder-devel/Portfile
diff --git a/python/py-spyder-devel/Portfile b/python/py-spyder-devel/Portfile index aedd863..293916e 100644
a b if {${name} ne ${subport}} { 128 128 129 129 if { ${python.version} < 30 } { 130 130 variant pil description { 131 Support image objects in editor through PIL (many dependencies.)131 Support image objects in editor through PIL or Pillow (many dependencies.) 132 132 } { 133 133 depends_lib-append \ 134 p ort:py${python.version}-pil134 path:${python.pkgd}/PIL:py${python.version}-Pillow 135 135 } 136 136 } 137 137 -
python/py-spyder/Portfile
diff --git a/python/py-spyder/Portfile b/python/py-spyder/Portfile index af760d5..2cbaa31 100644
a b if {${name} ne ${subport}} { 120 120 } 121 121 122 122 variant pil description { 123 Support image objects in editor through PIL (many dependencies.)123 Support image objects in editor through PIL or Pillow (many dependencies.) 124 124 } { 125 125 depends_lib-append \ 126 p ort:py${python.version}-pil126 path:${python.pkgd}/PIL:py${python.version}-Pillow 127 127 } 128 128 129 129 post-extract {