diff --git a/projects/cyrusimap.org/cyrus-sasl/fixture.cpp b/projects/cyrusimap.org/cyrus-sasl/fixture.cpp new file mode 100644 index 00000000..d94c1163 --- /dev/null +++ b/projects/cyrusimap.org/cyrus-sasl/fixture.cpp @@ -0,0 +1,12 @@ +#include +#include +#include + +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; +} \ No newline at end of file diff --git a/projects/cyrusimap.org/cyrus-sasl/package.yml b/projects/cyrusimap.org/cyrus-sasl/package.yml new file mode 100644 index 00000000..ff71c727 --- /dev/null +++ b/projects/cyrusimap.org/cyrus-sasl/package.yml @@ -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=="