summaryrefslogtreecommitdiff
path: root/dev-python/cgkit
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/cgkit
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/cgkit')
-rw-r--r--dev-python/cgkit/Manifest9
-rw-r--r--dev-python/cgkit/cgkit-2.0.0-r1.ebuild85
-rw-r--r--dev-python/cgkit/cgkit-2.0.0-r2.ebuild85
-rw-r--r--dev-python/cgkit/files/cgkit-2.0.0-fix-build-system.patch40
-rw-r--r--dev-python/cgkit/files/cgkit-2.0.0-fix-c++14.patch33
-rw-r--r--dev-python/cgkit/files/cgkit-py2k-pillow.patch82
-rw-r--r--dev-python/cgkit/files/cgkit-py3k-pillow.patch82
-rw-r--r--dev-python/cgkit/metadata.xml18
8 files changed, 434 insertions, 0 deletions
diff --git a/dev-python/cgkit/Manifest b/dev-python/cgkit/Manifest
new file mode 100644
index 000000000000..16ee5b11e21b
--- /dev/null
+++ b/dev-python/cgkit/Manifest
@@ -0,0 +1,9 @@
+AUX cgkit-2.0.0-fix-build-system.patch 1202 BLAKE2B ed474cc7fdd46c365d4064ba952afba2c9959589ae25514e113bd28f0043cf6861db053ff5f773932b29a796f364c880117cf6a031facf2710f27582fd55b096 SHA512 1bb685b9a26e81005ebcb21381cbe855a26bc6a4ac5ddb2ef42a054b5b7753a9f3aaf4bfc669ca2ab944e332f8aa01025473c8eed2118d1b48e047622d4c2b5c
+AUX cgkit-2.0.0-fix-c++14.patch 1200 BLAKE2B 9b55b90b9a4fa2bee77a44035296274387d35fd18584f27e61709a77bbca18d8ec279849a25d6603f609ab73011d9919343985195ef5915109c23c3363f77ffa SHA512 0ff1f9e613e44f9b4ab97bce7b83360c22652e1b0374a2b772e8971fcddb4386d49b1df23d7617a2a0c8e824f24eaad5c8c26e82380da50fba8a5f834f6257a2
+AUX cgkit-py2k-pillow.patch 2021 BLAKE2B cdf751cf4b8d88780a139074ef14fb9440be9d0b8378c7ada0a55f53edabf9d38504075b13c90fa2dbc53ee52634dc84519acc6d4f1358807eabb12d21d702ea SHA512 32d03359acb6d890d28f1e8fee8f62d136c52624313c65381fdde1f835f5d96c0337d310a22b7449508cc41be9af9c2215287b641a99f4f4c231593d948dc9bf
+AUX cgkit-py3k-pillow.patch 2025 BLAKE2B aa036db10e22b6c92c56a4e0e356d9fa8d14acc32121682d32b3f9221119f863a39ced8fcec2b23f40baf4b75c95df427757471ad435bb00c7ac889e3541f897 SHA512 163f0e13d9aa960a64beaaac2211b8e854f70bb18fdd1529a4d368ccd60d3c432ec33489c9de3438502409a7a530ee1131c0360992cac30fee5d549e7c88fc4e
+DIST cgkit-2.0.0-py2k.tar.gz 885682 BLAKE2B f32eb8f05197ae44b3a1d5bf734d779c6e7f53af526f1686348e977f55bc584f565eea9e3831f562dae6aa6715d732465e0d37b07746065e965f945ee1152d18 SHA512 44e57cafc3ba3aa824c44fe4ad04f350dfe053cafa09523acab220e8a5db45dde042b4fcc3e444dc3c248a43ddd94faac6875f579c2063e6c8feba7841472f7c
+DIST cgkit-2.0.0-py3k.tar.gz 885012 BLAKE2B fe48d57ec01ee286c0974b53e088f74db73a19d6cdf9ebde43f3190a46994c803f870f2546583cf6d4bce984895469f61a82e99e6bf98da77443b3857b70b60e SHA512 0c721d728e2cacb3a5518bfdf49810793a7e4a7efdec54a95d9b8b64099996452a08193c90e1b76f57852c3593bf07e4361ba20c17ea3565413d4997e9cf6c2e
+EBUILD cgkit-2.0.0-r1.ebuild 2124 BLAKE2B a60a0485180c1d47e87bb9622089b7ae7983b5ee585fbd986e53e067b9c0bbf1f0fbd3cfb6a73ef5ef7a393f482df4b3d3891d234aa96bdc5ebabf6ade9b4678 SHA512 0c65a4469d9324c1e6574b3511969b251601982b3b94364d929c24b37640302c3e9af86df6f90e151a2b31da6ceed7e4b716535e1e6c9d9a3eefcef88eb7286a
+EBUILD cgkit-2.0.0-r2.ebuild 2130 BLAKE2B 3904341c977941d3e7eaf58a5deb77bd98d016f3283f3c9297c0a11e02e20a1df45e43b0015ed272f488de7a6fdb0330eaf1e9c13a0f434993d56325be936a18 SHA512 0048823508f37487ae9c7e3887cf51cd99413edb5eddcb8b977a0dd3befff5293f766dc820d763269f02e87565d9dc3870b6975e7ccf5fe1c69880fa559d3218
+MISC metadata.xml 613 BLAKE2B 1ab7e4e1a5527090988592c49fdabfa5cb34527ac802efe6f4b144980a88346f6f2bfba8dabd94b63675e811852e3aa6c4dfe12d1ff65562a9c1ef74f8a96fc8 SHA512 276fc1ce3f5ef82f91499436866d31a2807c1d753eabc5bf5494af756086327320f671cd30e4628b4fd4740774a3d7bc83e14175157375abcf01b496589fc85b
diff --git a/dev-python/cgkit/cgkit-2.0.0-r1.ebuild b/dev-python/cgkit/cgkit-2.0.0-r1.ebuild
new file mode 100644
index 000000000000..346af45d30ab
--- /dev/null
+++ b/dev-python/cgkit/cgkit-2.0.0-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+DISTUTILS_IN_SOURCE_BUILD=1
+
+inherit distutils-r1 scons-utils toolchain-funcs
+
+MY_P="${P/_/}"
+
+DESCRIPTION="Python library for creating 3D images"
+HOMEPAGE="http://cgkit.sourceforge.net"
+SRC_URI="
+ $(python_gen_cond_dep mirror://sourceforge/${PN}/${PN}/${P}/${P}-py2k.tar.gz 'python2*')
+ $(python_gen_cond_dep mirror://sourceforge/${PN}/${PN}/${P}/${P}-py3k.tar.gz 'python3*')"
+
+LICENSE="LGPL-2.1 MPL-1.1 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="3ds"
+
+RDEPEND="
+ >=dev-libs/boost-1.48[python,${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/pyprotocols[${PYTHON_USEDEP}]' 'python2*')
+ dev-python/pyopengl[${PYTHON_USEDEP}]
+ dev-python/pygame[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ 3ds? ( ~media-libs/lib3ds-1.3.0 )"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ cgkit_unpack() {
+ local tarball
+ if python_is_python3; then
+ tarball=${P}-py3k.tar.gz
+ else
+ tarball=${P}-py2k.tar.gz
+ fi
+ mkdir "${BUILD_DIR}" || die
+ tar -C "${BUILD_DIR}" -x --strip-components 1 -f "${DISTDIR}/${tarball}" || die
+ }
+ python_foreach_impl cgkit_unpack
+ mkdir "${S}" || die
+}
+
+python_prepare() {
+ eapply \
+ "${FILESDIR}"/${PN}-2.0.0-fix-build-system.patch \
+ "${FILESDIR}"/${PN}-2.0.0-fix-c++14.patch
+ if python_is_python3; then
+ eapply "${FILESDIR}"/${PN}-py3k-pillow.patch
+ else
+ eapply "${FILESDIR}"/${PN}-py2k-pillow.patch
+ fi
+
+ cp config_template.cfg config.cfg || die
+ cat >> config.cfg <<- _EOF_ || die
+ BOOST_LIB = 'boost_python-${EPYTHON#python}'
+ LIBS += ['GL', 'GLU', 'glut']
+ LIB3DS_AVAILABLE = $(usex 3ds True False)
+ _EOF_
+
+ # Remove invalid test
+ rm -f unittests/test_pointcloud.py || die
+}
+
+python_configure_all() {
+ tc-export AR CXX
+}
+
+python_compile() {
+ pushd supportlib >/dev/null || die
+ CXXFLAGS="${CXXFLAGS} -fPIC" escons
+ popd >/dev/null || die
+ distutils-r1_python_compile
+}
+
+python_test() {
+ pushd unittests >/dev/null || die
+ mkdir tmp || die
+ "${EPYTHON}" all.py || die "Testing failed with ${EPYTHON}"
+ popd >/dev/null || die
+}
diff --git a/dev-python/cgkit/cgkit-2.0.0-r2.ebuild b/dev-python/cgkit/cgkit-2.0.0-r2.ebuild
new file mode 100644
index 000000000000..266537ff2c90
--- /dev/null
+++ b/dev-python/cgkit/cgkit-2.0.0-r2.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+DISTUTILS_IN_SOURCE_BUILD=1
+
+inherit distutils-r1 scons-utils toolchain-funcs
+
+MY_P="${P/_/}"
+
+DESCRIPTION="Python library for creating 3D images"
+HOMEPAGE="http://cgkit.sourceforge.net"
+SRC_URI="
+ $(python_gen_cond_dep mirror://sourceforge/${PN}/${PN}/${P}/${P}-py2k.tar.gz 'python2*')
+ $(python_gen_cond_dep mirror://sourceforge/${PN}/${PN}/${P}/${P}-py3k.tar.gz 'python3*')"
+
+LICENSE="LGPL-2.1 MPL-1.1 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~x86"
+IUSE="3ds"
+
+RDEPEND="
+ >=dev-libs/boost-1.48[python,${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/pyprotocols[${PYTHON_USEDEP}]' 'python2*')
+ dev-python/pyopengl[${PYTHON_USEDEP}]
+ dev-python/pygame[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ 3ds? ( ~media-libs/lib3ds-1.3.0 )"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ cgkit_unpack() {
+ local tarball
+ if python_is_python3; then
+ tarball=${P}-py3k.tar.gz
+ else
+ tarball=${P}-py2k.tar.gz
+ fi
+ mkdir "${BUILD_DIR}" || die
+ tar -C "${BUILD_DIR}" -x --strip-components 1 -f "${DISTDIR}/${tarball}" || die
+ }
+ python_foreach_impl cgkit_unpack
+ mkdir "${S}" || die
+}
+
+python_prepare() {
+ eapply \
+ "${FILESDIR}"/${PN}-2.0.0-fix-build-system.patch \
+ "${FILESDIR}"/${PN}-2.0.0-fix-c++14.patch
+ if python_is_python3; then
+ eapply "${FILESDIR}"/${PN}-py3k-pillow.patch
+ else
+ eapply "${FILESDIR}"/${PN}-py2k-pillow.patch
+ fi
+
+ cp config_template.cfg config.cfg || die
+ cat >> config.cfg <<- _EOF_ || die
+ BOOST_LIB = 'boost_python-${EPYTHON#python}'
+ LIBS += ['GL', 'GLU', 'glut']
+ LIB3DS_AVAILABLE = $(usex 3ds True False)
+ _EOF_
+
+ # Remove invalid test
+ rm -f unittests/test_pointcloud.py || die
+}
+
+python_configure_all() {
+ tc-export AR CXX
+}
+
+python_compile() {
+ pushd supportlib >/dev/null || die
+ CXXFLAGS="${CXXFLAGS} -fPIC" escons
+ popd >/dev/null || die
+ distutils-r1_python_compile
+}
+
+python_test() {
+ pushd unittests >/dev/null || die
+ mkdir tmp || die
+ "${EPYTHON}" all.py || die "Testing failed with ${EPYTHON}"
+ popd >/dev/null || die
+}
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
+
diff --git a/dev-python/cgkit/metadata.xml b/dev-python/cgkit/metadata.xml
new file mode 100644
index 000000000000..b5c29ce8fc23
--- /dev/null
+++ b/dev-python/cgkit/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <use>
+ <flag name="3ds">Enable support for importing 3D Studio models</flag>
+ </use>
+ <longdescription>Python library for creating 3D images</longdescription>
+ <longdescription lang="ja">
+ 3D画像を作成するためのPython言語ライブラリです。
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">cgkit</remote-id>
+ </upstream>
+</pkgmetadata>