NAME="x265"
DESC="Library for encoding video streams into the H.265/HEVC format"
VERSION="20230215"
FILES=("https://anduin.linuxfromscratch.org/BLFS/x265/x265-$VERSION.tar.xz")
HASHES=("e735837f5e3fa95889e0a72eca39fccf")
DEPENDS=()

PACKAGE() {
  tar xf $NAME-$VERSION.tar.xz
  cd $NAME-$VERSION

  mkdir bld
  cd    bld

  cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DGIT_ARCHETYPE=1             \
      -Wno-dev ../source
  make && make DESTDIR="$ROOTDIR" install
  rm -vf "$ROOTDIR/usr/lib/libx265.a"

  cd ../.. && rm -r $NAME-$VERSION
}
