Diff mysql-8.0.27-r1 with a mysql-8.0.31-r2

/usr/portage/dev-db/mysql/mysql-8.0.31-r2.ebuild 2023-10-09 14:52:29.324368346 +0300
1 1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI="8"
4
EAPI=8
5 5

  
6 6
CMAKE_MAKEFILE_GENERATOR=emake
7

  
8
inherit check-reqs cmake flag-o-matic linux-info \
9
	multiprocessing prefix toolchain-funcs
7
inherit check-reqs cmake flag-o-matic linux-info multiprocessing prefix toolchain-funcs
10 8

  
11 9
MY_PV="${PV//_pre*}"
12 10
MY_P="${PN}-${MY_PV}"
13 11

  
14 12
# Patch version
15
PATCH_SET=( https://dev.gentoo.org/~{whissi,dlan}/dist/mysql/${P}-patches-03.tar.xz )
16

  
17
SRC_URI="https://cdn.mysql.com/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz
18
	https://cdn.mysql.com/archives/mysql-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz
19
	http://downloads.mysql.com/archives/MySQL-$(ver_cut 1-2)/${PN}-boost-${MY_PV}.tar.gz
20
	${PATCH_SET[@]}"
13
PATCH_SET=( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patches-01.tar.xz )
21 14

  
22 15
HOMEPAGE="https://www.mysql.com/"
23 16
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
17
SRC_URI="https://cdn.mysql.com/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz"
18
SRC_URI+=" https://cdn.mysql.com/archives/mysql-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz"
19
SRC_URI+=" https://downloads.mysql.com/archives/MySQL-$(ver_cut 1-2)/${PN}-boost-${MY_PV}.tar.gz"
20
SRC_URI+=" ${PATCH_SET[@]}"
21
# Shorten the path because the socket path length must be shorter than 107 chars
22
# and we will run a mysql server during test phase
23
S="${WORKDIR}/mysql"
24

  
24 25
LICENSE="GPL-2"
25 26
SLOT="8.0"
26
IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
27
	router selinux +server tcmalloc test"
28

  
27
# -ppc, -riscv for bug #761715
28
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
29
IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
29 30
RESTRICT="!test? ( test )"
30

  
31 31
REQUIRED_USE="?? ( tcmalloc jemalloc )
32 32
	cjk? ( server )
33 33
	jemalloc? ( server )
......
36 36
	router? ( server )
37 37
	tcmalloc? ( server )"
38 38

  
39
# -ppc, -riscv for bug #761715
40
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
41

  
42
# Shorten the path because the socket path length must be shorter than 107 chars
43
# and we will run a mysql server during test phase
44
S="${WORKDIR}/mysql"
45

  
46
# Be warned, *DEPEND are version-dependant
39
# Be warned, *DEPEND are version-dependent
47 40
# These are used for both runtime and compiletime
48 41
COMMON_DEPEND="
49 42
	>=app-arch/lz4-0_p131:=
......
94 87
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
95 88
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
96 89

  
90
PATCHES=(
91
	"${WORKDIR}"/mysql-patches
92
	"${FILESDIR}"/mysql-8.0.31-build-tmpdir-nodefault.patch
93
)
94

  
97 95
mysql_init_vars() {
98 96
	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
99 97
	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
......
169 167
}
170 168

  
171 169
src_prepare() {
172
	eapply "${WORKDIR}"/mysql-patches
173
	eapply "${FILESDIR}"/${PN}-8.0.27-gcc12.patch
174

  
175 170
	# Avoid rpm call which would trigger sandbox, #692368
176 171
	sed -i \
177 172
		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
......
203 198

  
204 199
	# debug hack wrt #497532
205 200
	local mycmakeargs=(
206
		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
207
		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
201
		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usev !debug '-DNDEBUG')"
202
		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usev !debug '-DNDEBUG')"
203

  
208 204
		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
209 205
		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
206

  
210 207
		-DINSTALL_BINDIR=bin
211 208
		-DINSTALL_DOCDIR=share/doc/${PF}
212 209
		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
......
219 216
		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
220 217
		-DINSTALL_SBINDIR=sbin
221 218
		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
219

  
222 220
		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
223 221
		-DWITH_UNIT_TESTS=$(usex test ON OFF)
222

  
224 223
		# Using bundled editline to get CTRL+C working
225 224
		-DWITH_EDITLINE=bundled
226 225
		-DWITH_ZLIB=system
......
233 232
		# all the time for simplicity and to make sure it is actually correct.
234 233
		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
235 234
		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
235

  
236 236
		-DWITH_CURL=system
237 237
		-DWITH_BOOST="${S}/boost"
238 238
		-DWITH_ROUTER=$(usex router ON OFF)
Thank you!