--- /usr/portage/net-fs/samba/samba-4.5.1.ebuild 2016-11-02 10:04:10.000000000 +0000 +++ /usr/local/portage/net-fs/samba/samba-4.5.1-r999.ebuild 2016-12-04 14:13:32.277000000 +0000 @@ -25,8 +25,8 @@ SLOT="0" -IUSE="acl addc addns ads client cluster cups dmapi fam gnutls iprint -ldap pam quota selinux syslog +system-mitkrb5 systemd test winbind zeroconf" +IUSE="acl addc addns ads client cluster cups dmapi fam gnutls gpgme internal-heimdal iprint +ldap pam quota selinux syslog +system-mitkrb5 system-heimdal systemd test winbind zeroconf" MULTILIB_WRAPPED_HEADERS=( /usr/include/samba-4.0/policy.h @@ -56,7 +56,7 @@ sys-libs/ncurses:0=[${MULTILIB_USEDEP}] >=sys-libs/talloc-2.1.8[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}] >=sys-libs/tdb-1.3.10[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}] - >=sys-libs/tevent-0.9.31-r1[${MULTILIB_USEDEP}] + >=sys-libs/tevent-0.9.29[${MULTILIB_USEDEP}] sys-libs/zlib[${MULTILIB_USEDEP}] pam? ( virtual/pam ) acl? ( virtual/acl ) @@ -69,7 +69,8 @@ >=net-libs/gnutls-1.4.0 ) ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] ) system-mitkrb5? ( app-crypt/mit-krb5[${MULTILIB_USEDEP}] ) - !system-mitkrb5? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) + gpgme? ( app-crypt/gpgme ) systemd? ( sys-apps/systemd:0= )" DEPEND="${CDEPEND} virtual/pkgconfig" @@ -79,14 +80,18 @@ !dev-perl/Parse-Yapp " -REQUIRED_USE="addc? ( gnutls !system-mitkrb5 ) - ads? ( acl gnutls ldap ) +REQUIRED_USE=" + ^^ ( internal-heimdal system-heimdal system-mitkrb5 ) + addc? ( gnutls internal-heimdal ) + ads? ( acl ldap ) + gpgme? ( addc ) ${PYTHON_REQUIRED_USE}" S="${WORKDIR}/${MY_P}" PATCHES=( "${FILESDIR}/${PN}-4.4.0-pam.patch" + "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch" ) #CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" @@ -94,6 +99,10 @@ WAF_BINARY="${S}/buildtools/bin/waf" +# when specifying libs for samba build you must append NONE to the end to +# stop it automatically including things +HEIMDAL_LIBS="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE" + SHAREDMODS="" pkg_setup() { @@ -105,9 +114,13 @@ src_prepare() { default - + if use system-heimdal ; then + eapply "${FILESDIR}/${PN}-4.5.1-heimdal_compile_fix.patch" + fi # install the patches from tarball(s) - eapply "${WORKDIR}/patches/" +# eapply "${WORKDIR}/patches/" + + sed -i -e 's:::' source4/dsdb/samdb/ldb_modules/password_hash.c # ugly hackaround for bug #592502 cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die @@ -123,7 +136,7 @@ --localstatedir="${EPREFIX}/var" --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba" --with-piddir="${EPREFIX}/run/${PN}" - --bundled-libraries=NONE + --bundled-libraries=$(usex internal-heimdal $HEIMDAL_LIBS NONE) --builtin-libraries=NONE --disable-rpath --disable-rpath-install @@ -151,6 +164,7 @@ $(use_with systemd) $(usex system-mitkrb5 '--with-system-mitkrb5' '') $(use_with winbind) + $(use_with gpgme) $(usex test '--enable-selftest' '') $(use_enable zeroconf avahi) --with-shared-modules=${SHAREDMODS} @@ -176,6 +190,7 @@ $(usex system-mitkrb5 '--with-system-mitkrb5' '') --without-winbind --disable-python + --without-gpgme ) fi