forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-video/x264-encoder: bump a new snapshot
Package-Manager: Portage-2.3.6, Repoman-2.3.2
- Loading branch information
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST x264-snapshot-20160712-2245.tar.bz2 730644 SHA256 d5033882bbc7e2908f74970931c7dc2044191cc9fa7c7435dc85ad334f23078e SHA512 ac97730611e6194701a891a7e73c739696664de2411a7937ab0c36a3ce843f22bf2bd2defe053c2506d95652842b99a905b6f16a2f016a9d73059c2c75b71963 WHIRLPOOL d42459a93e8ff1b69d16f7adecaf3486d102e6fe4ee0d8dd991cdbb7a233bb9975faabc79ff7d2dfd2f67fa1f69a729e617ae868ee127cc0306dfc897db7053b | ||
DIST x264-snapshot-20170701-2245.tar.bz2 750527 SHA256 6ca4863cda3c7c24923ebd2c062c001a05283d50922292ee55dfda7811782380 SHA512 28fc9850c36ac385fced6dec9a0f68a5605a68805e1ef7b8cedcd78917eaa1ad6e47e57fe5a74fee0a6e482f3a33de6011f675e6c77b5db94c8fe01d5c5f3e9f WHIRLPOOL 063c0d3685d961b96101c98110345d1b283dbfe2b2098be51b4cb55f9d0551e80d01d449a2622ebba457a5a8374f5c2783351e2e1f0bfabf150be27dbcc07965 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=5 | ||
|
||
inherit flag-o-matic multilib toolchain-funcs eutils | ||
|
||
DESCRIPTION="A free commandline encoder for X264/AVC streams" | ||
HOMEPAGE="http://www.videolan.org/developers/x264.html" | ||
if [[ ${PV} == 9999 ]]; then | ||
inherit git-2 | ||
EGIT_REPO_URI="git://git.videolan.org/x264.git" | ||
SRC_URI="" | ||
else | ||
inherit versionator | ||
MY_P="x264-snapshot-$(get_version_component_range 3)-2245" | ||
SRC_URI="http://download.videolan.org/pub/videolan/x264/snapshots/${MY_P}.tar.bz2" | ||
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" | ||
S="${WORKDIR}/${MY_P}" | ||
fi | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
IUSE="10bit avs custom-cflags ffmpeg ffmpegsource +interlaced mp4 +threads" | ||
|
||
REQUIRED_USE="ffmpegsource? ( ffmpeg )" | ||
|
||
RDEPEND="ffmpeg? ( virtual/ffmpeg ) | ||
~media-libs/x264-${PV}[10bit=,interlaced=,threads=] | ||
ffmpegsource? ( media-libs/ffmpegsource ) | ||
mp4? ( >=media-video/gpac-0.5.2 )" | ||
|
||
ASM_DEP=">=dev-lang/nasm-2.13" | ||
DEPEND="${RDEPEND} | ||
amd64? ( ${ASM_DEP} ) | ||
x86? ( ${ASM_DEP} ) | ||
x86-fbsd? ( ${ASM_DEP} ) | ||
virtual/pkgconfig" | ||
|
||
src_prepare() { | ||
epatch "${FILESDIR}/gpac.patch" | ||
} | ||
|
||
src_configure() { | ||
tc-export CC | ||
|
||
# let upstream pick the optimization level by default | ||
use custom-cflags || filter-flags -O? | ||
|
||
./configure \ | ||
--prefix="${EPREFIX}"/usr \ | ||
--libdir="${EPREFIX}"/usr/$(get_libdir) \ | ||
--system-libx264 \ | ||
--host="${CHOST}" \ | ||
--disable-lsmash \ | ||
$(usex 10bit "--bit-depth=10" "") \ | ||
$(usex avs "" "--disable-avs") \ | ||
$(usex ffmpeg "" "--disable-lavf --disable-swscale") \ | ||
$(usex ffmpegsource "" "--disable-ffms") \ | ||
$(usex interlaced "" "--disable-interlaced") \ | ||
$(usex mp4 "" "--disable-gpac") \ | ||
$(usex threads "" "--disable-thread") || die | ||
|
||
# this is a nasty workaround for bug #376925 for x264 that also applies | ||
# here, needed because as upstream doesn't like us fiddling with their CFLAGS | ||
if use custom-cflags; then | ||
local cflags | ||
cflags="$(grep "^CFLAGS=" config.mak | sed 's/CFLAGS=//')" | ||
cflags="${cflags//$(get-flag O)/}" | ||
cflags="${cflags//-O? /$(get-flag O) }" | ||
cflags="${cflags//-g /}" | ||
sed -i "s:^CFLAGS=.*:CFLAGS=${cflags//:/\\:}:" config.mak | ||
fi | ||
} |