1 |
commit: 739bf1df4ed8f2aa2c3debfa49fe3214b66c1681 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 27 20:50:33 2018 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 27 20:52:30 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=739bf1df |
7 |
|
8 |
dev-python/cgkit: Support python3.6 |
9 |
|
10 |
Package-Manager: Portage-2.3.41, Repoman-2.3.9 |
11 |
|
12 |
dev-python/cgkit/cgkit-2.0.0-r2.ebuild | 85 ++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 85 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/cgkit/cgkit-2.0.0-r2.ebuild b/dev-python/cgkit/cgkit-2.0.0-r2.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..b5d7cbee09c |
18 |
--- /dev/null |
19 |
+++ b/dev-python/cgkit/cgkit-2.0.0-r2.ebuild |
20 |
@@ -0,0 +1,85 @@ |
21 |
+# Copyright 1999-2018 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=6 |
25 |
+ |
26 |
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) |
27 |
+DISTUTILS_IN_SOURCE_BUILD=1 |
28 |
+ |
29 |
+inherit distutils-r1 scons-utils toolchain-funcs |
30 |
+ |
31 |
+MY_P="${P/_/}" |
32 |
+ |
33 |
+DESCRIPTION="Python library for creating 3D images" |
34 |
+HOMEPAGE="http://cgkit.sourceforge.net" |
35 |
+SRC_URI=" |
36 |
+ $(python_gen_cond_dep mirror://sourceforge/${PN}/${PN}/${P}/${P}-py2k.tar.gz 'python2*') |
37 |
+ $(python_gen_cond_dep mirror://sourceforge/${PN}/${PN}/${P}/${P}-py3k.tar.gz 'python3*')" |
38 |
+ |
39 |
+LICENSE="LGPL-2.1 MPL-1.1 GPL-2" |
40 |
+SLOT="0" |
41 |
+KEYWORDS="~amd64 ~ppc ~x86" |
42 |
+IUSE="3ds" |
43 |
+ |
44 |
+RDEPEND=" |
45 |
+ >=dev-libs/boost-1.48[python,${PYTHON_USEDEP}] |
46 |
+ $(python_gen_cond_dep 'dev-python/pyprotocols[${PYTHON_USEDEP}]' 'python2*') |
47 |
+ dev-python/pyopengl[${PYTHON_USEDEP}] |
48 |
+ dev-python/pygame[${PYTHON_USEDEP}] |
49 |
+ dev-python/pillow[${PYTHON_USEDEP}] |
50 |
+ 3ds? ( ~media-libs/lib3ds-1.3.0 )" |
51 |
+DEPEND="${RDEPEND}" |
52 |
+ |
53 |
+src_unpack() { |
54 |
+ cgkit_unpack() { |
55 |
+ local tarball |
56 |
+ if python_is_python3; then |
57 |
+ tarball=${P}-py3k.tar.gz |
58 |
+ else |
59 |
+ tarball=${P}-py2k.tar.gz |
60 |
+ fi |
61 |
+ mkdir "${BUILD_DIR}" || die |
62 |
+ tar -C "${BUILD_DIR}" -x --strip-components 1 -f "${DISTDIR}/${tarball}" || die |
63 |
+ } |
64 |
+ python_foreach_impl cgkit_unpack |
65 |
+ mkdir "${S}" || die |
66 |
+} |
67 |
+ |
68 |
+python_prepare() { |
69 |
+ eapply \ |
70 |
+ "${FILESDIR}"/${PN}-2.0.0-fix-build-system.patch \ |
71 |
+ "${FILESDIR}"/${PN}-2.0.0-fix-c++14.patch |
72 |
+ if python_is_python3; then |
73 |
+ eapply "${FILESDIR}"/${PN}-py3k-pillow.patch |
74 |
+ else |
75 |
+ eapply "${FILESDIR}"/${PN}-py2k-pillow.patch |
76 |
+ fi |
77 |
+ |
78 |
+ cp config_template.cfg config.cfg || die |
79 |
+ cat >> config.cfg <<- _EOF_ || die |
80 |
+ BOOST_LIB = 'boost_python-${EPYTHON#python}' |
81 |
+ LIBS += ['GL', 'GLU', 'glut'] |
82 |
+ LIB3DS_AVAILABLE = $(usex 3ds True False) |
83 |
+ _EOF_ |
84 |
+ |
85 |
+ # Remove invalid test |
86 |
+ rm -f unittests/test_pointcloud.py || die |
87 |
+} |
88 |
+ |
89 |
+python_configure_all() { |
90 |
+ tc-export AR CXX |
91 |
+} |
92 |
+ |
93 |
+python_compile() { |
94 |
+ pushd supportlib >/dev/null || die |
95 |
+ CXXFLAGS="${CXXFLAGS} -fPIC" escons |
96 |
+ popd >/dev/null || die |
97 |
+ distutils-r1_python_compile |
98 |
+} |
99 |
+ |
100 |
+python_test() { |
101 |
+ pushd unittests >/dev/null || die |
102 |
+ mkdir tmp || die |
103 |
+ "${EPYTHON}" all.py || die "Testing failed with ${EPYTHON}" |
104 |
+ popd >/dev/null || die |
105 |
+} |