1 |
commit: 80b3cdfccb45eff1e5bdb33b625c8f413dfe3905 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 20 01:47:54 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 20 01:47:54 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80b3cdfc |
7 |
|
8 |
media-libs/x265: drop 3.5 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/814662 |
11 |
Bug: https://bugs.gentoo.org/833775 |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
media-libs/x265/x265-3.5.ebuild | 218 ---------------------------------------- |
15 |
1 file changed, 218 deletions(-) |
16 |
|
17 |
diff --git a/media-libs/x265/x265-3.5.ebuild b/media-libs/x265/x265-3.5.ebuild |
18 |
deleted file mode 100644 |
19 |
index ad7333090a3f..000000000000 |
20 |
--- a/media-libs/x265/x265-3.5.ebuild |
21 |
+++ /dev/null |
22 |
@@ -1,218 +0,0 @@ |
23 |
-# Copyright 1999-2022 Gentoo Authors |
24 |
-# Distributed under the terms of the GNU General Public License v2 |
25 |
- |
26 |
-EAPI=7 |
27 |
- |
28 |
-inherit cmake multilib-minimal multilib multibuild flag-o-matic |
29 |
- |
30 |
-if [[ ${PV} = 9999* ]]; then |
31 |
- inherit git-r3 |
32 |
- EGIT_REPO_URI="https://bitbucket.org/multicoreware/x265_git/" |
33 |
- S=${WORKDIR}/${P}/source |
34 |
-else |
35 |
- SRC_URI="https://bitbucket.org/multicoreware/x265_git/downloads/${PN}_${PV}.tar.gz" |
36 |
- KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~ppc ppc64 x86" |
37 |
-fi |
38 |
- |
39 |
-DESCRIPTION="Library for encoding video streams into the H.265/HEVC format" |
40 |
-HOMEPAGE="http://x265.org/ https://bitbucket.org/multicoreware/x265_git/" |
41 |
- |
42 |
-LICENSE="GPL-2" |
43 |
-# subslot = libx265 soname |
44 |
-SLOT="0/199" |
45 |
-IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test" |
46 |
-RESTRICT="!test? ( test )" |
47 |
- |
48 |
-RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )" |
49 |
-DEPEND="${RDEPEND}" |
50 |
-ASM_DEPEND=">=dev-lang/nasm-2.13" |
51 |
-BDEPEND=" |
52 |
- abi_x86_32? ( ${ASM_DEPEND} ) |
53 |
- abi_x86_64? ( ${ASM_DEPEND} )" |
54 |
- |
55 |
-PATCHES=( |
56 |
- "${FILESDIR}/arm-r1.patch" |
57 |
- "${FILESDIR}/neon.patch" |
58 |
- "${FILESDIR}/x265-3.3-ppc64.patch" |
59 |
- "${FILESDIR}/tests.patch" |
60 |
- "${FILESDIR}/test-ns.patch" |
61 |
-) |
62 |
- |
63 |
-src_unpack() { |
64 |
- if [[ ${PV} = 9999* ]]; then |
65 |
- git-r3_src_unpack |
66 |
- else |
67 |
- unpack ${A} |
68 |
- export S="$(echo "${WORKDIR}/${PN}_"*"/source")" |
69 |
- fi |
70 |
-} |
71 |
- |
72 |
-# By default, the library and the encoder is configured for only one output bit |
73 |
-# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC |
74 |
-# files with a different bit depth, which is annoying. However, upstream |
75 |
-# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all |
76 |
-# that together so that the resulting library can produce all three of them |
77 |
-# instead of only one. |
78 |
-# The API requires the bit depth parameter, so that libx265 can then chose which |
79 |
-# variant of the encoder to use. |
80 |
-# To achieve this, we have to build one (static) library for each non-main |
81 |
-# variant, and link it into the main library. |
82 |
-# Upstream documents using the 8bit variant as main library, hence we do not |
83 |
-# allow disabling it: "main" *MUST* come last in the following list. |
84 |
- |
85 |
-x265_get_variants() { |
86 |
- local variants="" |
87 |
- use 12bit && variants+="main12 " |
88 |
- use 10bit && variants+="main10 " |
89 |
- variants+="main" |
90 |
- echo "${variants}" |
91 |
-} |
92 |
- |
93 |
-x265_variant_src_configure() { |
94 |
- mkdir -p "${BUILD_DIR}" || die |
95 |
- pushd "${BUILD_DIR}" >/dev/null || die |
96 |
- |
97 |
- einfo "Configuring variant: ${MULTIBUILD_VARIANT} for ABI: ${ABI}" |
98 |
- |
99 |
- local mycmakeargs=( "${myabicmakeargs[@]}" ) |
100 |
- case "${MULTIBUILD_VARIANT}" in |
101 |
- "main12") |
102 |
- mycmakeargs+=( |
103 |
- -DHIGH_BIT_DEPTH=ON |
104 |
- -DEXPORT_C_API=OFF |
105 |
- -DENABLE_SHARED=OFF |
106 |
- -DENABLE_CLI=OFF |
107 |
- -DMAIN12=ON |
108 |
- ) |
109 |
- if [[ ${ABI} = x86 ]] ; then |
110 |
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF ) |
111 |
- fi |
112 |
- if [[ ${ABI} = arm* ]] ; then |
113 |
- # 589674 |
114 |
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF ) |
115 |
- fi |
116 |
- # disable altivec for 12bit build #607802#c5 |
117 |
- if [[ ${ABI} = ppc* ]] ; then |
118 |
- mycmakeargs+=( |
119 |
- -DENABLE_ALTIVEC=OFF |
120 |
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF) |
121 |
- ) |
122 |
- fi |
123 |
- ;; |
124 |
- "main10") |
125 |
- mycmakeargs+=( |
126 |
- -DHIGH_BIT_DEPTH=ON |
127 |
- -DEXPORT_C_API=OFF |
128 |
- -DENABLE_SHARED=OFF |
129 |
- -DENABLE_CLI=OFF |
130 |
- ) |
131 |
- if [[ ${ABI} = x86 ]] ; then |
132 |
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF ) |
133 |
- fi |
134 |
- if [[ ${ABI} = arm* ]] ; then |
135 |
- # 589674 |
136 |
- mycmakeargs+=( -DENABLE_ASSEMBLY=OFF ) |
137 |
- fi |
138 |
- # disable altivec for 10bit build #607802#c5 |
139 |
- if [[ ${ABI} = ppc* ]] ; then |
140 |
- mycmakeargs+=( |
141 |
- -DENABLE_ALTIVEC=OFF |
142 |
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF) |
143 |
- ) |
144 |
- fi |
145 |
- ;; |
146 |
- "main") |
147 |
- if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then |
148 |
- local myvariants=( "${MULTIBUILD_VARIANTS[@]}" ) |
149 |
- unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1] |
150 |
- local liblist="" v= |
151 |
- for v in "${myvariants[@]}" ; do |
152 |
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die |
153 |
- liblist+="libx265_${v}.a;" |
154 |
- done |
155 |
- mycmakeargs+=( |
156 |
- -DEXTRA_LIB="${liblist}" |
157 |
- -DEXTRA_LINK_FLAGS=-L. |
158 |
- -DLINKED_10BIT=$(usex 10bit) |
159 |
- -DLINKED_12BIT=$(usex 12bit) |
160 |
- ) |
161 |
- if [[ ${ABI} = ppc* ]] ; then |
162 |
- # upstream uses mix of altivec + power8 vectors |
163 |
- # it's impossible to enable altivec without CPU_POWER8 |
164 |
- # and it does not work on ppc32 |
165 |
- # so we toggle both variables together |
166 |
- mycmakeargs+=( |
167 |
- -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF) |
168 |
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF) |
169 |
- ) |
170 |
- fi |
171 |
- fi |
172 |
- ;; |
173 |
- *) |
174 |
- die "Unknown variant: ${MULTIBUILD_VARIANT}";; |
175 |
- esac |
176 |
- cmake_src_configure |
177 |
- popd >/dev/null || die |
178 |
-} |
179 |
- |
180 |
-multilib_src_configure() { |
181 |
- local myabicmakeargs=( |
182 |
- -DENABLE_TESTS=$(usex test ON OFF) |
183 |
- $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF") |
184 |
- -DENABLE_PIC=ON |
185 |
- -DENABLE_LIBNUMA=$(usex numa ON OFF) |
186 |
- -DLIB_INSTALL_DIR="$(get_libdir)" |
187 |
- ) |
188 |
- |
189 |
- if [[ ${ABI} = x86 ]] ; then |
190 |
- # Bug #528202 |
191 |
- if use pic ; then |
192 |
- ewarn "PIC has been requested but x86 asm is not PIC-safe, disabling it." |
193 |
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF ) |
194 |
- fi |
195 |
- elif [[ ${ABI} = x32 ]] ; then |
196 |
- # bug #510890 |
197 |
- myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF ) |
198 |
- elif [[ ${ABI} = arm ]] ; then |
199 |
- myabicmakeargs+=( -DENABLE_ASSEMBLY=$(usex pic OFF $(usex cpu_flags_arm_neon ON OFF)) ) |
200 |
- use cpu_flags_arm_neon && use pic && ewarn "PIC has been requested but arm neon asm is not PIC-safe, disabling it." |
201 |
- fi |
202 |
- |
203 |
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) ) |
204 |
- multibuild_foreach_variant x265_variant_src_configure |
205 |
-} |
206 |
- |
207 |
-multilib_src_compile() { |
208 |
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) ) |
209 |
- multibuild_foreach_variant cmake_src_compile |
210 |
-} |
211 |
- |
212 |
-x265_variant_src_test() { |
213 |
- if [ -x "${BUILD_DIR}/test/TestBench" ] ; then |
214 |
- "${BUILD_DIR}/test/TestBench" || die |
215 |
- else |
216 |
- einfo "Unit tests check only assembly." |
217 |
- einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}" |
218 |
- einfo "Skipping tests." |
219 |
- fi |
220 |
-} |
221 |
- |
222 |
-multilib_src_test() { |
223 |
- local MULTIBUILD_VARIANTS=( $(x265_get_variants) ) |
224 |
- multibuild_foreach_variant x265_variant_src_test |
225 |
-} |
226 |
- |
227 |
-multilib_src_install() { |
228 |
- # Install only "main" variant since the others are already linked into it. |
229 |
- local MULTIBUILD_VARIANTS=( "main" ) |
230 |
- multibuild_foreach_variant cmake_src_install |
231 |
-} |
232 |
- |
233 |
-multilib_src_install_all() { |
234 |
- dodoc -r "${S}/../doc/"* |
235 |
- |
236 |
- # we don't install *.a files for all variants, |
237 |
- # so just delete these files instead of pretending |
238 |
- # real USE=static-libs support |
239 |
- find "${ED}" -name "*.a" -delete || die |
240 |
-} |