Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/imath/
Date: Tue, 04 May 2021 22:03:02
Message-Id: 1620165735.ab42e90c0df8cb286b35d6f27d0e7fbe6011e73d.sam@gentoo
1 commit: ab42e90c0df8cb286b35d6f27d0e7fbe6011e73d
2 Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
3 AuthorDate: Tue Mar 16 16:28:34 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue May 4 22:02:15 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab42e90c
7
8 dev-libs/imath: new package
9
10 Package starts with version 3.0.1, as it was historically
11 outsourced from the ilmbase / openexr packages.
12
13 Closes: https://bugs.gentoo.org/776607
14 Package-Manager: Portage-3.0.18, Repoman-3.0.3
15 Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
16 Signed-off-by: Sam James <sam <AT> gentoo.org>
17
18 dev-libs/imath/Manifest | 1 +
19 dev-libs/imath/imath-3.0.1.ebuild | 90 +++++++++++++++++++++++++++++++++++++++
20 dev-libs/imath/metadata.xml | 25 +++++++++++
21 3 files changed, 116 insertions(+)
22
23 diff --git a/dev-libs/imath/Manifest b/dev-libs/imath/Manifest
24 new file mode 100644
25 index 00000000000..6778d92c9bd
26 --- /dev/null
27 +++ b/dev-libs/imath/Manifest
28 @@ -0,0 +1 @@
29 +DIST imath-3.0.1.tar.gz 527715 BLAKE2B 45d8f6524fd2505bdb3318f571c44228c9baf6df869d194d4b90a9c045f1dbb8f905253aeaf6b6a9254e4b0c0c19d753b7e4ae068732f0367fc936d4a111520d SHA512 40cdae81d624636b3dd7eb456e6e205e5b7adf7aed17f6e9168374f8830f1b5755dcd32ac790f94e768513d06ab96d94a2bc57ec80a079e4ac94a3857e5e3988
30
31 diff --git a/dev-libs/imath/imath-3.0.1.ebuild b/dev-libs/imath/imath-3.0.1.ebuild
32 new file mode 100644
33 index 00000000000..bf6da0d3e7e
34 --- /dev/null
35 +++ b/dev-libs/imath/imath-3.0.1.ebuild
36 @@ -0,0 +1,90 @@
37 +# Copyright 1999-2021 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=7
41 +
42 +PYTHON_COMPAT=( python3_{8,9} )
43 +
44 +inherit cmake python-single-r1
45 +
46 +MY_PN=Imath
47 +
48 +DESCRIPTION="Imath basic math package"
49 +HOMEPAGE="https://imath.readthedocs.io"
50 +SRC_URI="https://github.com/AcademySoftwareFoundation/${MY_PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
51 +# re-keywording needed for (according to ilmbase keywords):
52 +# ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x64-macos ~x86-solaris
53 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
54 +S="${WORKDIR}/${MY_PN}-${PV}"
55 +
56 +LICENSE="BSD"
57 +SLOT="0/27"
58 +IUSE="doc large-stack python static-libs test"
59 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
60 +RESTRICT="!test? ( test )"
61 +
62 +# libImath.so conflicts with ilmbase
63 +RDEPEND="
64 + !media-libs/ilmbase
65 + sys-libs/zlib
66 + python? (
67 + !dev-python/pyilmbase
68 + ${PYTHON_DEPS}
69 + $(python_gen_cond_dep '
70 + dev-libs/boost:=[python?,${PYTHON_MULTI_USEDEP}]
71 + dev-python/numpy[${PYTHON_MULTI_USEDEP}]
72 + ')
73 + )
74 +"
75 +DEPEND="${RDEPEND}"
76 +BDEPEND="
77 + virtual/pkgconfig
78 + doc? ( $(python_gen_cond_dep 'dev-python/breathe[${PYTHON_MULTI_USEDEP}]') )
79 + python? ( ${PYTHON_DEPS} )
80 +"
81 +
82 +DOCS=( CHANGES.md CONTRIBUTORS.md README.md SECURITY.md docs/PortingGuide2-3.md )
83 +
84 +pkg_setup() {
85 + use python && python-single-r1_pkg_setup
86 +}
87 +
88 +src_configure() {
89 + local mycmakeargs=(
90 + -DBUILD_SHARED_LIBS=$(usex !static-libs)
91 + -DIMATH_ENABLE_LARGE_STACK=$(usex large-stack)
92 + -DIMATH_INSTALL_PKG_CONFIG=ON
93 + -DIMATH_USE_CLANG_TIDY=OFF
94 + )
95 +
96 + if use python; then
97 + mycmakeargs+=(
98 + -DPYTHON=ON
99 + -DPython3_EXECUTABLE="${PYTHON}"
100 + -DPython3_INCLUDE_DIR=$(python_get_includedir)
101 + -DPython3_LIBRARY=$(python_get_library_path)
102 + )
103 + fi
104 +
105 + cmake_src_configure
106 +}
107 +
108 +src_compile() {
109 + cmake_src_compile
110 +
111 + if use doc; then
112 + pushd "${S}"/docs 2>/dev/null || die
113 + doxygen || die
114 + emake html
115 + popd 2>/dev/null || die
116 + fi
117 +}
118 +
119 +src_install() {
120 + cmake_src_install
121 +
122 + if use doc; then
123 + HTML_DOCS=( "${S}/docs/_build/html/." )
124 + einstalldocs
125 + fi
126 +}
127
128 diff --git a/dev-libs/imath/metadata.xml b/dev-libs/imath/metadata.xml
129 new file mode 100644
130 index 00000000000..e33071a5235
131 --- /dev/null
132 +++ b/dev-libs/imath/metadata.xml
133 @@ -0,0 +1,25 @@
134 +<?xml version="1.0" encoding="UTF-8"?>
135 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
136 +<pkgmetadata>
137 + <maintainer type="person" proxied="yes">
138 + <email>waebbl-gentoo@××××××.net</email>
139 + <name>Bernd Waibel</name>
140 + </maintainer>
141 + <maintainer type="project" proxied="proxy">
142 + <email>proxy-maint@g.o</email>
143 + <description>Gentoo Proxy Maintainers</description>
144 + </maintainer>
145 + <longdescription>
146 + Basic, light-weight C++ library for efficient representation of 2D
147 + and 3D vectors and matrices and data type common to computer graphics
148 + applications.
149 + </longdescription>
150 + <use>
151 + <flag name="large-stack">
152 + Enables code to take advantage of large stack support
153 + </flag>
154 + </use>
155 + <upstream>
156 + <remote-id type="github">AcademySoftwareFoundation/Imath</remote-id>
157 + </upstream>
158 +</pkgmetadata>