# Maintainer: PktSurf <smlinux@pktsurf.in>
app=poppler
version=23.05.0
build=1sml
homepage="https://poppler.freedesktop.org/"
download="https://poppler.freedesktop.org/poppler-$version.tar.xz"
desc="PDF rendering library aimed at centralised code maintenance"
requires="pkgconf gcc-libs libjpeg-turbo python3 curl lcms2 openjpeg icu cairo gtk2 gobject-introspection gtk3"

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

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

build() {
  mkdir -p smbuild && cd smbuild

  cmake .. \
    -DCMAKE_INSTALL_PREFIX="" \
    -DCMAKE_INSTALL_LIBDIR=lib

  make
  make install DESTDIR=$pkg

  cp ../COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
796d36af987d22c010d68a14d092341d42c9207500bb7e76711e157c3c395af67db835b074e09bf09788b6f5f439eac6d34fc4eea3dd288153ad8b8cfbc4ec75  poppler-23.05.0.tar.lz
"
