# Description: a library that parses the file format of Apple iWork documents
# URL: https://wiki.documentfoundation.org/DLP/Libraries/libetonyek
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: glm liblangtag librevenge mdds

name=libetonyek
version=0.1.13
release=1
source=(https://dev-www.libreoffice.org/src/$name/$name-$version.tar.xz
  libetonyek-bundled-soname.patch.0
  rpath.patch
  ubsan.patch
  mdds3.patch
)

build() {
  cd $name-$version

  patch -Np0 -i $SRC/libetonyek-bundled-soname.patch.0
  patch -Np0 -i $SRC/rpath.patch
  patch -Np0 -i $SRC/ubsan.patch
  patch -Np0 -i $SRC/mdds3.patch

  autoreconf -fvi

  ./configure --prefix=/usr \
    --with-pic \
    --with-mdds=3.0 \
    --disable-static \
    --disable-werror \
    --without-docs
  make
  make DESTDIR=$PKG install

  find $PKG -iname '*.la' -delete
}
