# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ GCONF_DEBUG="no" EAPI="1" inherit autotools gnome2 java eutils flag-o-matic MY_P="${P/_p/r}" DESCRIPTION="MySQL GUI Tools" HOMEPAGE="http://www.mysql.com/products/tools/" SRC_URI="mirror://mysql/Downloads/MySQLGUITools/${MY_P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64" IUSE="nls +administrator +query-browser gtk python fastcgi readline canvas" # TODO: java lua" RDEPEND=">=x11-libs/gtk+-2.6 >=dev-libs/glib-2.6 >=dev-libs/libsigc++-2.0 >=dev-libs/libpcre-4.4 >=dev-libs/libxml2-2.6.2 >=dev-cpp/glibmm-2.14 gtk? ( >=gnome-base/libglade-2.5 dev-cpp/gtkmm:2.4 ) php? ( >=dev-lang/php-5.2 ) python? ( >=dev-lang/python-2.6 ) fastcgi? ( virtual/httpd-fastcgi ) readline? ( sys-libs/readline ) canvas? ( virtual/opengl media-libs/freetype ) >=virtual/mysql-5.0 query-browser? ( gnome-extra/gtkhtml:3.14 gnome-base/libgnomeprint:2.2 )" #java? ( # virtual/jre #) #lua? ( # >=dev-lang/lua-5.1 #) DEPEND="${RDEPEND} >=dev-util/pkgconfig-0.15 >=app-text/scrollkeeper-0.3.11" #java? ( # virtual/jdk #) RDEPEND="${RDEPEND} !dev-db/mysql-administrator !dev-db/mysql-query-browser" S="${WORKDIR}"/${MY_P} pkg_setup() { if ! use administrator && ! use query-browser then elog "Please activate at least one of the following USE flags:" elog "- administrator for MySQL Administrator" elog "- query-browser for MySQL Query Browser" die "Please activate at least one of the following USE flags: administrator, query-browser" fi # Needed for gcc-4.3 append-cppflags -D_GNU_SOURCE } src_unpack() { gnome2_src_unpack cd "${S}" epatch \ "${FILESDIR}"/${P}-path-insanity.patch \ "${FILESDIR}"/${P}-weird-chars.patch \ "${FILESDIR}"/${P}-lua-modules.patch \ "${FILESDIR}"/${P}-query-browser-sps.patch \ "${FILESDIR}"/${P}-libsigc++-2.2.patch \ "${FILESDIR}"/${P}-gcc-4.3.patch \ "${FILESDIR}"/${P}-deprecated-gtk+-api.patch sed -i \ -e "s/\\(^\\|[[:space:]]\\)-ltermcap\\($\\|[[:space:]]\\)/ /g" \ common/tools/grtsh/Makefile.am \ || die "could not fix termcap inclusion" find "${S}" \ \( -name "Makefile.am" -o -name "Makefile.in.in" \) \ -exec \ sed -i -e "s:../mysql-gui-common/:../common/:g" {} \; \ || die "failed cleaning up path mess" cd "${S}"/common use nls || sed -i -e "/^SUBDIRS = / s/\\bpo\\b//" Makefile.am eautoreconf if use administrator then cd "${S}"/administrator use nls || sed -i -e "/^SUBDIRS = / s/\\bpo\\b//" Makefile.am eautoreconf fi if use query-browser then cd "${S}"/query-browser use nls || sed -i -e "/^SUBDIRS=/ s/\\bpo\\b//" Makefile.am eautoreconf # Fix missing file cp "${S}"/common/mkinstalldirs . fi } src_compile() { # mysql has -fno-exceptions, but we need exceptions append-flags -fexceptions cd "${S}"/common gnome2_src_compile \ $(use_enable nls i18n) \ $(use_enable gtk) \ $(use_enable php php-modules) \ $(use_enable python python-modules) \ $(use_enable fastcgi) \ $(use_enable readline) \ $(use_enable canvas) \ --disable-java-modules \ --disable-grt # $(use_enable java java-modules) \ # $(use_enable lua grt) \ if use administrator then cd "${S}"/administrator gnome2_src_compile $(use_enable nls i18n) fi if use query-browser then cd "${S}"/query-browser gnome2_src_compile --with-gtkhtml=libgtkhtml-3.14 fi } src_install() { cd "${S}"/common gnome2_src_install if use administrator then cd "${S}"/administrator gnome2_src_install fi if use query-browser then cd "${S}"/query-browser gnome2_src_install fi }