app=pango
version=1.42.4
build=1sml
homepage="https://www.pango.org/"
download="https://download.gnome.org/sources/pango/1.42/pango-1.42.4.tar.xz"
desc="A library for layout and rendering of text"
requires="fribidi libxft harfbuzz"

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

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

  applypatch $srcdir/CVE-2019-1010238.patch

  touch pango/s-enum-types-h
  touch pango/s-enum-types-c

  printf "all:\n\ttrue\n\ninstall:\n\ttrue\n\n" > tests/Makefile.in

  CFLAGS="$CFLAGS -D_GNU_SOURCE" \
  FREETYPE_LIBS=-lfreetype
  ./configure \
    --prefix="" \
    --sysconfdir=/etc 

  make
  make install DESTDIR=$pkg

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
82f160c26cb096697d69f05fe9d9e1f5887c9aecd33c8949af41e2aabe144956c0551f8b5ad2b148a416774c14cf701bada82c72c49c35eec4ca531218c6c1ea  pango-1.42.4.tar.lz
d11af8e56c59286f998d136d795d9ed22bea96b7dfaf4e02fe294ab0b147606ecb43ddfbd8caaa0eee1ee27b5a2f5c5a6f6f7a0b3193750649cf6b121cb6de50  CVE-2019-1010238.patch
"
