From c9b4c74d6a6695eaefd110d8435538a8680a2e75 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Tue, 15 Dec 2015 06:56:49 -0500 Subject: [PATCH] Add libsasl package --- packages/libsasl/auth_getpwent.c.patch | 25 +++++++++++++++++++++++++ packages/libsasl/build.sh | 17 +++++++++++++++++ packages/libsasl/config-ltconfig.patch | 24 ++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 packages/libsasl/auth_getpwent.c.patch create mode 100644 packages/libsasl/build.sh create mode 100644 packages/libsasl/config-ltconfig.patch diff --git a/packages/libsasl/auth_getpwent.c.patch b/packages/libsasl/auth_getpwent.c.patch new file mode 100644 index 000000000..10637b0dc --- /dev/null +++ b/packages/libsasl/auth_getpwent.c.patch @@ -0,0 +1,25 @@ +diff -u -r ../cyrus-sasl-2.1.26/saslauthd/auth_getpwent.c ./saslauthd/auth_getpwent.c +--- ../cyrus-sasl-2.1.26/saslauthd/auth_getpwent.c 2012-10-12 10:05:48.000000000 -0400 ++++ ./saslauthd/auth_getpwent.c 2015-12-13 20:55:42.978090186 -0500 +@@ -105,17 +105,21 @@ + } + } + ++#ifndef __ANDROID__ + if (strcmp(pw->pw_passwd, (const char *)crypt(password, pw->pw_passwd))) { + if (flags & VERBOSE) { + syslog(LOG_DEBUG, "DEBUG: auth_getpwent: %s: invalid password", login); + } ++#endif + RETURN("NO Incorrect password"); ++#ifndef __ANDROID__ + } + + if (flags & VERBOSE) { + syslog(LOG_DEBUG, "DEBUG: auth_getpwent: OK: %s", login); + } + RETURN("OK"); ++#endif + } + + /* END FUNCTION: auth_getpwent */ diff --git a/packages/libsasl/build.sh b/packages/libsasl/build.sh new file mode 100644 index 000000000..4dfcfdaff --- /dev/null +++ b/packages/libsasl/build.sh @@ -0,0 +1,17 @@ +TERMUX_PKG_HOMEPAGE=http://asg.web.cmu.edu/sasl/ +TERMUX_PKG_DESCRIPTION="Cyrus SASL - authentication abstraction library" +TERMUX_PKG_VERSION=2.1.26 +TERMUX_PKG_SRCURL=ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" ac_cv_func_syslog=no ac_cv_header_syslog_h=no" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --without-des --disable-otp" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-plugindir=$TERMUX_PREFIX/lib/sasl2 --sysconfdir=$TERMUX_PREFIX/etc" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-dblib=none" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-dbpath=$TERMUX_PREFIX/var/lib/sasldb --with-saslauthd=$TERMUX_PREFIX/var/run/saslauthd" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --without-saslauthd" +TERMUX_PKG_RM_AFTER_INSTALL="bin/pluginviewer" + +termux_step_post_configure () { + # Build wants to run makemd5 at build time: + gcc $TERMUX_PKG_SRCDIR/include/makemd5.c -o $TERMUX_PKG_BUILDDIR/include/makemd5 + $TERMUX_TOUCH -d "next hour" $TERMUX_PKG_BUILDDIR/include/makemd5 +} diff --git a/packages/libsasl/config-ltconfig.patch b/packages/libsasl/config-ltconfig.patch new file mode 100644 index 000000000..bc0c12611 --- /dev/null +++ b/packages/libsasl/config-ltconfig.patch @@ -0,0 +1,24 @@ +diff -u -r ../cyrus-sasl-2.1.26/config/ltconfig ./config/ltconfig +--- ../cyrus-sasl-2.1.26/config/ltconfig 2012-10-12 10:05:48.000000000 -0400 ++++ ./config/ltconfig 2015-12-15 06:27:44.916679421 -0500 +@@ -1237,9 +1240,9 @@ + + *) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC $CFLAGS -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC $CFLAGS -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; +@@ -1956,7 +1962,7 @@ + shlibpath_var=DYLD_LIBRARY_PATH + ;; + +-gnu*) ++gnu* | linux-android*) + version_type=linux + need_lib_prefix=no + need_version=no