DESCRIPTION="Fontconfig is a library for font customization and configuration." 
HOMEPAGE="http://www.freedesktop.org/wiki/Software/fontconfig" 
SRC_URI="http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.10.0.tar.bz2"
CHECKSUM_MD5="3950e82cf5885b41cba8a2bf466aa6f9"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="dev-util/pkgconfig >= 0.23
	media-libs/freetype >= 2.4.9"
BUILD()
{
	cd fontconfig-2.10.0
	mkdir -p `finddir B_USER_CACHE_DIRECTORY`
	libtoolize --force --copy --install
	aclocal
	autoconf
	automake
	FONTS_DIR=`finddir B_SYSTEM_FONTS_DIRECTORY`
	FONTS_DIR2=`finddir B_COMMON_FONTS_DIRECTORY`
	FONTS_DIR3=`finddir B_BEOS_FONTS_DIRECTORY`
	FONTS_DIR4=`finddir B_USER_FONTS_DIRECTORY`
	CACHE_DIR=`finddir B_USER_CACHE_DIRECTORY`
	DOCS_DIR=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
	DATA_DIR=`finddir B_COMMON_DATA_DIRECTORY`
	./configure --prefix=`finddir B_COMMON_DIRECTORY` \
		--enable-libxml2 \
		--with-default-fonts=${FONTS_DIR} \
		--with-add-fonts=${FONTS_DIR2},${FONTS_DIR3},${FONTS_DIR4} \
		--with-cache-dir=${CACHE_DIR} \
		--mandir=${DOCS_DIR}/man \
		--docdir=${DOCS_DIR}/doc \
		--datarootdir=${DATA_DIR}
	make
}

INSTALL()
{
	cd fontconfig-2.10.0
	make install
}
