diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2010-03-24 21:19:01 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2010-03-24 21:19:01 +0000 |
commit | 6dc4216d789f0052a9bc1ed8d0cdf6982627c9fd (patch) | |
tree | 5e651265b24e8ccc60ab34c783fe6c55a21a7fdd /dev-db | |
parent | Support other ways of doing libdir fixes for cmake, as suggested by http://ww... (diff) | |
download | gentoo-2-6dc4216d789f0052a9bc1ed8d0cdf6982627c9fd.tar.gz gentoo-2-6dc4216d789f0052a9bc1ed8d0cdf6982627c9fd.tar.bz2 gentoo-2-6dc4216d789f0052a9bc1ed8d0cdf6982627c9fd.zip |
Initial commit, ebuild submission by Hanno Meyer-Thurow <h.mth@web.de>.
(Portage version: 2.2_rc63/cvs/Linux x86_64)
Diffstat (limited to 'dev-db')
4 files changed, 153 insertions, 0 deletions
diff --git a/dev-db/mysql-connector-c++/ChangeLog b/dev-db/mysql-connector-c++/ChangeLog new file mode 100644 index 000000000000..41e72a01b812 --- /dev/null +++ b/dev-db/mysql-connector-c++/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for dev-db/mysql-connector-c++ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-connector-c++/ChangeLog,v 1.1 2010/03/24 21:19:00 robbat2 Exp $ + +*mysql-connector-c++-1.1.0_pre814 (24 Mar 2010) + + 24 Mar 2010; Robin H. Johnson <robbat2@gentoo.org> + +mysql-connector-c++-1.1.0_pre814.ebuild, + +files/mysql-connector-c++-1.1.0_pre814-libdir.patch, +metadata.xml: + Initial commit, ebuild submission by Hanno Meyer-Thurow <h.mth@web.de>. + diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.0_pre814-libdir.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.0_pre814-libdir.patch new file mode 100644 index 000000000000..f0dc154906fd --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.0_pre814-libdir.patch @@ -0,0 +1,42 @@ +diff -Nuar mysql-connector-c++-1.1.0~r814.orig/driver/CMakeLists.txt mysql-connector-c++-1.1.0~r814/driver/CMakeLists.txt +--- mysql-connector-c++-1.1.0~r814.orig/driver/CMakeLists.txt 2010-03-09 21:40:43.000000000 +0000 ++++ mysql-connector-c++-1.1.0~r814/driver/CMakeLists.txt 2010-03-24 21:04:44.836622353 +0000 +@@ -234,13 +234,13 @@ + + IF(WIN32) + INSTALL(TARGETS mysqlcppconn mysqlcppconn-static +- RUNTIME DESTINATION lib +- ARCHIVE DESTINATION lib ++ RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + ELSE(WIN32) + INSTALL(TARGETS mysqlcppconn mysqlcppconn-static +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + ENDIF(WIN32) + +diff -Nuar mysql-connector-c++-1.1.0~r814.orig/thread/CMakeLists.txt mysql-connector-c++-1.1.0~r814/thread/CMakeLists.txt +--- mysql-connector-c++-1.1.0~r814.orig/thread/CMakeLists.txt 2010-03-09 21:40:43.000000000 +0000 ++++ mysql-connector-c++-1.1.0~r814/thread/CMakeLists.txt 2010-03-24 21:05:49.059949215 +0000 +@@ -52,13 +52,13 @@ + + IF(WIN32) + INSTALL(TARGETS mysqlcppconn_thread mysqlcppconn_thread-static +- RUNTIME DESTINATION lib +- ARCHIVE DESTINATION lib ++ RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + ELSE(WIN32) + INSTALL(TARGETS mysqlcppconn_thread mysqlcppconn_thread-static +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + ENDIF(WIN32) + diff --git a/dev-db/mysql-connector-c++/metadata.xml b/dev-db/mysql-connector-c++/metadata.xml new file mode 100644 index 000000000000..c0715e3227e4 --- /dev/null +++ b/dev-db/mysql-connector-c++/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>mysql</herd> +<use> +<flag name='gcov'>Build coverage support</flag> +</use> +</pkgmetadata> diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.0_pre814.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.0_pre814.ebuild new file mode 100644 index 000000000000..ff50e8cfc67d --- /dev/null +++ b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.0_pre814.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.0_pre814.ebuild,v 1.1 2010/03/24 21:19:00 robbat2 Exp $ + +EAPI="2" + +inherit base cmake-utils flag-o-matic + +DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)" +HOMEPAGE="http://forge.mysql.com/wiki/Connector_C++" + +DEBIAN_PV=1 +MY_PV="${PV/_pre/~r}" +MY_P="${PN}_${MY_PV}" +DEBIAN_URI="mirror://debian/pool/main/${PN:0:1}/${PN}" +DEBIAN_PATCH="${MY_P}-${DEBIAN_PV}.diff.gz" +DEBIAN_SRC="${MY_P}.orig.tar.gz" +SRC_URI="${DEBIAN_URI}/${DEBIAN_SRC} ${DEBIAN_URI}/${DEBIAN_PATCH}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="debug examples gcov static" + +DEPEND=">=virtual/mysql-5.1 + dev-libs/boost + dev-libs/openssl" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${P/_pre/~r}" + +# cmake config helper function +use_cmake() { + local i_use="0" + use ${1} && i_use="1" + + echo ${i_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" + +src_unpack() { + unpack "${DEBIAN_SRC}" +} + +src_prepare() { + EPATCH_OPTS="-p1" epatch "${DISTDIR}"/"${DEBIAN_PATCH}" + for i in $(<"${S}"/debian/patches/00list) ; do + epatch "${S}"/debian/patches/${i}* + done + epatch "${FILESDIR}"/${PN}-1.1.0_pre814-libdir.patch +} + +src_configure() { + # native lib/wrapper needs this! + append-flags "-fno-strict-aliasing" + + # configure + cmake-utils_src_configure +} + +src_compile() { + # make + cmake-utils_src_compile mysqlcppconn + + # make static + use static && cmake-utils_src_compile mysqlcppconn-static +} + +src_install() { + # install - ignore failure for now ... + emake DESTDIR="${D}" install/fast + + # fast install fails on useflag [-static-libs] + # http://bugs.mysql.com/bug.php?id=52281 + insinto /usr/include + doins driver/mysql_{connection,driver}.h + + dodoc ANNOUNCE* CHANGES* README + + # examples + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins "${S}"/examples/* + fi +} |