new/cyrusimap.org/cyrus-sasl (#5240)

* new/cyrusimap.org/cyrus-sasl

* Fix test

* Add CFLAGS: -Wno-implicit-function-declaration

* Remove platform limitations

---------

Co-authored-by: James Reynolds <magnsuviri@me.com>
This commit is contained in:
James Reynolds 2024-02-20 23:28:04 -07:00 committed by GitHub
parent 18a9b13cbb
commit 9c75ec77a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,12 @@
#include <sasl/saslutil.h>
#include <assert.h>
#include <stdio.h>
int main(void) {
char buf[123] = "\\0";
unsigned len = 0;
int ret = sasl_encode64("Hello, world!", 13, buf, sizeof buf, &len);
assert(ret == SASL_OK);
printf("%u %s", len, buf);
return 0;
}

View file

@ -0,0 +1,31 @@
distributable:
url: https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-{{version}}/cyrus-sasl-{{version}}.tar.gz
strip-components: 1
display-name: cyrus-sasl
versions:
github: cyrusimap/cyrus-sasl
strip: /^cyrus-sasl-/
build:
dependencies:
kerberos.org: '*'
openssl.org: ^1.1.1
script:
- ./configure $ARGS
- make --jobs {{ hw.concurrency }} install
env:
ARGS:
- --disable-macos-framework
- --disable-dependency-tracking
- --disable-silent-rules
- --prefix="{{prefix}}"
- --with-ssl={{ deps.openssl.org.prefix }}
linux:
CFLAGS: -Wno-implicit-function-declaration
test:
script:
- cc fixture.cpp "-I{{prefix}}/include", "-L{{prefix}}/lib" -lsasl2
- test "$(./a.out)" = "20 SGVsbG8sIHdvcmxkIQ=="