Diff mysql-connector-c++-1.1.12-r1 with a mysql-connector-c++-8.0.15

/usr/portage/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.15.ebuild 2019-03-04 19:09:00.000000000 +0300
3 3

  
4 4
EAPI="7"
5 5

  
6
inherit cmake-utils flag-o-matic
6
CMAKE_MAKEFILE_GENERATOR=emake
7
inherit cmake-utils
7 8

  
8 9
DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
9 10
HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
10 11
URI_DIR="Connector-C++"
11
SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}.tar.gz"
12
SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
12 13

  
13 14
LICENSE="Artistic GPL-2"
14
SLOT="0/7"
15
KEYWORDS="amd64 arm ~arm64 ppc ppc64 sparc x86"
16
IUSE="debug examples gcov libressl static-libs"
17

  
18
DEPEND="dev-db/mysql-connector-c:=
19
	dev-libs/boost:=
15
SLOT="0"
16
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
17
IUSE="+legacy libressl"
18

  
19
RDEPEND="
20
	dev-libs/protobuf:=
21
	legacy? (
22
		dev-libs/boost:=
23
		>=dev-db/mysql-connector-c-6.1.8:=
24
	)
20 25
	!libressl? ( dev-libs/openssl:0= )
21
	libressl? ( dev-libs/libressl:0= )
22
	!<dev-db/mysql-connector-c-6.1.8"
23
RDEPEND="${DEPEND}"
26
	libressl? ( dev-libs/libressl:0= )"
27
DEPEND="${RDEPEND}"
28
S="${WORKDIR}/${P}-src"
24 29

  
25 30
PATCHES=(
26
	"${FILESDIR}/${PN}-1.1.6-fix-cmake.patch"
27
	"${FILESDIR}/${PN}-1.1.11-fix-mariadb.patch"
31
	"${FILESDIR}/${PN}-8.0.15-fix-build.patch"
28 32
)
29 33

  
30 34
src_configure() {
31
	# native lib/wrapper needs this!
32
	append-flags "-fno-strict-aliasing"
33

  
34 35
	local mycmakeargs=(
35
		-DMYSQLCPPCONN_BUILD_EXAMPLES=OFF
36
		-DMYSQLCPPCONN_ICU_ENABLE=OFF
37
		-DMYSQLCPPCONN_TRACE_ENABLE=$(usex debug ON OFF)
38
		-DMYSQLCPPCONN_GCOV_ENABLE=$(usex gcov ON OFF)
39
		-DINSTALL_DOCS="/usr/share/doc/${PF}"
40
		-DMYSQL_CXX_LINKAGE=0
41
		-DMYSQL_INCLUDE_DIR=$(mysql_config --variable=pkgincludedir)
36
		-DWITH_SSL=system
37
		-DWITH_JDBC=$(usex legacy ON OFF)
42 38
	)
43 39

  
44 40
	cmake-utils_src_configure
45 41
}
46

  
47
src_install() {
48
	cmake-utils_src_install
49

  
50
	# static lib has wrong name so we need to rename it
51
	if use static-libs; then
52
		mv "${ED%/}"/usr/$(get_libdir)/libmysqlcppconn-static.a \
53
			"${ED%/}"/usr/$(get_libdir)/libmysqlcppconn.a || die
54
	else
55
		rm -f "${ED%/}"/usr/$(get_libdir)/libmysqlcppconn-static.a
56
	fi
57

  
58
	# examples
59
	if use examples; then
60
		insinto /usr/share/doc/${PF}/examples
61
		doins "${S}"/examples/*
62
	fi
63
}
Thank you!