Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libaom/
Date: Thu, 22 Feb 2018 13:40:33
Message-Id: 1519306815.fa8ef6b1bdf230f75465f93ca90371abce5f2219.aballier@gentoo
1 commit: fa8ef6b1bdf230f75465f93ca90371abce5f2219
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 22 13:40:06 2018 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 22 13:40:15 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa8ef6b1
7
8 media-libs/libaom: cleanup ebuild and convert to cmake.
9
10 Closes: https://bugs.gentoo.org/645142
11 Package-Manager: Portage-2.3.24, Repoman-2.3.6
12
13 media-libs/libaom/libaom-9999.ebuild | 128 ++++++++++++-----------------------
14 1 file changed, 43 insertions(+), 85 deletions(-)
15
16 diff --git a/media-libs/libaom/libaom-9999.ebuild b/media-libs/libaom/libaom-9999.ebuild
17 index 4a8404db590..f940504046e 100644
18 --- a/media-libs/libaom/libaom-9999.ebuild
19 +++ b/media-libs/libaom/libaom-9999.ebuild
20 @@ -1,40 +1,33 @@
21 -# Copyright 1999-2017 Gentoo Foundation
22 +# Copyright 1999-2018 Gentoo Foundation
23 # Distributed under the terms of the GNU General Public License v2
24
25 -EAPI=5
26 -inherit eutils multilib toolchain-funcs multilib-minimal
27 -
28 -LIBVPX_TESTDATA_VER=1.6.0
29 +EAPI=6
30 +inherit cmake-multilib
31
32 if [[ ${PV} == *9999* ]]; then
33 - inherit git-2
34 + inherit git-r3
35 EGIT_REPO_URI="https://aomedia.googlesource.com/aom"
36 elif [[ ${PV} == *pre* ]]; then
37 SRC_URI="mirror://gentoo/${P}.tar.bz2"
38 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
39 + KEYWORDS="~amd64"
40 fi
41 -# generated by: make LIBVPX_TEST_DATA_PATH=libvpx-testdata testdata + tar'ing
42 -# it.
43 -#SRC_URI="${SRC_URI}
44 -# test? ( mirror://gentoo/${PN}-testdata-${LIBVPX_TESTDATA_VER}.tar.bz2 )"
45
46 DESCRIPTION="Alliance for Open Media AV1 Codec SDK"
47 HOMEPAGE="http://aomedia.org"
48
49 -LICENSE="BSD"
50 -SLOT="0/4"
51 -IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 doc cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 static-libs test +threads"
52 +LICENSE="BSD-2"
53 +SLOT="0/0"
54 +IUSE="doc examples"
55 +IUSE="${IUSE} cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 cpu_flags_x86_avx cpu_flags_x86_avx2"
56 +IUSE="${IUSE} cpu_flags_arm_neon"
57
58 -RDEPEND="abi_x86_32? ( !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
59 +RDEPEND=""
60 DEPEND="abi_x86_32? ( dev-lang/yasm )
61 abi_x86_64? ( dev-lang/yasm )
62 abi_x86_x32? ( dev-lang/yasm )
63 x86-fbsd? ( dev-lang/yasm )
64 amd64-fbsd? ( dev-lang/yasm )
65 - doc? (
66 - app-doc/doxygen
67 - dev-lang/php
68 - )
69 + doc? ( app-doc/doxygen )
70 "
71
72 REQUIRED_USE="
73 @@ -42,75 +35,40 @@ REQUIRED_USE="
74 cpu_flags_x86_ssse3? ( cpu_flags_x86_sse2 )
75 "
76
77 -#src_prepare() {
78 -#}
79 -
80 -multilib_src_configure() {
81 - unset CODECS #357487
82 -
83 - # let the build system decide which AS to use (it honours $AS but
84 - # then feeds it with yasm flags without checking...) #345161
85 - tc-export AS
86 - case "${CHOST}" in
87 - i?86*) export AS=yasm;;
88 - x86_64*) export AS=yasm;;
89 - esac
90 -
91 - # https://bugs.gentoo.org/show_bug.cgi?id=384585
92 - # https://bugs.gentoo.org/show_bug.cgi?id=465988
93 - # copied from php-pear-r1.eclass
94 - addpredict /usr/share/snmp/mibs/.index
95 - addpredict /var/lib/net-snmp/
96 - addpredict /var/lib/net-snmp/mib_indexes
97 - addpredict /session_mm_cli0.sem
98 -
99 - # Build with correct toolchain.
100 - tc-export CC CXX AR NM
101 - # Link with gcc by default, the build system should override this if needed.
102 - export LD="${CC}"
103 -
104 - local myconf
105 - if [ "${ABI}" = "${DEFAULT_ABI}" ] ; then
106 - myconf+=" $(use_enable doc install-docs) $(use_enable doc docs)"
107 - else
108 - # not needed for multilib and will be overwritten anyway.
109 - myconf+=" --disable-examples --disable-install-docs --disable-docs"
110 - fi
111 -
112 - # #498364: sse doesn't work without sse2 enabled,
113 - "${S}/configure" \
114 - --prefix="${EPREFIX}"/usr \
115 - --libdir="${EPREFIX}"/usr/$(get_libdir) \
116 - --enable-pic \
117 - --enable-av1 \
118 - --enable-shared \
119 - --extra-cflags="${CFLAGS}" \
120 - $(use_enable cpu_flags_x86_avx avx) \
121 - $(use_enable cpu_flags_x86_avx2 avx2) \
122 - $(use_enable cpu_flags_x86_mmx mmx) \
123 - $(use cpu_flags_x86_sse2 && use_enable cpu_flags_x86_sse sse || echo --disable-sse) \
124 - $(use_enable cpu_flags_x86_sse2 sse2) \
125 - $(use_enable cpu_flags_x86_sse3 sse3) \
126 - $(use_enable cpu_flags_x86_sse4_1 sse4_1) \
127 - $(use_enable cpu_flags_x86_ssse3 ssse3) \
128 - $(use_enable static-libs static) \
129 - $(use_enable test unit-tests) \
130 - $(use_enable threads multithread) \
131 - ${myconf} \
132 - || die
133 +src_prepare() {
134 + sed -e 's/lib"/lib${LIB_SUFFIX}"/' -i CMakeLists.txt || die
135 + cmake-utils_src_prepare
136 }
137
138 -multilib_src_compile() {
139 - # build verbose by default and do not build examples that will not be installed
140 - emake verbose=yes GEN_EXAMPLES=
141 +multilib_src_configure() {
142 + local mycmakeargs=(
143 + -DENABLE_DOCS=$(multilib_native_usex doc ON OFF)
144 + -DENABLE_EXAMPLES=$(multilib_native_usex examples ON OFF)
145 + -DENABLE_NASM=OFF
146 + -DENABLE_TOOLS=ON
147 + -DENABLE_WERROR=OFF
148 +
149 + -DENABLE_NEON=$(usex cpu_flags_arm_neon ON OFF)
150 + -DENABLE_NEON_ASM=$(usex cpu_flags_arm_neon ON OFF)
151 + # ENABLE_DSPR2 / ENABLE_MSA for mips
152 + -DENABLE_MMX=$(usex cpu_flags_x86_mmx ON OFF)
153 + -DENABLE_SSE=$(usex cpu_flags_x86_sse ON OFF)
154 + -DENABLE_SSE2=$(usex cpu_flags_x86_sse2 ON OFF)
155 + -DENABLE_SSE3=$(usex cpu_flags_x86_sse3 ON OFF)
156 + -DENABLE_SSSE3=$(usex cpu_flags_x86_ssse3 ON OFF)
157 + -DENABLE_SSE4_1=$(usex cpu_flags_x86_sse4_1 ON OFF)
158 + -DENABLE_AVX=$(usex cpu_flags_x86_avx ON OFF)
159 + -DENABLE_AVX2=$(usex cpu_flags_x86_avx2 ON OFF)
160 +
161 + -DBUILD_SHARED_LIBS=ON
162 + )
163 + cmake-utils_src_configure
164 }
165
166 -#multilib_src_test() {
167 - #LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}" \
168 - # emake verbose=yes GEN_EXAMPLES= LIBVPX_TEST_DATA_PATH="${WORKDIR}/${PN}-testdata" test
169 -#}
170 -
171 multilib_src_install() {
172 - emake verbose=yes GEN_EXAMPLES= DESTDIR="${D}" install
173 - [ "${ABI}" = "${DEFAULT_ABI}" ] && use doc && dohtml docs/html/*
174 + cmake-utils_src_install
175 + if multilib_is_native_abi && use doc ; then
176 + docinto html
177 + dodoc docs/html/*
178 + fi
179 }