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

NAME="xvidcore"
VERSION="1.1.0beta2"
REVISION="3"

PKG_SOURCEURL='http://downloads.xvid.org/downloads/$NAME-$VERSION.tar.gz'

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

# We're doing this because when we actually pass a CFLAGS argument to the
# configure script in this package, the configure script simply takes *our*
# options and then never comes up with it's own.  Don't worry, by only
# setting PKG_OPTLEVEL we still allow global PKG_CPU and PKG_ARCH settings to
# flow down into the build during the cflags() call.
PKG_OPTLEVEL="-O2 -pipe -fstrength-reduce -finline-functions -freduce-all-givs -ffast-math -fomit-frame-pointer"
cflags

prepare
analyzesource

# This package (annoyingly) doesn't put it's configure script in the root
# directory for the source tarball.  (At least it's easy to get around.)
PKG_BUILDROOT=$PKG_BUILDROOT/build/generic

configure
make
makeinstall 
spewdo "strip -g $PKG_STAGEROOT$PKG_PREFIX/lib/libxvidcore*"
tidydocumentation
analyzebinaries
finalizepackage
packagize
cleanup
