public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/mysql:master commit in: dev-db/mariadb-native-client/, eclass/, dev-db/mariadb-native-client/files/
@ 2013-06-27 13:03 Brian Evans
  0 siblings, 0 replies; only message in thread
From: Brian Evans @ 2013-06-27 13:03 UTC (permalink / raw
  To: gentoo-commits

commit:     193c09aa22b4c3410f49ce4359e6876e16abe52a
Author:     Brian Evans <grknight <AT> lavabit <DOT> com>
AuthorDate: Wed Jun 26 14:30:03 2013 +0000
Commit:     Brian Evans <grknight <AT> lavabit <DOT> com>
CommitDate: Thu Jun 27 13:02:52 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=193c09aa

Add live ebuild with mysqlcompat feature, optional ssl support and external zlib

Package-Manager: portage-2.1.12.2

---
 dev-db/mariadb-native-client/ChangeLog             |  8 +++++
 .../files/multilib-install.patch                   |  6 ++--
 .../mariadb-native-client-1.0.ebuild               | 11 ++++--
 ....0.ebuild => mariadb-native-client-9999.ebuild} | 41 +++++++++++++++++-----
 dev-db/mariadb-native-client/metadata.xml          |  1 +
 eclass/mysql-v2.eclass                             |  1 +
 6 files changed, 55 insertions(+), 13 deletions(-)

diff --git a/dev-db/mariadb-native-client/ChangeLog b/dev-db/mariadb-native-client/ChangeLog
index 813f454..bb6ae82 100644
--- a/dev-db/mariadb-native-client/ChangeLog
+++ b/dev-db/mariadb-native-client/ChangeLog
@@ -1,3 +1,11 @@
+*mariadb-native-client-9999 (26 Jun 2013)
+
+  26 Jun 2013; Brian Evans <grknight@lavabit.com>
+  +mariadb-native-client-9999.ebuild, mariadb-native-client-1.0.ebuild,
+  metadata.xml:
+  Add live ebuild with mysqlcompat feature, optional ssl support and external
+  zlib
+
 *mariadb-native-client-1.0 (22 May 2013)
 
   22 May 2013;  <grknight@lavabit.com> +files/multilib-install.patch,

diff --git a/dev-db/mariadb-native-client/files/multilib-install.patch b/dev-db/mariadb-native-client/files/multilib-install.patch
index c3b11f4..6dfa270 100644
--- a/dev-db/mariadb-native-client/files/multilib-install.patch
+++ b/dev-db/mariadb-native-client/files/multilib-install.patch
@@ -8,9 +8,9 @@ diff -aruN a/CMakeLists.txt b/CMakeLists.txt
 -          RUNTIME DESTINATION "lib"
 -          LIBRARY DESTINATION "lib"
 -          ARCHIVE DESTINATION "lib")
-+          RUNTIME DESTINATION "${CMAKE_INSTALL_LIBDIR}/mariadb"
-+          LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/mariadb"
-+          ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/mariadb")
++          RUNTIME DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++          LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++          ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
  
  INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include
          DESTINATION mariadbclient)

diff --git a/dev-db/mariadb-native-client/mariadb-native-client-1.0.ebuild b/dev-db/mariadb-native-client/mariadb-native-client-1.0.ebuild
index 38ce3e7..510e42a 100644
--- a/dev-db/mariadb-native-client/mariadb-native-client-1.0.ebuild
+++ b/dev-db/mariadb-native-client/mariadb-native-client-1.0.ebuild
@@ -4,7 +4,15 @@
 
 EAPI=5
 
-inherit cmake-multilib eutils
+VCS_INHERIT=""
+if [[ "${PV}" == 9999 ]] ; then
+	VCS_INHERIT="bzr"
+	EBZR_REPO_URI="lp:${PN}"
+else
+	S="${WORKDIR}/${PN}"
+fi
+
+inherit cmake-multilib eutils "${VCS_INHERIT}"
 
 DESCRIPTION="Client Library for C is used to connect applications developed in C/C++ to MariaDB/MySQL databases"
 HOMEPAGE="http://mariadb.org/"
@@ -22,7 +30,6 @@ IUSE="doc static-libs"
 RDEPEND="dev-libs/openssl"
 DEPEND="${RDEPEND}
 	doc? ( app-text/xmlto )"
