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:53
Message-Id: 1606821724.beb901a124bd4b8b9c85e074ef3f607c81004c55.juippis@gentoo
1 commit: beb901a124bd4b8b9c85e074ef3f607c81004c55
2 Author: Adrian Grigo <agrigo2001 <AT> yahoo <DOT> com <DOT> au>
3 AuthorDate: Thu Nov 26 23:09:30 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 1 11:22:04 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=beb901a1
7
8 media-libs/osl: Version bump to 1.10.13
9
10 This version works with openimageio 2 (fixes build failure of 1.10.10)
11
12 Add support for LLVM 10, which requires C++14
13
14 Enable shared libraries
15 Add github page as second homepage
16
17 Added subslot operator otherwise upgrading to 1.11 will leave behind
18 preserved libraries (blender is the only current client in the tree)
19
20 Thanks to Mehw, Cyrillic, Peter Karlsson, Reggie, Luke A Guest, and
21 Joonas Niilola for their contributions to the bugs mentioned below
22 which forms the bulk of this update.
23
24 Signed-off-by: Adrian Grigo <agrigo2001 <AT> yahoo.com.au>
25 Closes: https://bugs.gentoo.org/735750
26 Closes: https://bugs.gentoo.org/751580
27 Package-Manager: Portage-3.0.9, Repoman-3.0.2
28 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
29
30 media-libs/osl/Manifest | 1 +
31 media-libs/osl/osl-1.10.13.ebuild | 87 +++++++++++++++++++++++++++++++++++++++
32 2 files changed, 88 insertions(+)
33
34 diff --git a/media-libs/osl/Manifest b/media-libs/osl/Manifest
35 index 2001775196d..9d9c3beb49e 100644
36 --- a/media-libs/osl/Manifest
37 +++ b/media-libs/osl/Manifest
38 @@ -1 +1,2 @@
39 DIST osl-1.10.10.tar.gz 13549066 BLAKE2B d91360d4cde0e8f70e01aa5cbf14bd6dc30be47ba96d4f2206adb75ef8f14af6af43b00f025cbf9b9c03cfcf117380ee9bb0a93129c314b249151cd97135757b SHA512 10371d9aefa786fefbae15cb9c71d7360bd903a36734840f7d0a960a615d48096b7170596bd934d10579b33d8f8398fc0e00471a10cd517c1a4a601169b2ca13
40 +DIST osl-1.10.13.tar.gz 13551733 BLAKE2B 63b687ec46bd5334a7d0c00cfa5bf5243003e16adf2637fba648a75f98c10103c7c4b5fa1d091ab43b0929f85523b0fa79589eca56686490ee61c48069593767 SHA512 bc39fcf80878160807e35c52654a2993a7d33b3ab2fbf567ec50d0b23636a19064830afab5734f1e39276c77e843bbfe1d6b10a64fd4ebe69b17c8faa5378201
41
42 diff --git a/media-libs/osl/osl-1.10.13.ebuild b/media-libs/osl/osl-1.10.13.ebuild
43 new file mode 100644
44 index 00000000000..85fdd979a7f
45 --- /dev/null
46 +++ b/media-libs/osl/osl-1.10.13.ebuild
47 @@ -0,0 +1,87 @@
48 +# Copyright 1999-2020 Gentoo Authors
49 +# Distributed under the terms of the GNU General Public License v2
50 +
51 +EAPI=7
52 +inherit cmake llvm toolchain-funcs
53 +
54 +# check this on updates
55 +LLVM_MAX_SLOT=10
56 +
57 +DESCRIPTION="Advanced shading language for production GI renderers"
58 +HOMEPAGE="http://opensource.imageworks.com/?p=osl https://github.com/imageworks/OpenShadingLanguage"
59 +SRC_URI="https://github.com/imageworks/OpenShadingLanguage/archive/Release-${PV}.tar.gz -> ${P}.tar.gz"
60 +
61 +LICENSE="BSD"
62 +SLOT="0/10"
63 +KEYWORDS="~amd64 ~x86"
64 +
65 +X86_CPU_FEATURES=(
66 + sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4.1 sse4_2:sse4.2
67 + avx:avx avx2:avx2 avx512f:avx512f f16c:f16c
68 +)
69 +CPU_FEATURES=( ${X86_CPU_FEATURES[@]/#/cpu_flags_x86_} )
70 +
71 +IUSE="doc partio qt5 test ${CPU_FEATURES[@]%:*}"
72 +
73 +RDEPEND="
74 + dev-libs/boost:=
75 + dev-libs/pugixml
76 + media-libs/openexr:=
77 + media-libs/openimageio:=
78 + <sys-devel/clang-11:=
79 + sys-libs/zlib
80 + partio? ( media-libs/partio )
81 + qt5? (
82 + dev-qt/qtcore:5
83 + dev-qt/qtgui:5
84 + dev-qt/qtwidgets:5
85 + )
86 +"
87 +
88 +DEPEND="${RDEPEND}"
89 +BDEPEND="
90 + sys-devel/bison
91 + sys-devel/flex
92 + virtual/pkgconfig
93 +"
94 +
95 +PATCHES=(
96 + "${FILESDIR}/${PN}-1.10.5-fix-install-shaders.patch"
97 +)
98 +
99 +# Restricting tests as Make file handles them differently
100 +RESTRICT="test"
101 +
102 +S="${WORKDIR}/OpenShadingLanguage-Release-${PV}"
103 +
104 +llvm_check_deps() {
105 + has_version -r "sys-devel/clang:${LLVM_SLOT}"
106 +}
107 +
108 +src_configure() {
109 + local cpufeature
110 + local mysimd=()
111 + for cpufeature in "${CPU_FEATURES[@]}"; do
112 + use "${cpufeature%:*}" && mysimd+=("${cpufeature#*:}")
113 + done
114 +
115 + # If no CPU SIMDs were used, completely disable them
116 + [[ -z ${mysimd} ]] && mysimd=("0")
117 +
118 + local gcc=$(tc-getCC)
119 + # LLVM needs CPP11. Do not disable.
120 + local mycmakeargs=(
121 + -DCMAKE_CXX_STANDARD=14
122 + -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"
123 + -DENABLERTTI=OFF
124 + -DINSTALL_DOCS=$(usex doc)
125 + -DLLVM_STATIC=OFF
126 + -DOSL_BUILD_TESTS=$(usex test)
127 + -DSTOP_ON_WARNING=OFF
128 + -DUSE_PARTIO=$(usex partio)
129 + -DUSE_QT=$(usex qt5)
130 + -DUSE_SIMD="$(IFS=","; echo "${mysimd[*]}")"
131 + )
132 +
133 + cmake_src_configure
134 +}