summaryrefslogtreecommitdiff
path: root/dev-python/cgkit
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/cgkit
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/cgkit')
-rw-r--r--dev-python/cgkit/Manifest10
-rw-r--r--dev-python/cgkit/cgkit-2.0.0-r1.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
7 files changed, 350 insertions, 0 deletions
diff --git a/dev-python/cgkit/Manifest b/dev-python/cgkit/Manifest
new file mode 100644
index 000000000000..f5b9f8c2b3c7
--- /dev/null
+++ b/dev-python/cgkit/Manifest
@@ -0,0 +1,10 @@
+AUX cgkit-2.0.0-fix-build-system.patch 1202 SHA256 ba8a2ad9101dac42d46cf2e60c5cf71b4a3a66c1aac9f214da5a16ddea80968b SHA512 1bb685b9a26e81005ebcb21381cbe855a26bc6a4ac5ddb2ef42a054b5b7753a9f3aaf4bfc669ca2ab944e332f8aa01025473c8eed2118d1b48e047622d4c2b5c WHIRLPOOL 3543dc184ef8f88220dbcd73b5ca6449dfc365fd17d87fffd8bb00f3ce1bb2847cffec0bd0c80996d6e5305acfb6be741b57d0e1db5af6e1366d08c721934233
+AUX cgkit-2.0.0-fix-c++14.patch 1200 SHA256 98537c45dd03a5831ebdcd7cdf1f364939f56428918ec241f1c18f0fd7a6228a SHA512 0ff1f9e613e44f9b4ab97bce7b83360c22652e1b0374a2b772e8971fcddb4386d49b1df23d7617a2a0c8e824f24eaad5c8c26e82380da50fba8a5f834f6257a2 WHIRLPOOL 4a85e102e13b3c02c6cd50d501e0ab491c9ce3ca4107eb362e68d42266858d09a0401d9c8da9e1ee90d05592674253d5041d93b98226fbee66a8b048b9cee41b
+AUX cgkit-py2k-pillow.patch 2021 SHA256 968de552cc9b8f8f41f3dfdf0290486dae877430a92a86632e461da6e45289bb SHA512 32d03359acb6d890d28f1e8fee8f62d136c52624313c65381fdde1f835f5d96c0337d310a22b7449508cc41be9af9c2215287b641a99f4f4c231593d948dc9bf WHIRLPOOL 9ab2347c2b3e37f4bca60c2d36920b945295de69735ca9a31bb4510b358858051ddb6c017d98a6586bad7b7fbec60700f9a70944e36c8e98284fc9efbad064e2
+AUX cgkit-py3k-pillow.patch 2025 SHA256 1599751ff15ea47b0354290e44a3cc648a3d783b1f73ae22f2f3362f2ae3e3d2 SHA512 163f0e13d9aa960a64beaaac2211b8e854f70bb18fdd1529a4d368ccd60d3c432ec33489c9de3438502409a7a530ee1131c0360992cac30fee5d549e7c88fc4e WHIRLPOOL 2e0f7a76bf590870cdd22fdc536bb44216571f323318f99d50111cadcc475d2122af02e20404afd5bf25e397b1a209f895689c391d7d9f29fd81301a122232d5
+DIST cgkit-2.0.0-py2k.tar.gz 885682 SHA256 a665037f06bd64dcdb519bb0baa7a8d577b788860a627fd850d5b72a08a3746f SHA512 44e57cafc3ba3aa824c44fe4ad04f350dfe053cafa09523acab220e8a5db45dde042b4fcc3e444dc3c248a43ddd94faac6875f579c2063e6c8feba7841472f7c WHIRLPOOL 0507024920bf84dec311e617c932b6ea2827b4609c915f38fce2baa0ac948b96b3fa51ec82a2770796081f88b3bf0d81f72439e65a87a6e0db4d24ef874b4b9b
+DIST cgkit-2.0.0-py3k.tar.gz 885012 SHA256 6d3fb3f02b4a55544c0698b6627054796d36d338704eb1788228cb6523ec2846 SHA512 0c721d728e2cacb3a5518bfdf49810793a7e4a7efdec54a95d9b8b64099996452a08193c90e1b76f57852c3593bf07e4361ba20c17ea3565413d4997e9cf6c2e WHIRLPOOL 95d53d7fb4b5db2ef680051f0d4bcd86bbd189594a4ca99379104d2b306877806a1a4d4de9a8bcb55aa870ffbd52cd2ef8754cb9857b5561e6f6ca5a26b2d1d0
+EBUILD cgkit-2.0.0-r1.ebuild 2124 SHA256 3b4efc51b6c2c494fd83dc9aa9349cf840ffca945faadfa4da747d0dd9ffca0d SHA512 0c65a4469d9324c1e6574b3511969b251601982b3b94364d929c24b37640302c3e9af86df6f90e151a2b31da6ceed7e4b716535e1e6c9d9a3eefcef88eb7286a WHIRLPOOL 789314c648f64c832af72c701507ead6b23a59caca40254f60bd6291fefd1b595f6356b9697627cc293c7aec58a22a8f9d8861df57ff131724e67a4b44a4b969
+MISC ChangeLog 3921 SHA256 c9ab0cbde4d96be350dc9e31f2c368afaa9ce3d6692ab73f837814a1994f3678 SHA512 dd176525498f874ea9d5d09725b3dedec70f17b54db5d98d22b051a1ed9371769a7aa9da6e3f7b63c1c8295c551298fc45713ab82ea76532d7757988c74041e7 WHIRLPOOL 354bfcbad163127552509627b248af0ec0dab74a5986c3fae714ab54c7830ee499630293c4236778358500bf3814f3461357983a5a32ebdf14242d841324e057
+MISC ChangeLog-2015 6537 SHA256 1e7a0c06106b94a44c58ae96d8ad3a5fee01e3aa4b9daf52e11699db02137388 SHA512 e83f9f831942da0edaf139aa82a04fc8517ace7575b8ffd37b7dd053403627fe2b5fa126d31b437a37ff264b9daa55d14dd3c827c81e954e820ba981ea7b0b61 WHIRLPOOL 10bdfeeeabf3aaa21542ca901cbcdd11a577751d7d7418aaf0238fc0850c16c599f9636ef8f8a70ccc2ce316e464b222849aba68c8af0057baa43d4b0bf2ee67
+MISC metadata.xml 613 SHA256 47180bf07d18888f0733a93f19964b02afae05fb584a4f3e15879842b24b58a8 SHA512 276fc1ce3f5ef82f91499436866d31a2807c1d753eabc5bf5494af756086327320f671cd30e4628b4fd4740774a3d7bc83e14175157375abcf01b496589fc85b WHIRLPOOL 386a8ddfb6957ead0bf2759ccf79c2c4774cb5f26bb482a3691eb34a9d9bb0f70beb88b1941ac90eed5a9fab41107f6438df2819a0e8bc8ee9ba2613c7d517cb
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/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>