new file: projects/x.org/applewm/package.yml

new file:   projects/x.org/applewm/test.c
This commit is contained in:
Andrii Riabchenko 2023-10-27 23:41:25 +03:00 committed by Jacob Heider
parent cec08444bf
commit 1851396e87
2 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,38 @@
distributable:
url: https://www.x.org/releases/individual/lib/libAppleWM-{{version}}.tar.bz2
strip-components: 1
versions:
url: https://www.x.org/releases/individual/lib/
match: /libAppleWM-\d+\.\d+\.\d+\.tar\.bz2/
strip:
- /^libAppleWM-/
- /\.tar\.bz2/
platforms:
- darwin
dependencies:
x.org/x11: '*'
x.org/exts: '*'
build:
dependencies:
freedesktop.org/pkg-config: '*'
script:
- run: |
sed -i.bak "s|-F|-iframeworkwithsysroot|g" src/Makefile.in
rm -f src/Makefile.in.bak
if: 1.4.1
- ./configure $CONFIGURE_ARGS
- make --jobs {{ hw.concurrency }}
- make --jobs {{ hw.concurrency }} install
env:
CONFIGURE_ARGS:
- --disable-debug
- --disable-dependency-tracking
- --prefix="{{prefix}}"
- --libdir="{{prefix}}/lib"
test:
dependencies:
freedesktop.org/pkg-config: '*'
script:
- pkg-config --modversion applewm | grep {{version}}
- cc test.c -lX11 -lAppleWM -o test
- ./test

View file

@ -0,0 +1,16 @@
#include <X11/Xlib.h>
#include <X11/extensions/applewm.h>
#include <stdio.h>
int main(void)
{
Display *disp = XOpenDisplay(NULL);
if (disp == NULL)
{
fprintf(stderr, "Unable to connect to display\\n");
return 0;
}
XAppleWMSetFrontProcess(disp);
return 0;
}