media-libs/libaom: add a snapshot
authorAlexis Ballier <aballier@gentoo.org>
Sat, 21 Apr 2018 09:45:24 +0000 (11:45 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Sat, 21 Apr 2018 10:03:48 +0000 (12:03 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

media-libs/libaom/Manifest [new file with mode: 0644]
media-libs/libaom/libaom-0_pre20180421.ebuild [new file with mode: 0644]
media-libs/libaom/libaom-9999.ebuild

diff --git a/media-libs/libaom/Manifest b/media-libs/libaom/Manifest
new file mode 100644 (file)
index 0000000..458f356
--- /dev/null
@@ -0,0 +1 @@
+DIST libaom-0_pre20180421.tar.xz 123279636 BLAKE2B 62e1739fb22f473c56b596ac81c36e9c36e23fb22f0a0823a1b61ce1c1719d6ed53db90dfd1868d3b61a2bfa4836267b6fbfc7d192d98ed3db91b0d2223ec3c7 SHA512 897b7252a18f6c441b4d2f1a8d74fc9837be976a6ac64682543adc3da518d1781d3b7bc533be7affec84b564fd6feeaca8aa8fb74743a63e9932e502f3701acd
diff --git a/media-libs/libaom/libaom-0_pre20180421.ebuild b/media-libs/libaom/libaom-0_pre20180421.ebuild
new file mode 100644 (file)
index 0000000..6261a1c
--- /dev/null
@@ -0,0 +1,78 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit cmake-multilib
+
+if [[ ${PV} == *9999* ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://aomedia.googlesource.com/aom"
+elif [[ ${PV} == *pre* ]]; then
+       SRC_URI="mirror://gentoo/${P}.tar.xz"
+       KEYWORDS="~amd64"
+       S="${WORKDIR}/${PN}"
+fi
+
+DESCRIPTION="Alliance for Open Media AV1 Codec SDK"
+HOMEPAGE="http://aomedia.org"
+
+LICENSE="BSD-2"
+SLOT="0/0"
+IUSE="doc examples"
+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"
+IUSE="${IUSE} cpu_flags_arm_neon"
+
+RDEPEND=""
+DEPEND="abi_x86_32? ( dev-lang/yasm )
+       abi_x86_64? ( dev-lang/yasm )
+       abi_x86_x32? ( dev-lang/yasm )
+       x86-fbsd? ( dev-lang/yasm )
+       amd64-fbsd? ( dev-lang/yasm )
+       doc? ( app-doc/doxygen )
+"
+
+REQUIRED_USE="
+       cpu_flags_x86_sse2? ( cpu_flags_x86_mmx )
+       cpu_flags_x86_ssse3? ( cpu_flags_x86_sse2 )
+"
+
+PATCHES=( "${FILESDIR}/libdirpc.patch" "${FILESDIR}/pthread_lib.patch" )
+
+src_prepare() {
+       sed -e 's/lib"/lib${LIB_SUFFIX}"/' -i CMakeLists.txt || die
+       cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+       local mycmakeargs=(
+               -DENABLE_DOCS=$(multilib_native_usex doc ON OFF)
+               -DENABLE_EXAMPLES=$(multilib_native_usex examples ON OFF)
+               -DENABLE_NASM=OFF
+               -DENABLE_TOOLS=ON
+               -DENABLE_WERROR=OFF
+
+               -DENABLE_NEON=$(usex cpu_flags_arm_neon ON OFF)
+               -DENABLE_NEON_ASM=$(usex cpu_flags_arm_neon ON OFF)
+               # ENABLE_DSPR2 / ENABLE_MSA for mips
+               -DENABLE_MMX=$(usex cpu_flags_x86_mmx ON OFF)
+               -DENABLE_SSE=$(usex cpu_flags_x86_sse ON OFF)
+               -DENABLE_SSE2=$(usex cpu_flags_x86_sse2 ON OFF)
+               -DENABLE_SSE3=$(usex cpu_flags_x86_sse3 ON OFF)
+               -DENABLE_SSSE3=$(usex cpu_flags_x86_ssse3 ON OFF)
+               -DENABLE_SSE4_1=$(usex cpu_flags_x86_sse4_1 ON OFF)
+               -DENABLE_AVX=$(usex cpu_flags_x86_avx ON OFF)
+               -DENABLE_AVX2=$(usex cpu_flags_x86_avx2 ON OFF)
+
+               -DBUILD_SHARED_LIBS=ON
+       )
+       cmake-utils_src_configure
+       rm aom.pc # ensure it is rebuilt with proper libdir
+}
+
+multilib_src_install() {
+       cmake-utils_src_install
+       if multilib_is_native_abi && use doc ; then
+               docinto html
+               dodoc docs/html/*
+       fi
+}
index 9b472bd99def7452a687161db66514818a262c42..6261a1ce7e7f8b2c2775fd6679a3bc5f858cae04 100644 (file)
@@ -8,8 +8,9 @@ if [[ ${PV} == *9999* ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://aomedia.googlesource.com/aom"
 elif [[ ${PV} == *pre* ]]; then
-       SRC_URI="mirror://gentoo/${P}.tar.bz2"
+       SRC_URI="mirror://gentoo/${P}.tar.xz"
        KEYWORDS="~amd64"
+       S="${WORKDIR}/${PN}"
 fi
 
 DESCRIPTION="Alliance for Open Media AV1 Codec SDK"