summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-30 05:15:58 +0100
committerSam James <sam@gentoo.org>2022-09-30 05:18:42 +0100
commitb23366c1e34cd6c65ca1aa439d7a98a8c5dfd8cc (patch)
tree4ec8c1cd2dac2ed7a7676d64b92458677acbc4f4 /net-fs
parentsys-libs/ldb: add 2.6.1, conditionally depend on cmocka, add version checker (diff)
downloadgentoo-b23366c1e34cd6c65ca1aa439d7a98a8c5dfd8cc.tar.gz
gentoo-b23366c1e34cd6c65ca1aa439d7a98a8c5dfd8cc.tar.bz2
gentoo-b23366c1e34cd6c65ca1aa439d7a98a8c5dfd8cc.zip
net-fs/samba: add talloc/tdb/tevent version checker
Nabbed Ionen's sed from wine-proton etc. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/samba/samba-4.16.5-r1.ebuild35
1 files changed, 32 insertions, 3 deletions
diff --git a/net-fs/samba/samba-4.16.5-r1.ebuild b/net-fs/samba/samba-4.16.5-r1.ebuild
index b14d8de3be2c..4ece5b887999 100644
--- a/net-fs/samba/samba-4.16.5-r1.ebuild
+++ b/net-fs/samba/samba-4.16.5-r1.ebuild
@@ -55,6 +55,10 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/samba-4.0/ctdb_version.h
)
+TALLOC_VERSION="2.3.3"
+TDB_VERSION="1.4.6"
+TEVENT_VERSION="0.11.0"
+
COMMON_DEPEND="
>=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
dev-lang/perl:=
@@ -71,9 +75,9 @@ COMMON_DEPEND="
sys-libs/liburing:=[${MULTILIB_USEDEP}]
sys-libs/ncurses:=
sys-libs/readline:=
- >=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}]
- >=sys-libs/tdb-1.4.6[${MULTILIB_USEDEP}]
- >=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}]
+ >=sys-libs/talloc-${TALLOC_VERSION}[${MULTILIB_USEDEP}]
+ >=sys-libs/tdb-${TDB_VERSION}[${MULTILIB_USEDEP}]
+ >=sys-libs/tevent-${TEVENT_VERSION}[${MULTILIB_USEDEP}]
sys-libs/zlib[${MULTILIB_USEDEP}]
virtual/libcrypt:=[${MULTILIB_USEDEP}]
virtual/libiconv
@@ -166,9 +170,34 @@ pkg_setup() {
fi
}
+check_samba_dep_versions() {
+ actual_talloc_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/talloc/wscript || die)
+ if [[ ${actual_talloc_version} != ${TALLOC_VERSION} ]] ; then
+ eerror "Source talloc version: ${TALLOC_VERSION}"
+ eerror "Ebuild talloc version: ${actual_talloc_version}"
+ die "Ebuild needs to fix TALLOC_VERSION!"
+ fi
+
+ actual_tdb_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tdb/wscript || die)
+ if [[ ${actual_tdb_version} != ${TDB_VERSION} ]] ; then
+ eerror "Source tdb version: ${TDB_VERSION}"
+ eerror "Ebuild tdb version: ${actual_tdb_version}"
+ die "Ebuild needs to fix TDB_VERSION!"
+ fi
+
+ actual_tevent_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tevent/wscript || die)
+ if [[ ${actual_tevent_version} != ${TEVENT_VERSION} ]] ; then
+ eerror "Source tevent version: ${TEVENT_VERSION}"
+ eerror "Ebuild tevent version: ${actual_tevent_version}"
+ die "Ebuild needs to fix TEVENT_VERSION!"
+ fi
+}
+
src_prepare() {
default
+ check_samba_dep_versions
+
# Unbundle dnspython
sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die