dev-db/mysql++: Fix build for Bug 629492 and general build cleanup
authorBrian Evans <grknight@gentoo.org>
Fri, 1 Sep 2017 13:45:16 +0000 (09:45 -0400)
committerBrian Evans <grknight@gentoo.org>
Fri, 1 Sep 2017 13:45:16 +0000 (09:45 -0400)
Installed files are unchanged

Package-Manager: Portage-2.3.8, Repoman-2.3.3

dev-db/mysql++/files/mysql++-3.2.3-mariadb-10.2.patch [new file with mode: 0644]
dev-db/mysql++/mysql++-3.2.3.ebuild

diff --git a/dev-db/mysql++/files/mysql++-3.2.3-mariadb-10.2.patch b/dev-db/mysql++/files/mysql++-3.2.3-mariadb-10.2.patch
new file mode 100644 (file)
index 0000000..f461daa
--- /dev/null
@@ -0,0 +1,31 @@
+diff -Naur mysql++-3.2.2-ORIG/lib/dbdriver.cpp mysql++-3.2.2/lib/dbdriver.cpp
+--- mysql++-3.2.2-ORIG/lib/dbdriver.cpp        2017-07-14 14:56:06.206629443 +0200
++++ mysql++-3.2.2/lib/dbdriver.cpp     2017-07-14 15:28:34.690826959 +0200
+@@ -257,7 +257,11 @@
+       }
+       
+       if ((n == 1) &&
++#ifdef CLIENT_LONG_PASSWORD
+                       (o >= CLIENT_LONG_PASSWORD) &&
++#else
++                      (o >= CLIENT_MYSQL) &&
++#endif
+ #if MYSQL_VERSION_ID > 40000  // highest flag value varies by version
+                       (o <= CLIENT_MULTI_RESULTS)
+ #else
+diff -aurN a/lib/common.h b/lib/common.h
+--- a/lib/common.h     2016-12-30 18:44:44.000000000 -0500
++++ b/lib/common.h     2017-09-01 09:12:12.270089396 -0400
+@@ -130,12 +130,6 @@
+       #define MYSQLPP_PATH_SEPARATOR '/'
+ #endif
+ 
+-#if defined(MYSQLPP_MYSQL_HEADERS_BURIED)
+-#     include <mysql/mysql_version.h>
+-#else
+-#     include <mysql_version.h>
+-#endif
+-
+ namespace mysqlpp {
+ 
+ /// \brief Alias for 'true', to make code requesting exceptions more
index 01ad02be6ce0ea801e22ecd8b6ad1de6c163ceba..7491c26b1fbc41221c088c2841cfccdee2f23368 100644 (file)
@@ -3,7 +3,7 @@
 
 EAPI=6
 
-inherit eutils
+inherit autotools libtool flag-o-matic
 
 DESCRIPTION="C++ API interface to the MySQL database"
 HOMEPAGE="http://tangentsoft.net/mysql++/"
@@ -19,16 +19,28 @@ DEPEND="${RDEPEND}"
 DOCS=( CREDITS.txt HACKERS.txt Wishlist doc/ssqls-pretty )
 
 src_prepare() {
+       # Bug filed upstream about deprecated std::auto_ptr
+       append-cxxflags $(test-flags-CXX -Wno-deprecated-declarations)
+       # Bad symlink for libtool in the archive
+       rm "${S}/ltmain.sh" || die
        eapply "${FILESDIR}/${PN}-3.2.1-gold.patch"
+       eapply "${FILESDIR}/${PN}-3.2.3-mariadb-10.2.patch"
        eapply_user
+       _elibtoolize --auto-ltdl --install --copy --force
+       elibtoolize
        # Current MySQL libraries are always with threads and slowly being removed
        sed -i -e "s/mysqlclient_r/mysqlclient/" "${S}/configure" || die
        rm "${S}/doc/"README-*-RPM.txt || die
 }
 
 src_configure() {
-       local myconf="--enable-thread-check --with-mysql=${EPREFIX}/usr"
-       econf ${myconf}
+       local myconf=(
+               --enable-thread-check
+               --with-mysql="${EPREFIX}/usr"
+               --with-mysql-lib="${EPREFIX}$(mysql_config --variable=pkglibdir)"
+               --with-mysql-include="${EPREFIX}$(mysql_config --variable=pkgincludedir)"
+       )
+       econf "${myconf[@]}"
 }
 
 src_install() {