Skip to content

Commit

Permalink
cyrus-sasl: 2.1.26 -> 2.1.27 w/ cross-compiling support
Browse files Browse the repository at this point in the history
Fixes #50539
  • Loading branch information
eburimu authored and matthewbauer committed Nov 21, 2018
1 parent d492f53 commit b13af1e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/m4/sasl2.m4 2018-11-18 22:33:29.902625600 +0300
+++ b/m4/sasl2.m4 2018-11-18 22:33:59.828746176 +0300
@@ -339,7 +339,8 @@
],
[ AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO])
AC_MSG_RESULT(yes) ],
- AC_MSG_RESULT(no))
+ AC_MSG_RESULT(no),
+ AC_MSG_RESULT(no))
LIBS="$cmu_save_LIBS"

else
25 changes: 9 additions & 16 deletions pkgs/development/libraries/cyrus-sasl/default.nix
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
{ lib, stdenv, fetchurl, openssl, openldap, kerberos, db, gettext,
pam, fixDarwinDylibNames, autoreconfHook, fetchpatch, enableLdap ? false }:
{ lib, stdenv, fetchurl, openssl, openldap, kerberos, db, gettext
, pam, fixDarwinDylibNames, autoreconfHook, fetchpatch, enableLdap ? false
, buildPackages }:

with stdenv.lib;
stdenv.mkDerivation rec {
name = "cyrus-sasl-${version}${optionalString (kerberos == null) "-without-kerberos"}";
version = "2.1.26";
version = "2.1.27";

src = fetchurl {
url = "ftp://ftp.cyrusimap.org/cyrus-sasl/${name}.tar.gz";
sha256 = "1hvvbcsg21nlncbgs0cgn3iwlnb3vannzwsp6rwvnn9ba4v53g4g";
sha256 = "1m85zcpgfdhm43cavpdkhb1s2zq1b31472hq1w1gs3xh94anp1i6";
};

outputs = [ "bin" "dev" "out" "man" "devdoc" ];

depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ autoreconfHook fixDarwinDylibNames ];
buildInputs =
[ openssl db gettext kerberos ]
++ lib.optional enableLdap openldap
++ lib.optional stdenv.isFreeBSD autoreconfHook
++ lib.optional stdenv.isLinux pam
++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
++ lib.optional stdenv.isLinux pam;

patches = [
./missing-size_t.patch # https://bugzilla.redhat.com/show_bug.cgi?id=906519
(fetchpatch {
name = "CVE-2013-4122.patch";
url = "http://sourceforge.net/projects/miscellaneouspa/files/glibc217/cyrus-sasl-2.1.26-glibc217-crypt.diff";
sha256 = "05l7dh1w9d5fvzg0pjwzqh0fy4ah8y5cv6v67s4ssbq8xwd4pkf2";
})
./cyrus-sasl-ac-try-run-fix.patch
] ++ lib.optional stdenv.isFreeBSD (
fetchurl {
url = "http://www.linuxfromscratch.org/patches/blfs/svn/cyrus-sasl-2.1.26-fixes-3.patch";
Expand All @@ -42,10 +39,6 @@ stdenv.mkDerivation rec {
"--enable-shared"
] ++ lib.optional enableLdap "--with-ldap=${openldap.dev}";

# Avoid triggering regenerating using broken autoconf/libtool bits.
# (many distributions carry patches to remove/replace, but this works for now)
dontUpdateAutotoolsGnuConfigScripts = if stdenv.hostPlatform.isMusl then true else null;

installFlags = lib.optional stdenv.isDarwin [ "framedir=$(out)/Library/Frameworks/SASL2.framework" ];

postInstall = ''
Expand Down

1 comment on commit b13af1e

@sachi059
Copy link

@sachi059 sachi059 commented on b13af1e Mar 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eburimu Hi, After changing this how we can rebuilt the package,
Can someone tell the sequence of GNU autotools to be used for generating configure file.

Please sign in to comment.