diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/cgkit/files | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/cgkit/files')
-rw-r--r-- | dev-python/cgkit/files/cgkit-2.0.0-fix-build-system.patch | 40 | ||||
-rw-r--r-- | dev-python/cgkit/files/cgkit-2.0.0-fix-c++14.patch | 33 | ||||
-rw-r--r-- | dev-python/cgkit/files/cgkit-py2k-pillow.patch | 82 | ||||
-rw-r--r-- | dev-python/cgkit/files/cgkit-py3k-pillow.patch | 82 |
4 files changed, 237 insertions, 0 deletions
diff --git a/dev-python/cgkit/files/cgkit-2.0.0-fix-build-system.patch b/dev-python/cgkit/files/cgkit-2.0.0-fix-build-system.patch new file mode 100644 index 000000000000..2b62071380c1 --- /dev/null +++ b/dev-python/cgkit/files/cgkit-2.0.0-fix-build-system.patch @@ -0,0 +1,40 @@ +Make scons respect user variables + +--- a/setup.py ++++ b/setup.py +@@ -214,7 +214,7 @@ + + # The following variables are used to customize the compile process + +-INC_DIRS = [] ++INC_DIRS = ['/usr/include'] + LIB_DIRS = [] + LIBS = [] + CC_ARGS = [] +--- a/supportlib/SConstruct ++++ b/supportlib/SConstruct +@@ -30,19 +30,11 @@ + # Add the local 'include' directory... + env.Append(CPPPATH = ["include"]) + +-# Do platform specific stuff... +-if sys.platform=="win32": +- env.Append(CCFLAGS = ["/GX", "/GR", "/MD", "/W3"]) +- env.Append(CPPDEFINES = ["WIN32", "_LIB"]) +-elif sys.platform=="darwin": +- env.Append(CCFLAGS = ["-arch", "x86_64"]) +- env.Append(CCFLAGS = ["-arch", "i386"]) +-# env.Append(CCFLAGS = ["-arch", "ppc"]) +- env.Append(CPPPATH = ["/opt/local/include"]) +- env.Append(CCFLAGS = ["-fPIC"]) +-else: +- env.Append(CPPPATH = ["/opt/local/include"]) +- env.Append(CCFLAGS = ["-fPIC"]) ++env.Append(CPPPATH = ['/usr/include']) ++env['AR'] = os.environ.get('AR', 'ar') ++env['CXX'] = os.environ.get('CXX', 'g++') ++env['CXXFLAGS'] = os.environ.get('CXXFLAGS', '-fPIC') ++env['CPPFLAGS'] = os.environ.get('CPPFLAGS', '') + + # Setup the help message + Help(vars.GenerateHelpText(env)) diff --git a/dev-python/cgkit/files/cgkit-2.0.0-fix-c++14.patch b/dev-python/cgkit/files/cgkit-2.0.0-fix-c++14.patch new file mode 100644 index 000000000000..70f794664e81 --- /dev/null +++ b/dev-python/cgkit/files/cgkit-2.0.0-fix-c++14.patch @@ -0,0 +1,33 @@ +Fix building in C++14 mode + +--- a/wrappers/py_geoms1.cpp ++++ b/wrappers/py_geoms1.cpp +@@ -142,7 +142,7 @@ + string name = it->first; + const PrimVarInfo& info = it->second; + it++; +- return make_tuple(name, info.storage, info.type, info.multiplicity); ++ return boost::python::make_tuple(name, info.storage, info.type, info.multiplicity); + } + } + +@@ -163,7 +163,7 @@ + } + else + { +- return make_tuple(name, info->storage, info->type, info->multiplicity); ++ return boost::python::make_tuple(name, info->storage, info->type, info->multiplicity); + } + } + +--- a/wrappers/py_slot.h ++++ b/wrappers/py_slot.h +@@ -40,7 +40,7 @@ + // .def("onValueChanged", &Slot<double>::onValueChanged, &SlotWrapper<double>::base_onValueChanged) + + // This macro can be used to create a new Python array slot type +-#define ARRAYSLOT(sname,stype) class_<_ArraySlotIterator<stype> >("_"sname"_Iterator", init<ArraySlot<stype>&>()) \ ++#define ARRAYSLOT(sname,stype) class_<_ArraySlotIterator<stype> >("_" sname "_Iterator", init<ArraySlot<stype>&>()) \ + .def("__iter__", &_ArraySlotIterator<stype>::__iter__) \ + .def("next", &_ArraySlotIterator<stype>::next) \ + ; \ diff --git a/dev-python/cgkit/files/cgkit-py2k-pillow.patch b/dev-python/cgkit/files/cgkit-py2k-pillow.patch new file mode 100644 index 000000000000..0cddbd60b868 --- /dev/null +++ b/dev-python/cgkit/files/cgkit-py2k-pillow.patch @@ -0,0 +1,82 @@ +From 83cb693954f6f56e50a1aa90d935e94e9e8bac8e Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Wed, 5 Jun 2013 20:39:05 -0400 +Subject: [PATCH] Update PIL imports for compatibility with Pillow + +--- + cgkit/_Image.py | 2 +- + cgkit/_ImageDraw.py | 2 +- + cgkit/riutil.py | 2 +- + utilities/checkenv.py | 2 +- + utilities/postbake.py | 3 ++- + 5 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/cgkit/_Image.py b/cgkit/_Image.py +index 7266d4b..0122cd2 100644 +--- a/cgkit/_Image.py ++++ b/cgkit/_Image.py +@@ -38,7 +38,7 @@ + try: + + # Try to import the original module... +- from Image import * ++ from PIL.Image import * + + except ImportError: + +diff --git a/cgkit/_ImageDraw.py b/cgkit/_ImageDraw.py +index dfd6cf8..d1d3cff 100644 +--- a/cgkit/_ImageDraw.py ++++ b/cgkit/_ImageDraw.py +@@ -38,7 +38,7 @@ + try: + + # Try to import the original module... +- from ImageDraw import * ++ from PIL.ImageDraw import * + + except ImportError: + +diff --git a/cgkit/riutil.py b/cgkit/riutil.py +index 301e0f6..ae373c3 100644 +--- a/cgkit/riutil.py ++++ b/cgkit/riutil.py +@@ -38,7 +38,7 @@ import types, sys, getpass + from cgtypes import vec3 + from ri import * + try: +- import Image ++ from PIL import Image + _PIL_installed = 1 + except ImportError: + _PIL_installed = 0 +diff --git a/utilities/checkenv.py b/utilities/checkenv.py +index b95dbf7..c93235e 100644 +--- a/utilities/checkenv.py ++++ b/utilities/checkenv.py +@@ -96,7 +96,7 @@ visualize them. You can obtain PyOpenGL at http://pyopengl.sourceforge.net/ + # Check PIL + chkmsg("PIL") + try: +- import Image ++ from PIL import Image + print "is installed" + except: + print "missing" +diff --git a/utilities/postbake.py b/utilities/postbake.py +index cadd11d..74f894a 100644 +--- a/utilities/postbake.py ++++ b/utilities/postbake.py +@@ -34,7 +34,8 @@ + # + # ***** END LICENSE BLOCK ***** + +-import sys, optparse, Image ++import sys, optparse ++from PIL import Image + + # shift + def shift(img, dx, dy): +-- +1.8.2.1 + diff --git a/dev-python/cgkit/files/cgkit-py3k-pillow.patch b/dev-python/cgkit/files/cgkit-py3k-pillow.patch new file mode 100644 index 000000000000..734ff6eb356a --- /dev/null +++ b/dev-python/cgkit/files/cgkit-py3k-pillow.patch @@ -0,0 +1,82 @@ +From 1953081269ce1cfdf29023a8590db40312c43194 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Wed, 5 Jun 2013 20:39:05 -0400 +Subject: [PATCH] Update PIL imports for compatibility with Pillow + +--- + cgkit/_Image.py | 2 +- + cgkit/_ImageDraw.py | 2 +- + cgkit/riutil.py | 2 +- + utilities/checkenv.py | 2 +- + utilities/postbake.py | 3 ++- + 5 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/cgkit/_Image.py b/cgkit/_Image.py +index 7266d4b..0122cd2 100644 +--- a/cgkit/_Image.py ++++ b/cgkit/_Image.py +@@ -38,7 +38,7 @@ + try: + + # Try to import the original module... +- from Image import * ++ from PIL.Image import * + + except ImportError: + +diff --git a/cgkit/_ImageDraw.py b/cgkit/_ImageDraw.py +index dfd6cf8..d1d3cff 100644 +--- a/cgkit/_ImageDraw.py ++++ b/cgkit/_ImageDraw.py +@@ -38,7 +38,7 @@ + try: + + # Try to import the original module... +- from ImageDraw import * ++ from PIL.ImageDraw import * + + except ImportError: + +diff --git a/cgkit/riutil.py b/cgkit/riutil.py +index b51f192..ae0fba2 100644 +--- a/cgkit/riutil.py ++++ b/cgkit/riutil.py +@@ -38,7 +38,7 @@ import types, sys, getpass + from .cgtypes import vec3 + from .ri import * + try: +- import Image ++ from PIL import Image + _PIL_installed = 1 + except ImportError: + _PIL_installed = 0 +diff --git a/utilities/checkenv.py b/utilities/checkenv.py +index dda600f..8b6f74e 100644 +--- a/utilities/checkenv.py ++++ b/utilities/checkenv.py +@@ -96,7 +96,7 @@ visualize them. You can obtain PyOpenGL at http://pyopengl.sourceforge.net/ + # Check PIL + chkmsg("PIL") + try: +- import Image ++ from PIL import Image + print("is installed") + except: + print("missing") +diff --git a/utilities/postbake.py b/utilities/postbake.py +index 90e3140..27728c2 100644 +--- a/utilities/postbake.py ++++ b/utilities/postbake.py +@@ -34,7 +34,8 @@ + # + # ***** END LICENSE BLOCK ***** + +-import sys, optparse, Image ++import sys, optparse ++from PIL import Image + + # shift + def shift(img, dx, dy): +-- +1.8.2.1 + |