mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
new file: projects/x.org/applewm/package.yml
new file: projects/x.org/applewm/test.c
This commit is contained in:
parent
cec08444bf
commit
1851396e87
38
projects/x.org/applewm/package.yml
Normal file
38
projects/x.org/applewm/package.yml
Normal 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
|
16
projects/x.org/applewm/test.c
Normal file
16
projects/x.org/applewm/test.c
Normal 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;
|
||||||
|
}
|
Loading…
Reference in a new issue