# $Id: x264-20091128_2245-r1.smage2 4168 2009-11-29 22:42:21Z niro $ PNAME="x264" PVER="20100905_2245" PBUILD="r1" PCATEGORIE="media-libs" STATE="unstable" DESCRIPTION="x264 is a free AVC/H.264 video encoder library." HOMEPAGE="http://developers.videolan.org/x264.html" DEPEND=">= virtual/glibc" # 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" SRCFILE="${PNAME}-snapshot-${PVER/_/-}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-snapshot-${PVER/_/-}" sminclude mbuild SRC_URI=( ftp://ftp.videolan.org/pub/videolan/${PNAME}/snapshots/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-20090427_2245-only-libs.patch ) # do not autoupdate this package as it has daily snapshots UP2DATE="echo ${PVER}" # 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 lib mpatch ${PNAME}-20090427_2245-only-libs.patch || die } src_compile() { cd ${SRCDIR} mconfigure \ --enable-pic \ --enable-shared \ --enable-pthread \ --disable-mp4-output \ || die mmake || die } postinstall() { echo echo "Please note that this package only installs the" echo "x264 libraries. In order to have the encoder," echo "please install 'media-video/x264-encoder'." echo }