-S="${WORKDIR}/${PN}"
 
 src_prepare() {
 	epatch "${FILESDIR}/multilib-install.patch"

diff --git a/dev-db/mariadb-native-client/mariadb-native-client-1.0.ebuild b/dev-db/mariadb-native-client/mariadb-native-client-9999.ebuild
similarity index 50%
copy from dev-db/mariadb-native-client/mariadb-native-client-1.0.ebuild
copy to dev-db/mariadb-native-client/mariadb-native-client-9999.ebuild
index 38ce3e7..a73260e 100644
--- a/dev-db/mariadb-native-client/mariadb-native-client-1.0.ebuild
+++ b/dev-db/mariadb-native-client/mariadb-native-client-9999.ebuild
@@ -4,7 +4,19 @@
 
 EAPI=5
 
-inherit cmake-multilib eutils
+VCS_INHERIT=""
+if [[ "${PV}" == 9999 ]] ; then
+	VCS_INHERIT="bzr"
+	EBZR_REPO_URI="lp:${PN}"
+else
+	S="${WORKDIR}/${PN}"
+fi
+
+inherit cmake-multilib eutils "${VCS_INHERIT}"
+
+MULTILIB_WRAPPED_HEADERS+=(
+	/usr/include/mariadb/my_config.h
+)
 
 DESCRIPTION="Client Library for C is used to connect applications developed in C/C++ to MariaDB/MySQL databases"
 HOMEPAGE="http://mariadb.org/"
@@ -16,21 +28,33 @@ SRC_URI="
 LICENSE="LGPL-2.1"
 
 SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="doc static-libs"
+KEYWORDS=""
+IUSE="doc +mysqlcompat +ssl static-libs"
 
-RDEPEND="dev-libs/openssl"
+RDEPEND="sys-libs/zlib
+	ssl? ( dev-libs/openssl )
+	mysqlcompat? (
+		!dev-db/mysql
+		!dev-db/mysql-cluster
+		!dev-db/mariadb
+		!dev-db/mariadb-galera
+		!dev-db/percona-server
+	)"
 DEPEND="${RDEPEND}
 	doc? ( app-text/xmlto )"
-S="${WORKDIR}/${PN}"
 
 src_prepare() {
-	epatch "${FILESDIR}/multilib-install.patch"
+	sed -i 	-e "s~DESTINATION \"lib/mariadb~DESTINATION \"\$\{CMAKE_INSTALL_LIBDIR\}~" \
+		-e "s~DESTINATION lib/mariadb~DESTINATION \$\{CMAKE_INSTALL_LIBDIR\}~" \
+		"${S}/libmariadb/CMakeLists.txt"
 }
 
 src_configure() {
 	mycmakeargs+=(
 		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_EXTERNAL_ZLIB=ON
+		$(cmake-utils_use_with ssl OPENSSL)
+		$(cmake-utils_use_with mysqlcompat MYSQLCOMPAT)
 		$(cmake-utils_use_build doc DOCS)
 	)
 	cmake-multilib_src_configure
@@ -38,12 +62,13 @@ src_configure() {
 
 src_install() {
 	strip_static_libraries() {
-		einfo "IN ${T}/usr/$(get_libdir)"
-		rm "${T}/usr/$(get_libdir)/mariadb/libmariadbclient.a"
+		rm "${ED}/usr/$(get_libdir)/libmariadbclient.a"
+		use mysqlcompat && rm "${ED}/usr/$(get_libdir)/libmysqlclient.a"
 	}
 
 	cmake-multilib_src_install
 	if ! use static-libs ; then
 		multilib_foreach_abi strip_static_libraries
 	fi
+	dodoc README
 }

diff --git a/dev-db/mariadb-native-client/metadata.xml b/dev-db/mariadb-native-client/metadata.xml
index eada174..069fbde 100644
--- a/dev-db/mariadb-native-client/metadata.xml
+++ b/dev-db/mariadb-native-client/metadata.xml
@@ -3,5 +3,6 @@
 <pkgmetadata>
 <herd>mysql</herd>
 <use>
+<flag name='mysqlcompat'>Enable mysqlclient library symbolic links</flag>
 </use>
 </pkgmetadata>

diff --git a/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass
index e213275..1e56c45 100644
--- a/eclass/mysql-v2.eclass
+++ b/eclass/mysql-v2.eclass
@@ -228,6 +228,7 @@ DEPEND="
 	>=sys-apps/texinfo-4.7-r1
 	>=sys-libs/readline-4.1
 	>=sys-libs/zlib-1.2.3
+	!dev-db/mariadb-native-client[mysqlcompat]
 "
 
 if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-27 13:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-27 13:03 [gentoo-commits] proj/mysql:master commit in: dev-db/mariadb-native-client/, eclass/, dev-db/mariadb-native-client/files/ Brian Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox