public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Evans" <grknight@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/mysql:split-client commit in: dev-db/mariadb/files/, eclass/
Date: Wed, 24 Jun 2015 19:41:19 +0000 (UTC)	[thread overview]
Message-ID: <1435175005.d542342e8ec41a615bc3a207a7d4cd328ad87d7b.grknight@gentoo> (raw)

commit:     d542342e8ec41a615bc3a207a7d4cd328ad87d7b
Author:     layman <layman <AT> localhost>
AuthorDate: Wed Jun 24 19:43:25 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Jun 24 19:43:25 2015 +0000
URL:        https://gitweb.gentoo.org/proj/mysql.git/commit/?id=d542342e

client-libs, server and tools now build ; Need to tweak things like shared files and man pages

 .../mariadb/files/without-clientlibs-tools.patch   | 23 ++++++--
 eclass/mysql-cmake.eclass                          | 62 +++++++++++++---------
 eclass/mysql-multilib.eclass                       | 39 +++++++++-----
 3 files changed, 83 insertions(+), 41 deletions(-)

diff --git a/dev-db/mariadb/files/without-clientlibs-tools.patch b/dev-db/mariadb/files/without-clientlibs-tools.patch
index dd03b9f..7b759f3 100644
--- a/dev-db/mariadb/files/without-clientlibs-tools.patch
+++ b/dev-db/mariadb/files/without-clientlibs-tools.patch
@@ -10,14 +10,13 @@ diff -aurN a/CMakeLists.txt b/CMakeLists.txt
  
  SET(MALLOC_LIBRARY "system")
  CHECK_JEMALLOC()
-@@ -394,25 +392,36 @@
+@@ -394,24 +392,35 @@
   CONFIGURE_PLUGINS()
  ENDIF()
  
 -ADD_SUBDIRECTORY(include)
 +IF(NOT WITHOUT_CLIENTLIBS)
 +  ADD_SUBDIRECTORY(include)
-+  ADD_SUBDIRECTORY(libmysql)
 +ENDIF(NOT WITHOUT_CLIENTLIBS)
 +
  ADD_SUBDIRECTORY(dbug)
@@ -25,7 +24,7 @@ diff -aurN a/CMakeLists.txt b/CMakeLists.txt
  ADD_SUBDIRECTORY(vio)
  ADD_SUBDIRECTORY(mysys)
  ADD_SUBDIRECTORY(mysys_ssl)
--ADD_SUBDIRECTORY(libmysql)
+ ADD_SUBDIRECTORY(libmysql)
 -ADD_SUBDIRECTORY(client)
  ADD_SUBDIRECTORY(extra)
  ADD_SUBDIRECTORY(libservices)
@@ -98,3 +97,21 @@ diff -aurN a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
    FOREACH(file ${BIN_SCRIPTS})
      IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh)
        CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
+diff -aurN a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
+--- a/libmysql/CMakeLists.txt	2015-06-24 12:32:11.606169100 -0400
++++ b/libmysql/CMakeLists.txt	2015-06-24 13:44:53.857169100 -0400
+@@ -440,12 +440,12 @@
+       SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
+     ENDIF() 
+   ENDMACRO()
+-  IF(ENABLE_STATIC_LIBS)
++  IF(ENABLE_STATIC_LIBS AND NOT WITHOUT_CLIENTLIBS)
+     INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development)
+   ENDIF()
+ ENDIF()
+ 
+-IF(NOT DISABLE_SHARED)
++IF(NOT DISABLE_SHARED AND NOT WITHOUT_CLIENTLIBS)
+   MERGE_LIBRARIES(libmysql SHARED ${LIBS}
+     EXPORTS ${CLIENT_API_FUNCTIONS} ${CLIENT_API_5_1_EXTRA} ${CLIENT_API_5_5_EXTRA}
+     COMPONENT SharedLibraries)

