Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/osl/
Date: Tue, 01 Dec 2020 11:24:52
Message-Id: 1606821729.cf4b1ff64f961b0fd360e4f74351fa3325081890.juippis@gentoo
1 commit: cf4b1ff64f961b0fd360e4f74351fa3325081890
2 Author: Adrian Grigo <agrigo2001 <AT> yahoo <DOT> com <DOT> au>
3 AuthorDate: Fri Nov 27 00:27:24 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 1 11:22:09 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf4b1ff6
7
8 media-libs/osl: Version bump to 1.11.9.0
9
10 Version bump to 1.11.9.0, using LLVM 10 and C++14
11 using shared libraries to prevent compilation error
12
13 New dependency on pybind11 added
14
15 ENABLERTTI removed as flag removed upstream
16
17 LLVM_ROOT set to prevent errors with pugixml
18
19 Shader install patch replaced with setting
20 OSL_SHADER_INSTALL_DIR and OSL_PTX_INSTALLDIR
21
22 Thanks again to Luke A Guest, Sam James, Joonas Niilola,
23 Reggie and mehw for contributions to this update.
24
25 Signed-off-by: Adrian Grigo <agrigo2001 <AT> yahoo.com.au>
26 Closes: https://bugs.gentoo.org/747475
27 Package-Manager: Portage-3.0.9, Repoman-3.0.2
28 Closes: https://github.com/gentoo/gentoo/pull/18418
29 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
30
31 media-libs/osl/Manifest | 1 +
32 media-libs/osl/osl-1.11.9.0.ebuild | 93 ++++++++++++++++++++++++++++++++++++++
33 2 files changed, 94 insertions(+)
34
35 diff --git a/media-libs/osl/Manifest b/media-libs/osl/Manifest
36 index 9d9c3beb49e..1b6d5ed44f2 100644
37 --- a/media-libs/osl/Manifest
38 +++ b/media-libs/osl/Manifest
39 @@ -1,2 +1,3 @@
40 DIST osl-1.10.10.tar.gz 13549066 BLAKE2B d91360d4cde0e8f70e01aa5cbf14bd6dc30be47ba96d4f2206adb75ef8f14af6af43b00f025cbf9b9c03cfcf117380ee9bb0a93129c314b249151cd97135757b SHA512 10371d9aefa786fefbae15cb9c71d7360bd903a36734840f7d0a960a615d48096b7170596bd934d10579b33d8f8398fc0e00471a10cd517c1a4a601169b2ca13
41 DIST osl-1.10.13.tar.gz 13551733 BLAKE2B 63b687ec46bd5334a7d0c00cfa5bf5243003e16adf2637fba648a75f98c10103c7c4b5fa1d091ab43b0929f85523b0fa79589eca56686490ee61c48069593767 SHA512 bc39fcf80878160807e35c52654a2993a7d33b3ab2fbf567ec50d0b23636a19064830afab5734f1e39276c77e843bbfe1d6b10a64fd4ebe69b17c8faa5378201
42 +DIST osl-1.11.9.0.tar.gz 14137334 BLAKE2B db68cb77d6af56e711b897371a4fe9386bf1a62625f9fa04012e9ec22346933fe3b0112301a8ad17ac6dd9c01c2a8e00c6d6e557d947870fd39bb3dec1443fd8 SHA512 f93bce0b29ff2da022372d81f2709c7db68e011c07c346b679c4b5ce05425f7eda8904779d7ea460817639e6be78a8c77272d71a3ffa8b068cfaab7572eb2e65
43
44 diff --git a/media-libs/osl/osl-1.11.9.0.ebuild b/media-libs/osl/osl-1.11.9.0.ebuild
45 new file mode 100644
46 index 00000000000..9ab4388c8df
47 --- /dev/null
48 +++ b/media-libs/osl/osl-1.11.9.0.ebuild
49 @@ -0,0 +1,93 @@
50 +# Copyright 1999-2020 Gentoo Authors
51 +# Distributed under the terms of the GNU General Public License v2
52 +
53 +EAPI=7
54 +inherit cmake llvm toolchain-funcs
55 +
56 +# check this on updates
57 +LLVM_MAX_SLOT=10
58 +
59 +DESCRIPTION="Advanced shading language for production GI renderers"
60 +HOMEPAGE="http://opensource.imageworks.com/?p=osl https://github.com/imageworks/OpenShadingLanguage"
61 +SRC_URI="https://github.com/imageworks/OpenShadingLanguage/archive/Release-${PV}.tar.gz -> ${P}.tar.gz"
62 +
63 +LICENSE="BSD"
64 +SLOT="0/11"
65 +KEYWORDS="~amd64 ~x86"
66 +
67 +X86_CPU_FEATURES=(
68 + sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4.1 sse4_2:sse4.2
69 + avx:avx avx2:avx2 avx512f:avx512f f16c:f16c
70 +)
71 +CPU_FEATURES=( ${X86_CPU_FEATURES[@]/#/cpu_flags_x86_} )
72 +
73 +IUSE="doc partio qt5 test ${CPU_FEATURES[@]%:*}"
74 +
75 +RDEPEND="
76 + dev-libs/boost:=
77 + dev-libs/pugixml
78 + media-libs/openexr:=
79 + media-libs/openimageio:=
80 + <sys-devel/clang-11:=
81 + sys-libs/zlib
82 + partio? ( media-libs/partio )
83 + qt5? (
84 + dev-qt/qtcore:5
85 + dev-qt/qtgui:5
86 + dev-qt/qtwidgets:5
87 + )
88 +"
89 +
90 +DEPEND="
91 + ${RDEPEND}
92 + dev-python/pybind11
93 +"
94 +
95 +BDEPEND="
96 + sys-devel/bison
97 + sys-devel/flex
98 + virtual/pkgconfig
99 +"
100 +
101 +PATCHES=()
102 +
103 +CMAKE_REMOVE_MODULES_LIST=()
104 +
105 +# Restricting tests as Make file handles them differently
106 +RESTRICT="test"
107 +
108 +S="${WORKDIR}/OpenShadingLanguage-Release-${PV}"
109 +
110 +llvm_check_deps() {
111 + has_version -r "sys-devel/clang:${LLVM_SLOT}"
112 +}
113 +
114 +src_configure() {
115 + local cpufeature
116 + local mysimd=()
117 + for cpufeature in "${CPU_FEATURES[@]}"; do
118 + use "${cpufeature%:*}" && mysimd+=("${cpufeature#*:}")
119 + done
120 +
121 + # If no CPU SIMDs were used, completely disable them
122 + [[ -z ${mysimd} ]] && mysimd=("0")
123 +
124 + local gcc=$(tc-getCC)
125 + # LLVM10+ needs CPP14+
126 + local mycmakeargs=(
127 + -DCMAKE_CXX_STANDARD=14
128 + -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"
129 + -DINSTALL_DOCS=$(usex doc)
130 + -DLLVM_STATIC=OFF
131 + -DLLVM_ROOT="$(get_llvm_prefix ${LLVM_MAX_SLOT})"
132 + -DOSL_BUILD_TESTS=$(usex test)
133 + -DOSL_SHADER_INSTALL_DIR="${EPREFIX}/usr/include/${PN^^}/shaders"
134 + -DOSL_PTX_INSTALL_DIR="${EPREFIX}/usr/include/${PN^^}/ptx"
135 + -DSTOP_ON_WARNING=OFF
136 + -DUSE_PARTIO=$(usex partio)
137 + -DUSE_QT=$(usex qt5)
138 + -DUSE_SIMD="$(IFS=","; echo "${mysimd[*]}")"
139 + )
140 +
141 + cmake_src_configure
142 +}