#!/bin/bash
#
# Copyright 2004,2007 Dagmar d'Surreal <rivyqntzne@tznvy.pbz>
# Copyright 2005, 2006 Scott Harmon
# Available under the terms of the GNU GPL.
#

NAME="gtk-doc"
VERSION="1.18"
REVISION="2"

PKG_SOURCEURL='ftp://ftp.gnome.org/mirror/gnome.org/sources/$NAME/$VER_MAJ.$VER_MIN/$NAME-$VERSION.tar.xz'

PKG_PATCH[0]='gtk-doc-1.18-pkgconfigdirfix.patch'

. $DLG_ROOT/etc/config
. $DLG_ROOT/lib/dl-base

PKG_SANIFYNOTOUCH="needed"

prepare

applypatch 0 1 

analyzesource

# Really disable scrollkeeper
PKG_SCROLLKEEPER=0

configure --libdir=/usr/lib${LIBSUFFIX} \
	--disable-scrollkeeper
make

# An internet connection is required for these tests.
# Skip them if not available.
spew 3 "Checking if an internet connection is available"
spew 3 "-c 2 -W 3 google.com"
ping -c 2 -W 3 google.com
if [ $? -eq 0 ]; then
	makecheck
fi

makeinstall
tidydocumentation
analyzebinaries
finalizepackage
packagize
cleanup