diff --git a/eclass/mysql-cmake.eclass b/eclass/mysql-cmake.eclass
index 169dd06..55babbc 100644
--- a/eclass/mysql-cmake.eclass
+++ b/eclass/mysql-cmake.eclass
@@ -87,26 +87,30 @@ mysql-cmake_use_plugin() {
 # Helper function to configure locale cmake options
 configure_cmake_locale() {
 
-	if ( ! use_if_iuse minimal || use_if_iuse server ) && [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
-		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-		ewarn "You MUST file bugs without these variables set."
+	if use_if_iuse minimal ; then
+		:
+	elif ! in_iuse server || use_if_iuse server ; then
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
 
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-		)
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
 
-	elif ! use latin1 ; then
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=utf8
-			-DDEFAULT_COLLATION=utf8_general_ci
-		)
-	else
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=latin1
-			-DDEFAULT_COLLATION=latin1_swedish_ci
-		)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
 	fi
 }
 
@@ -424,11 +428,13 @@ mysql-cmake_src_install() {
 
 	cmake-utils_src_install
 
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize"
+	if ! in_iuse tools || use_if_iuse tools ; then
+		# Convenience links
+		einfo "Making Convenience links for mysqlcheck multi-call binary"
+		dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze"
+		dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair"
+		dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize"
+	fi
 
 	if [[ -z ${HAS_TOOLS_PATCH} ]] ; then
 		# Create a mariadb_config symlink
@@ -471,7 +477,9 @@ mysql-cmake_src_install() {
 	newins "${TMPDIR}/my.cnf.ok" my.cnf
 
 	# Minimal builds don't have the MySQL server
-	if ! use_if_iuse minimal || use_if_iuse server ; then
+	if use_if_iuse minimal ; then
+		:
+	elif ! in_iuse server || use_if_iuse server ; then
 		einfo "Creating initial directories"
 		# Empty directories ...
 		diropts "-m0750"
@@ -490,7 +498,9 @@ mysql-cmake_src_install() {
 	fi
 
 	# Minimal builds don't have the MySQL server
-	if ! use_if_iuse minimal || use_if_iuse server; then
+	if use_if_iuse minimal ; then
+		:
+	elif ! in_iuse server || use_if_iuse server; then
 		einfo "Including support files and sample configurations"
 		docinto "support-files"
 		for script in \
@@ -511,6 +521,8 @@ mysql-cmake_src_install() {
 	[[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && ! use perl \
 	&& rm -f "${ED}/usr/bin/mytop"
 
+	in_iuse client-libs && ! use client-libs && return
+
 	# Percona has decided to rename libmysqlclient to libperconaserverclient
 	# Use a symlink to preserve linkages for those who don't use mysql_config
 	if [[ ${PN} == "percona-server" ]] && mysql_version_is_at_least "5.5.36" ; then

diff --git a/eclass/mysql-multilib.eclass b/eclass/mysql-multilib.eclass
index e9e1b81..175f455 100644
--- a/eclass/mysql-multilib.eclass
+++ b/eclass/mysql-multilib.eclass
@@ -238,7 +238,7 @@ fi
 
 if [[ ${HAS_TOOLS_PATCH} ]] ; then
 	IUSE="${IUSE} client-libs +server +tools"
-	REQUIRED_USE="${REQUIRED_USE} !server? ( !extraengine !embedded ) server? ( tools )"
+	REQUIRED_USE="${REQUIRED_USE} !server? ( !extraengine !embedded ) server? ( tools ) || ( client-libs server tools )"
 else
 	IUSE="${IUSE} minimal"
 	REQUIRED_USE="${REQUIRED_USE} minimal? ( !extraengine !embedded )"
@@ -370,7 +370,9 @@ RDEPEND="${DEPEND}
 "
 
 if [[ ${HAS_TOOLS_PATCH} ]] ; then
-	RDEPEND="${RDEPEND} server? ( !prefix? ( dev-db/mysql-init-scripts ) )"
+	RDEPEND="${RDEPEND} 
+		server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+		!client-libs? ( virtual/libmysqclient )"
 else
 	RDEPEND="${RDEPEND} !minimal? ( !prefix? ( dev-db/mysql-init-scripts ) )"
 fi
@@ -444,9 +446,6 @@ MULTILIB_WRAPPED_HEADERS=( /usr/include/mysql/my_config.h /usr/include/mysql/pri
 [[ ${PN} == "mariadb" ]] && mysql_version_is_at_least "10.1.1" && \
 	MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/mysql_version.h )
 
-# wrap the config script
-MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-
 #
 # HELPER FUNCTIONS:
 #
@@ -488,7 +487,9 @@ mysql-multilib_pkg_pretend() {
 mysql-multilib_pkg_setup() {
 
 	if has test ${FEATURES} ; then
-		if ! use_if_iuse minimal || use_if_iuse server ; then
+		if use_if_iuse minimal ; then
+			:
+		elif ! in_iuse server || use_if_iuse server ; then
 			if ! has userpriv ${FEATURES} ; then
 				eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
 			fi
@@ -574,8 +575,8 @@ multilib_src_configure() {
 		-DMYSQL_DATADIR=${EPREFIX}/var/lib/mysql
 		-DSYSCONFDIR=${EPREFIX}/etc/mysql
 		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${P}
-		-DINSTALL_DOCREADMEDIR=share/doc/${P}
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
 		-DINSTALL_INCLUDEDIR=include/mysql
 		-DINSTALL_INFODIR=share/info
 		-DINSTALL_LIBDIR=$(get_libdir)
@@ -651,7 +652,9 @@ multilib_src_configure() {
 
 	configure_cmake_locale
 
-	if multilib_is_native_abi && ( ! use_if_iuse minimal || use_if_iuse server ) ; then
+	if use_if_iuse minimal ; then
+		configure_cmake_minimal
+	elif multilib_is_native_abi && use_if_iuse server ; then
 		configure_cmake_standard
 	else
 		configure_cmake_minimal
@@ -680,6 +683,10 @@ multilib_src_compile() {
 # @DESCRIPTION:
 # Install mysql.
 mysql-multilib_src_install() {
+	if ! in_iuse client-libs || use_if_iuse client-libs ; then
+		# wrap the config script
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+	fi
 	multilib-minimal_src_install
 }
 
@@ -690,9 +697,13 @@ multilib_src_install() {
 		mysql-cmake_src_install
 	else
 		cmake-utils_src_install
-		if ( ! use_if_iuse minimal || use_if_iuse server ) && [[ "${PN}" == "mariadb" || "${PN}" == "mariadb-galera" ]] ; then
-			insinto /usr/include/mysql/private
-			doins "${S}"/sql/*.h
+		if [[ "${PN}" == "mariadb" || "${PN}" == "mariadb-galera" ]] ; then
+			if use_if_iuse minimal ; then
+				:
+			elif  use_if_iuse server || ! in_iuse server ; then
+				insinto /usr/include/mysql/private
+				doins "${S}"/sql/*.h
+			fi
 		fi
 	fi
 }
@@ -731,7 +742,9 @@ mysql-multilib_pkg_postinst() {
 	chmod 0660 "${ROOT}${MY_LOGDIR}"/mysql*
 
 	# Minimal builds don't have the MySQL server
-	if ! use_if_iuse minimal || use_if_iuse server ; then
+	if use_if_iuse minimal ; then
+		:
+	elif ! in_iuse server || use_if_iuse server ; then
 		docinto "support-files"
 		for script in \
 			support-files/my-*.cnf \


                 reply	other threads:[~2015-06-24 19:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435175005.d542342e8ec41a615bc3a207a7d4cd328ad87d7b.grknight@gentoo \
    --to=grknight@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox