# $Id$ PNAME="x264-encoder" PVER="20091020_2245" PBUILD="r1" PCATEGORIE="media-video" STATE="unstable" 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.22 >= x11-libs/gtk2+-2.18" # 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} mirror://x264/x264-20090427_2245-no-libs.patch ) # 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_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # fix the makefile to only build and install the decoder, not any libs mpatch x264-20090427_2245-no-libs.patch || die } src_compile() { cd ${SRCDIR} mconfigure \ --enable-pic \ --enable-shared \ --enable-pthread \ --enable-mp4-output \ --enable-gtk \ || die mmake || die }