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/dwbuiten/postproc.git"
13 inherit eutils flag-o-matic multilib toolchain-funcs ${SCM}
15 DESCRIPTION="Video post processing library"
16 HOMEPAGE="https://github.com/dwbuiten/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%:*}"
39 DEPEND=">=virtual/ffmpeg-0.10.2-r1"
41 !<media-video/libav-0.8.2-r2
46 local myconf="${EXTRA_LIBPOSTPROC_CONF}"
47 for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
48 [ "${i}" = "native" ] && i="host" # bug #273421
49 myconf="${myconf} --cpu=${i}"
54 myconf="${myconf} --enable-pic"
55 # disable asm code if PIC is required
56 # as the provided asm decidedly is not PIC for x86.
57 use x86 && myconf="${myconf} --disable-asm"
60 # cross compile support
61 if tc-is-cross-compiler ; then
62 myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-"
65 myconf="${myconf} --target-os=freebsd"
68 myconf="${myconf} --target-os=mingw32"
71 myconf="${myconf} --target-os=linux"
78 --prefix="${EPREFIX}/usr" \
79 --libdir="${EPREFIX}/usr/$(get_libdir)" \
80 --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
84 --optflags="${CFLAGS}" \
85 --extra-cflags="${CFLAGS}" \
86 $(use_enable static-libs static) \