Diff ldb-2.5.3 with a ldb-2.6.2

/usr/portage/sys-libs/ldb/ldb-2.6.2.ebuild 2023-10-09 14:52:35.548368503 +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=7
4
EAPI=8
5 5

  
6 6
PYTHON_COMPAT=( python3_{10..11} )
7 7
PYTHON_REQ_USE="threads(+)"
......
13 13

  
14 14
LICENSE="LGPL-3"
15 15
SLOT="0/${PV}"
16
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
16
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
17 17
IUSE="doc ldap +lmdb python test"
18 18

  
19 19
REQUIRED_USE="${PYTHON_REQUIRED_USE}
......
21 21

  
22 22
RESTRICT="!test? ( test )"
23 23

  
24
TALLOC_VERSION="2.3.4"
25
TDB_VERSION="1.4.7"
26
TEVENT_VERSION="0.13.0"
27

  
24 28
RDEPEND="
25 29
	dev-libs/libbsd[${MULTILIB_USEDEP}]
26 30
	dev-libs/popt[${MULTILIB_USEDEP}]
27
	>=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
28
	>=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}]
29
	>=sys-libs/tdb-1.4.6[${MULTILIB_USEDEP}]
30
	>=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}]
31
	>=sys-libs/talloc-${TALLOC_VERSION}[${MULTILIB_USEDEP}]
32
	>=sys-libs/tdb-${TDB_VERSION}[${MULTILIB_USEDEP}]
33
	>=sys-libs/tevent-${TEVENT_VERSION}[${MULTILIB_USEDEP}]
31 34
	ldap? ( net-nds/openldap:= )
32 35
	lmdb? ( >=dev-db/lmdb-0.9.16:=[${MULTILIB_USEDEP}] )
33 36
	python? (
......
37 40
		sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
38 41
	)
39 42
"
40
DEPEND="${RDEPEND}
43
DEPEND="
44
	${RDEPEND}
41 45
	virtual/libcrypt
46
	test? ( >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] )
42 47
"
43 48
BDEPEND="${PYTHON_DEPS}
44 49
	dev-libs/libxslt
......
60 65
pkg_setup() {
61 66
	# Package fails to build with distcc
62 67
	export DISTCC_DISABLE=1
68
	export PYTHONHASHSEED=1
63 69

  
64 70
	# waf requires a python interpreter
65 71
	python-single-r1_pkg_setup
66 72
}
67 73

  
74
check_samba_dep_versions() {
75
	actual_talloc_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/talloc/wscript || die)
76
	if [[ ${actual_talloc_version} != ${TALLOC_VERSION} ]] ; then
77
		eerror "Source talloc version: ${TALLOC_VERSION}"
78
		eerror "Ebuild talloc version: ${actual_talloc_version}"
79
		die "Ebuild needs to fix TALLOC_VERSION!"
80
	fi
81

  
82
	actual_tdb_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tdb/wscript || die)
83
	if [[ ${actual_tdb_version} != ${TDB_VERSION} ]] ; then
84
		eerror "Source tdb version: ${TDB_VERSION}"
85
		eerror "Ebuild tdb version: ${actual_tdb_version}"
86
		die "Ebuild needs to fix TDB_VERSION!"
87
	fi
88

  
89
	actual_tevent_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tevent/wscript || die)
90
	if [[ ${actual_tevent_version} != ${TEVENT_VERSION} ]] ; then
91
		eerror "Source tevent version: ${TEVENT_VERSION}"
92
		eerror "Ebuild tevent version: ${actual_tevent_version}"
93
		die "Ebuild needs to fix TEVENT_VERSION!"
94
	fi
95
}
96

  
68 97
src_prepare() {
69 98
	default
70 99

  
100
	check_samba_dep_versions
101

  
71 102
	if use test && ! use python ; then
72 103
		# We want to be able to run tests w/o Python as it makes
73 104
		# automated testing much easier (as USE=python isn't default-enabled).
......
78 109
}
79 110

  
80 111
multilib_src_configure() {
112
	# When specifying libs for samba build you must append NONE to the end to
113
	# stop it automatically including things
114
	local bundled_libs="NONE"
115

  
116
	# We "use" bundled cmocka when we're not running tests as we're
117
	# not using it anyway. Means we avoid making users install it for
118
	# no reason. bug #802531
119
	if ! use test; then
120
		bundled_libs="cmocka,${bundled_libs}"
121
	fi
122

  
81 123
	local myconf=(
82 124
		$(usex ldap '' --disable-ldap)
83 125
		$(usex lmdb '' --without-ldb-lmdb)
84 126
		--disable-rpath
85
		--disable-rpath-install --bundled-libraries=NONE
127
		--disable-rpath-install
86 128
		--with-modulesdir="${EPREFIX}"/usr/$(get_libdir)/samba
129
		--bundled-libraries="${bundled_libs}"
87 130
		--builtin-libraries=NONE
88 131
	)
89
	if ! multilib_is_native_abi; then
132

  
133
	if ! use python || ! multilib_is_native_abi; then
90 134
		myconf+=( --disable-python )
91
	else
92
		use python || myconf+=( --disable-python )
93 135
	fi
136

  
94 137
	waf-utils_src_configure "${myconf[@]}"
95 138
}
96 139

  
......
102 145
multilib_src_test() {
103 146
	if multilib_is_native_abi; then
104 147
		WAF_MAKE=1 \
105
		PATH=buildtools/bin:../../../buildtools/bin:$PATH:"${BUILD_DIR}"/bin/shared/private/ \
106
		LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"${BUILD_DIR}"/bin/shared/private/:"${BUILD_DIR}"/bin/shared \
148
		PATH=buildtools/bin:../../../buildtools/bin:${PATH}:"${BUILD_DIR}"/bin/shared/private/ \
149
		LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"${BUILD_DIR}"/bin/shared/private/:"${BUILD_DIR}"/bin/shared \
107 150
		waf test || die
108 151
	fi
109 152
}
......
117 160
		dodoc -r apidocs/html/.
118 161
	fi
119 162

  
120
	use python && python_optimize #726454
163
	# bug #726454
164
	use python && python_optimize
121 165
}
122 166

  
123 167
pkg_postinst() {
Thank you!