# Maintainer: PktSurf <smlinux@pktsurf.in>
app=woff2
version=1.0.2
build=1sml
homepage="https://github.com/google/iwoff2/"
download="https://github.com/google/woff2/archive/v$version/woff2-$version.tar.gz"
desc="Font compression and decompression library in C++"
requires="gcc-libs brotli"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions
}

build() {
  sed -i "s/NOT BUILD_SHARED_LIBS/TRUE/" CMakeLists.txt
  mkdir -p smbuild && cd smbuild
  cmake .. -GNinja \
    -DCMAKE_INSTALL_PREFIX="" \
    -DCMAKE_INSTALL_LIBDIR=lib 

  DESTDIR="$pkg" ninja install

  cp ../LICENSE $pkgdocs/

  mkfinalpkg
}

sha512sums="
7315c05853540c34be1d2223a7999df63518ebe8341ced45ce37d72f2277435653e9c8251c991fd330ab94a16fd77aaa71db281536f175e8ac34cde2668f3471  woff2-1.0.2.tar.lz
"
