distributable: url: https://archive.hadrons.org/software/libmd/libmd-{{ version }}.tar.xz strip-components: 1 versions: github: guillemj/libmd/tags build: dependencies: tea.xyz/gx/cc: c99 tea.xyz/gx/make: '*' gnu.org/autoconf: '*' gnu.org/automake: '*' gnu.org/patch: '*' crates.io/semverator: '*' script: # Combats "error: aliases are not supported on darwin" on versions # prior to 1.1.0. - run: | if semverator lt 1.1.0 {{version}}; then patch -p1 #include #include #include int main() { MD5_CTX ctx; uint8_t results[MD5_DIGEST_LENGTH]; char *buf; buf = "abc"; int n; n = strlen(buf); MD5Init(&ctx); MD5Update(&ctx, (uint8_t *)buf, n); MD5Final(results, &ctx); for (n = 0; n < MD5_DIGEST_LENGTH; n++) printf("%02x", results[n]); putchar('\n'); return EXIT_SUCCESS; }