app=x264
version=0.155
build=1sml
longversion=snapshot-20180831-2245-stable
homepage="http://www.videolan.org/developers/x264.html"
desc="free h264/avc encoder"
requires="nasm"

build() {
  mkandenterbuilddir
  rm -rf "$app-$longversion"

  tar xf $srcdir/$app-$longversion.tar.?z*
  cd "$app-$longversion"
  fixbuilddirpermissions

  # Let x264 use its own optimized -O3 -ffast-math compiler flags.
  unset CFLAGS CXXFLAGS

  ./configure \
    --prefix="" \
    --enable-shared 

  make
  make install DESTDIR=$pkg

  cp AUTHORS COPYING doc/* $pkgdocs/

  mkfinalpkg
}

sha512sums="
e2472af814c2bf57c0ce293e0b74ca27cd567874ba953dcf995470ba2357b4c1b27a2c51b0033c01afff9d9897ed78f53ca4be30e24036106ec2df5671234223  x264-snapshot-20180831-2245-stable.tar.lz
"
