# $Id$ PNAME="x264-encoder" PVER="20110727_2245" PBUILD="r1" PCATEGORIE="media-video" DESCRIPTION="x264 is a free AVC/H.264 video encoder." HOMEPAGE="http://developers.videolan.org/x264.html" DEPEND="== media-libs/x264-${PVER} >= dev-libs/glib2-2.28 >= x11-libs/gtk2+-2.24" # i*86 needs nasm SDEPENDS_x86=">= dev-lang/nasm-2" # x86_64 needs yasm SDEPENDS_x86_64=">= dev-lang/yasm-0.7" # very dirty trick to get the dependencies right # ';' is the IFS, tr replaces ';' with an crlfs # the var is finally decided via our common eval+echo magic SDEPEND="\$(eval echo \\\$SDEPENDS_\${ARCH/i*86/x86} | tr ';' '\n')" # these vars must be exported to the mage file to get all things right SPECIAL_VARS="SDEPENDS_x86_64 SDEPENDS_x86" # gpac is only needed to build the mp4-output module SDEPEND="${SDEPEND} >= media-video/gpac-0.4.5 >= dev-util/pkgconfig-0.23" SRCFILE="x264-snapshot-${PVER/_/-}.tar.bz2" SRCDIR="${BUILDDIR}/x264-snapshot-${PVER/_/-}" sminclude mbuild SRC_URI=( ftp://ftp.videolan.org/pub/videolan/x264/snapshots/${SRCFILE} mirror://x264/${SRCFILE} ) # note: we build a seperate lib and util package to prevent depwalker loops # when resolving packages: # gpac needs ffmpeg, ffmpeg needs x264, but x264 needs gpac to compile src_compile() { cd ${SRCDIR} mconfigure \ --enable-pic \ --disable-shared \ --disable-static \ --enable-mp4-output \ --enable-gtk \ --enable-cli \ --system-libx264 \ || die mmake || die }