1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 if [ "${PV#9999}" != "${PV}" ] ; then
10 EGIT_REPO_URI="git://github.com/lu-zero/postproc.git"
13 inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
15 DESCRIPTION="Video post processing library"
16 HOMEPAGE="https://github.com/lu-zero/postproc"
17 if [ "${PV#9999}" != "${PV}" ] ; then
19 elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
20 SRC_URI="mirror://gentoo/${P}.tar.xz"
22 SRC_URI="https://dev.gentoo.org/~lu_zero/distfiles/${P}.tar.xz"
27 if [ "${PV#9999}" = "${PV}" ] ; then
28 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
30 IUSE="pic static-libs"
32 # String for CPU features in the useflag[:configure_option] form
33 # if :configure_option isn't set, it will use 'useflag' as configure option
34 CPU_FEATURES="cpu_flags_x86_3dnow:amd3dnow altivec cpu_flags_x86_mmx:mmx cpu_flags_x86_mmxext:mmxext"
35 for i in ${CPU_FEATURES}; do
36 IUSE="${IUSE} ${i%:*}"
40 >=media-video/libav-0.8.2-r2:0=
42 abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
43 !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )
47 multilib_src_configure() {
48 local myconf=( ${EXTRA_LIBPOSTPROC_CONF} )
49 for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
50 [[ "${i}" = "native" ]] && i="host" # bug #273421
51 myconf+=( --cpu=${i} )
56 myconf+=( --enable-pic )
57 # disable asm code if PIC is required
58 # as the provided asm decidedly is not PIC for x86.
59 [[ ${ABI} == x86 ]] && myconf+=( --disable-asm )
62 # cross compile support
63 if tc-is-cross-compiler ; then
64 myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
67 myconf+=( --target-os=freebsd )
70 myconf+=( --target-os=mingw32 )
73 myconf+=( --target-os=linux )
79 --prefix="${EPREFIX}/usr" \
80 --libdir="${EPREFIX}/usr/$(get_libdir)" \
81 --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
85 --optflags="${CFLAGS}" \
86 --extra-cflags="${CFLAGS}" \
87 $(use_enable static-libs static) \