# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit base cmake-utils flag-o-matic DESCRIPTION="MySQL Connector/C++ is a MySQL database connector for C++ (JDBC 4.0 API)" HOMEPAGE="http://forge.mysql.com/wiki/Connector_C++" SRC_URI="http://ftp.debian.org/debian/pool/main/m/${PN}/${PN}_${PV/_pre/~r}.orig.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" IUSE="debug examples gcov" DEPEND=">=virtual/mysql-5.0 dev-libs/boost dev-libs/openssl" RDEPEND="${DEPEND}" RESTRICT="debug? ( strip )" S="${WORKDIR}/${P/_pre/~r}" # cmake config helper function use_cmake() { local use="0" use ${1} && use="1" echo ${use} } # cmake config that works ... CMAKE_USE_DIR="." CMAKE_IN_SOURCE_BUILD="1" mycmakeargs="-DMYSQLCPPCONN_TRACE_ENABLE:BOOL=$(use_cmake debug) \ -DMYSQLCPPCONN_BUILD_EXAMPLES:BOOL=0 \ MYSQLCPPCONN_GCOV_ENABLE:BOOL=$(use_cmake gcov) \ -DMYSQLCPPCONN_ICU_ENABLE:BOOL=0" PATCHES="${FILESDIR}/02_no_README_LICENSE.mysql.diff ${FILESDIR}/05_disable_tests.diff ${FILESDIR}/07_attribute_visibility_default_for_exceptions.diff" src_configure() { # native lib/wrapper needs this! append-flags "-fno-strict-aliasing" # debug use debug && append-flags "-g" # configure cmake-utils_src_configure } src_install() { # install cmake-utils_src_install # examples if use examples; then insinto /usr/share/doc/${P}/examples doins "${S}"/examples/* fi }