Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions media-libs/x264/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DIST x264-snapshot-20170701-2245.tar.bz2 750527 SHA256 6ca4863cda3c7c24923ebd2c062c001a05283d50922292ee55dfda7811782380 SHA512 28fc9850c36ac385fced6dec9a0f68a5605a68805e1ef7b8cedcd78917eaa1ad6e47e57fe5a74fee0a6e482f3a33de6011f675e6c77b5db94c8fe01d5c5f3e9f WHIRLPOOL 063c0d3685d961b96101c98110345d1b283dbfe2b2098be51b4cb55f9d0551e80d01d449a2622ebba457a5a8374f5c2783351e2e1f0bfabf150be27dbcc07965
EBUILD x264-0.0.20170701.ebuild 2035 SHA256 fed6ccd748a373e559248add89d63e826ab9552fb592d4c74d5239f6e975fa43 SHA512 288cf38deae10376568a7198fa793b99c9f95dcee727d9cd3a1c660287db92e1a17d82f567d4a487aacde0dfffceab1e04144d538ec325fbc62edcf50513027c WHIRLPOOL 1ade3a3cf4fe4da08ede9eec66a1fd6ce191a029d3946266726c4d4fc100d70c61d2fe414142d9e0712cbaef06becb97e36072dc79c278e075c5abe525e4b7e0
MISC metadata.xml 600 SHA256 123122a9038074338014a640906e6b0bd5431e589f1978d2936e1962ac04c0df SHA512 eeb9f40cfa12a66b5e56b653c611941c1a74837fe41f00d36c26ed9d2e6a3c1748d49431642536bfa509fdbe1503b2e85c91c65a3a41e12b1f413f42406bce5a WHIRLPOOL 93c39679329975aecb1f68be71fe0e6671f5d63be1fdf7adace52ae75f26698c80bdce413b103f3aae8cfc377e57f52e47220c124a5db24f7e848825688549db
13 changes: 13 additions & 0 deletions media-libs/x264/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>media-video@gentoo.org</email>
</maintainer>
<use>
<flag name="10bit">Set output bit depth to 10, this may not be compatible with all decoders</flag>
<flag name="interlaced">enable interlaced encoding support, this can decrease encoding speed by up to 2%</flag>
<flag name="opencl">Add support for OpenCL.</flag>
<flag name="pic">disable optimized assembly code that is not PIC friendly</flag>
</use>
</pkgmetadata>
68 changes: 68 additions & 0 deletions media-libs/x264/x264-0.0.20170701.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# 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 multilib-minimal

DESCRIPTION="A free library for encoding X264/AVC streams"
HOMEPAGE="https://www.videolan.org/developers/x264.html"
if [[ ${PV} == 9999 ]]; then
inherit git-2
EGIT_REPO_URI="git://git.videolan.org/x264.git"
else
inherit versionator
MY_P="x264-snapshot-$(get_version_component_range 3)-2245"
SRC_URI="https://download.videolan.org/pub/videolan/x264/snapshots/${MY_P}.tar.bz2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
S="${WORKDIR}/${MY_P}"
fi

SONAME="152"
SLOT="0/${SONAME}"

LICENSE="GPL-2"
IUSE="10bit altivec +interlaced opencl pic static-libs cpu_flags_x86_sse +threads"

ASM_DEP=">=dev-lang/nasm-2.13"
DEPEND="abi_x86_32? ( ${ASM_DEP} )
abi_x86_64? ( ${ASM_DEP} )
opencl? ( dev-lang/perl )"
RDEPEND="opencl? ( >=virtual/opencl-0-r3[${MULTILIB_USEDEP}] )
abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r7
!app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"

DOCS="AUTHORS doc/*.txt"

src_prepare() {
epatch_user
}


multilib_src_configure() {
tc-export CC
local asm_conf=""

if [[ ${ABI} == x86* ]] && { use pic || use !cpu_flags_x86_sse ; } || [[ ${ABI} == "x32" ]] || [[ ${CHOST} == armv5* ]] || [[ ${ABI} == ppc* ]] && { use !altivec ; }; then
asm_conf=" --disable-asm"
fi

"${S}/configure" \
--prefix="${EPREFIX}"/usr \
--libdir="${EPREFIX}"/usr/$(get_libdir) \
--disable-cli \
--disable-avs \
--disable-lavf \
--disable-swscale \
--disable-ffms \
--disable-gpac \
--enable-pic \
--enable-shared \
--host="${CHOST}" \
$(usex 10bit "--bit-depth=10" "") \
$(usex interlaced "" "--disable-interlaced") \
$(usex opencl "" "--disable-opencl") \
$(usex static-libs "--enable-static" "") \
$(usex threads "" "--disable-thread") \
${asm_conf} || die
}
3 changes: 1 addition & 2 deletions sys-config/ltoize/files/package.cflags/ltoworkarounds.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Packages which require fat LTO objects in order to build (TESTING: STRIP_MASK)
#or which others depend on non-LTO symbols (previously was ltofat.conf)
dev-haskell/* *FLAGS+=-ffat-lto-objects #This is so non-portage GHC compilations work, as GHC is oblivious to LTO. portage builds are fine.
media-libs/x264 *FLAGS+=-ffat-lto-objects
sys-boot/syslinux *FLAGS+=-ffat-lto-objects
app-editors/vim "has perl ${IUSE//+} && use perl && FlagAddAllFlags -ffat-lto-objects" # required for perl USE flag
dev-lang/moarvm *FLAGS+=-ffat-lto-objects # required for perl6 (i.e., dev-lang/nqp and dev-lang/rakudo to build)
Expand Down Expand Up @@ -64,7 +63,7 @@ dev-qt/qtscript:4 *FLAGS-=-flto*
#dev-lang/ocaml *FLAGS+=-ffat-lto-objects # necessary not for OCaml itself, but certain OCaml libraries
#dev-ml/camlbz2 *FLAGS+=-ffat-lto-objects
#dev-qt/qtscript:5 *FLAGS-=-flto*

#media-libs/x264 *FLAGS+=-ffat-lto-objects
# END: Packages known as FIXED

# BEGIN: Packages known to ignore all flags
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- configure 2017-10-12 23:56:01.941756673 +0300
+++ configure 2017-10-12 23:56:57.781761873 +0300
@@ -962,7 +962,7 @@
CPU_ENDIAN="little-endian"
if [ $compiler = GNU ]; then
echo "int i[2] = {0x42494745,0}; double f[2] = {0x1.0656e6469616ep+102,0};" > conftest.c
- $CC $CFLAGS conftest.c -c -o conftest.o 2>/dev/null || die "endian test failed"
+ $CC $CFLAGS conftest.c -o conftest.o -shared 2>/dev/null || die "endian test failed"
if (${cross_prefix}strings -a conftest.o | grep -q BIGE) && (${cross_prefix}strings -a conftest.o | grep -q FPendian) ; then
define WORDS_BIGENDIAN
CPU_ENDIAN="big-endian"