# Description: Renders an image of the earth into the X root window.
# URL: http://xplanet.sourceforge.net/
# Maintainer: unmaintained
# Depends on: pango giflib libtiff xorg-libxscrnsaver

name=xplanet
version=1.3.1
release=1
source=(https://downloads.sourceforge.net/project/$name/$name/$version/$name-$version.tar.gz
  giflib6.patch
  xplanet-c++11.patch)

build() {
  cd $name-$version

  patch -p1 -i $SRC/giflib6.patch
  patch -p1 -i $SRC/xplanet-c++11.patch
  sed -e 's|freetype-config|pkg-config freetype2|g' -i acinclude.m4
  autoreconf -vif

  ./configure \
    --prefix=/usr \
    --with-freetype

  make
  make DESTDIR=$PKG install
  find $PKG -name "README" -type f -delete
}
