forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mysql-connector-c-6.1.5.ebuild
63 lines (52 loc) · 1.41 KB
/
mysql-connector-c-6.1.5.ebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit cmake-multilib eutils
MULTILIB_WRAPPED_HEADERS+=(
/usr/include/mysql/my_config.h
)
DESCRIPTION="C client library for MariaDB/MySQL"
HOMEPAGE="https://dev.mysql.com/downloads/connector/c/"
LICENSE="GPL-2"
SRC_URI="mirror://mysql/Downloads/Connector-C/${P}-src.tar.gz"
S="${WORKDIR}/${P}-src"
KEYWORDS="~amd64 ~x86"
SLOT="0/18"
IUSE="+ssl static-libs"
CDEPEND="
sys-libs/zlib:=[${MULTILIB_USEDEP}]
ssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
"
RDEPEND="${CDEPEND}
!dev-db/mysql[client-libs(+)]
!dev-db/mysql-cluster[client-libs(+)]
!dev-db/mariadb[client-libs(+)]
!dev-db/mariadb-connector-c[mysqlcompat]
!dev-db/mariadb-galera[client-libs(+)]
!dev-db/percona-server[client-libs(+)]
"
DEPEND="${CDEPEND}"
DOCS=( README Docs/ChangeLog )
src_prepare() {
epatch "${FILESDIR}/openssl-cmake-detection.patch"
epatch_user
}
multilib_src_configure() {
mycmakeargs+=(
-DINSTALL_LAYOUT=RPM
-DINSTALL_LIBDIR=$(get_libdir)
-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
-DWITH_DEFAULT_FEATURE_SET=OFF
-DENABLED_LOCAL_INFILE=ON
-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-DWITH_ZLIB=system
-DENABLE_DTRACE=OFF
-DWITH_SSL=$(usex ssl system bundled)
)
cmake-utils_src_configure
}
multilib_src_install_all() {
if ! use static-libs ; then
find "${ED}" -name "*.a" -delete || die
fi
}