#!/bin/sh
#
# Copyright 2004 Dagmar d'Surreal <rivyqntzne@tznvy.pbz>
# Available under the terms of the GNU GPL.
#

NAME="gtk+2"
VERSION="2.8.7"
REVISION="1"

PKG_SOURCEURL='http://ftp.gnome.org/pub/GNOME/sources/gtk+/$VER_MAJ.$VER_MIN/gtk+-$VERSION.tar.bz2'

. $DLG_ROOT/config
. $DLG_ROOT/SCRIPTS/dropline-functions.sh

# Since we decide what to include by what's in patches
# we need these kinda ghost patches.  I will also track which
# number of the array I'm on.
PATCHNUMBER=0

cflags
cxxflags
prepare
analyzesource
configure --with-xinput
make
makeinstall install-strip

spewdo "createdir $PKG_STAGEROOT$PKG_SYSCONFDIR/gtk-2.0"
spewdo "createdir $PKG_STAGEROOT$PKG_SYSCONFDIR/profile.d"

for filename in gtk+2.sh gtk+2.csh; do
  obtainfile location $filename
  if [ -z "$location" ]; then
    die "Unable to find $filename!"
  fi
  PKG_PATCH[PATCHNUMBER]=$location
  PATCHNUMBER=$(($PATCHNUMBER+1))
  spewdo "install -m 755 $location $PKG_STAGEROOT$PKG_SYSCONFDIR/profile.d"
done

tidydocumentation
analyzebinaries
finalizepackage
packagize
cleanup
