# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils qt3 MY_P="${PN}2-${PV}" DESCRIPTION="A free development environment based on a Basic interpreter with object extensions." HOMEPAGE="http://gambas.sourceforge.net/" SRC_URI="mirror://sourceforge/gambas/${MY_P}.tar.bz2" LICENSE="GPL-2" SLOT="2" KEYWORDS="~x86" IUSE="bzip2 corba curl debug firebird gtk kde ldap mysql odbc opengl pcre pdf postgres sdl smtp sqlite sqlite3 v4l xml zlib" S=${WORKDIR}/${MY_P} DEPEND="$(qt_min_version 3.2) virtual/libintl virtual/libiconf sys-devel/gettext bzip2? ( app-arch/bzip2 ) corba? ( =net-misc/omniORB-4* ) curl? ( net-misc/curl ) gtk? ( >=x11-libs/gtk+-2.6.4 ) firebird? ( dev-db/firebird ) kde? ( >=kde-base/kdelibs-3.5 ) ldap? ( net-nds/openldap ) mysql? ( dev-db/mysql ) odbc? ( || ( dev-db/unixODBC dev-db/libiodbc ) ) opengl? ( x11-libs/libX11 virtual/glu ) pcre? ( dev-libs/libpcre ) pdf? ( app-text/poppler ) postgres? ( dev-db/libpq ) sdl? ( media-libs/libsdl media-libs/sdl-mixer x11-libs/libXcursor ) smtp? ( dev-libs/glib ) sqlite? ( =dev-db/sqlite-2* ) sqlite3? ( >=dev-db/sqlite-3 ) v4l? ( sys-kernel/linux-headers media-libs/jpeg media-libs/libpng ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib )" DEPEND="${RDEPEND}" src_compile() { local mainconf="" local modulesconf="" # NOTES: # - 'qt' is enabled per default because it would make dependency tracking a lot harder # - 'image' is enabled per default because it depends on qt only (see above) # - 'crypt' depends on glibc only # - 'net' is needed for curl and smtp, it is easier to have it unconditionally (like qt) # - 'sdlopengl' is disabled because it needs a directory "gb.sdl.opengl" which is missing at the moment (?) # - The flags are in the same order as in './configure --help' # # TODO: # - remove libsmtp headers and sourcefile from gb.net.smtp/src and add dependy for libsmtp mainconf=" $(use_enable bzip2 bzlib2) $(use_enable zlib) $(use_enable mysql) $(use_enable odbc) $(use_enable postgres postgresql) $(use_enable sqlite sqlite2) $(use_enable sqlite3) $(use_enable firebird) $(use_enable gtk) $(use_enable pdf) --enable-net \ $(use_enable curl) $(use_enable smtp) $(use_enable pcre) --enable-qt $(use_enable kde) $(use_enable sdl) $(use_enable xml) $(use_enable v4l) --enable-crypt $(use_enable opengl) --disable-sdlopengl $(use_enable ldap) $(use_enable corba) --enable-image" # Applies to a couple of modules, but not all modulesconf="\ $(use_enable debug) $(use_enable !debug optimization) --enable-preloading --disable-profiling" # main modulesconf="${modulesconf} \ --enable-intl --enable-conv --enable-gettext" # qt modulesconf="${modulesconf} \ $(use_enable opengl qtopengl)" # sdl modulesconf="${modulesconf} \ $(use_enable sdl sdl_sound) $(use_enable sdl Xcursor)" econf ${mainconf} ${modulesconf} || die "econf failed" emake || die "econf failed" } src_install() { export PATH="${D}/usr/bin:${PATH}" emake DESTDIR="${D}" install || die "emake install failed" dodoc README AUTHORS ChangeLog TODO mv "${D}/usr/share/${PN}2/help" "${D}/usr/share/doc/${PF}/html" mv "${D}/usr/share/${PN}2/examples" "${D}/usr/share/doc/${PF}/examples" dohtml "${FILESDIR}/WebHome.html" dosym ../doc/${PF}/html /usr/share/${PN}2/help dosym ../doc/${PF}/examples /usr/share/${PN}2/examples }