+x.org/xcb

Closes #201
This commit is contained in:
Max Howell 2023-03-15 14:09:57 -04:00
parent 2b8b54e43c
commit b6008b4c24
4 changed files with 92 additions and 4 deletions

View file

@ -0,0 +1,12 @@
diff --git a/configure b/configure
index 2503d4b..0c36685 100755
--- a/configure
+++ b/configure
@@ -20662,7 +20662,7 @@ printf "%s\n" "yes" >&6; }
fi
NEEDED="xau >= 0.99.2"
case $host_os in
-linux*) ;;
+linux*|darwin*) ;;
*) NEEDED="$NEEDED pthread-stubs" ;;
esac

View file

@ -0,0 +1,36 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "xcb/xcb.h"
int main() {
xcb_connection_t *connection;
xcb_atom_t *atoms;
xcb_intern_atom_cookie_t *cookies;
int count, i;
char **names;
char buf[100];
count = 200;
connection = xcb_connect(NULL, NULL);
atoms = (xcb_atom_t *) malloc(count * sizeof(atoms));
names = (char **) malloc(count * sizeof(char *));
for (i = 0; i < count; ++i) {
sprintf(buf, "NAME%d", i);
names[i] = strdup(buf);
memset(buf, 0, sizeof(buf));
}
cookies = (xcb_intern_atom_cookie_t *) malloc(count * sizeof(xcb_intern_atom_cookie_t));
for(i = 0; i < count; ++i) {
cookies[i] = xcb_intern_atom(connection, 0, strlen(names[i]), names[i]);
}
for(i = 0; i < count; ++i) {
xcb_intern_atom_reply_t *r;
r = xcb_intern_atom_reply(connection, cookies[i], 0);
if(r)
atoms[i] = r->atom;
free(r);
}
free(atoms);
free(cookies);
xcb_disconnect(connection);
return 0;
}

View file

@ -0,0 +1,44 @@
distributable:
url: https://xcb.freedesktop.org/dist/libxcb-{{version.raw}}.tar.gz
strip-components: 1
versions:
- 1.15
dependencies:
x.org/xau: ^1
x.org/xdmcp: ^1
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
freedesktop.org/pkg-config: ^0.29
python.org: ^3.11
x.org/protocol/xcb: ^1
gnu.org/patch: '*'
script: |
patch -p1 <props/configure.patch
./configure $ARGS
make --jobs {{ hw.concurrency }} install
env:
SHELF: ${{tea.prefix}}/x.org
ARGS:
- --prefix="{{prefix}}"
- --sysconfdir="$SHELF"/etc
- --localstatedir="$SHELF"/var
- --enable-dri3
- --enable-ge
- --enable-xevie
- --enable-xprint
- --enable-selinux
- --disable-silent-rules
- --enable-devel-docs=no
- --with-doxygen=no
test:
dependencies:
tea.xyz/gx/cc: c99
script: |
cc fixture.c -lxcb
./a.out

View file

@ -1,4 +0,0 @@
dependencies:
tea.xyz/brewkit: ~0.7
env:
TEA_PANTRY_PATH: ${{srcroot}}