# pkg-config - a helper tool used when compiling applications and libraries
# http://pkgconfig.freedesktop.org/

[buildout]
parts =
  pkgconfig
extends =
  ../gettext/buildout.cfg
  ../glib/buildout.cfg
  ../popt/buildout.cfg

[pkgconfig]
recipe = hexagonit.recipe.cmmi
url = ftp://mirror.ovh.net/gentoo-distfiles/distfiles/pkg-config-0.26.tar.gz
md5sum = 47525c26a9ba7ba14bf85e01509a7234
location = ${buildout:parts-directory}/${:_buildout_section_name_}
# build pkg-config twice so that second configure can use pkg-config
# to compute GLIB_CFLAGS and GLIB_LIBS.
configure-command =
  ./configure --prefix=${:location} --with-installed-glib --with-installed-popt && make && make install && ./configure
configure-options =
  --prefix=${:location}
  --with-installed-glib
  --with-installed-popt
environment =
  PATH=${:location}/bin:%(PATH)s
  PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig
  CPPFLAGS=-I${glib:location}/include -I${popt:location}/include
  LDFLAGS=-L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${popt:location}/lib -Wl,-rpath=${popt:location}/lib
  GLIB_CFLAGS=-I${glib:location}/include/glib-2.0 -I${glib:location}/lib/glib-2.0/include
  GLIB_LIBS=-L${glib:location}/lib -lglib-2.0 -lintl