# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup perl5 1.0 # O_CLOEXEC, AT_FDCWD, utimensat PortGroup legacysupport 1.1 legacysupport.newest_darwin_requires_legacy 16 name samba4 # With sbsat due to /opt/local/bin/gentest conflicts samba3 sbsat version 4.21.2 revision 2 checksums rmd160 f8b0751600bb857aadc37767c8edf0afd57bf3c1 \ sha256 bde66be3d2025cb949de38518ad2652f3795f824c7fa89d4e443ede1ae828ea6 \ size 42647875 categories net maintainers nomaintainer license GPL-3+ description SMB/CIFS server and client long_description Samba is an software suite that provides seamless file \ and print services to SMB/CIFS clients. homepage https://www.samba.org master_sites https://download.samba.org/pub/samba/stable distname samba-${version} perl5.major 5.34 depends_build path:bin/pkg-config:pkgconfig \ port:gettext \ port:bison depends_lib port:gettext-runtime \ path:lib/pkgconfig/gnutls.pc:gnutls \ port:gpgme \ path:lib/pkgconfig/icu-uc.pc:icu \ port:jansson \ port:libarchive \ port:libiconv \ path:lib/libldap.dylib:openldap \ port:p${perl5.major}-parse-yapp \ port:popt \ port:python313 \ port:readline \ port:zlib \ port:tdb \ port:talloc \ port:tevent platform darwin { # patch "get_user_groups: failed to get the unix group list" on # macOS # # Samba fails on macOS when current user belongs to more than 16 # groups. # # The 16 group limit is returned by sysconf when asked for # _SC_NGROUPS_MAX; this is apparently due to OS X's nested groups; # while the call to getgrouplist returns a flat (not nested) group # list. getgrouplist will happily return the first 16 groups but # still return a -1 return code, indicating failure. Hence the # strange maximum of 16 groups on OS X. # # https://github.com/Homebrew/legacy-homebrew/issues/5954 patchfiles-append \ patch-macos-grouplimit.diff } # patch to disable building documentation on MacOS # this enables us to have a working samba4 port without docs, # rather than not having samba4 at all. Can be removed when # doc build issues are resolved. patchfiles-append patch-no-xsltproc.diff patchfiles-append patch-bug-15030.diff patchfiles-append patch-samba-install.diff # https://bugzilla.samba.org/show_bug.cgi?id=15763 patchfiles-append patch-ldb-test.diff # Add a missing header for renameat. patchfiles-append patch-vfs_default.c.diff configure.perl ${perl5.bin} configure.python ${prefix}/bin/python3.13 configure.env-append \ YAPP=${prefix}/bin/yapp-${perl5.major} # configure script provided by samba forwards to waf, but also sets environment. # bypassing it breaks build on ppc: https://trac.macports.org/ticket/65622 # configure.cmd ${configure.python} ./buildtools/bin/waf configure configure.args -C \ --enable-fhs \ --mandir=${prefix}/share/man \ --with-libiconv=${prefix} \ --without-acl-support \ --without-ad-dc \ --disable-avahi \ --with-gpgme \ --disable-spotlight # https://trac.macports.org/ticket/71494 if {[string match *gcc* ${configure.compiler}]} { configure.cflags-append \ -Wno-error=incompatible-pointer-types } build.pre_args build.env-append PYTHON=${configure.python} DESTDIR=${destroot} destroot.env-append PYTHON=${configure.python} DESTDIR=${destroot} destroot.destdir # error: redefinition of typedef ‘SMB_STRUCT_STAT’ compiler.blacklist-append *gcc-4.* {clang < 400} livecheck.type regex livecheck.url https://download.samba.org/pub/samba/ livecheck.regex samba-(\[0-9a-z.\]+)\\.tar\\.gz