2023-02-06 06:48:14 +03:00
|
|
|
distributable:
|
|
|
|
url: https://ftp.gnu.org/gnu/libunistring/libunistring-{{version.raw}}.tar.gz
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
2023-05-01 20:14:59 +03:00
|
|
|
url: https://ftp.gnu.org/gnu/libunistring/
|
|
|
|
match: /libunistring-(\d+\.\d+(\.\d+)?)\.tar\.gz/
|
|
|
|
strip:
|
|
|
|
- /libunistring-/
|
|
|
|
- /.tar.gz/
|
2023-02-06 06:48:14 +03:00
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
tea.xyz/gx/cc: c99
|
|
|
|
tea.xyz/gx/make: '*'
|
|
|
|
gnu.org/gmp: '*'
|
|
|
|
gnu.org/m4: '*'
|
|
|
|
script: |
|
|
|
|
./configure --prefix={{ prefix }}
|
|
|
|
make --jobs {{ hw.concurrency }} install
|
|
|
|
|
|
|
|
test:
|
|
|
|
dependencies:
|
|
|
|
tea.xyz/gx/cc: c99
|
|
|
|
script: |
|
|
|
|
mv $FIXTURE test.c
|
|
|
|
cc -lunistring -o test test.c
|
|
|
|
test "$(./test)" = "🫖\n"
|
|
|
|
fixture: |
|
|
|
|
#include <uniname.h>
|
|
|
|
#include <unistdio.h>
|
|
|
|
#include <unistr.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
int main (void) {
|
|
|
|
uint32_t s[2] = {};
|
|
|
|
uint8_t buff[12] = {};
|
|
|
|
if (u32_uctomb (s, unicode_name_character ("TEAPOT"), sizeof s) != 1) abort();
|
|
|
|
if (u8_sprintf (buff, "%llU", s) != 4) abort();
|
|
|
|
printf ("%s\\n", buff);
|
|
|
|
return 0;
|
|
|
|
}
|