parent
659739fe74
commit
50f5240610
Binary file not shown.
Binary file not shown.
@ -1,3 +1,4 @@
|
||||
DIST sudo-1.9.10.tar.gz 4516568 BLAKE2B 94d97379e31b41917616a829cbece3d3fce7dd6ab9d04791b928981c14249c306508298655c19dc59a054ccf7deed4e69e65367cbfe9f6d8b5aba8895cfa6064 SHA512 65cf92b67b64413cb807da8b9602fc90b75e5b30dd1402d682ca36f276a3d6209a8a59c14e463898abc9856bc56263e5ba4bb6d44774f56a2885a9eea4a35375
|
||||
DIST sudo-1.9.6p1.tar.gz 4119888 BLAKE2B 02bdb551c46cff11ac56e64937c64e6a29ccd8e0af34ea2f6b33c223bee8f7ad958d0fc3d7ef8ef12bf5bc82565769b923ff112a3f3d6bf6999fa4f6ea55e38e SHA512 632dfe72f04ce9a7a5a7236fcd5c09ce4535e695ced49d24dd848e3a7b1bea7380df44188b9e475af4271069539b5a5816948a98fbb0649ebebaba8b4c4b7745
|
||||
DIST sudo-1.9.8p2.tar.gz 4302256 BLAKE2B ba40df539b3466bebe0d876ef4f1809867125e83983609eae0447f933fbd499b2eda88d2f6c475779654e68af9580a2998eca3c3f7953129ff73c923e1c88ad9 SHA512 899b252e8c219226f658dff3dd34c97b07d42004998b45175b4c0c4de42a6bf9f909598e99b4056fa1171e63378e203854b0f8608b0f5c1b00e9d3677818f6d3
|
||||
DIST sudo-1.9.9.tar.gz 4456969 BLAKE2B 1a661a24e9891c705ca1ff0ff0881be30888ac850d18478031379de6cfa10a581ee4b256fda7d8882e17c661bcaa03b1055ab0e525dc75a2b1feec2ca13283c8 SHA512 53064240431ae3d9409dc5cb7d72ab55d9ab5f802af4de99fadd987855461b3cca53f261d6256e3b6f35e30c7e162f4dfa3978ef6976415cf5be874fb2026614
|
||||
|
@ -0,0 +1,255 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit pam libtool tmpfiles toolchain-funcs
|
||||
|
||||
MY_P="${P/_/}"
|
||||
MY_P="${MY_P/beta/b}"
|
||||
|
||||
DESCRIPTION="Allows users or groups to run commands as other users"
|
||||
HOMEPAGE="https://www.sudo.ws/"
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
inherit mercurial
|
||||
EHG_REPO_URI="https://www.sudo.ws/repos/sudo"
|
||||
else
|
||||
uri_prefix=
|
||||
case ${P} in
|
||||
*_beta*|*_rc*) uri_prefix=beta/ ;;
|
||||
esac
|
||||
|
||||
SRC_URI="https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz
|
||||
ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz"
|
||||
if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~sparc-solaris"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Basic license is ISC-style as-is, some files are released under
|
||||
# 3-clause BSD license
|
||||
LICENSE="ISC BSD"
|
||||
SLOT="0"
|
||||
IUSE="gcrypt ldap nls offensive pam sasl +secure-path selinux +sendmail skey ssl sssd"
|
||||
|
||||
DEPEND="
|
||||
sys-libs/zlib:=
|
||||
virtual/libcrypt:=
|
||||
gcrypt? ( dev-libs/libgcrypt:= )
|
||||
ldap? (
|
||||
>=net-nds/openldap-2.1.30-r1
|
||||
sasl? (
|
||||
dev-libs/cyrus-sasl
|
||||
net-nds/openldap[sasl]
|
||||
)
|
||||
)
|
||||
pam? ( sys-libs/pam )
|
||||
sasl? ( dev-libs/cyrus-sasl )
|
||||
skey? ( >=sys-auth/skey-1.1.5-r1 )
|
||||
ssl? ( dev-libs/openssl:0= )
|
||||
sssd? ( sys-auth/sssd[sudo] )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
>=app-misc/editor-wrapper-3
|
||||
virtual/editor
|
||||
ldap? ( dev-lang/perl )
|
||||
pam? ( sys-auth/pambase )
|
||||
selinux? ( sec-policy/selinux-sudo )
|
||||
sendmail? ( virtual/mta )
|
||||
"
|
||||
BDEPEND="
|
||||
sys-devel/bison
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
REQUIRED_USE="
|
||||
?? ( pam skey )
|
||||
?? ( gcrypt ssl )
|
||||
"
|
||||
|
||||
MAKEOPTS+=" SAMPLES="
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
elibtoolize
|
||||
}
|
||||
|
||||
set_secure_path() {
|
||||
# first extract the default ROOTPATH from build env
|
||||
SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env;
|
||||
echo "${ROOTPATH}")
|
||||
case "${SECURE_PATH}" in
|
||||
*/usr/sbin*) ;;
|
||||
*) SECURE_PATH=$(unset PATH;
|
||||
. "${EPREFIX}"/etc/profile.env; echo "${PATH}")
|
||||
;;
|
||||
esac
|
||||
if [[ -z ${SECURE_PATH} ]] ; then
|
||||
ewarn " Failed to detect SECURE_PATH, please report this"
|
||||
fi
|
||||
|
||||
# then remove duplicate path entries
|
||||
cleanpath() {
|
||||
local newpath thisp IFS=:
|
||||
for thisp in $1 ; do
|
||||
if [[ :${newpath}: != *:${thisp}:* ]] ; then
|
||||
newpath+=:${thisp}
|
||||
else
|
||||
einfo " Duplicate entry ${thisp} removed..."
|
||||
fi
|
||||
done
|
||||
SECURE_PATH=${newpath#:}
|
||||
}
|
||||
cleanpath /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}}
|
||||
|
||||
# finally, strip gcc paths #136027
|
||||
rmpath() {
|
||||
local e newpath thisp IFS=:
|
||||
for thisp in ${SECURE_PATH} ; do
|
||||
for e ; do [[ ${thisp} == ${e} ]] && continue 2 ; done
|
||||
newpath+=:${thisp}
|
||||
done
|
||||
SECURE_PATH=${newpath#:}
|
||||
}
|
||||
rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*'
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local SECURE_PATH
|
||||
set_secure_path
|
||||
tc-export PKG_CONFIG #767712
|
||||
|
||||
# audit: somebody got to explain me how I can test this before I
|
||||
# enable it.. - Diego
|
||||
# plugindir: autoconf code is crappy and does not delay evaluation
|
||||
# until `make` time, so we have to use a full path here rather than
|
||||
# basing off other values.
|
||||
myeconfargs=(
|
||||
# requires some python eclass
|
||||
--disable-python
|
||||
--enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d
|
||||
--enable-zlib=system
|
||||
--with-editor="${EPREFIX}"/usr/libexec/editor
|
||||
--with-env-editor
|
||||
--with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo
|
||||
--with-rundir="${EPREFIX}"/run/sudo
|
||||
--with-vardir="${EPREFIX}"/var/db/sudo
|
||||
--without-linux-audit
|
||||
--without-opie
|
||||
$(use_enable gcrypt)
|
||||
$(use_enable nls)
|
||||
$(use_enable sasl)
|
||||
$(use_enable ssl openssl)
|
||||
$(use_with ldap)
|
||||
$(use_with ldap ldap_conf_file /etc/ldap.conf.sudo)
|
||||
$(use_with offensive insults)
|
||||
$(use_with offensive all-insults)
|
||||
$(use_with pam)
|
||||
$(use_with pam pam-login)
|
||||
$(use_with secure-path secure-path "${SECURE_PATH}")
|
||||
$(use_with selinux)
|
||||
$(use_with sendmail)
|
||||
$(use_with skey)
|
||||
$(use_with sssd)
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
if use ldap ; then
|
||||
dodoc README.LDAP.md
|
||||
|
||||
cat <<-EOF > "${T}"/ldap.conf.sudo
|
||||
# See ldap.conf(5) and README.LDAP.md for details
|
||||
# This file should only be readable by root
|
||||
|
||||
# supported directives: host, port, ssl, ldap_version
|
||||
# uri, binddn, bindpw, sudoers_base, sudoers_debug
|
||||
# tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key}
|
||||
EOF
|
||||
|
||||
if use sasl ; then
|
||||
cat <<-EOF >> "${T}"/ldap.conf.sudo
|
||||
|
||||
# SASL directives: use_sasl, sasl_mech, sasl_auth_id
|
||||
# sasl_secprops, rootuse_sasl, rootsasl_auth_id, krb5_ccname
|
||||
EOF
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${T}"/ldap.conf.sudo
|
||||
fperms 0440 /etc/ldap.conf.sudo
|
||||
|
||||
insinto /etc/openldap/schema
|
||||
newins docs/schema.OpenLDAP sudo.schema
|
||||
fi
|
||||
|
||||
if use pam; then
|
||||
pamd_mimic system-auth sudo auth account session
|
||||
pamd_mimic system-auth sudo-i auth account session
|
||||
fi
|
||||
|
||||
keepdir /var/db/sudo/lectured
|
||||
fperms 0700 /var/db/sudo/lectured
|
||||
fperms 0711 /var/db/sudo #652958
|
||||
|
||||
# Don't install into /run as that is a tmpfs most of the time
|
||||
# (bug #504854)
|
||||
rm -rf "${ED}"/run || die
|
||||
|
||||
find "${ED}" -type f -name "*.la" -delete || die #697812
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process sudo.conf
|
||||
|
||||
#652958
|
||||
local sudo_db="${EROOT}/var/db/sudo"
|
||||
if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then
|
||||
chmod 711 "${sudo_db}" || die
|
||||
fi
|
||||
|
||||
if use ldap ; then
|
||||
ewarn
|
||||
ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration."
|
||||
ewarn
|
||||
if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then
|
||||
ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly"
|
||||
ewarn "configured in /etc/nsswitch.conf."
|
||||
ewarn
|
||||
ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:"
|
||||
ewarn " sudoers: ldap files"
|
||||
ewarn
|
||||
fi
|
||||
fi
|
||||
if use prefix ; then
|
||||
ewarn
|
||||
ewarn "To use sudo, you need to change file ownership and permissions"
|
||||
ewarn "with root privileges, as follows:"
|
||||
ewarn
|
||||
ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo"
|
||||
ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so"
|
||||
ewarn " # chown root:root ${EPREFIX}/etc/sudoers"
|
||||
ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d"
|
||||
ewarn " # chown root:root ${EPREFIX}/var/db/sudo"
|
||||
ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
elog "To use the -A (askpass) option, you need to install a compatible"
|
||||
elog "password program from the following list. Starred packages will"
|
||||
elog "automatically register for the use with sudo (but will not force"
|
||||
elog "the -A option):"
|
||||
elog ""
|
||||
elog " [*] net-misc/ssh-askpass-fullscreen"
|
||||
elog " net-misc/x11-ssh-askpass"
|
||||
elog ""
|
||||
elog "You can override the choice by setting the SUDO_ASKPASS environmnent"
|
||||
elog "variable to the program you want to use."
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +1 @@
|
||||
DIST mysql-connector-odbc-8.0.22-src.tar.gz 3726015 BLAKE2B 055920446767b0c9a30a0ca4773e71d662b398a9849df1a0b7975d71a21cfb23f540d8dda5430c717569f173e63673d3e51b025bb098e51202093d33e19bc142 SHA512 c613ae60346cea2e57bade89d813fd5ac21d0712d3d751e3acbc275421da6ac7593afc3da9fb6d161ee413f60e76e670f0c84876591f331925c980d969db4e8c
|
||||
DIST mysql-connector-odbc-8.0.23-src.tar.gz 3726277 BLAKE2B 21b5e6f3f7e77d6107268800441675a230c79071e52db39093fade6e02031c12c96371d165af9459e9739e069e5b4196f0169dff54c0fa300e7a3023e8a82722 SHA512 2f66b5e1796176d638b1209b7d3381c2600a11cc88fa0dfb1f29b16a6c59386926674d5581d4843036d061af09312d58620484730bd7cdad36c0a0dcd45d49a9
|
||||
DIST mysql-connector-odbc-8.0.25-src.tar.gz 3736461 BLAKE2B 888219340ed2ea86194b2aeab04719c58f2bdfaedb4364492eab2d8cce4b7617a259ae075fada3f55f2bd475d310b5a98642a791ac1efff22a8ceda31bbdf89c SHA512 b2df4134d89600708f30866ded6d915246d36eea087a5c86c0030ba55a1a96c7ee37f023183a28e2f731851969ee802846012e4435fb86a38f7a0f09571d32ac
|
||||
DIST mysql-connector-odbc-8.0.26-src.tar.gz 3760542 BLAKE2B e0da539743335bc70a7b809759121d5186782df27c301dc9bb34a73d5584540906df72f0e2b2bfa8af47587693063286cd3eadd3b69f77398264463e69a20e35 SHA512 caed3db20fb42df5123356a973e4f8cc1b162be0ada1de881981237e9a7b39d95f3f0aa48fceeff23139c3d05fc24115bf900206db7a497f4ed734a2234eb528
|
||||
DIST mysql-connector-odbc-8.0.27-src.tar.gz 3849283 BLAKE2B 6a2500cdd706c0f8cda83dd04d3e573baa0bfbad59c931e20bb25a3f09dd78d2380079d0a20e075c3f44482d58acb6e727f4cbcf490e9d4d7817dd26f98061ee SHA512 4f907b7647425c274d3bd1c3b3ebbb83ac2360f2ee56733dabb501c17b800a26ef1117e16e5b05180ff904bfc642d25393baa861b96a79edf9d35f186a8689b2
|
||||
|
@ -1,118 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake-multilib
|
||||
|
||||
MAJOR="$(ver_cut 1-2)"
|
||||
MY_PN="mysql-connector-odbc"
|
||||
MY_P="${MY_PN}-${PV/_p/r}-src"
|
||||
|
||||
DESCRIPTION="ODBC driver for MySQL"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/connector/odbc/"
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="${MAJOR}"
|
||||
KEYWORDS="amd64 ppc x86"
|
||||
IUSE=""
|
||||
|
||||
# Broken when built dynamically against libmysqlclient.so
|
||||
RDEPEND="
|
||||
dev-db/unixODBC[${MULTILIB_USEDEP}]
|
||||
>=dev-db/mysql-connector-c-8.0:0=[static-libs,${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
# Careful!
|
||||
DRIVER_NAME="${PN}-${SLOT}"
|
||||
|
||||
# Patch document path so it doesn't install files to /usr
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${MAJOR}-cmake-doc-path.patch"
|
||||
"${FILESDIR}/${PN}-8.0.19-cxxlinkage.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
# Remove Tests
|
||||
sed -i -e "s/ADD_SUBDIRECTORY(test)//" \
|
||||
"${S}/CMakeLists.txt"
|
||||
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
mycmakeargs+=(
|
||||
-DMYSQLCLIENT_STATIC_LINKING=1
|
||||
-DMYSQL_CXX_LINKAGE=1
|
||||
-DWITH_UNIXODBC=1
|
||||
-DWITH_DOCUMENTATION_INSTALL_PATH=/usr/share/doc/${PF}
|
||||
-DLIB_SUBDIR="$(get_libdir)/${PN}-${MAJOR}"
|
||||
-DMYSQLCLIENT_NO_THREADS=ON
|
||||
-DDISABLE_GUI=ON
|
||||
# The NUMA and LIBWRAP options are not really used.
|
||||
# They are just copied from the server code
|
||||
-DWITH_NUMA=OFF
|
||||
-DWITH_LIBWRAP=OFF
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
dodir /usr/share/${PN}-${SLOT}
|
||||
for i in odbc.ini odbcinst.ini; do
|
||||
einfo "Building $i"
|
||||
sed \
|
||||
-e "s,__PN__,${DRIVER_NAME},g" \
|
||||
-e "s,__PF__,${MAJOR},g" \
|
||||
-e "s,lib/libmyodbc3.so,$(get_libdir)/${PN}-${MAJOR}/libmyodbc${SLOT:0:1}a.so,g" \
|
||||
>"${D}"/usr/share/${PN}-${SLOT}/${i} \
|
||||
<"${FILESDIR}"/${i}.m4 \
|
||||
|| die "Failed to build $i"
|
||||
done;
|
||||
mv "${D}/usr/bin/myodbc-installer" \
|
||||
"${D}/usr/bin/myodbc-installer-${MAJOR}" || die "failed to move slotted binary"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
|
||||
[ "${ROOT}" != "/" ] && \
|
||||
die 'Sorry, non-standard ROOT setting is not supported :-('
|
||||
|
||||
local msg='MySQL ODBC driver'
|
||||
local drivers=$(/usr/bin/odbcinst -q -d)
|
||||
|
||||
if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
|
||||
ebegin "Installing ${msg}"
|
||||
/usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini
|
||||
rc=$?
|
||||
eend $rc
|
||||
[ $rc -ne 0 ] && die
|
||||
else
|
||||
einfo "Skipping already installed ${msg}"
|
||||
fi
|
||||
|
||||
local sources=$(/usr/bin/odbcinst -q -s)
|
||||
msg='sample MySQL ODBC DSN'
|
||||
if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then
|
||||
ebegin "Installing ${msg}"
|
||||
/usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
|
||||
rc=$?
|
||||
eend $rc
|
||||
[ $rc -ne 0 ] && die
|
||||
else
|
||||
einfo "Skipping already installed ${msg}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "If this is a new install, please run the following command"
|
||||
elog "to configure the MySQL ODBC drivers and sources:"
|
||||
elog "emerge --config =${CATEGORY}/${PF}"
|
||||
elog "Please note that the driver name used to form the DSN now includes the SLOT."
|
||||
elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}"
|
||||
}
|
@ -1,122 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake-multilib
|
||||
|
||||
MAJOR="$(ver_cut 1-2)"
|
||||
MY_PN="mysql-connector-odbc"
|
||||
MY_P="${MY_PN}-${PV/_p/r}-src"
|
||||
|
||||
DESCRIPTION="ODBC driver for MySQL"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/connector/odbc/"
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="${MAJOR}"
|
||||
KEYWORDS="amd64 ~ppc x86"
|
||||
IUSE=""
|
||||
|
||||
# Broken when built dynamically against libmysqlclient.so
|
||||
RDEPEND="
|
||||
dev-db/unixODBC[${MULTILIB_USEDEP}]
|
||||
>=dev-db/mysql-connector-c-8.0:0=[static-libs,${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
# Careful!
|
||||
DRIVER_NAME="${PN}-${SLOT}"
|
||||
|
||||
# Patch document path so it doesn't install files to /usr
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${MAJOR}-cmake-doc-path.patch"
|
||||
"${FILESDIR}/${PN}-8.0.19-cxxlinkage.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
# Remove Tests
|
||||
sed -i -e "s/ADD_SUBDIRECTORY(test)//" \
|
||||
"${S}/CMakeLists.txt"
|
||||
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
mycmakeargs+=(
|
||||
-DMYSQLCLIENT_STATIC_LINKING=1
|
||||
-DMYSQL_CXX_LINKAGE=1
|
||||
-DWITH_UNIXODBC=1
|
||||
-DWITH_DOCUMENTATION_INSTALL_PATH=${EPREFIX}/usr/share/doc/${PF}
|
||||
-DLIB_SUBDIR="$(get_libdir)/${PN}-${MAJOR}"
|
||||
-DMYSQLCLIENT_NO_THREADS=ON
|
||||
-DDISABLE_GUI=ON
|
||||
# The NUMA and LIBWRAP options are not really used.
|
||||
# They are just copied from the server code
|
||||
-DWITH_NUMA=OFF
|
||||
-DWITH_LIBWRAP=OFF
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
dodir /usr/share/${PN}-${SLOT}
|
||||
for i in odbc.ini odbcinst.ini; do
|
||||
einfo "Building $i"
|
||||
sed \
|
||||
-e "s,__PN__,${DRIVER_NAME},g" \
|
||||
-e "s,__PF__,${MAJOR},g" \
|
||||
-e "s,lib/libmyodbc3.so,$(get_libdir)/${PN}-${MAJOR}/libmyodbc${SLOT:0:1}a.so,g" \
|
||||
>"${D}"/usr/share/${PN}-${SLOT}/${i} \
|
||||
<"${FILESDIR}"/${i}.m4 \
|
||||
|| die "Failed to build $i"
|
||||
done
|
||||
|
||||
rm -rf "${ED}/usr/$(get_libdir)/${PN}-${MAJOR}/private" \
|
||||
|| die "failed to remove bundled libs"
|
||||
|
||||
mv "${D}/usr/bin/myodbc-installer" \
|
||||
"${D}/usr/bin/myodbc-installer-${MAJOR}" || die "failed to move slotted binary"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
|
||||
[ "${ROOT}" != "/" ] && \
|
||||
die 'Sorry, non-standard ROOT setting is not supported :-('
|
||||
|
||||
local msg='MySQL ODBC driver'
|
||||
local drivers=$(/usr/bin/odbcinst -q -d)
|
||||
|
||||
if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
|
||||
ebegin "Installing ${msg}"
|
||||
/usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini
|
||||
rc=$?
|
||||
eend $rc
|
||||
[ $rc -ne 0 ] && die
|
||||
else
|
||||
einfo "Skipping already installed ${msg}"
|
||||
fi
|
||||
|
||||
local sources=$(/usr/bin/odbcinst -q -s)
|
||||
msg='sample MySQL ODBC DSN'
|
||||
if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then
|
||||
ebegin "Installing ${msg}"
|
||||
/usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
|
||||
rc=$?
|
||||
eend $rc
|
||||
[ $rc -ne 0 ] && die
|
||||
else
|
||||
einfo "Skipping already installed ${msg}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "If this is a new install, please run the following command"
|
||||
elog "to configure the MySQL ODBC drivers and sources:"
|
||||
elog "emerge --config =${CATEGORY}/${PF}"
|
||||
elog "Please note that the driver name used to form the DSN now includes the SLOT."
|
||||
elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}"
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake-multilib
|
||||
|
||||
MAJOR="$(ver_cut 1-2)"
|
||||
MY_PN="mysql-connector-odbc"
|
||||
MY_P="${MY_PN}-${PV/_p/r}-src"
|
||||
|
||||
DESCRIPTION="ODBC driver for MySQL"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/connector/odbc/"
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="${MAJOR}"
|
||||
KEYWORDS="amd64 ppc x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
dev-db/unixODBC[${MULTILIB_USEDEP}]
|
||||
>=dev-db/mysql-connector-c-8.0:0=[${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
# Careful!
|
||||
DRIVER_NAME="${PN}-${SLOT}"
|
||||
|
||||
# Patch document path so it doesn't install files to /usr
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${MAJOR}-cmake-doc-path.patch"
|
||||
"${FILESDIR}/${PN}-8.0.19-cxxlinkage.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
# Remove Tests
|
||||
sed -i -e "s/ADD_SUBDIRECTORY(test)//" \
|
||||
"${S}/CMakeLists.txt"
|
||||
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
mycmakeargs+=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
||||
-DMYSQLCLIENT_STATIC_LINKING=OFF
|
||||
-DMYSQL_CXX_LINKAGE=YES
|
||||
-DWITH_UNIXODBC=YES
|
||||
-DWITH_DOCUMENTATION_INSTALL_PATH=${EPREFIX}/usr/share/doc/${PF}
|
||||
-DLIB_SUBDIR="$(get_libdir)/${PN}-${MAJOR}"
|
||||
-DMYSQLCLIENT_NO_THREADS=ON
|
||||
-DDISABLE_GUI=ON
|
||||
# Don't build "libmysql_strings.so" and "libmysql_sys.so" which are only
|
||||
# used internally
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
# The NUMA and LIBWRAP options are not really used.
|
||||
# They are just copied from the server code
|
||||
-DWITH_NUMA=OFF
|
||||
-DWITH_LIBWRAP=OFF
|
||||
)
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
dodir /usr/share/${PN}-${SLOT}
|
||||
for i in odbc.ini odbcinst.ini; do
|
||||
einfo "Building $i"
|
||||
sed \
|
||||
-e "s,__PN__,${DRIVER_NAME},g" \
|
||||
-e "s,__PF__,${MAJOR},g" \
|
||||
-e "s,lib/libmyodbc3.so,$(get_libdir)/${PN}-${MAJOR}/libmyodbc${SLOT:0:1}a.so,g" \
|
||||
>"${D}"/usr/share/${PN}-${SLOT}/${i} \
|
||||
<"${FILESDIR}"/${i}.m4 \
|
||||
|| die "Failed to build $i"
|
||||
done
|
||||
|
||||
rm -rf "${ED}/usr/$(get_libdir)/${PN}-${MAJOR}/private" \
|
||||
|| die "failed to remove bundled libs"
|
||||
|
||||
mv "${D}/usr/bin/myodbc-installer" \
|
||||
"${D}/usr/bin/myodbc-installer-${MAJOR}" || die "failed to move slotted binary"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
|
||||
[ "${ROOT}" != "/" ] && \
|
||||
die 'Sorry, non-standard ROOT setting is not supported :-('
|
||||
|
||||
local msg='MySQL ODBC driver'
|
||||
local drivers=$(/usr/bin/odbcinst -q -d)
|
||||
|
||||
if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
|
||||
ebegin "Installing ${msg}"
|
||||
/usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini
|
||||
rc=$?
|
||||
eend $rc
|
||||
[ $rc -ne 0 ] && die
|
||||
else
|
||||
einfo "Skipping already installed ${msg}"
|
||||
fi
|
||||
|
||||
local sources=$(/usr/bin/odbcinst -q -s)
|
||||
msg='sample MySQL ODBC DSN'
|
||||
if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then
|
||||
ebegin "Installing ${msg}"
|
||||
/usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
|
||||
rc=$?
|
||||
eend $rc
|
||||
[ $rc -ne 0 ] && die
|
||||
else
|
||||
einfo "Skipping already installed ${msg}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "If this is a new install, please run the following command"
|
||||
elog "to configure the MySQL ODBC drivers and sources:"
|
||||
elog "emerge --config =${CATEGORY}/${PF}"
|
||||
elog "Please note that the driver name used to form the DSN now includes the SLOT."
|
||||
elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}"
|
||||
}
|
@ -1,131 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
CMAKE_ECLASS=cmake
|
||||
|
||||
inherit cmake-multilib
|
||||
|
||||
MAJOR="$(ver_cut 1-2)"
|
||||
MY_PN="mysql-connector-odbc"
|
||||
MY_P="${MY_PN}-${PV/_p/r}-src"
|
||||
|
||||
DESCRIPTION="ODBC driver for MySQL"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/connector/odbc/"
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="${MAJOR}"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
dev-db/unixODBC[${MULTILIB_USEDEP}]
|
||||
>=dev-db/mysql-connector-c-8.0:0=[${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
# Careful!
|
||||
DRIVER_NAME="${PN}-${SLOT}"
|
||||
|
||||
# Patch document path so it doesn't install files to /usr
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${MAJOR}-cmake-doc-path.patch"
|
||||
"${FILESDIR}/${PN}-8.0.19-cxxlinkage.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
# Remove Tests
|
||||
sed -i -e "s/ADD_SUBDIRECTORY(test)//" \
|
||||
"${S}/CMakeLists.txt"
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
mycmakeargs+=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
||||
-DMYSQLCLIENT_STATIC_LINKING=OFF
|
||||
-DMYSQL_CXX_LINKAGE=YES
|
||||
-DWITH_UNIXODBC=YES
|
||||
-DWITH_DOCUMENTATION_INSTALL_PATH=${EPREFIX}/usr/share/doc/${PF}
|
||||
-DLIB_SUBDIR="$(get_libdir)/${PN}-${MAJOR}"
|
||||
-DMYSQLCLIENT_NO_THREADS=ON
|
||||
-DDISABLE_GUI=ON
|
||||
# Don't build "libmysql_strings.so" and "libmysql_sys.so" which are only
|
||||
# used internally
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
# The NUMA and LIBWRAP options are not really used.
|
||||
# They are just copied from the server code
|
||||
-DWITH_NUMA=OFF
|
||||
-DWITH_LIBWRAP=OFF
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
dodir /usr/share/${PN}-${SLOT}
|
||||
for i in odbc.ini odbcinst.ini; do
|
||||
einfo "Building $i"
|
||||
sed \
|
||||
-e "s,__PN__,${DRIVER_NAME},g" \
|
||||
-e "s,__PF__,${MAJOR},g" \
|
||||
-e "s,lib/libmyodbc3.so,$(get_libdir)/${PN}-${MAJOR}/libmyodbc${SLOT:0:1}a.so,g" \
|
||||
>"${D}"/usr/share/${PN}-${SLOT}/${i} \
|
||||
<"${FILESDIR}"/${i}.m4 \
|
||||
|| die "Failed to build $i"
|
||||
done
|
||||
|
||||
rm -rf "${ED}/usr/$(get_libdir)/${PN}-${MAJOR}/private" \
|
||||
|| die "failed to remove bundled libs"
|
||||
|
||||
mv "${D}/usr/bin/myodbc-installer" \
|
||||
"${D}/usr/bin/myodbc-installer-${MAJOR}" || die "failed to move slotted binary"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
|
||||
[ "${ROOT}" != "/" ] && \
|
||||
die 'Sorry, non-standard ROOT setting is not supported :-('
|
||||
|
||||
local msg='MySQL ODBC driver'
|
||||
local drivers=$(/usr/bin/odbcinst -q -d)
|
||||
|
||||
if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
|
||||
ebegin "Installing ${msg}"
|
||||
/usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini
|
||||
rc=$?
|
||||
eend $rc
|
||||
[ $rc -ne 0 ] && die
|
||||
else
|
||||
einfo "Skipping already installed ${msg}"
|
||||
fi
|
||||
|
||||
local sources=$(/usr/bin/odbcinst -q -s)
|
||||
msg='sample MySQL ODBC DSN'
|
||||
if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then
|
||||
ebegin "Installing ${msg}"
|
||||
/usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
|
||||
rc=$?
|
||||
eend $rc
|
||||
[ $rc -ne 0 ] && die
|
||||
else
|
||||
einfo "Skipping already installed ${msg}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "If this is a new install, please run the following command"
|
||||
elog "to configure the MySQL ODBC drivers and sources:"
|
||||
elog "emerge --config =${CATEGORY}/${PF}"
|
||||
elog "Please note that the driver name used to form the DSN now includes the SLOT."
|
||||
elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}"
|
||||
}
|
@ -1,5 +1,2 @@
|
||||
DIST mysql-connector-c++-1.1.12.tar.gz 518615 BLAKE2B 386a4753ca3f03999a49a89507da1b1172b3db89797c38403fee4eea86e7108a5e4f91f24a17de86d585c2a3d9e5742a117fa84d9b14aad649f938a597f3dae9 SHA512 d7e132dbc2efda4a77f8ae00c24006a1ade1d0a50f22d89ece453505e6d206427ee7988df29c0d6ef8b396ad6b8d326b6d263a1d4fa08ef5db0966fb4f1479f4
|
||||
DIST mysql-connector-c++-8.0.24-src.tar.gz 3797356 BLAKE2B e509e04f6c93893948c573401188567bcbda91db0e608d53b1795593abf043117e1a525d3abe5c8396068a2ef750582cde15b64412e556e89762d08032abb602 SHA512 5507bc562e8263ee17efb9d4e2f52e471da75e73a1fc4dd1bc0a2ac1c2a593be889c4b042037cf6d3cbff854ae5cc865a8800251da475aed0f31710229af26f1
|
||||
DIST mysql-connector-c++-8.0.25-src.tar.gz 3800065 BLAKE2B 67546b2d7d9de25ccb440c22bd58ee83e6fae78710e6dfa802cb0446bf5be433c56458424f0ee81c9a899bbfd5f464712d2d0b43dceb4205b492c7b1a79f7858 SHA512 44dd7f4296d666801be55642e53cb5181d9b5c3b080306975a48eb6280e555d9b924b42b14b44dffee4c54fab3f662a7b6bb6584d9a1ed710f0026788611c525
|
||||
DIST mysql-connector-c++-8.0.26-src.tar.gz 3980027 BLAKE2B 86ce0d94db588ed86ce7b21851f866da26268f7c9059b57697cbe1f5c5d031a3eada2f55042feb7b2888b538277c773215c0d19e8a1968ff70ce363e8f95bd77 SHA512 e3a08551a4245bf886cb7e3775a256fa379bb781b523a84d30e0d0c16cae73c808a3413b08b09998eba9c0ea3ede19e505b6392ed71712a8e9a2df31f07e4c79
|
||||
DIST mysql-connector-c++-8.0.27-src.tar.gz 4004836 BLAKE2B e581c679d8d9a31d2570b9cf1968b4e793cfccbd4cafdc5a9c9d17a465c16faa1492b2da7bdc1679d97474c27b6353274a390668f77d3cb47f72598eb3a967fa SHA512 3da7109efd2d1af813931b923218de9a85afe20d23e2654eecfa5524431f5b11ebdb8421b14563300b66ab61714e284cc15407a3b28a87922c9a8c79b2804bf3
|
||||
|
@ -1,322 +0,0 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -467,7 +467,7 @@ set_target_properties(connector PROPERTIES
|
||||
|
||||
|
||||
install(TARGETS connector
|
||||
- CONFIGURATIONS Release RelWithDebInfo
|
||||
+ CONFIGURATIONS Release RelWithDebInfo Gentoo
|
||||
ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT XDevAPIDev
|
||||
RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
|
||||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
|
||||
--- a/cdk/cmake/DepFindProtobuf.cmake
|
||||
+++ b/cdk/cmake/DepFindProtobuf.cmake
|
||||
@@ -48,244 +48,7 @@ if(TARGET Protobuf::pb)
|
||||
return()
|
||||
endif()
|
||||
|
||||
-message(STATUS "Setting up Protobuf.")
|
||||
-
|
||||
-set(PB_SOURCE_DIR "${PROJECT_SOURCE_DIR}/protobuf")
|
||||
-set(PB_BINARY_DIR "${PROJECT_BINARY_DIR}/protobuf")
|
||||
-set(config_stamp "${PB_BINARY_DIR}/config.stamp")
|
||||
-set(build_stamp "${PB_BINARY_DIR}/build.stamp")
|
||||
-
|
||||
-
|
||||
-#
|
||||
-# Pick build configuration for the protobuf build. Normally we build using the
|
||||
-# same build configuration that is used for building CDK (Release/Debug/etc.).
|
||||
-# But we also support building CDK under non-standard build configuration
|
||||
-# named 'Static' (this is a dirty trick we use to simplify building our MSIs).
|
||||
-# Since protobuf does not know 'Static' build configuration, we build protobuf
|
||||
-# under 'Release' configuration in that case.
|
||||
-#
|
||||
-# We need to handle two cases. For some build systems, like Makefiles,
|
||||
-# the build configuration is specified at cmake time using CMAKE_BUILD_TYPE
|
||||
-# variable. In that case we also set it during protobuf build configuration.
|
||||
-# Another case is a multi-configuration build system like MSVC. In this case
|
||||
-# we use generator expression to pick correct configuration when the build
|
||||
-# command is invoked below.
|
||||
-#
|
||||
-
|
||||
-set(build_type)
|
||||
-if(CMAKE_BUILD_TYPE)
|
||||
- if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
|
||||
- set(set_build_type -DCMAKE_BUILD_TYPE=Release)
|
||||
- else()
|
||||
- set(set_build_type -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
-set(CONFIG_EXPR
|
||||
- $<$<CONFIG:Static>:Release>$<$<NOT:$<CONFIG:Static>>:$<CONFIG>>
|
||||
-)
|
||||
-
|
||||
-set(set_arch)
|
||||
-if(CMAKE_GENERATOR_PLATFORM)
|
||||
- set(set_arch -A ${CMAKE_GENERATOR_PLATFORM})
|
||||
-endif()
|
||||
-
|
||||
-set(set_toolset)
|
||||
-if(CMAKE_GENERATOR_TOOLSET)
|
||||
- set(set_toolset -T ${CMAKE_GENERATOR_TOOLSET})
|
||||
-endif()
|
||||
-
|
||||
-set(set_system_name)
|
||||
-if(CMAKE_SYSTEM_NAME)
|
||||
- set(set_system_name -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME})
|
||||
- if(CMAKE_SYSTEM_VERSION)
|
||||
- list(APPEND set_system_name -DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION})
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
-set(set_system_processor)
|
||||
-if(CMAKE_SYSTEM_PROCESSOR)
|
||||
- set(set_system_processor -DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR})
|
||||
-endif()
|
||||
-
|
||||
-if(NOT EXISTS "${PB_BINARY_DIR}/exports.cmake")
|
||||
-
|
||||
- message("==== Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR} ${set_arch} ${set_toolset} ${set_system_name}")
|
||||
-
|
||||
- file(REMOVE "${PB_BINARY_DIR}/CMakeCache.txt")
|
||||
- file(MAKE_DIRECTORY "${PB_BINARY_DIR}")
|
||||
-
|
||||
- # Dirty trick to speed up cmake set up time.
|
||||
- #file(
|
||||
- # COPY "${CMAKE_BINARY_DIR}/CMakeFiles/${CMAKE_VERSION}"
|
||||
- # DESTINATION "${PB_BINARY_DIR}/CMakeFiles"
|
||||
- #)
|
||||
-
|
||||
- execute_process(
|
||||
- COMMAND ${CMAKE_COMMAND}
|
||||
- -G "${CMAKE_GENERATOR}"
|
||||
- ${set_arch}
|
||||
- ${set_toolset}
|
||||
- ${set_build_type}
|
||||
- ${set_system_name}
|
||||
- ${set_system_processor}
|
||||
- -DSTATIC_MSVCRT=${STATIC_MSVCRT}
|
||||
- -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
|
||||
- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
|
||||
- -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
|
||||
- -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
|
||||
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
|
||||
- -DCMAKE_CXX_FLAGS_MINSIZEREL=${CMAKE_CXX_FLAGS_MINSIZEREL}
|
||||
- -DCMAKE_STATIC_LINKER_FLAGS=${CMAKE_STATIC_LINKER_FLAGS}
|
||||
- ${PB_SOURCE_DIR}
|
||||
- WORKING_DIRECTORY ${PB_BINARY_DIR}
|
||||
- RESULT_VARIABLE protobuf_config
|
||||
- )
|
||||
-
|
||||
- if(protobuf_config)
|
||||
- message(FATAL_ERROR "Could not configure Protobuf build: ${protobuf_config}")
|
||||
- endif()
|
||||
-
|
||||
- message("==== Protobuf build configured.")
|
||||
-
|
||||
-endif()
|
||||
-
|
||||
-
|
||||
-include(${PB_BINARY_DIR}/exports.cmake)
|
||||
-
|
||||
-#
|
||||
-# Protobuf library targets imported above (pb_protobuf
|
||||
-# and pb_protobuf-lite) are local to the directory from which
|
||||
-# they were imported. This is not good if cdk is used as
|
||||
-# a sub-project of a parent project, because the parent project
|
||||
-# must have access to these targets.
|
||||
-#
|
||||
-# For that reason below we create global protobuf/protobuf-lite targets
|
||||
-# and copy their locations from the imported targets.
|
||||
-#
|
||||
-# Note: we can't use ALIAS library because it does not work with imported
|
||||
-# targets
|
||||
-#
|
||||
-
|
||||
-add_library(Protobuf::pb-full STATIC IMPORTED GLOBAL)
|
||||
-add_library(Protobuf::pb-lite STATIC IMPORTED GLOBAL)
|
||||
-add_executable(Protobuf::protoc IMPORTED GLOBAL)
|
||||
-
|
||||
-set(TGT_protobuf Protobuf::pb-full)
|
||||
-set(TGT_protobuf-lite Protobuf::pb-lite)
|
||||
-set(TGT_protoc Protobuf::protoc)
|
||||
-
|
||||
-foreach(tgt protobuf protobuf-lite protoc)
|
||||
-
|
||||
- #message("processing: ${tgt}")
|
||||
-
|
||||
- set(loc_list)
|
||||
-
|
||||
- foreach(CONF NOCONFIG DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
|
||||
-
|
||||
- #message("- CONF: ${CONF}")
|
||||
-
|
||||
- get_target_property(LOC pb_${tgt} IMPORTED_LOCATION_${CONF})
|
||||
-
|
||||
- if(LOC)
|
||||
-
|
||||
- #message("- setting imported location to: ${LOC}")
|
||||
- list(APPEND loc_list "${LOC}")
|
||||
-
|
||||
- set_target_properties(${TGT_${tgt}} PROPERTIES
|
||||
- IMPORTED_LOCATION_${CONF} "${LOC}"
|
||||
- )
|
||||
-
|
||||
- set_property(TARGET ${TGT_${tgt}} APPEND PROPERTY
|
||||
- IMPORTED_CONFIGURATIONS ${CONF}
|
||||
- )
|
||||
-
|
||||
- endif()
|
||||
-
|
||||
- endforeach(CONF)
|
||||
-
|
||||
- #
|
||||
- # To support 'Static' build configuration the targets imported from the
|
||||
- # Protobuf project need to have IMPORTED_LOCATION_STATIC defined. We use
|
||||
- # 'Release' locations as Protobuf is built using 'Release' configuration in
|
||||
- # that case.
|
||||
- #
|
||||
-
|
||||
- get_target_property(LOC ${TGT_${tgt}} IMPORTED_LOCATION_RELEASE)
|
||||
- set_property(TARGET ${TGT_${tgt}} PROPERTY IMPORTED_LOCATION_STATIC ${LOC})
|
||||
-
|
||||
-endforeach(tgt)
|
||||
-
|
||||
-
|
||||
-#message("Protobuf include path: ${PROTOBUF_INCLUDE_DIR}")
|
||||
-set(PROTOBUF_INCLUDE_DIR ${PROTOBUF_INCLUDE_DIR} CACHE INTERNAL "")
|
||||
-
|
||||
-set_target_properties(Protobuf::pb-lite PROPERTIES
|
||||
- INTERFACE_INCLUDE_DIRECTORIES "${PROTOBUF_INCLUDE_DIR}"
|
||||
-)
|
||||
-
|
||||
-set_target_properties(Protobuf::pb-full PROPERTIES
|
||||
- INTERFACE_LINK_LIBRARIES Protobuf::pb-lite
|
||||
-)
|
||||
-
|
||||
-# On UNIX Protobuf uses pthread library
|
||||
-if(UNIX)
|
||||
- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
|
||||
- INTERFACE_LINK_LIBRARIES pthread
|
||||
- )
|
||||
-endif()
|
||||
-
|
||||
-#
|
||||
-# Note: This is needed to correctly compile headers generated by protobuf
|
||||
-# with sunpro compiler.
|
||||
-#
|
||||
-
|
||||
-if(SUNPRO)
|
||||
- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
|
||||
- INTERFACE_COMPILE_DEFINITIONS SOLARIS_64BIT_ENABLED
|
||||
- )
|
||||
-endif()
|
||||
-
|
||||
-#
|
||||
-# Try using parallel builds for protobuf.
|
||||
-#
|
||||
-
|
||||
-include(ProcessorCount)
|
||||
-ProcessorCount(N)
|
||||
-
|
||||
-MESSAGE("Processor Count: ${N}")
|
||||
-
|
||||
-set(opt_build)
|
||||
-set(opt_tool)
|
||||
-if(NOT N EQUAL 0)
|
||||
- if(NOT CMAKE_VERSION VERSION_LESS 3.12)
|
||||
- set(opt_build --parallel ${N})
|
||||
- elseif(CMAKE_MAKE_PROGRAM MATCHES "make")
|
||||
- set(opt_tool -j${N})
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
-add_custom_command(OUTPUT "${build_stamp}"
|
||||
- COMMAND ${CMAKE_COMMAND} --build . ${opt_build} --config ${CONFIG_EXPR} -- ${opt_tool}
|
||||
- COMMAND ${CMAKE_COMMAND} -E touch "${build_stamp}"
|
||||
- WORKING_DIRECTORY "${PB_BINARY_DIR}"
|
||||
- COMMENT "Building protobuf"
|
||||
-)
|
||||
-
|
||||
-add_custom_target(build_protobuf
|
||||
- SOURCES "${build_stamp}"
|
||||
-)
|
||||
-
|
||||
-set_target_properties(build_protobuf PROPERTIES FOLDER "Misc")
|
||||
-
|
||||
-add_dependencies(Protobuf::pb-full build_protobuf)
|
||||
-add_dependencies(Protobuf::pb-lite build_protobuf)
|
||||
-add_dependencies(Protobuf::protoc build_protobuf)
|
||||
-
|
||||
-# TODO: Handle lite/full version
|
||||
-
|
||||
-
|
||||
+find_package(Protobuf REQUIRED)
|
||||
|
||||
# Standard PROTOBUF_GENERATE_CPP modified to our usage
|
||||
|
||||
@@ -314,11 +77,11 @@ function(mysqlx_protobuf_generate_cpp SRCS HDRS)
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/protobuf/${FIL_WE}.pb.h"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E make_directory "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
|
||||
- COMMAND Protobuf::protoc
|
||||
+ COMMAND ${Protobuf_PROTOC_EXECUTABLE}
|
||||
ARGS --cpp_out "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
|
||||
-I ${ABS_PATH} ${ABS_FIL}
|
||||
- --proto_path=${PROJECT_SOURCE_DIR}/protobuf/protobuf-3.6.1/src
|
||||
- DEPENDS ${ABS_FIL} #${PROTOBUF_PROTOC_EXECUTABLE}
|
||||
+ --proto_path=${Protobuf_INCLUDE_DIR}
|
||||
+ DEPENDS ${ABS_FIL} #${Protobuf_PROTOC_EXECUTABLE}
|
||||
COMMENT "Running C++ protocol buffer compiler on ${FIL}"
|
||||
VERBATIM
|
||||
)
|
||||
--- a/cdk/core/CMakeLists.txt
|
||||
+++ b/cdk/core/CMakeLists.txt
|
||||
@@ -45,7 +45,7 @@ add_library(cdk STATIC ${cdk_sources} ${HEADERS})
|
||||
|
||||
target_link_libraries(cdk
|
||||
PUBLIC cdk_mysqlx cdk_parser
|
||||
- PRIVATE Protobuf::pb-lite # required by codecc.cc
|
||||
+ PRIVATE protobuf # required by codecc.cc
|
||||
)
|
||||
|
||||
add_coverage(cdk)
|
||||
--- a/cdk/protocol/mysqlx/CMakeLists.txt
|
||||
+++ b/cdk/protocol/mysqlx/CMakeLists.txt
|
||||
@@ -127,11 +127,7 @@ target_include_directories(cdk_proto_mysqlx PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
-if(use_full_protobuf)
|
||||
- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-full)
|
||||
-else()
|
||||
- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-lite)
|
||||
-endif()
|
||||
+target_link_libraries(cdk_proto_mysqlx PRIVATE protobuf)
|
||||
|
||||
target_link_libraries(cdk_proto_mysqlx PRIVATE cdk_foundation zlib lz4 zstd)
|
||||
|
||||
--- a/jdbc.cmake
|
||||
+++ b/jdbc.cmake
|
||||
@@ -66,7 +66,7 @@ if(MYSQL_CONFIG_EXECUTABLE)
|
||||
list(APPEND jdbc_cmake_opts -DMYSQL_CONFIG_EXECUTABLE=${MYSQL_CONFIG_EXECUTABLE})
|
||||
endif()
|
||||
|
||||
-list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=ON)
|
||||
+list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=OFF)
|
||||
|
||||
if(CMAKE_BUILD_TYPE)
|
||||
if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
|
||||
--- a/jdbc/CMakeLists.txt
|
||||
+++ b/jdbc/CMakeLists.txt
|
||||
@@ -299,7 +299,7 @@ endif()
|
||||
|
||||
|
||||
install(TARGETS connector-jdbc
|
||||
- CONFIGURATIONS Release RelWithDebInfo
|
||||
+ CONFIGURATIONS Release RelWithDebInfo Gentoo
|
||||
ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT JDBCDev
|
||||
RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
|
||||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
|
@ -1,13 +0,0 @@
|
||||
https://bugs.gentoo.org/786252
|
||||
|
||||
--- a/include/mysqlx/common/util.h
|
||||
+++ b/include/mysqlx/common/util.h
|
||||
@@ -112,6 +112,7 @@ PUSH_SYS_WARNINGS
|
||||
#include <ostream>
|
||||
#include <memory>
|
||||
#include <forward_list>
|
||||
+#include <limits> // std::numeric_limits
|
||||
#include <string.h> // for memcpy
|
||||
#include <utility> // std::move etc
|
||||
#include <algorithm>
|
||||
|
@ -1,274 +0,0 @@
|
||||
From 774d7bd983a2e12e78a0231c7936a9481bb3df1d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Lu=C3=ADs=20Silva?= <luis.m.silva@oracle.com>
|
||||
Date: Thu, 13 May 2021 23:14:57 +0100
|
||||
Subject: [PATCH] Bug #32882344: FIX MYSQLCLIENT_STATIC_BINDING=0 BUILD
|
||||
|
||||
---
|
||||
driver/nativeapi/libmysql_dynamic_proxy.cpp | 13 ++
|
||||
driver/nativeapi/libmysql_dynamic_proxy.h | 132 ++++++++++----------
|
||||
driver/nativeapi/mysql_client_api.h | 2 +
|
||||
3 files changed, 83 insertions(+), 64 deletions(-)
|
||||
|
||||
diff --git a/driver/nativeapi/libmysql_dynamic_proxy.cpp b/driver/nativeapi/libmysql_dynamic_proxy.cpp
|
||||
index 4c70074e..9bd4bd99 100644
|
||||
--- a/jdbc/driver/nativeapi/libmysql_dynamic_proxy.cpp
|
||||
+++ b/jdbc/driver/nativeapi/libmysql_dynamic_proxy.cpp
|
||||
@@ -512,6 +512,19 @@ LibmysqlDynamicProxy::real_connect_dns_srv(MYSQL * mysql,
|
||||
/* }}} */
|
||||
|
||||
|
||||
+/* {{{ LibmysqlDynamicProxy::bind_param() */
|
||||
+bool
|
||||
+LibmysqlDynamicProxy::bind_param(MYSQL *mysql, unsigned n_params,
|
||||
+ MYSQL_BIND *binds, const char **names)
|
||||
+{
|
||||
+ ptr2mysql_bind_param ptr2_bind_param=
|
||||
+ symbol_safe_cast<ptr2mysql_bind_param>(GetProcAddr("mysql_bind_param"));
|
||||
+
|
||||
+ return (*ptr2_bind_param)(mysql, n_params, binds, names);
|
||||
+}
|
||||
+/* }}} */
|
||||
+
|
||||
+
|
||||
/* {{{ LibmysqlDynamicProxy::real_escape_string() */
|
||||
unsigned long
|
||||
LibmysqlDynamicProxy::real_escape_string(MYSQL * mysql, char * to, const char * from, unsigned long length)
|
||||
diff --git a/driver/nativeapi/libmysql_dynamic_proxy.h b/driver/nativeapi/libmysql_dynamic_proxy.h
|
||||
index 93dc9700..e0f00c95 100644
|
||||
--- a/jdbc/driver/nativeapi/libmysql_dynamic_proxy.h
|
||||
+++ b/jdbc/driver/nativeapi/libmysql_dynamic_proxy.h
|
||||
@@ -65,67 +65,67 @@ public:
|
||||
|
||||
// MySQL C-API calls wrappers
|
||||
|
||||
- my_ulonglong affected_rows(MYSQL *);
|
||||
+ my_ulonglong affected_rows(MYSQL *) override;
|
||||
|
||||
- my_bool autocommit(MYSQL * , my_bool);
|
||||
+ my_bool autocommit(MYSQL * , my_bool) override;
|
||||
|
||||
- void close (MYSQL *mysql);
|
||||
+ void close (MYSQL *mysql) override;
|
||||
|
||||
- my_bool commit(MYSQL *mysql);
|
||||
+ my_bool commit(MYSQL *mysql) override;
|
||||
|
||||
- void data_seek(MYSQL_RES *, my_ulonglong);
|
||||
+ void data_seek(MYSQL_RES *, my_ulonglong) override;
|
||||
|
||||
- void debug(const char *);
|
||||
+ void debug(const char *) override;
|
||||
|
||||
- unsigned int mysql_errno(MYSQL *);
|
||||
+ unsigned int mysql_errno(MYSQL *) override;
|
||||
|
||||
- const char * error(MYSQL *);
|
||||
+ const char * error(MYSQL *) override;
|
||||
|
||||
- MYSQL_FIELD * fetch_field(MYSQL_RES *);
|
||||
+ MYSQL_FIELD * fetch_field(MYSQL_RES *) override;
|
||||
|
||||
- MYSQL_FIELD * fetch_field_direct(MYSQL_RES *, unsigned int);
|
||||
+ MYSQL_FIELD * fetch_field_direct(MYSQL_RES *, unsigned int) override;
|
||||
|
||||
- unsigned long * fetch_lengths(MYSQL_RES *);
|
||||
+ unsigned long * fetch_lengths(MYSQL_RES *) override;
|
||||
|
||||
- MYSQL_ROW fetch_row(MYSQL_RES *);
|
||||
+ MYSQL_ROW fetch_row(MYSQL_RES *) override;
|
||||
|
||||
- unsigned int field_count(MYSQL *);
|
||||
+ unsigned int field_count(MYSQL *) override;
|
||||
|
||||
- void free_result(MYSQL_RES *);
|
||||
+ void free_result(MYSQL_RES *) override;
|
||||
|
||||
- unsigned long get_client_version();
|
||||
+ unsigned long get_client_version() override;
|
||||
|
||||
- const char * get_server_info(MYSQL *);
|
||||
+ const char * get_server_info(MYSQL *) override;
|
||||
|
||||
- unsigned long get_server_version(MYSQL *);
|
||||
+ unsigned long get_server_version(MYSQL *) override;
|
||||
|
||||
- void get_character_set_info(MYSQL *, void *);
|
||||
+ void get_character_set_info(MYSQL *, void *) override;
|
||||
|
||||
- const char * info(MYSQL *);
|
||||
+ const char * info(MYSQL *) override;
|
||||
|
||||
- MYSQL * init(MYSQL *mysql);
|
||||
+ MYSQL * init(MYSQL *mysql) override;
|
||||
|
||||
- int library_init(int, char **, char **);
|
||||
+ int library_init(int, char **, char **) override;
|
||||
|
||||
- void library_end();
|
||||
+ void library_end() override;
|
||||
|
||||
- my_bool more_results(MYSQL *);
|
||||
+ my_bool more_results(MYSQL *) override;
|
||||
|
||||
- int next_result(MYSQL *);
|
||||
+ int next_result(MYSQL *) override;
|
||||
|
||||
- unsigned int num_fields(MYSQL_RES *);
|
||||
+ unsigned int num_fields(MYSQL_RES *) override;
|
||||
|
||||
- my_ulonglong num_rows(MYSQL_RES *);
|
||||
+ my_ulonglong num_rows(MYSQL_RES *) override;
|
||||
|
||||
- int options (MYSQL *, enum mysql_option, const void *);
|
||||
+ int options (MYSQL *, enum mysql_option, const void *) override;
|
||||
|
||||
- int options (MYSQL *, enum mysql_option, const void *, const void *);
|
||||
+ int options (MYSQL *, enum mysql_option, const void *, const void *) override;
|
||||
|
||||
- int get_option (MYSQL *, enum mysql_option, const void *);
|
||||
+ int get_option (MYSQL *, enum mysql_option, const void *) override;
|
||||
|
||||
- int ping(MYSQL *);
|
||||
+ int ping(MYSQL *) override;
|
||||
|
||||
- int query(MYSQL *, const char *);
|
||||
+ int query(MYSQL *, const char *) override;
|
||||
|
||||
MYSQL * real_connect(MYSQL * mysql, const char * host,
|
||||
const char * user,
|
||||
@@ -133,82 +133,86 @@ public:
|
||||
const char * db,
|
||||
unsigned int port,
|
||||
const char * unix_socket,
|
||||
- unsigned long client_flag);
|
||||
+ unsigned long client_flag) override;
|
||||
|
||||
MYSQL * real_connect_dns_srv(MYSQL * mysql,
|
||||
const char * host,
|
||||
const char * user,
|
||||
const char * passwd,
|
||||
const char * db,
|
||||
- unsigned long client_flag);
|
||||
+ unsigned long client_flag) override;
|
||||
|
||||
- unsigned long real_escape_string(MYSQL * mysql, char * to, const char * from, unsigned long length);
|
||||
+ bool bind_param(MYSQL *mysql, unsigned n_params,
|
||||
+ MYSQL_BIND *binds, const char **names) override;
|
||||
|
||||
- int real_query(MYSQL *, const char *, unsigned long);
|
||||
|
||||
- my_bool rollback(MYSQL *);
|
||||
+ unsigned long real_escape_string(MYSQL * mysql, char * to, const char * from, unsigned long length) override;
|
||||
|
||||
- const char * sqlstate(MYSQL *);
|
||||
+ int real_query(MYSQL *, const char *, unsigned long) override;
|
||||
+
|
||||
+ my_bool rollback(MYSQL *) override;
|
||||
+
|
||||
+ const char * sqlstate(MYSQL *) override;
|
||||
|
||||
my_bool ssl_set(MYSQL * mysql,
|
||||
const char * key,
|
||||
const char * cert,
|
||||
const char * ca,
|
||||
const char * capath,
|
||||
- const char * cipher);
|
||||
+ const char * cipher) override;
|
||||
|
||||
- MYSQL_RES * store_result(MYSQL *);
|
||||
+ MYSQL_RES * store_result(MYSQL *) override;
|
||||
|
||||
- MYSQL_RES * use_result(MYSQL *);
|
||||
+ MYSQL_RES * use_result(MYSQL *) override;
|
||||
|
||||
- unsigned int warning_count(MYSQL *);
|
||||
+ unsigned int warning_count(MYSQL *) override;
|
||||
|
||||
/* Prepared Statement stmt_* functions */
|
||||
- my_ulonglong stmt_affected_rows (MYSQL_STMT *);
|
||||
+ my_ulonglong stmt_affected_rows (MYSQL_STMT *) override;
|
||||
|
||||
- my_bool stmt_attr_set(MYSQL_STMT *, enum enum_stmt_attr_type, const void *);
|
||||
+ my_bool stmt_attr_set(MYSQL_STMT *, enum enum_stmt_attr_type, const void *) override;
|
||||
|
||||
- my_bool stmt_bind_param(MYSQL_STMT *, MYSQL_BIND *);
|
||||
+ my_bool stmt_bind_param(MYSQL_STMT *, MYSQL_BIND *) override;
|
||||
|
||||
- my_bool stmt_bind_result(MYSQL_STMT *, MYSQL_BIND *);
|
||||
+ my_bool stmt_bind_result(MYSQL_STMT *, MYSQL_BIND *) override;
|
||||
|
||||
- my_bool stmt_close(MYSQL_STMT *);
|
||||
+ my_bool stmt_close(MYSQL_STMT *) override;
|
||||
|
||||
- void stmt_data_seek(MYSQL_STMT *, my_ulonglong);
|
||||
+ void stmt_data_seek(MYSQL_STMT *, my_ulonglong) override;
|
||||
|
||||
- unsigned int stmt_errno(MYSQL_STMT *);
|
||||
+ unsigned int stmt_errno(MYSQL_STMT *) override;
|
||||
|
||||
- const char * stmt_error(MYSQL_STMT *);
|
||||
+ const char * stmt_error(MYSQL_STMT *) override;
|
||||
|
||||
- int stmt_execute(MYSQL_STMT *);
|
||||
+ int stmt_execute(MYSQL_STMT *) override;
|
||||
|
||||
- int stmt_fetch(MYSQL_STMT *);
|
||||
+ int stmt_fetch(MYSQL_STMT *) override;
|
||||
|
||||
- unsigned int stmt_field_count(MYSQL_STMT *);
|
||||
+ unsigned int stmt_field_count(MYSQL_STMT *) override;
|
||||
|
||||
- MYSQL_STMT * stmt_init(MYSQL *);
|
||||
+ MYSQL_STMT * stmt_init(MYSQL *) override;
|
||||
|
||||
- my_ulonglong stmt_num_rows(MYSQL_STMT *);
|
||||
+ my_ulonglong stmt_num_rows(MYSQL_STMT *) override;
|
||||
|
||||
- unsigned long stmt_param_count(MYSQL_STMT *);
|
||||
+ unsigned long stmt_param_count(MYSQL_STMT *) override;
|
||||
|
||||
- int stmt_prepare(MYSQL_STMT *, const char *, unsigned long);
|
||||
+ int stmt_prepare(MYSQL_STMT *, const char *, unsigned long) override;
|
||||
|
||||
- MYSQL_RES * stmt_result_metadata(MYSQL_STMT *);
|
||||
+ MYSQL_RES * stmt_result_metadata(MYSQL_STMT *) override;
|
||||
|
||||
- my_bool stmt_send_long_data (MYSQL_STMT * , unsigned int, const char *, unsigned long);
|
||||
+ my_bool stmt_send_long_data (MYSQL_STMT * , unsigned int, const char *, unsigned long) override;
|
||||
|
||||
- const char * stmt_sqlstate(MYSQL_STMT *);
|
||||
+ const char * stmt_sqlstate(MYSQL_STMT *) override;
|
||||
|
||||
- int stmt_store_result(MYSQL_STMT *);
|
||||
+ int stmt_store_result(MYSQL_STMT *) override;
|
||||
|
||||
- int stmt_next_result(MYSQL_STMT *);
|
||||
+ int stmt_next_result(MYSQL_STMT *) override;
|
||||
|
||||
- bool stmt_free_result(MYSQL_STMT *);
|
||||
+ bool stmt_free_result(MYSQL_STMT *) override;
|
||||
|
||||
- void thread_init();
|
||||
+ void thread_init() override;
|
||||
|
||||
- void thread_end();
|
||||
+ void thread_end() override;
|
||||
};
|
||||
|
||||
} /* namespace NativeAPI */
|
||||
diff --git a/driver/nativeapi/mysql_client_api.h b/driver/nativeapi/mysql_client_api.h
|
||||
index b738cf9a..fa044c93 100644
|
||||
--- a/jdbc/driver/nativeapi/mysql_client_api.h
|
||||
+++ b/jdbc/driver/nativeapi/mysql_client_api.h
|
||||
@@ -111,6 +111,8 @@ typedef MYSQL * (STDCALL *ptr2mysql_real_connect)(MYSQL *, const char *, const c
|
||||
|
||||
typedef MYSQL * (STDCALL *ptr2mysql_real_connect_dns_srv)(MYSQL *, const char *, const char *, const char * , const char *, unsigned long);
|
||||
|
||||
+typedef bool (STDCALL *ptr2mysql_bind_param)(MYSQL *mysql, unsigned n_params, MYSQL_BIND *binds, const char **names);
|
||||
+
|
||||
typedef unsigned long (STDCALL *ptr2mysql_real_escape_string)(MYSQL * mysql, char *, const char *, unsigned long);
|
||||
|
||||
typedef int (STDCALL *ptr2mysql_real_query)(MYSQL *, const char *, unsigned long);
|
||||
--
|
||||
2.30.2
|
||||
|
@ -1,321 +0,0 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -467,7 +467,7 @@ set_target_properties(connector PROPERTIES
|
||||
|
||||
|
||||
install(TARGETS connector
|
||||
- CONFIGURATIONS Release RelWithDebInfo
|
||||
+ CONFIGURATIONS Release RelWithDebInfo Gentoo
|
||||
ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT XDevAPIDev
|
||||
RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
|
||||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
|
||||
--- a/cdk/cmake/DepFindProtobuf.cmake
|
||||
+++ b/cdk/cmake/DepFindProtobuf.cmake
|
||||
@@ -48,244 +48,7 @@ if(TARGET Protobuf::pb)
|
||||
return()
|
||||
endif()
|
||||
|
||||
-message(STATUS "Setting up Protobuf.")
|
||||
-
|
||||
-set(PB_SOURCE_DIR "${PROJECT_SOURCE_DIR}/protobuf")
|
||||
-set(PB_BINARY_DIR "${PROJECT_BINARY_DIR}/protobuf")
|
||||
-set(config_stamp "${PB_BINARY_DIR}/config.stamp")
|
||||
-set(build_stamp "${PB_BINARY_DIR}/build.stamp")
|
||||
-
|
||||
-
|
||||
-#
|
||||
-# Pick build configuration for the protobuf build. Normally we build using the
|
||||
-# same build configuration that is used for building CDK (Release/Debug/etc.).
|
||||
-# But we also support building CDK under non-standard build configuration
|
||||
-# named 'Static' (this is a dirty trick we use to simplify building our MSIs).
|
||||
-# Since protobuf does not know 'Static' build configuration, we build protobuf
|
||||
-# under 'Release' configuration in that case.
|
||||
-#
|
||||
-# We need to handle two cases. For some build systems, like Makefiles,
|
||||
-# the build configuration is specified at cmake time using CMAKE_BUILD_TYPE
|
||||
-# variable. In that case we also set it during protobuf build configuration.
|
||||
-# Another case is a multi-configuration build system like MSVC. In this case
|
||||
-# we use generator expression to pick correct configuration when the build
|
||||
-# command is invoked below.
|
||||
-#
|
||||
-
|
||||
-set(build_type)
|
||||
-if(CMAKE_BUILD_TYPE)
|
||||
- if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
|
||||
- set(set_build_type -DCMAKE_BUILD_TYPE=Release)
|
||||
- else()
|
||||
- set(set_build_type -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
-set(CONFIG_EXPR
|
||||
- $<$<CONFIG:Static>:Release>$<$<NOT:$<CONFIG:Static>>:$<CONFIG>>
|
||||
-)
|
||||
-
|
||||
-set(set_arch)
|
||||
-if(CMAKE_GENERATOR_PLATFORM)
|
||||
- set(set_arch -A ${CMAKE_GENERATOR_PLATFORM})
|
||||
-endif()
|
||||
-
|
||||
-set(set_toolset)
|
||||
-if(CMAKE_GENERATOR_TOOLSET)
|
||||
- set(set_toolset -T ${CMAKE_GENERATOR_TOOLSET})
|
||||
-endif()
|
||||
-
|
||||
-set(set_system_name)
|
||||
-if(CMAKE_SYSTEM_NAME)
|
||||
- set(set_system_name -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME})
|
||||
- if(CMAKE_SYSTEM_VERSION)
|
||||
- list(APPEND set_system_name -DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION})
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
-set(set_system_processor)
|
||||
-if(CMAKE_SYSTEM_PROCESSOR)
|
||||
- set(set_system_processor -DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR})
|
||||
-endif()
|
||||
-
|
||||
-if(NOT EXISTS "${PB_BINARY_DIR}/exports.cmake")
|
||||
-
|
||||
- message("==== Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR} ${set_arch} ${set_toolset} ${set_system_name}")
|
||||
-
|
||||
- file(REMOVE "${PB_BINARY_DIR}/CMakeCache.txt")
|
||||
- file(MAKE_DIRECTORY "${PB_BINARY_DIR}")
|
||||
-
|
||||
- # Dirty trick to speed up cmake set up time.
|
||||
- #file(
|
||||
- # COPY "${CMAKE_BINARY_DIR}/CMakeFiles/${CMAKE_VERSION}"
|
||||
- # DESTINATION "${PB_BINARY_DIR}/CMakeFiles"
|
||||
- #)
|
||||
-
|
||||
- execute_process(
|
||||
- COMMAND ${CMAKE_COMMAND}
|
||||
- -G "${CMAKE_GENERATOR}"
|
||||
- ${set_arch}
|
||||
- ${set_toolset}
|
||||
- ${set_build_type}
|
||||
- ${set_system_name}
|
||||
- ${set_system_processor}
|
||||
- -DSTATIC_MSVCRT=${STATIC_MSVCRT}
|
||||
- -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
|
||||
- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
|
||||
- -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
|
||||
- -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
|
||||
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
|
||||
- -DCMAKE_CXX_FLAGS_MINSIZEREL=${CMAKE_CXX_FLAGS_MINSIZEREL}
|
||||
- -DCMAKE_STATIC_LINKER_FLAGS=${CMAKE_STATIC_LINKER_FLAGS}
|
||||
- ${PB_SOURCE_DIR}
|
||||
- WORKING_DIRECTORY ${PB_BINARY_DIR}
|
||||
- RESULT_VARIABLE protobuf_config
|
||||
- )
|
||||
-
|
||||
- if(protobuf_config)
|
||||
- message(FATAL_ERROR "Could not configure Protobuf build: ${protobuf_config}")
|
||||
- endif()
|
||||
-
|
||||
- message("==== Protobuf build configured.")
|
||||
-
|
||||
-endif()
|
||||
-
|
||||
-
|
||||
-include(${PB_BINARY_DIR}/exports.cmake)
|
||||
-
|
||||
-#
|
||||
-# Protobuf library targets imported above (pb_protobuf
|
||||
-# and pb_protobuf-lite) are local to the directory from which
|
||||
-# they were imported. This is not good if cdk is used as
|
||||
-# a sub-project of a parent project, because the parent project
|
||||
-# must have access to these targets.
|
||||
-#
|
||||
-# For that reason below we create global protobuf/protobuf-lite targets
|
||||
-# and copy their locations from the imported targets.
|
||||
-#
|
||||
-# Note: we can't use ALIAS library because it does not work with imported
|
||||
-# targets
|
||||
-#
|
||||
-
|
||||
-add_library(Protobuf::pb-full STATIC IMPORTED GLOBAL)
|
||||
-add_library(Protobuf::pb-lite STATIC IMPORTED GLOBAL)
|
||||
-add_executable(Protobuf::protoc IMPORTED GLOBAL)
|
||||
-
|
||||
-set(TGT_libprotobuf Protobuf::pb-full)
|
||||
-set(TGT_libprotobuf-lite Protobuf::pb-lite)
|
||||
-set(TGT_protoc Protobuf::protoc)
|
||||
-
|
||||
-foreach(tgt libprotobuf libprotobuf-lite protoc)
|
||||
-
|
||||
- #message("processing: ${tgt}")
|
||||
-
|
||||
- set(loc_list)
|
||||
-
|
||||
- foreach(CONF NOCONFIG DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
|
||||
-
|
||||
- #message("- CONF: ${CONF}")
|
||||
-
|
||||
- get_target_property(LOC pb_${tgt} IMPORTED_LOCATION_${CONF})
|
||||
-
|
||||
- if(LOC)
|
||||
-
|
||||
- #message("- setting imported location to: ${LOC}")
|
||||
- list(APPEND loc_list "${LOC}")
|
||||
-
|
||||
- set_target_properties(${TGT_${tgt}} PROPERTIES
|
||||
- IMPORTED_LOCATION_${CONF} "${LOC}"
|
||||
- )
|
||||
-
|
||||
- set_property(TARGET ${TGT_${tgt}} APPEND PROPERTY
|
||||
- IMPORTED_CONFIGURATIONS ${CONF}
|
||||
- )
|
||||
-
|
||||
- endif()
|
||||
-
|
||||
- endforeach(CONF)
|
||||
-
|
||||
- #
|
||||
- # To support 'Static' build configuration the targets imported from the
|
||||
- # Protobuf project need to have IMPORTED_LOCATION_STATIC defined. We use
|
||||
- # 'Release' locations as Protobuf is built using 'Release' configuration in
|
||||
- # that case.
|
||||
- #
|
||||
-
|
||||
- get_target_property(LOC ${TGT_${tgt}} IMPORTED_LOCATION_RELEASE)
|
||||
- set_property(TARGET ${TGT_${tgt}} PROPERTY IMPORTED_LOCATION_STATIC ${LOC})
|
||||
-
|
||||
-endforeach(tgt)
|
||||
-
|
||||
-
|
||||
-#message("Protobuf include path: ${PROTOBUF_INCLUDE_DIR}")
|
||||
-set(PROTOBUF_INCLUDE_DIR ${PROTOBUF_INCLUDE_DIR} CACHE INTERNAL "")
|
||||
-
|
||||
-set_target_properties(Protobuf::pb-lite PROPERTIES
|
||||
- INTERFACE_INCLUDE_DIRECTORIES "${PROTOBUF_INCLUDE_DIR}"
|
||||
-)
|
||||
-
|
||||
-set_target_properties(Protobuf::pb-full PROPERTIES
|
||||
- INTERFACE_LINK_LIBRARIES Protobuf::pb-lite
|
||||
-)
|
||||
-
|
||||
-# On UNIX Protobuf uses pthread library
|
||||
-if(UNIX)
|
||||
- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
|
||||
- INTERFACE_LINK_LIBRARIES pthread
|
||||
- )
|
||||
-endif()
|
||||
-
|
||||
-#
|
||||
-# Note: This is needed to correctly compile headers generated by protobuf
|
||||
-# with sunpro compiler.
|
||||
-#
|
||||
-
|
||||
-if(SUNPRO)
|
||||
- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
|
||||
- INTERFACE_COMPILE_DEFINITIONS SOLARIS_64BIT_ENABLED
|
||||
- )
|
||||
-endif()
|
||||
-
|
||||
-#
|
||||
-# Try using parallel builds for protobuf.
|
||||
-#
|
||||
-
|
||||
-include(ProcessorCount)
|
||||
-ProcessorCount(N)
|
||||
-
|
||||
-MESSAGE("Processor Count: ${N}")
|
||||
-
|
||||
-set(opt_build)
|
||||
-set(opt_tool)
|
||||
-if(NOT N EQUAL 0)
|
||||
- if(NOT CMAKE_VERSION VERSION_LESS 3.12)
|
||||
- set(opt_build --parallel ${N})
|
||||
- elseif(CMAKE_MAKE_PROGRAM MATCHES "make")
|
||||
- set(opt_tool -j${N})
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
-add_custom_command(OUTPUT "${build_stamp}"
|
||||
- COMMAND ${CMAKE_COMMAND} --build . ${opt_build} --config ${CONFIG_EXPR} -- ${opt_tool}
|
||||
- COMMAND ${CMAKE_COMMAND} -E touch "${build_stamp}"
|
||||
- WORKING_DIRECTORY "${PB_BINARY_DIR}"
|
||||
- COMMENT "Building protobuf"
|
||||
-)
|
||||
-
|
||||
-add_custom_target(build_protobuf
|
||||
- SOURCES "${build_stamp}"
|
||||
-)
|
||||
-
|
||||
-set_target_properties(build_protobuf PROPERTIES FOLDER "Misc")
|
||||
-
|
||||
-add_dependencies(Protobuf::pb-full build_protobuf)
|
||||
-add_dependencies(Protobuf::pb-lite build_protobuf)
|
||||
-add_dependencies(Protobuf::protoc build_protobuf)
|
||||
-
|
||||
-# TODO: Handle lite/full version
|
||||
-
|
||||
-
|
||||
+find_package(Protobuf REQUIRED)
|
||||
|
||||
# Standard PROTOBUF_GENERATE_CPP modified to our usage
|
||||
|
||||
@@ -314,10 +77,11 @@ function(mysqlx_protobuf_generate_cpp SRCS HDRS)
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/protobuf/${FIL_WE}.pb.h"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E make_directory "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
|
||||
- COMMAND Protobuf::protoc
|
||||
+ COMMAND ${Protobuf_PROTOC_EXECUTABLE}
|
||||
ARGS --cpp_out "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
|
||||
-I ${ABS_PATH} ${ABS_FIL}
|
||||
- DEPENDS ${ABS_FIL} #${PROTOBUF_PROTOC_EXECUTABLE}
|
||||
+ --proto_path=${Protobuf_INCLUDE_DIR}
|
||||
+ DEPENDS ${ABS_FIL} #${Protobuf_PROTOC_EXECUTABLE}
|
||||
COMMENT "Running C++ protocol buffer compiler on ${FIL}"
|
||||
VERBATIM
|
||||
)
|
||||
--- a/cdk/core/CMakeLists.txt
|
||||
+++ b/cdk/core/CMakeLists.txt
|
||||
@@ -45,7 +45,7 @@ add_library(cdk STATIC ${cdk_sources} ${HEADERS})
|
||||
|
||||
target_link_libraries(cdk
|
||||
PUBLIC cdk_mysqlx cdk_parser
|
||||
- PRIVATE Protobuf::pb-lite # required by codecc.cc
|
||||
+ PRIVATE protobuf # required by codecc.cc
|
||||
)
|
||||
|
||||
add_coverage(cdk)
|
||||
--- a/cdk/protocol/mysqlx/CMakeLists.txt
|
||||
+++ b/cdk/protocol/mysqlx/CMakeLists.txt
|
||||
@@ -127,11 +127,7 @@ target_include_directories(cdk_proto_mysqlx PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
-if(use_full_protobuf)
|
||||
- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-full)
|
||||
-else()
|
||||
- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-lite)
|
||||
-endif()
|
||||
+target_link_libraries(cdk_proto_mysqlx PRIVATE protobuf)
|
||||
|
||||
target_link_libraries(cdk_proto_mysqlx PRIVATE cdk_foundation zlib lz4 zstd)
|
||||
|
||||
--- a/jdbc.cmake
|
||||
+++ b/jdbc.cmake
|
||||
@@ -66,7 +66,7 @@ if(MYSQL_CONFIG_EXECUTABLE)
|
||||
list(APPEND jdbc_cmake_opts -DMYSQL_CONFIG_EXECUTABLE=${MYSQL_CONFIG_EXECUTABLE})
|
||||
endif()
|
||||
|
||||
-list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=ON)
|
||||
+list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=OFF)
|
||||
|
||||
if(CMAKE_BUILD_TYPE)
|
||||
if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
|
||||
--- a/jdbc/CMakeLists.txt
|
||||
+++ b/jdbc/CMakeLists.txt
|
||||
@@ -299,7 +299,7 @@ endif()
|
||||
|
||||
|
||||
install(TARGETS connector-jdbc
|
||||
- CONFIGURATIONS Release RelWithDebInfo
|
||||
+ CONFIGURATIONS Release RelWithDebInfo Gentoo
|
||||
ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT JDBCDev
|
||||
RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
|
||||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
|
@ -1,45 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
CMAKE_MAKEFILE_GENERATOR=emake
|
||||
inherit cmake
|
||||
|
||||
DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
|
||||
URI_DIR="Connector-C++"
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
|
||||
|
||||
LICENSE="Artistic GPL-2"
|
||||
SLOT="0"
|
||||
# -ppc, -sparc for bug #711940
|
||||
KEYWORDS="amd64 arm ~arm64 -ppc ~ppc64 -sparc x86"
|
||||
IUSE="+legacy"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/protobuf:=
|
||||
legacy? (
|
||||
dev-libs/boost:=
|
||||
>=dev-db/mysql-connector-c-6.1.8:=
|
||||
)
|
||||
dev-libs/openssl:0=
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
S="${WORKDIR}/${P}-src"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-8.0.22-fix-build.patch
|
||||
"${FILESDIR}"/${PN}-8.0.24-gcc11-numeric_limits.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DWITH_SSL=system
|
||||
-DWITH_JDBC=$(usex legacy ON OFF)
|
||||
$(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
|
||||
$(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
CMAKE_MAKEFILE_GENERATOR=emake
|
||||
inherit cmake
|
||||
|
||||
DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
|
||||
URI_DIR="Connector-C++"
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
|
||||
|
||||
LICENSE="Artistic GPL-2"
|
||||
SLOT="0"
|
||||
# -ppc, -sparc for bug #711940
|
||||
KEYWORDS="amd64 arm ~arm64 -ppc ~ppc64 -sparc x86"
|
||||
IUSE="+legacy"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/protobuf:=
|
||||
legacy? (
|
||||
dev-libs/boost:=
|
||||
>=dev-db/mysql-connector-c-6.1.8:=
|
||||
)
|
||||
dev-libs/openssl:0=
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
S="${WORKDIR}/${P}-src"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-8.0.22-fix-build.patch
|
||||
"${FILESDIR}"/${PN}-8.0.24-gcc11-numeric_limits.patch
|
||||
"${FILESDIR}"/${PN}-8.0.25-fix-mysqlclient-static-binding.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DWITH_SSL=system
|
||||
-DWITH_JDBC=$(usex legacy ON OFF)
|
||||
$(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
|
||||
$(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
CMAKE_MAKEFILE_GENERATOR=emake
|
||||
inherit cmake
|
||||
|
||||
DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
|
||||
URI_DIR="Connector-C++"
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
|
||||
|
||||
LICENSE="Artistic GPL-2"
|
||||
SLOT="0"
|
||||
# -ppc, -sparc for bug #711940
|
||||
KEYWORDS="~amd64 ~arm ~arm64 -ppc ~ppc64 -sparc ~x86"
|
||||
IUSE="+legacy"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/protobuf:=
|
||||
legacy? (
|
||||
dev-libs/boost:=
|
||||
>=dev-db/mysql-connector-c-6.1.8:=
|
||||
)
|
||||
dev-libs/openssl:0=
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
S="${WORKDIR}/${P}-src"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-8.0.26-fix-build.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DWITH_SSL=system
|
||||
-DWITH_JDBC=$(usex legacy ON OFF)
|
||||
$(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
|
||||
$(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
@ -1,5 +1 @@
|
||||
DIST mysql-boost-8.0.22.tar.gz 285934450 BLAKE2B 1ba0c9bb9a0cb74af4842d3b746f8b690c122cfbf2c6d5201ce95e59a257427a8683dd8d5c2be31dfe9ece4761366c1287fa7b841c45db222725bf76b0639bc6 SHA512 792f2ada93ec67a4679228478c6b798e81d9e9f6d13c7f4977cb7682738a4aae3cb483294edc6b2fde16c3960e51af8786216c063ab500840afd39a609e4b612
|
||||
DIST mysql-boost-8.0.23.tar.gz 291039175 BLAKE2B 3a7d3e05c774085d6078d0d3effd58d2df47521615356a2aa5efc2ea2ef8457e19ad57a054926ccff0a4752ca71d0464daa7fe9a3ac6c1b1d3bd86a9a82dfc58 SHA512 b8c2e2ac772b7b730f8b3bac7a5afb205da173b3639500606e7d1fac74832a0134027951855a2dc81af015e6158c924927ad63b9e1f2e7c823d45d4c4961c3f8
|
||||
DIST mysql-boost-8.0.25.tar.gz 290265324 BLAKE2B 5393a2a2525a886d9ece19777deae01e6c0b24b9ff5a0a5ffb9075740ed912d0df59a165b6ec9ceb60c7c28f3062cda5cceb4da3a8280f42549984c846f1ce5c SHA512 af653ccff66a9d87221b46ad4f7bcc629700549f758998b9a7fb22e4573b9495a28624e031f016f9ad8fe0dfcf481b82f1ffe224aa48c2d45531570026b26081
|
||||
DIST mysql-boost-8.0.26.tar.gz 291285918 BLAKE2B 6198ca8982a8c9df7e6ee4df5e2c1e0d64d2eb4d83cb7265317b58d55f6787c3240c8e40d196f2326ff3d66926ad7dab0705edd92e5a82881ce6ddb7f0c510b9 SHA512 63d47cb52407a816dc9f4330b99924624dfee46e57e7fdce19eff32909dd9e23251e2439d1807b002a1661b547173222c77465a3ca4dbb312414a84927809cfc
|
||||
DIST mysql-boost-8.0.27.tar.gz 292184025 BLAKE2B 177209f3c62b0326ca9d021c751a701dec84c1b15c946ab0a68b1b4cf0620468eb3a1df77a918284007a0fde1aaa6a9767d0baed57936612813ef583df51c35e SHA512 6ef2426c0bee46bdf8e2fa5cb159d5ae19f0bed4f7c9bea9b33e0dd922b568c3c68ca063dcbcd7ea6904aaea31877c10064ea10b4bc63fb40d9f31778e3a7891
|
||||
|
@ -1,294 +0,0 @@
|
||||
From 3bf91fabf641f3f5114bf3893de40a31aae36e13 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Deutschmann <whissi@gentoo.org>
|
||||
Date: Tue, 22 Jun 2021 23:56:54 +0200
|
||||
Subject: [PATCH 5/5] Add OpenSSL 3.0.0 support
|
||||
|
||||
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
||||
---
|
||||
cmake/ssl.cmake | 59 +++++++++++++------
|
||||
mysys/my_md5.cc | 2 +
|
||||
.../bindings/xcom/xcom/xcom_ssl_transport.cc | 4 ++
|
||||
plugin/x/client/xconnection_impl.cc | 4 ++
|
||||
sql-common/client.cc | 2 +
|
||||
sql/mysqld.cc | 2 +
|
||||
sql/sys_vars.cc | 18 +++++-
|
||||
vio/viosslfactories.cc | 2 +
|
||||
8 files changed, 74 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
|
||||
index 18c95dfac..dd2f7e657 100644
|
||||
--- a/cmake/ssl.cmake
|
||||
+++ b/cmake/ssl.cmake
|
||||
@@ -201,34 +201,59 @@ MACRO (MYSQL_CHECK_SSL)
|
||||
NAMES crypto libcrypto libeay32
|
||||
HINTS ${OPENSSL_ROOT_DIR}/lib)
|
||||
|
||||
- IF(OPENSSL_INCLUDE_DIR)
|
||||
+ IF(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
|
||||
# Verify version number. Version information looks like:
|
||||
# #define OPENSSL_VERSION_NUMBER 0x1000103fL
|
||||
# Encoded as MNNFFPPS: major minor fix patch status
|
||||
FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
|
||||
OPENSSL_VERSION_NUMBER
|
||||
- REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
|
||||
- )
|
||||
- STRING(REGEX REPLACE
|
||||
- "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
|
||||
- OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
|
||||
- )
|
||||
- STRING(REGEX REPLACE
|
||||
- "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
|
||||
- OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}"
|
||||
- )
|
||||
- STRING(REGEX REPLACE
|
||||
- "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
|
||||
- OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
|
||||
+ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
|
||||
)
|
||||
+
|
||||
+ IF(OPENSSL_VERSION_NUMBER)
|
||||
+ STRING(REGEX REPLACE
|
||||
+ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
|
||||
+ OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
|
||||
+ )
|
||||
+ STRING(REGEX REPLACE
|
||||
+ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
|
||||
+ OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}"
|
||||
+ )
|
||||
+ STRING(REGEX REPLACE
|
||||
+ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
|
||||
+ OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
|
||||
+ )
|
||||
+ ELSE()
|
||||
+ FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
|
||||
+ OPENSSL_VERSION_STR
|
||||
+ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_STR[\t ]+\"([0-9])+\\.([0-9])+\\.([0-9])+\".*"
|
||||
+ )
|
||||
+
|
||||
+ STRING(REGEX REPLACE
|
||||
+ "^.*OPENSSL_VERSION_STR[\t ]+\"([0-9]+)\\.[0-9]+\\.[0-9]+\".*$" "\\1"
|
||||
+ OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_STR}"
|
||||
+ )
|
||||
+ STRING(REGEX REPLACE
|
||||
+ "^.*OPENSSL_VERSION_STR[\t ]+\"[0-9]+\\.([0-9]+)\\.[0-9]+\".*$" "\\1"
|
||||
+ OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_STR}"
|
||||
+ )
|
||||
+ STRING(REGEX REPLACE
|
||||
+ "^.*OPENSSL_VERSION_STR[\t ]+\"[0-9]+\\.[0-9]+\\.([0-9]+)\".*$" "\\1"
|
||||
+ OPENSSL_FIX_VERSION "${OPENSSL_VERSION_STR}"
|
||||
+ )
|
||||
+ ENDIF()
|
||||
ENDIF()
|
||||
- IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0")
|
||||
+
|
||||
+ INCLUDE(CheckSymbolExists)
|
||||
+
|
||||
+ CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION)
|
||||
+ IF(HAVE_TLS1_3_VERSION)
|
||||
ADD_DEFINITIONS(-DHAVE_TLSv13)
|
||||
ENDIF()
|
||||
IF(OPENSSL_INCLUDE_DIR AND
|
||||
OPENSSL_LIBRARY AND
|
||||
CRYPTO_LIBRARY AND
|
||||
- OPENSSL_MAJOR_VERSION STREQUAL "1"
|
||||
+ OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1"
|
||||
)
|
||||
SET(OPENSSL_FOUND TRUE)
|
||||
FIND_PROGRAM(OPENSSL_EXECUTABLE openssl
|
||||
@@ -292,8 +317,6 @@ MACRO (MYSQL_CHECK_SSL)
|
||||
MESSAGE(STATUS "OPENSSL_MINOR_VERSION = ${OPENSSL_MINOR_VERSION}")
|
||||
MESSAGE(STATUS "OPENSSL_FIX_VERSION = ${OPENSSL_FIX_VERSION}")
|
||||
|
||||
- INCLUDE(CheckSymbolExists)
|
||||
-
|
||||
CMAKE_PUSH_CHECK_STATE()
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
|
||||
CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
|
||||
diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc
|
||||
index 86203619f..37ed3c8b2 100644
|
||||
--- a/mysys/my_md5.cc
|
||||
+++ b/mysys/my_md5.cc
|
||||
@@ -56,7 +56,9 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf,
|
||||
int compute_md5_hash(char *digest, const char *buf, int len) {
|
||||
int retval = 0;
|
||||
int fips_mode = 0;
|
||||
+#if defined(OPENSSL_FIPS)
|
||||
fips_mode = FIPS_mode();
|
||||
+#endif
|
||||
/* If fips mode is ON/STRICT restricted method calls will result into abort,
|
||||
* skipping call. */
|
||||
if (fips_mode == 0) {
|
||||
diff --git a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
|
||||
index 4ed9f9ac9..895443166 100644
|
||||
--- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
|
||||
+++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
|
||||
@@ -325,6 +325,7 @@ error:
|
||||
return 1;
|
||||
}
|
||||
|
||||
+#if defined(OPENSSL_FIPS)
|
||||
#define OPENSSL_ERROR_LENGTH 512
|
||||
static int configure_ssl_fips_mode(const uint fips_mode) {
|
||||
int rc = -1;
|
||||
@@ -348,6 +349,7 @@ static int configure_ssl_fips_mode(const uint fips_mode) {
|
||||
EXIT:
|
||||
return rc;
|
||||
}
|
||||
+#endif
|
||||
|
||||
static int configure_ssl_ca(SSL_CTX *ssl_ctx, const char *ca_file,
|
||||
const char *ca_path) {
|
||||
@@ -544,10 +546,12 @@ int xcom_init_ssl(const char *server_key_file, const char *server_cert_file,
|
||||
int verify_server = SSL_VERIFY_NONE;
|
||||
int verify_client = SSL_VERIFY_NONE;
|
||||
|
||||
+#if defined(OPENSSL_FIPS)
|
||||
if (configure_ssl_fips_mode(ssl_fips_mode) != 1) {
|
||||
G_ERROR("Error setting the ssl fips mode");
|
||||
goto error;
|
||||
}
|
||||
+#endif
|
||||
|
||||
SSL_library_init();
|
||||
SSL_load_error_strings();
|
||||
diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
|
||||
index c1686c6d5..3ae34fdfd 100644
|
||||
--- a/plugin/x/client/xconnection_impl.cc
|
||||
+++ b/plugin/x/client/xconnection_impl.cc
|
||||
@@ -617,6 +617,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
|
||||
return XError(CR_SSL_CONNECTION_ERROR, buffer);
|
||||
}
|
||||
|
||||
+#if defined(OPENSSL_FIPS)
|
||||
/**
|
||||
Set fips mode in openssl library,
|
||||
When we set fips mode ON/STRICT, it will perform following operations:
|
||||
@@ -656,6 +657,7 @@ int set_fips_mode(const uint32_t fips_mode,
|
||||
EXIT:
|
||||
return rc;
|
||||
}
|
||||
+#endif
|
||||
|
||||
XError Connection_impl::activate_tls() {
|
||||
if (nullptr == m_vio) return get_socket_error(SOCKET_ECONNRESET);
|
||||
@@ -666,12 +668,14 @@ XError Connection_impl::activate_tls() {
|
||||
if (!m_context->m_ssl_config.is_configured())
|
||||
return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED, true};
|
||||
|
||||
+#if defined(OPENSSL_FIPS)
|
||||
char err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
|
||||
if (set_fips_mode(
|
||||
static_cast<uint32_t>(m_context->m_ssl_config.m_ssl_fips_mode),
|
||||
err_string) != 1) {
|
||||
return XError{CR_SSL_CONNECTION_ERROR, err_string, true};
|
||||
}
|
||||
+#endif
|
||||
auto ssl_ctx_flags = process_tls_version(
|
||||
details::null_when_empty(m_context->m_ssl_config.m_tls_version));
|
||||
|
||||
diff --git a/sql-common/client.cc b/sql-common/client.cc
|
||||
index 1316d54a7..554970378 100644
|
||||
--- a/sql-common/client.cc
|
||||
+++ b/sql-common/client.cc
|
||||
@@ -8019,6 +8019,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
|
||||
return 1;
|
||||
break;
|
||||
case MYSQL_OPT_SSL_FIPS_MODE: {
|
||||
+#if defined(OPENSSL_FIPS)
|
||||
char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
|
||||
ENSURE_EXTENSIONS_PRESENT(&mysql->options);
|
||||
mysql->options.extension->ssl_fips_mode = *static_cast<const uint *>(arg);
|
||||
@@ -8030,6 +8031,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
|
||||
"Set Fips mode ON/STRICT failed, detail: '%s'.", ssl_err_string);
|
||||
return 1;
|
||||
}
|
||||
+#endif
|
||||
} break;
|
||||
case MYSQL_OPT_SSL_MODE:
|
||||
ENSURE_EXTENSIONS_PRESENT(&mysql->options);
|
||||
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
|
||||
index 83643f76a..dfdc23ab7 100644
|
||||
--- a/sql/mysqld.cc
|
||||
+++ b/sql/mysqld.cc
|
||||
@@ -5134,12 +5134,14 @@ static void init_ssl() {
|
||||
}
|
||||
|
||||
static int init_ssl_communication() {
|
||||
+#if defined(OPENSSL_FIPS)
|
||||
char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
|
||||
int ret_fips_mode = set_fips_mode(opt_ssl_fips_mode, ssl_err_string);
|
||||
if (ret_fips_mode != 1) {
|
||||
LogErr(ERROR_LEVEL, ER_SSL_FIPS_MODE_ERROR, ssl_err_string);
|
||||
return 1;
|
||||
}
|
||||
+#endif
|
||||
if (TLS_channel::singleton_init(&mysql_main, mysql_main_channel, opt_use_ssl,
|
||||
&server_main_callback, opt_initialize))
|
||||
return 1;
|
||||
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
|
||||
index 3b8473bd1..c22c38305 100644
|
||||
--- a/sql/sys_vars.cc
|
||||
+++ b/sql/sys_vars.cc
|
||||
@@ -4614,6 +4614,7 @@ static Sys_var_ulong Sys_max_execution_time(
|
||||
HINT_UPDATEABLE SESSION_VAR(max_execution_time), CMD_LINE(REQUIRED_ARG),
|
||||
VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1));
|
||||
|
||||
+#if defined(OPENSSL_FIPS)
|
||||
static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
|
||||
char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
|
||||
if (set_fips_mode(opt_ssl_fips_mode, ssl_err_string) != 1) {
|
||||
@@ -4624,15 +4625,30 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
+#if defined(OPENSSL_FIPS)
|
||||
static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", nullptr};
|
||||
+#else
|
||||
+static const char *ssl_fips_mode_names[] = {"OFF", 0};
|
||||
+#endif
|
||||
static Sys_var_enum Sys_ssl_fips_mode(
|
||||
"ssl_fips_mode",
|
||||
"SSL FIPS mode (applies only for OpenSSL); "
|
||||
+#if defined(OPENSSL_FIPS)
|
||||
"permitted values are: OFF, ON, STRICT",
|
||||
+#else
|
||||
+ "permitted values are: OFF",
|
||||
+#endif
|
||||
GLOBAL_VAR(opt_ssl_fips_mode), CMD_LINE(REQUIRED_ARG, OPT_SSL_FIPS_MODE),
|
||||
ssl_fips_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG,
|
||||
- ON_CHECK(nullptr), ON_UPDATE(update_fips_mode), nullptr);
|
||||
+ ON_CHECK(NULL),
|
||||
+#if defined(OPENSSL_FIPS)
|
||||
+ ON_UPDATE(update_fips_mode),
|
||||
+#else
|
||||
+ ON_UPDATE(NULL),
|
||||
+#endif
|
||||
+ NULL);
|
||||
|
||||
static Sys_var_bool Sys_auto_generate_certs(
|
||||
"auto_generate_certs",
|
||||
diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
|
||||
index c25117bd0..11b466bcf 100644
|
||||
--- a/vio/viosslfactories.cc
|
||||
+++ b/vio/viosslfactories.cc
|
||||
@@ -472,6 +472,7 @@ void ssl_start() {
|
||||
}
|
||||
}
|
||||
|
||||
+#if defined(OPENSSL_FIPS)
|
||||
/**
|
||||
Set fips mode in openssl library,
|
||||
When we set fips mode ON/STRICT, it will perform following operations:
|
||||
@@ -525,6 +526,7 @@ EXIT:
|
||||
@returns openssl current fips mode
|
||||
*/
|
||||
uint get_fips_mode() { return FIPS_mode(); }
|
||||
+#endif
|
||||
|
||||
long process_tls_version(const char *tls_version) {
|
||||
const char *separator = ",";
|
||||
--
|
||||
2.32.0
|
||||
|
@ -1,110 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake-multilib
|
||||
|
||||
# wrap the config script
|
||||
MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
|
||||
|
||||
DESCRIPTION="C client library for MariaDB/MySQL"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/"
|
||||
LICENSE="GPL-2"
|
||||
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${PV}.tar.gz"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
|
||||
|
||||
SLOT="0/21"
|
||||
IUSE="ldap static-libs"
|
||||
|
||||
RDEPEND="
|
||||
>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
|
||||
app-arch/zstd:=[${MULTILIB_USEDEP}]
|
||||
sys-libs/zlib:=[${MULTILIB_USEDEP}]
|
||||
ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
|
||||
dev-libs/openssl:0=[${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
# Avoid file collisions, #692580
|
||||
RDEPEND+=" !<dev-db/mysql-5.6.45-r1"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.23*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.24*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.25*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.26-r0"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.27-r0"
|
||||
RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1"
|
||||
|
||||
DOCS=( README )
|
||||
|
||||
S="${WORKDIR}/mysql-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-8.0.22-always-build-decompress-utilities.patch
|
||||
"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
|
||||
|
||||
# All these are for the server only.
|
||||
# Disable rpm call which would trigger sandbox, #692368
|
||||
sed -i \
|
||||
-e '/MYSQL_CHECK_LIBEVENT/d' \
|
||||
-e '/MYSQL_CHECK_RAPIDJSON/d' \
|
||||
-e '/MYSQL_CHECK_ICU/d' \
|
||||
-e '/MYSQL_CHECK_EDITLINE/d' \
|
||||
-e '/MYSQL_CHECK_CURL/d' \
|
||||
-e '/ADD_SUBDIRECTORY(man)/d' \
|
||||
-e '/ADD_SUBDIRECTORY(share)/d' \
|
||||
-e '/INCLUDE(cmake\/boost/d' \
|
||||
-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
|
||||
CMakeLists.txt || die
|
||||
|
||||
# Skip building clients
|
||||
echo > client/CMakeLists.txt || die
|
||||
|
||||
# Forcefully disable auth plugin
|
||||
if ! use ldap ; then
|
||||
sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
|
||||
echo > libmysql/authentication_ldap/CMakeLists.txt || die
|
||||
fi
|
||||
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DINSTALL_LAYOUT=RPM
|
||||
-DINSTALL_LIBDIR=$(get_libdir)
|
||||
-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
|
||||
-DENABLED_LOCAL_INFILE=ON
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
|
||||
-DWITH_LZ4=system
|
||||
-DWITH_NUMA=OFF
|
||||
-DWITH_SSL=system
|
||||
-DWITH_ZLIB=system
|
||||
-DWITH_ZSTD=system
|
||||
-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
|
||||
-DSHARED_LIB_PATCH_VERSION="0"
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DWITHOUT_SERVER=ON
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
cmake-utils_src_install
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
doman \
|
||||
man/my_print_defaults.1 \
|
||||
man/perror.1 \
|
||||
man/zlib_decompress.1
|
||||
|
||||
if ! use static-libs ; then
|
||||
find "${ED}" -name "*.a" -delete || die
|
||||
fi
|
||||
}
|
@ -1,118 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
CMAKE_ECLASS=cmake
|
||||
inherit cmake-multilib
|
||||
|
||||
# wrap the config script
|
||||
MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
|
||||
|
||||
DESCRIPTION="C client library for MariaDB/MySQL"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
|
||||
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc x86"
|
||||
|
||||
S="${WORKDIR}/mysql-${PV}"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/21"
|
||||
IUSE="ldap static-libs"
|
||||
|
||||
RDEPEND="
|
||||
>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
|
||||
app-arch/zstd:=[${MULTILIB_USEDEP}]
|
||||
sys-libs/zlib:=[${MULTILIB_USEDEP}]
|
||||
ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
|
||||
dev-libs/openssl:0=[${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
# Avoid file collisions, #692580
|
||||
RDEPEND+=" !<dev-db/mysql-5.6.45-r1"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.23*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.24*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.25*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.26-r0"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.27-r0"
|
||||
RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1"
|
||||
|
||||
DOCS=( README )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-8.0.22-always-build-decompress-utilities.patch
|
||||
"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "scripts/CMakeLists.txt" || die
|
||||
|
||||
# All these are for the server only.
|
||||
# Disable rpm call which would trigger sandbox, #692368
|
||||
sed -i \
|
||||
-e '/MYSQL_CHECK_LIBEVENT/d' \
|
||||
-e '/MYSQL_CHECK_RAPIDJSON/d' \
|
||||
-e '/MYSQL_CHECK_ICU/d' \
|
||||
-e '/MYSQL_CHECK_EDITLINE/d' \
|
||||
-e '/MYSQL_CHECK_CURL/d' \
|
||||
-e '/ADD_SUBDIRECTORY(man)/d' \
|
||||
-e '/ADD_SUBDIRECTORY(share)/d' \
|
||||
-e '/INCLUDE(cmake\/boost/d' \
|
||||
-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
|
||||
CMakeLists.txt || die
|
||||
|
||||
# Skip building clients
|
||||
echo > client/CMakeLists.txt || die
|
||||
|
||||
# Forcefully disable auth plugin
|
||||
if ! use ldap ; then
|
||||
sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
|
||||
echo > libmysql/authentication_ldap/CMakeLists.txt || die
|
||||
fi
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
||||
-DINSTALL_LAYOUT=RPM
|
||||
-DINSTALL_LIBDIR=$(get_libdir)
|
||||
-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
|
||||
-DENABLED_LOCAL_INFILE=ON
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
|
||||
-DWITH_LZ4=system
|
||||
-DWITH_NUMA=OFF
|
||||
-DWITH_SSL=system
|
||||
-DWITH_ZLIB=system
|
||||
-DWITH_ZSTD=system
|
||||
-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
|
||||
-DSHARED_LIB_PATCH_VERSION="0"
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DWITHOUT_SERVER=ON
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
doman \
|
||||
man/my_print_defaults.1 \
|
||||
man/perror.1 \
|
||||
man/zlib_decompress.1
|
||||
|
||||
if ! use static-libs ; then
|
||||
find "${ED}" -name "*.a" -delete || die
|
||||
fi
|
||||
}
|
@ -1,122 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
CMAKE_ECLASS=cmake
|
||||
inherit cmake-multilib flag-o-matic
|
||||
|
||||
# wrap the config script
|
||||
MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
|
||||
|
||||
DESCRIPTION="C client library for MariaDB/MySQL"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
|
||||
S="${WORKDIR}/mysql-${PV}"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/21"
|
||||
IUSE="ldap static-libs"
|
||||
|
||||
RDEPEND="
|
||||
>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
|
||||
app-arch/zstd:=[${MULTILIB_USEDEP}]
|
||||
sys-libs/zlib:=[${MULTILIB_USEDEP}]
|
||||
ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
|
||||
dev-libs/openssl:0=[${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
# Avoid file collisions, #692580
|
||||
RDEPEND+=" !<dev-db/mysql-5.6.45-r1"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.23*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.24*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.25*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.26-r0"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.27-r0"
|
||||
RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1"
|
||||
|
||||
DOCS=( README )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-8.0.22-always-build-decompress-utilities.patch
|
||||
"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
|
||||
"${FILESDIR}"/${PN}-8.0.25-add-OpenSSL-3.0.0-support.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "scripts/CMakeLists.txt" || die
|
||||
|
||||
# All these are for the server only.
|
||||
# Disable rpm call which would trigger sandbox, #692368
|
||||
sed -i \
|
||||
-e '/MYSQL_CHECK_LIBEVENT/d' \
|
||||
-e '/MYSQL_CHECK_RAPIDJSON/d' \
|
||||
-e '/MYSQL_CHECK_ICU/d' \
|
||||
-e '/MYSQL_CHECK_EDITLINE/d' \
|
||||
-e '/MYSQL_CHECK_CURL/d' \
|
||||
-e '/ADD_SUBDIRECTORY(man)/d' \
|
||||
-e '/ADD_SUBDIRECTORY(share)/d' \
|
||||
-e '/INCLUDE(cmake\/boost/d' \
|
||||
-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
|
||||
CMakeLists.txt || die
|
||||
|
||||
# Skip building clients
|
||||
echo > client/CMakeLists.txt || die
|
||||
|
||||
# Forcefully disable auth plugin
|
||||
if ! use ldap ; then
|
||||
sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
|
||||
echo > libmysql/authentication_ldap/CMakeLists.txt || die
|
||||
fi
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
# code is not C++17 ready, bug #786402
|
||||
append-cxxflags -std=c++14
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
||||
-DINSTALL_LAYOUT=RPM
|
||||
-DINSTALL_LIBDIR=$(get_libdir)
|
||||
-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
|
||||
-DENABLED_LOCAL_INFILE=ON
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
|
||||
-DWITH_LZ4=system
|
||||
-DWITH_NUMA=OFF
|
||||
-DWITH_SSL=system
|
||||
-DWITH_ZLIB=system
|
||||
-DWITH_ZSTD=system
|
||||
-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
|
||||
-DSHARED_LIB_PATCH_VERSION="0"
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DWITHOUT_SERVER=ON
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
doman \
|
||||
man/my_print_defaults.1 \
|
||||
man/perror.1 \
|
||||
man/zlib_decompress.1
|
||||
|
||||
if ! use static-libs ; then
|
||||
find "${ED}" -name "*.a" -delete || die
|
||||
fi
|
||||
}
|
@ -1,121 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
CMAKE_ECLASS=cmake
|
||||
inherit cmake-multilib flag-o-matic
|
||||
|
||||
# wrap the config script
|
||||
MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
|
||||
|
||||
DESCRIPTION="C client library for MariaDB/MySQL"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
|
||||
|
||||
S="${WORKDIR}/mysql-${PV}"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/21"
|
||||
IUSE="ldap static-libs"
|
||||
|
||||
RDEPEND="
|
||||
>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
|
||||
app-arch/zstd:=[${MULTILIB_USEDEP}]
|
||||
sys-libs/zlib:=[${MULTILIB_USEDEP}]
|
||||
ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
|
||||
dev-libs/openssl:0=[${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
# Avoid file collisions, #692580
|
||||
RDEPEND+=" !<dev-db/mysql-5.6.45-r1"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.23*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.24*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.25*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.26-r0"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.27-r0"
|
||||
RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1"
|
||||
|
||||
DOCS=( README )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-8.0.22-always-build-decompress-utilities.patch
|
||||
"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "scripts/CMakeLists.txt" || die
|
||||
|
||||
# All these are for the server only.
|
||||
# Disable rpm call which would trigger sandbox, #692368
|
||||
sed -i \
|
||||
-e '/MYSQL_CHECK_LIBEVENT/d' \
|
||||
-e '/MYSQL_CHECK_RAPIDJSON/d' \
|
||||
-e '/MYSQL_CHECK_ICU/d' \
|
||||
-e '/MYSQL_CHECK_EDITLINE/d' \
|
||||
-e '/MYSQL_CHECK_CURL/d' \
|
||||
-e '/ADD_SUBDIRECTORY(man)/d' \
|
||||
-e '/ADD_SUBDIRECTORY(share)/d' \
|
||||
-e '/INCLUDE(cmake\/boost/d' \
|
||||
-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
|
||||
CMakeLists.txt || die
|
||||
|
||||
# Skip building clients
|
||||
echo > client/CMakeLists.txt || die
|
||||
|
||||
# Forcefully disable auth plugin
|
||||
if ! use ldap ; then
|
||||
sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
|
||||
echo > libmysql/authentication_ldap/CMakeLists.txt || die
|
||||
fi
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
# code is not C++17 ready, bug #786402
|
||||
append-cxxflags -std=c++14
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
||||
-DINSTALL_LAYOUT=RPM
|
||||
-DINSTALL_LIBDIR=$(get_libdir)
|
||||
-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
|
||||
-DENABLED_LOCAL_INFILE=ON
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
|
||||
-DWITH_LZ4=system
|
||||
-DWITH_NUMA=OFF
|
||||
-DWITH_SSL=system
|
||||
-DWITH_ZLIB=system
|
||||
-DWITH_ZSTD=system
|
||||
-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
|
||||
-DSHARED_LIB_PATCH_VERSION="0"
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DWITHOUT_SERVER=ON
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
doman \
|
||||
man/my_print_defaults.1 \
|
||||
man/perror.1 \
|
||||
man/zlib_decompress.1
|
||||
|
||||
if ! use static-libs ; then
|
||||
find "${ED}" -name "*.a" -delete || die
|
||||
fi
|
||||
}
|
@ -1,122 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
CMAKE_ECLASS=cmake
|
||||
inherit cmake-multilib flag-o-matic
|
||||
|
||||
# wrap the config script
|
||||
MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
|
||||
|
||||
DESCRIPTION="C client library for MariaDB/MySQL"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
|
||||
S="${WORKDIR}/mysql-${PV}"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/21"
|
||||
IUSE="ldap static-libs"
|
||||
|
||||
RDEPEND="
|
||||
>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
|
||||
app-arch/zstd:=[${MULTILIB_USEDEP}]
|
||||
sys-libs/zlib:=[${MULTILIB_USEDEP}]
|
||||
ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
|
||||
dev-libs/openssl:0=[${MULTILIB_USEDEP}]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
# Avoid file collisions, #692580
|
||||
RDEPEND+=" !<dev-db/mysql-5.6.45-r1"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.23*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.24*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.25*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.26-r0"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.27-r0"
|
||||
RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1"
|
||||
|
||||
DOCS=( README )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-8.0.22-always-build-decompress-utilities.patch
|
||||
"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
|
||||
"${FILESDIR}"/${PN}-8.0.25-add-OpenSSL-3.0.0-support.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "scripts/CMakeLists.txt" || die
|
||||
|
||||
# All these are for the server only.
|
||||
# Disable rpm call which would trigger sandbox, #692368
|
||||
sed -i \
|
||||
-e '/MYSQL_CHECK_LIBEVENT/d' \
|
||||
-e '/MYSQL_CHECK_RAPIDJSON/d' \
|
||||
-e '/MYSQL_CHECK_ICU/d' \
|
||||
-e '/MYSQL_CHECK_EDITLINE/d' \
|
||||
-e '/MYSQL_CHECK_CURL/d' \
|
||||
-e '/ADD_SUBDIRECTORY(man)/d' \
|
||||
-e '/ADD_SUBDIRECTORY(share)/d' \
|
||||
-e '/INCLUDE(cmake\/boost/d' \
|
||||
-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
|
||||
CMakeLists.txt || die
|
||||
|
||||
# Skip building clients
|
||||
echo > client/CMakeLists.txt || die
|
||||
|
||||
# Forcefully disable auth plugin
|
||||
if ! use ldap ; then
|
||||
sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
|
||||
echo > libmysql/authentication_ldap/CMakeLists.txt || die
|
||||
fi
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
# code is not C++17 ready, bug #786402
|
||||
append-cxxflags -std=c++14
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
||||
-DINSTALL_LAYOUT=RPM
|
||||
-DINSTALL_LIBDIR=$(get_libdir)
|
||||
-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
|
||||
-DENABLED_LOCAL_INFILE=ON
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
|
||||
-DWITH_LZ4=system
|
||||
-DWITH_NUMA=OFF
|
||||
-DWITH_SSL=system
|
||||
-DWITH_ZLIB=system
|
||||
-DWITH_ZSTD=system
|
||||
-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
|
||||
-DSHARED_LIB_PATCH_VERSION="0"
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DWITHOUT_SERVER=ON
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
doman \
|
||||
man/my_print_defaults.1 \
|
||||
man/perror.1 \
|
||||
man/zlib_decompress.1
|
||||
|
||||
if ! use static-libs ; then
|
||||
find "${ED}" -name "*.a" -delete || die
|
||||
fi
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1,65 +0,0 @@
|
||||
--- a/runtime/Makefile
|
||||
+++ b/runtime/Makefile
|
||||
@@ -335,7 +335,7 @@
|
||||
# (without the extension, which is added by the macro)
|
||||
define COMPILE_C_FILE
|
||||
$(1).$(O): %.c
|
||||
- $$(CC) -c $$(OC_CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$<
|
||||
+ $$(CC) -c $$(OC_CFLAGS) $(CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$<
|
||||
endef
|
||||
|
||||
object_types := % %_b %_bd %_bi %_bpic %_n %_nd %_ni %_np %_npic
|
||||
--- a/yacc/Makefile
|
||||
+++ b/yacc/Makefile
|
||||
@@ -63,4 +63,4 @@
|
||||
# also works for .obj files.
|
||||
|
||||
%.$(O): %.c
|
||||
- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
+ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
--- a/otherlibs/Makefile.otherlibs.common
|
||||
+++ b/otherlibs/Makefile.otherlibs.common
|
||||
@@ -138,4 +138,4 @@
|
||||
$(CAMLOPT) -c $(COMPFLAGS) $(OPTCOMPFLAGS) $<
|
||||
|
||||
.c.$(O):
|
||||
- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
+ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
--- a/ocamltest/Makefile
|
||||
+++ b/ocamltest/Makefile
|
||||
@@ -221,7 +221,7 @@
|
||||
$(ocamllex) -q $<
|
||||
|
||||
%.$(O): %.c
|
||||
- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) -c $<
|
||||
+ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -c $<
|
||||
|
||||
ocamltest_config.ml: ocamltest_config.ml.in Makefile ../Makefile.config
|
||||
sed \
|
||||
--- a/otherlibs/systhreads/Makefile
|
||||
+++ b/otherlibs/systhreads/Makefile
|
||||
@@ -93,11 +93,11 @@
|
||||
# twice, each time with different options).
|
||||
|
||||
st_stubs_b.$(O): st_stubs.c $(HEADER)
|
||||
- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime \
|
||||
+ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime \
|
||||
$(SHAREDLIB_CFLAGS) $(OUTPUTOBJ)$@ $<
|
||||
|
||||
st_stubs_n.$(O): st_stubs.c $(HEADER)
|
||||
- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) \
|
||||
+ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) \
|
||||
-I$(ROOTDIR)/runtime $(SHAREDLIB_CFLAGS) -DNATIVE_CODE \
|
||||
-DTARGET_$(ARCH) -DMODEL_$(MODEL) -DSYS_$(SYSTEM) \
|
||||
$(OUTPUTOBJ)$@ -c $<
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -322,7 +322,7 @@
|
||||
endif
|
||||
|
||||
objinfo_helper$(EXE): objinfo_helper.c $(ROOTDIR)/runtime/caml/s.h
|
||||
- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime $(OUTPUTEXE)$@ \
|
||||
+ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime $(OUTPUTEXE)$@ \
|
||||
$(DEF_SYMBOL_PREFIX) $(LIBBFD_INCLUDE) $< $(LIBBFD_LINK)
|
||||
|
||||
OBJINFO=$(ROOTDIR)/compilerlibs/ocamlcommon.cma \
|
@ -1,21 +0,0 @@
|
||||
--- a/runtime/backtrace.c
|
||||
+++ b/runtime/backtrace.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "caml/fail.h"
|
||||
|
||||
/* The table of debug information fragments */
|
||||
-struct ext_table caml_debug_info;
|
||||
+extern struct ext_table caml_debug_info;
|
||||
|
||||
CAMLexport int32_t caml_backtrace_active = 0;
|
||||
CAMLexport int32_t caml_backtrace_pos = 0;
|
||||
--- a/runtime/startup_nat.c
|
||||
+++ b/runtime/startup_nat.c
|
||||
@@ -44,7 +44,6 @@
|
||||
#endif
|
||||
|
||||
extern int caml_parser_trace;
|
||||
-CAMLexport header_t caml_atom_table[256];
|
||||
char * caml_code_area_start, * caml_code_area_end;
|
||||
struct ext_table caml_code_fragments_table;
|
||||
|
@ -1,104 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit flag-o-matic
|
||||
|
||||
HOMEPAGE="https://ocaml.org/"
|
||||
SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
DESCRIPTION="Programming language supporting functional, imperative & object-oriented styles"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
|
||||
IUSE="emacs flambda latex +ocamlopt spacetime xemacs"
|
||||
|
||||
RDEPEND="sys-libs/binutils-libs:=
|
||||
spacetime? ( sys-libs/libunwind:= )"
|
||||
BDEPEND="${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
PDEPEND="emacs? ( app-emacs/ocaml-mode )
|
||||
xemacs? ( app-xemacs/ocaml )"
|
||||
|
||||
QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs'
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.09.0-gcc-10.patch
|
||||
"${FILESDIR}"/${P}-cflags.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
cp "${FILESDIR}"/ocaml.conf "${T}" || die
|
||||
|
||||
# Broken until 4.12
|
||||
# bug #818445
|
||||
filter-flags '-flto*'
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
# OCaml generates textrels on 32-bit arches
|
||||
# We can't do anything about it, but disabling it means that tests
|
||||
# for OCaml-based packages won't fail on unexpected output
|
||||
# bug #773226
|
||||
if use arm || use ppc || use x86 ; then
|
||||
append-ldflags "-Wl,-z,notext"
|
||||
fi
|
||||
|
||||
# Upstream build ignores LDFLAGS in several places.
|
||||
sed -i -e 's/\(^MKDLL=.*\)/\1 $(LDFLAGS)/' \
|
||||
-e 's/\(^OC_CFLAGS=.*\)/\1 $(LDFLAGS)/' \
|
||||
-e 's/\(^OC_LDFLAGS=.*\)/\1 $(LDFLAGS)/' \
|
||||
Makefile.config.in || die "LDFLAGS fix failed"
|
||||
# ${P} overrides upstream build's own P due to a wrong assignment operator.
|
||||
sed -i -e 's/^P ?=/P =/' stdlib/StdlibModules || die "P fix failed"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local opt=(
|
||||
--bindir="${EPREFIX}/usr/bin"
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)/ocaml"
|
||||
--mandir="${EPREFIX}/usr/share/man"
|
||||
--prefix="${EPREFIX}/usr"
|
||||
$(use_enable flambda)
|
||||
$(use_enable spacetime)
|
||||
)
|
||||
econf ${opt[@]}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use ocamlopt ; then
|
||||
emake world.opt
|
||||
else
|
||||
emake world
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use ocamlopt ; then
|
||||
# OCaml tests only work when run sequentially
|
||||
emake -j1 -C testsuite all
|
||||
else
|
||||
ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests."
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
dodir /usr/include
|
||||
# Create symlink for header files
|
||||
dosym "../$(get_libdir)/ocaml/caml" /usr/include/caml
|
||||
dodoc Changes README.adoc
|
||||
# Create envd entry for latex input files
|
||||
if use latex ; then
|
||||
echo "TEXINPUTS=\"${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:\"" > "${T}"/99ocamldoc || die
|
||||
doenvd "${T}"/99ocamldoc
|
||||
fi
|
||||
|
||||
sed -i -e "s:lib:$(get_libdir):" "${T}"/ocaml.conf || die
|
||||
|
||||
# Install ocaml-rebuild portage set
|
||||
insinto /usr/share/portage/config/sets
|
||||
doins "${T}"/ocaml.conf
|
||||
}
|
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue