Date: Wed, 21 Aug 2024 17:01:32 GMT From: Mateusz Piotrowski <0mp@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: b6c509342f4a - main - Mk/Uses/samba.mk: Clean up and define SAMBA_LDB_PORT Message-ID: <202408211701.47LH1WcW039027@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/ports/commit/?id=b6c509342f4a065b30cf1afe0b2a8f67bd5a0401 commit b6c509342f4a065b30cf1afe0b2a8f67bd5a0401 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-08-19 19:56:05 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-08-21 17:00:46 +0000 Mk/Uses/samba.mk: Clean up and define SAMBA_LDB_PORT - Deprecate the SAMBAPORT, SAMBALIBS, and SAMBAINCLUDES variables and replace them with the more readable and consistent SAMBA_PORT, SAMBA_LIBDIR, and SAMBA_INCLUDEDIR. The new variables follow the conventions of python.mk, ruby.mk, and cargo.mk more and are more future-proof. - Rearrange the order of IGNORE checks. - Explicitly mention the ports used samba.mk in a searchable manner (i.e., grepping for net/samba419 is going to return samba.mk). - Define SAMBA_LDB_PORT, which allows ports to always use the right version of ldb for the Samba selected via SAMBA_DEFAULT. - Remove old comments about samba.mk becoming more granular once subpackages are committed. Subpackages will not help samba.mk because Samba's bundled dependencies are built as private libraries and are not usable by external software. PR: 280773 Reviewed by: Xavier Beaudouin <kiwi@oav.net> Approved by: samba (0mp, Xavier Beaudouin <kiwi@oav.net>) Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D46322 --- Mk/Uses/samba.mk | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/Mk/Uses/samba.mk b/Mk/Uses/samba.mk index de3ba677bc7e..27d0ec1595da 100644 --- a/Mk/Uses/samba.mk +++ b/Mk/Uses/samba.mk @@ -5,8 +5,6 @@ # Valid ARGS: build, env, lib, run # default is build,run (implicit) # -# When subpackages are available this can be more granular -# # MAINTAINER: samba@FreeBSD.org .if !defined(_INCLUDE_USES_SAMBA_MK) @@ -20,22 +18,35 @@ samba_ARGS= build run IGNORE= USES=samba has invalid arguments: ${samba_ARGS:Nbuild:Nenv:Nlib:Nrun} . endif -SAMBAPORT= net/samba${SAMBA_DEFAULT:S/.//} -SAMBAINCLUDES= ${LOCALBASE}/include/samba4 -. if ${SAMBA_DEFAULT} == 4.16 || ${SAMBA_DEFAULT} == 4.19 -SAMBALIBS= ${LOCALBASE}/lib/samba4 -. else +. if ${SAMBA_DEFAULT} != 4.16 && ${SAMBA_DEFAULT} != 4.19 IGNORE= Invalid version of samba: ${SAMBA_DEFAULT} . endif +SAMBA_SUFFIX= ${SAMBA_DEFAULT:S/.//} + +SAMBA_PORT_416= net/samba416 +SAMBA_LDB_PORT_416= databases/ldb25 +SAMBA_PORT_419= net/samba419 +SAMBA_LDB_PORT_419= databases/ldb28 + +SAMBA_PORT= ${SAMBA_PORT_${SAMBA_SUFFIX}} +SAMBA_INCLUDEDIR= ${LOCALBASE}/include/samba4 +SAMBA_LIBDIR= ${LOCALBASE}/lib/samba4 +SAMBA_LDB_PORT= ${SAMBA_LDB_PORT_${SAMBA_SUFFIX}} + . if ${samba_ARGS:Mbuild} -BUILD_DEPENDS+= smbd:${SAMBAPORT} +BUILD_DEPENDS+= smbd:${SAMBA_PORT} . endif . if ${samba_ARGS:Mlib} -LIB_DEPENDS+= libsmbclient.so:${SAMBAPORT} +LIB_DEPENDS+= libsmbclient.so:${SAMBA_PORT} . endif . if ${samba_ARGS:Mrun} -RUN_DEPENDS+= smbd:${SAMBAPORT} +RUN_DEPENDS+= smbd:${SAMBA_PORT} . endif +# Legacy variables. Removing those requires a tree-wide update +# and a note in the CHANGES file +SAMBAPORT= ${SAMBA_PORT} +SAMBAINCLUDES= ${SAMBA_INCLUDEDIR} +SAMBALIBS= ${SAMBA_LIBDIR} .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408211701.47LH1WcW039027>