Index: Mk/Uses/samba.mk =================================================================== --- /dev/null +++ Mk/Uses/samba.mk @@ -0,0 +1,40 @@ + +.if !defined(_INCLUDE_USES_SAMBA_MK) +_INCLUDE_USES_SAMBA_MK= yes + +.if !${samba_ARGS} +samba_ARGS= build run +.endif + +.if ${samba_ARGS:Nbuild:Nlib:Nrun} +IGNORE= USES=samba has invalid arguments: ${samba_ARGS:Nbuild:Nlib:Nrun} +.endif + +.if ${SAMBA_DEFAULT} == 4.2 +SAMBAINCLUDES= ${LOCALBASE}/include/samba4 +SAMBALIBS= ${LOCALBASE}/lib +SAMBAPORT= net/samba42 +.elif ${SAMBA_DEFAULT} == 4.3 +SAMBAINCLUDES= ${LOCALBASE}/include/samba4 +SAMBALIBS= ${LOCALBASE}/lib +SAMBAPORT= net/samba43 +.elif ${SAMBA_DEFAULT} == 4.4 +SAMBAINCLUDES= ${LOCALBASE}/include/samba4 +SAMBALIBS= ${LOCALBASE}/lib/samba4 +SAMBAPORT= net/samba44 +.else +IGNORE= Invalid version of samba ${SAMBA_DEFAULT} +.endif + +.if ${samba_ARGS:Mbuild} +BUILD_DEPENDS+= smbd:${SAMBAPORT} +.endif +.if ${samba_ARGS:Mlib} +LIB_DEPENDS+= libsmbclient.so:${SAMBAPORT} +.endif +.if ${samba_ARGS:Mrun} +RUN_DEPENDS+= smbd:${SAMBAPORT} +.endif + +.endif + Index: Mk/bsd.default-versions.mk =================================================================== --- Mk/bsd.default-versions.mk +++ Mk/bsd.default-versions.mk @@ -78,6 +78,8 @@ PYTHON3_DEFAULT?= 3.5 # Possible values: 2.1, 2.2, 2.3, 2.4 RUBY_DEFAULT?= 2.2 +# Possible values: 4.2, 4.3, 4.4 +SAMBA_DEFAULT?= 4.4 # Possible values: base, openssl, openssl-devel, libressl, libressl-devel .if !defined(SSL_DEFAULT) # If no preference was set, check for an installed base version Index: audio/xmms2/Makefile =================================================================== --- audio/xmms2/Makefile +++ audio/xmms2/Makefile @@ -122,7 +122,9 @@ PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_CONFIGURE_OFF= --without-plugins="pulse" -SAMBA_LIB_DEPENDS= libsmbclient.so:net/samba-libsmbclient +SAMBA_USES= samba:lib +SAMBA_CPPFLAGS= -I${SAMBAINCLUDES} +SAMBA_LDFLAGS= -L${SAMBALIBS} SAMBA_CONFIGURE_OFF= --without-plugins="samba" SID_LIB_DEPENDS= libsidplay2.so:audio/libsidplay2 Index: devel/gnome-vfs/Makefile =================================================================== --- devel/gnome-vfs/Makefile +++ devel/gnome-vfs/Makefile @@ -61,7 +61,8 @@ .endif .if ${PORT_OPTIONS:MSAMBA} -LIB_DEPENDS+= libsmbclient.so:net/samba-libsmbclient +CONFIGURE_ARGS+=--with-samba-includes=${SAMBAINCLUDES} --with-samba-libs=${SAMBALIBS} +USES+= samba:lib PLIST_SUB+= SAMBA="" .else PLIST_SUB+= SAMBA="@comment " Index: devel/gvfs/Makefile =================================================================== --- devel/gvfs/Makefile +++ devel/gvfs/Makefile @@ -53,8 +53,9 @@ FUSE_USES= fuse FUSE_CONFIGURE_ENABLE= fuse -SAMBA_LIB_DEPENDS= libsmbclient.so:net/samba-libsmbclient +SAMBA_USES= samba:lib SAMBA_CONFIGURE_ENABLE= samba +SAMBA_CONFIGURE_WITH= samba-includes=${SAMBAINCLUDES} samba-libs=${SAMBALIBS} CDDA_LIB_DEPENDS= libcdio_paranoia.so:sysutils/libcdio-paranoia CDDA_CONFIGURE_ENABLE= cdda Index: emulators/qemu-devel/Makefile =================================================================== --- emulators/qemu-devel/Makefile +++ emulators/qemu-devel/Makefile @@ -63,7 +63,7 @@ STATIC_LINK_CONFIGURE_ON= --static STATIC_LINK_PREVENTS= GTK2 X11 STATIC_LINK_PREVENTS_MSG= X11 ui cannot be built static -SAMBA_RUN_DEPENDS= ${LOCALBASE}/sbin/smbd:net/samba36 +SAMBA_USES= samba:run # smbd DOCS_BUILD_DEPENDS= texi2html:textproc/texi2html DOCS_USES= makeinfo DOCS_MAKE_ARGS_OFF= NOPORTDOCS=1 Index: emulators/qemu-devel/pkg-message =================================================================== --- emulators/qemu-devel/pkg-message +++ emulators/qemu-devel/pkg-message @@ -44,7 +44,7 @@ the same way. - The -smb option (smb-export local dir to guest using the default - slirp networking) needs the net/samba36 port/package installed + slirp networking) needs the samba port/package installed in addition to qemu. (SAMBA knob.) - If you want to use usb devices connected to the host in the guest Index: emulators/qemu-sbruno/Makefile =================================================================== --- emulators/qemu-sbruno/Makefile +++ emulators/qemu-sbruno/Makefile @@ -213,7 +213,7 @@ .endif .if ${PORT_OPTIONS:MSAMBA} -RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:net/samba36 +USES+= samba:run # smbd .endif .if ${PORT_OPTIONS:MDOCS} Index: emulators/qemu-sbruno/pkg-message =================================================================== --- emulators/qemu-sbruno/pkg-message +++ emulators/qemu-sbruno/pkg-message @@ -44,7 +44,7 @@ the same way. - The -smb option (smb-export local dir to guest using the default - slirp networking) needs the net/samba36 port/package installed + slirp networking) needs the samba port/package installed in addition to qemu. (SAMBA knob.) - If you want to use usb devices connected to the host in the guest Index: emulators/qemu/Makefile =================================================================== --- emulators/qemu/Makefile +++ emulators/qemu/Makefile @@ -65,7 +65,7 @@ STATIC_LINK_PREVENTS= GTK2 X11 STATIC_LINK_PREVENTS_MSG= X11 ui cannot be built static NCURSES_USES= ncurses:base -SAMBA_RUN_DEPENDS= ${LOCALBASE}/sbin/smbd:net/samba36 +SAMBA_USES= samba:run # smbd DOCS_BUILD_DEPENDS= texi2html:textproc/texi2html DOCS_USES= makeinfo DOCS_MAKE_ARGS_OFF= NOPORTDOCS=1 Index: emulators/qemu/pkg-message =================================================================== --- emulators/qemu/pkg-message +++ emulators/qemu/pkg-message @@ -44,7 +44,7 @@ the same way. - The -smb option (smb-export local dir to guest using the default - slirp networking) needs the net/samba36 port/package installed + slirp networking) needs the samba port/package installed in addition to qemu. (SAMBA knob.) - If you want to use usb devices connected to the host in the guest Index: net/samba42/Makefile =================================================================== --- net/samba42/Makefile +++ net/samba42/Makefile @@ -155,7 +155,6 @@ --with-winbind \ --without-gettext \ --with-sendfile-support \ - --builtin-libraries=smbclient \ ${ICONV_CONFIGURE_BASE} # for libexecinfo: (so that __builtin_frame_address() finds the top of the stack) Index: net/samba42/pkg-plist =================================================================== --- net/samba42/pkg-plist +++ net/samba42/pkg-plist @@ -197,6 +197,8 @@ lib/libsamba-util.so.0 lib/libsamdb.so lib/libsamdb.so.0 +lib/libsmbclient.so +lib/libsmbclient.so.0 lib/libsmbclient-raw.so lib/libsmbclient-raw.so.0 lib/libsmbconf.so @@ -473,6 +475,7 @@ %%PKGCONFIGDIR%%/samba-policy.pc %%PKGCONFIGDIR%%/samba-util.pc %%PKGCONFIGDIR%%/samdb.pc +%%PKGCONFIGDIR%%/smbclient.pc %%PKGCONFIGDIR%%/smbclient-raw.pc %%PKGCONFIGDIR%%/torture.pc %%PKGCONFIGDIR%%/wbclient.pc Index: net/samba43/Makefile =================================================================== --- net/samba43/Makefile +++ net/samba43/Makefile @@ -155,7 +155,6 @@ --with-winbind \ --without-gettext \ --with-sendfile-support \ - --builtin-libraries=smbclient \ ${ICONV_CONFIGURE_BASE} # for libexecinfo: (so that __builtin_frame_address() finds the top of the stack) Index: net/samba43/pkg-plist =================================================================== --- net/samba43/pkg-plist +++ net/samba43/pkg-plist @@ -204,6 +204,8 @@ lib/libsamba-util.so.0 lib/libsamdb.so lib/libsamdb.so.0 +lib/libsmbclient.so +lib/libsmbclient.so.0 lib/libsmbclient-raw.so lib/libsmbclient-raw.so.0 lib/libsmbconf.so @@ -499,6 +501,7 @@ %%PKGCONFIGDIR%%/samba-policy.pc %%PKGCONFIGDIR%%/samba-util.pc %%PKGCONFIGDIR%%/samdb.pc +%%PKGCONFIGDIR%%/smbclient.pc %%PKGCONFIGDIR%%/smbclient-raw.pc %%PKGCONFIGDIR%%/torture.pc %%PKGCONFIGDIR%%/wbclient.pc Index: net/samba44/Makefile =================================================================== --- net/samba44/Makefile +++ net/samba44/Makefile @@ -156,7 +156,6 @@ --disable-rpath \ --without-gettext \ --with-sendfile-support \ - --builtin-libraries=smbclient \ ${ICONV_CONFIGURE_BASE} # for libexecinfo: (so that __builtin_frame_address() finds the top of the stack) Index: net/samba44/pkg-plist =================================================================== --- net/samba44/pkg-plist +++ net/samba44/pkg-plist @@ -160,6 +160,8 @@ lib/samba4/libsamba-util.so.0 lib/samba4/libsamdb.so lib/samba4/libsamdb.so.0 +lib/samba4/libsmbclient.so +lib/samba4/libsmbclient.so.0 lib/samba4/libsmbconf.so lib/samba4/libsmbconf.so.0 %%LDAP%%lib/samba4/libsmbldap.so @@ -450,6 +452,7 @@ %%PKGCONFIGDIR%%/samba-policy.pc %%PKGCONFIGDIR%%/samba-util.pc %%PKGCONFIGDIR%%/samdb.pc +%%PKGCONFIGDIR%%/smbclient.pc %%PKGCONFIGDIR%%/wbclient.pc %%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/dckeytab.so %%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/posix_eadb.so