summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Exequiel Pedone2024-03-28 10:41:45 -0300
committerGonzalo Exequiel Pedone2024-03-28 10:41:45 -0300
commit1e24ab9f1b689bca9c40c09cb3fc5c2e69a58f9d (patch)
tree779184e8fea10ed43c4d81cf78347b8d5db3d631
downloadaur-android-x86-libsasl.tar.gz
New package.
-rw-r--r--.SRCINFO31
-rw-r--r--.gitignore6
-rw-r--r--0001-Add-missing-headers.patch21
-rw-r--r--0002-Disable-endpwent.patch10
-rw-r--r--PKGBUILD102
5 files changed, 170 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3ddb545d581c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,31 @@
+pkgbase = android-x86-libsasl
+ pkgdesc = Cyrus Simple Authentication Service Layer (SASL) library (Android, x86)
+ pkgver = 2.1.28
+ pkgrel = 1
+ url = https://www.cyrusimap.org/sasl/
+ arch = any
+ groups = android-libsasl
+ license = custom
+ makedepends = android-configure
+ makedepends = android-x86-openldap
+ makedepends = android-x86-mariadb
+ makedepends = android-x86-postgresql
+ makedepends = android-x86-sqlite
+ depends = android-x86-gdbm
+ depends = android-x86-openssl
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ options = !emptydirs
+ source = https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-2.1.28/cyrus-sasl-2.1.28.tar.gz
+ source = https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-2.1.28/cyrus-sasl-2.1.28.tar.gz.sig
+ source = 0001-Add-missing-headers.patch
+ source = 0002-Disable-endpwent.patch
+ validpgpkeys = 829F339F8C296FE80F409D93E3D7C118C7B9F46A
+ validpgpkeys = DEA1999F0CDB1AAEBA001E0DBEE3E3B4D2F06546
+ md5sums = 6f228a692516f5318a64505b46966cfa
+ md5sums = SKIP
+ md5sums = 15c03fcc850a6282adabc4f4d17cd517
+ md5sums = f4ff7c553efe884ee328167893005e11
+
+pkgname = android-x86-libsasl
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..b5b03b115225
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+pkg
+src
+*.tar.xz
+*.tar.gz
+*.tar.bz2
+*.asc
diff --git a/0001-Add-missing-headers.patch b/0001-Add-missing-headers.patch
new file mode 100644
index 000000000000..f0b6b9a414c4
--- /dev/null
+++ b/0001-Add-missing-headers.patch
@@ -0,0 +1,21 @@
+--- a/plugins/cram.c
++++ b/plugins/cram.c
+@@ -48,6 +48,7 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <time.h>
+ #ifndef macintosh
+ #include <sys/stat.h>
+ #endif
+--- a/saslauthd/auth_getpwent.c
++++ b/saslauthd/auth_getpwent.c
+@@ -39,6 +39,8 @@
+ #include <errno.h>
+ #include <syslog.h>
+ #include <stdio.h>
++#include <sys/types.h>
++#include <pwd.h>
+
+ #ifdef HAVE_CRYPT_H
+ #include <crypt.h>
diff --git a/0002-Disable-endpwent.patch b/0002-Disable-endpwent.patch
new file mode 100644
index 000000000000..53c42665c1c8
--- /dev/null
+++ b/0002-Disable-endpwent.patch
@@ -0,0 +1,10 @@
+--- a/saslauthd/auth_getpwent.c
++++ b/saslauthd/auth_getpwent.c
+@@ -81,7 +81,6 @@
+ errno = 0;
+ pw = getpwnam(login);
+ errnum = errno;
+- endpwent();
+
+ if (pw == NULL) {
+ if (errnum != 0) {
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cd99df0475de
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,102 @@
+# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
+# Contributor: David Runge <dvzrv@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+
+_android_arch=x86
+
+pkgname=android-${_android_arch}-libsasl
+pkgver=2.1.28
+pkgrel=1
+arch=('any')
+pkgdesc="Cyrus Simple Authentication Service Layer (SASL) library (Android, ${_android_arch})"
+url="https://www.cyrusimap.org/sasl/"
+license=('custom')
+groups=('android-libsasl')
+depends=("android-${_android_arch}-gdbm"
+ "android-${_android_arch}-openssl")
+makedepends=('android-configure'
+ "android-${_android_arch}-openldap"
+ "android-${_android_arch}-mariadb"
+ "android-${_android_arch}-postgresql"
+ "android-${_android_arch}-sqlite")
+options=(!strip !buildflags staticlibs !emptydirs)
+source=("https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-$pkgver/cyrus-sasl-$pkgver.tar.gz"{,.sig}
+ '0001-Add-missing-headers.patch'
+ '0002-Disable-endpwent.patch')
+md5sums=('6f228a692516f5318a64505b46966cfa'
+ 'SKIP'
+ '15c03fcc850a6282adabc4f4d17cd517'
+ 'f4ff7c553efe884ee328167893005e11')
+validpgpkeys=(
+ '829F339F8C296FE80F409D93E3D7C118C7B9F46A' # Partha Susarla <mail@spartha.org>
+ 'DEA1999F0CDB1AAEBA001E0DBEE3E3B4D2F06546' # Quanah Gibson-Mount <quanah@fast-mail.org>
+)
+
+prepare() {
+ cd "${srcdir}/cyrus-sasl-$pkgver"
+ source android-env ${_android_arch}
+
+ patch -Np1 -i ../0001-Add-missing-headers.patch
+
+ if [ "${ANDROID_MINIMUM_PLATFORM}" -lt 26 ]; then
+ patch -Np1 -i ../0002-Disable-endpwent.patch
+ fi
+
+ autoreconf -fiv
+}
+
+build() {
+ cd "${srcdir}/cyrus-sasl-$pkgver"
+ source android-env ${_android_arch}
+
+ export CFLAGS="${CFLAGS} -DHAVE_TIME_H=1"
+ export CXXFLAGS="${CXXFLAGS} -DHAVE_TIME_H=1"
+
+ android-${_android_arch}-configure \
+ --prefix="${ANDROID_PREFIX}" \
+ --sysconfdir="${ANDROID_PREFIX_ETC}" \
+ --infodir="${ANDROID_PREFIX_SHARE}/info" \
+ --mandir="${ANDROID_PREFIX_SHARE}/man" \
+ --sbin="${ANDROID_PREFIX_BIN}" \
+ --with-configdir="${ANDROID_PREFIX_ETC}/sasl2:${ANDROID_PREFIX_ETC}/sasl:${ANDROID_PREFIX_LIB}/sasl2" \
+ --enable-alwaystrue \
+ --enable-anon \
+ --enable-auth-sasldb \
+ --enable-checkapop \
+ --enable-cram \
+ --enable-digest \
+ --enable-gssapi \
+ --enable-ldapdb \
+ --enable-login \
+ --enable-ntlm \
+ --enable-plain \
+ --enable-shared \
+ --enable-sql \
+ --disable-krb4 \
+ --disable-macos-framework \
+ --disable-otp \
+ --disable-passdss \
+ --disable-srp \
+ --disable-srp-setpass \
+ --disable-static \
+ --disable-sample \
+ --with-dblib=gdbm \
+ --with-ldap \
+ --with-mysql="${ANDROID_PREFIX}" \
+ --with-pgsql="${ANDROID_PREFIX_LIB}" \
+ --with-sqlite3="${ANDROID_PREFIX_INCLUDE}" \
+ --with-saslauthd=no \
+ --with-authdaemond=no
+ make $MAKEFLAGS
+}
+
+package() {
+ cd "${srcdir}/cyrus-sasl-$pkgver"
+ source android-env ${_android_arch}
+
+ make DESTDIR="$pkgdir" install
+ rm -rf "${pkgdir}/${ANDROID_PREFIX_BIN}"
+ rm -rf "${pkgdir}/${ANDROID_PREFIX_SHARE}"
+ ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so
+ ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/sasl2/*.so
+}