Skip to content

Commit 2d5e2ec

Browse files
bootstrap: pkgs::wayland
Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent d68a284 commit 2d5e2ec

File tree

4 files changed

+193
-13
lines changed

4 files changed

+193
-13
lines changed

bootstrap.yml

Lines changed: 119 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,42 @@ sources:
124124
regenerate:
125125
- args: ['autoreconf', '-f', '-i']
126126

127+
- name: 'pkg-config'
128+
subdir: 'bundled'
129+
git: 'https://gitlab.freedesktop.org/pkg-config/pkg-config.git'
130+
tag: 'pkg-config-0.29.2'
131+
version: '0.29.2'
132+
tools_required:
133+
- host-autoconf-v2.69
134+
- host-automake-v1.16
135+
- host-libtool
136+
regenerate:
137+
- args: ['./autogen.sh']
138+
environ:
139+
'NOCONFIGURE': 'yes'
140+
127141
- name: wayland
128142
subdir: 'bundled'
129143
git: 'https://github.com/wayland-project/wayland.git'
130144
tag: '1.20.0'
131145
version: '1.20.0'
132146

133147
tools:
148+
# We could run an external pkg-config; however, we need the aclocal files.
149+
# The easiest way to ensure that they are available is to just install pkg-config.
150+
- name: host-pkg-config
151+
exports_aclocal: true
152+
from_source: pkg-config
153+
configure:
154+
- args:
155+
- '@THIS_SOURCE_DIR@/configure'
156+
- '--prefix=@PREFIX@'
157+
- '--with-internal-glib'
158+
compile:
159+
- args: ['make', '-j@PARALLELISM@']
160+
install:
161+
- args: ['make', 'install']
162+
134163
- name: host-autoconf-v2.69
135164
source:
136165
name: autoconf-v2.69
@@ -371,9 +400,14 @@ tools:
371400

372401
- name: wayland-scanner
373402
from_source: wayland
403+
tools_required:
404+
- virtual: pkgconfig-for-host
405+
program_name: host-pkg-config
374406
configure:
375407
- args:
376408
- 'meson'
409+
- '--native-file'
410+
- '@SOURCE_ROOT@/userland/native-file.ini'
377411
- '--prefix=@PREFIX@'
378412
- '-Ddtd_validation=false'
379413
- '-Ddocumentation=false'
@@ -916,7 +950,7 @@ packages:
916950
- '-j@PARALLELISM@'
917951
- args: ['make', 'install', 'INSTALL_TOP=@THIS_COLLECT_DIR@/usr']
918952

919-
# -------------------- wayland (wayland-protocols, wayland-scanner, wayland, libexpat, host-libtool, libffi) --------------------
953+
# -------------------- wayland --------------------
920954
- name: wayland-protocols
921955
source:
922956
subdir: 'bundled'
@@ -1003,39 +1037,111 @@ packages:
10031037
- '--with-sysroot=@SYSROOT_DIR@' # Set libtool's lt_sysroot.
10041038
build:
10051039
- args: ['make', '-j@PARALLELISM@']
1006-
- args: ['make', 'install']
1040+
- args: ['make', 'install-strip']
10071041
environ:
10081042
DESTDIR: '@THIS_COLLECT_DIR@'
1009-
quiet: true
10101043

1011-
# - name: wayland
1012-
# from_source: wayland
1044+
- name: wayland
1045+
from_source: wayland
1046+
tools_required:
1047+
- host-pkg-config
1048+
- host-gcc
1049+
- wayland-scanner
1050+
- host-libtool
1051+
- virtual: pkgconfig-for-target
1052+
triple: "x86_64-aero"
1053+
- virtual: pkgconfig-for-host
1054+
program_name: host-pkg-config
1055+
pkgs_required:
1056+
- mlibc
1057+
- libexpat
1058+
- libffi
1059+
configure:
1060+
- args:
1061+
- 'meson'
1062+
- '--native-file'
1063+
- '@SOURCE_ROOT@/userland/native-file.ini'
1064+
- '--cross-file'
1065+
- '@SOURCE_ROOT@/userland/cross-file.ini'
1066+
- '--prefix=/usr'
1067+
- '--buildtype=debugoptimized'
1068+
- '-Ddtd_validation=false'
1069+
- '-Ddocumentation=false'
1070+
- '-Dscanner=false'
1071+
- '@THIS_SOURCE_DIR@'
1072+
environ:
1073+
PKG_CONFIG_SYSROOT_DIR: '@BUILD_ROOT@/system-root'
1074+
build:
1075+
- args: ['ninja']
1076+
- args: ['ninja', 'install']
1077+
environ:
1078+
DESTDIR: '@THIS_COLLECT_DIR@'
1079+
1080+
# - name: weston
1081+
# labels: [aarch64]
1082+
# architecture: '@OPTION:arch@'
1083+
# source:
1084+
# subdir: 'ports'
1085+
# git: 'https://github.com/wayland-project/weston.git'
1086+
# tag: '10.0.0'
1087+
# version: '10.0.0'
10131088
# tools_required:
1014-
# - host-gcc
1015-
# - wayland-scanner
1089+
# - host-autoconf-v2.69
1090+
# - host-automake-v1.15
10161091
# - host-libtool
1092+
# - host-pkg-config
1093+
# - system-gcc
1094+
# - wayland-scanner
1095+
# - virtual: pkgconfig-for-target
1096+
# triple: "@OPTION:arch-triple@"
1097+
# - virtual: pkgconfig-for-host
1098+
# program_name: host-pkg-config
10171099
# pkgs_required:
10181100
# - mlibc
1019-
# - libexpat
1020-
# - libffi
1101+
# - cairo
1102+
# - libinput
1103+
# - libxkbcommon
1104+
# - mesa
1105+
# - wayland
1106+
# - wayland-protocols
1107+
# - dejavu
1108+
# - libxcursor
1109+
# - xorg-server
1110+
# - pango
1111+
# - glib
1112+
# - libjpeg-turbo
10211113
# configure:
10221114
# - args:
10231115
# - 'meson'
1116+
# - '--native-file'
1117+
# - '@SOURCE_ROOT@/scripts/meson.native-file'
10241118
# - '--cross-file'
1025-
# - '@SOURCE_ROOT@/userland/cross-file.ini'
1119+
# - '@SOURCE_ROOT@/scripts/meson-@OPTION:arch-triple@.cross-file'
10261120
# - '--prefix=/usr'
1121+
# - '--libdir=lib'
10271122
# - '--buildtype=debugoptimized'
1028-
# - '-Ddtd_validation=false'
1029-
# - '-Ddocumentation=false'
1030-
# - '-Dscanner=false'
1123+
# - '-Dbackend-x11=false'
1124+
# - '-Dsimple-clients=damage,im,egl,shm,touch'
1125+
# - '-Dimage-jpeg=true'
1126+
# - '-Dimage-webp=false'
1127+
# - '-Dlauncher-logind=false'
1128+
# - '-Dbackend-drm-screencast-vaapi=false'
1129+
# - '-Dbackend-rdp=false'
1130+
# - '-Dcolor-management-colord=false'
1131+
# - '-Dcolor-management-lcms=false'
1132+
# - '-Dsystemd=false'
1133+
# - '-Dremoting=false'
1134+
# - '-Dpipewire=false'
10311135
# - '@THIS_SOURCE_DIR@'
10321136
# environ:
10331137
# PKG_CONFIG_SYSROOT_DIR: '@BUILD_ROOT@/system-root'
1138+
# PKG_CONFIG_LIBDIR: '@BUILD_ROOT@/system-root/usr/lib/pkgconfig:@BUILD_ROOT@/system-root/usr/share/pkgconfig'
10341139
# build:
10351140
# - args: ['ninja']
10361141
# - args: ['ninja', 'install']
10371142
# environ:
10381143
# DESTDIR: '@THIS_COLLECT_DIR@'
1144+
# quiet: true
10391145

10401146
tasks:
10411147
- name: sysroot

patches/wayland/wayland.patch

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
From 845a4f951b9165576f6b930385bfef82b61394fc Mon Sep 17 00:00:00 2001
2+
From: Andy-Python-Programmer <[email protected]>
3+
Date: Thu, 26 May 2022 19:09:39 +1000
4+
Subject: [PATCH] wayland: aero specific changes
5+
6+
Signed-off-by: Andy-Python-Programmer <[email protected]>
7+
---
8+
.gitignore | 2 ++
9+
src/wayland-os.c | 1 +
10+
src/wayland-server.c | 2 ++
11+
tests/test-runner.c | 1 +
12+
4 files changed, 6 insertions(+)
13+
14+
diff --git a/.gitignore b/.gitignore
15+
index 4fefe5d..7013a49 100644
16+
--- a/.gitignore
17+
+++ b/.gitignore
18+
@@ -6,3 +6,5 @@
19+
*~
20+
cscope.out
21+
ctags
22+
+
23+
+.vscode
24+
\ No newline at end of file
25+
diff --git a/src/wayland-os.c b/src/wayland-os.c
26+
index 27c6035..43f7b00 100644
27+
--- a/src/wayland-os.c
28+
+++ b/src/wayland-os.c
29+
@@ -27,6 +27,7 @@
30+
31+
#include "../config.h"
32+
33+
+#include <stddef.h>
34+
#include <sys/types.h>
35+
#include <sys/socket.h>
36+
#include <unistd.h>
37+
diff --git a/src/wayland-server.c b/src/wayland-server.c
38+
index 02f1365..d4cf79b 100644
39+
--- a/src/wayland-server.c
40+
+++ b/src/wayland-server.c
41+
@@ -1490,6 +1490,7 @@ wl_socket_lock(struct wl_socket *socket)
42+
{
43+
struct stat socket_stat;
44+
45+
+ /* lockfiles are currently not supported on aero.
46+
snprintf(socket->lock_addr, sizeof socket->lock_addr,
47+
"%s%s", socket->addr.sun_path, LOCK_SUFFIX);
48+
49+
@@ -1518,6 +1519,7 @@ wl_socket_lock(struct wl_socket *socket)
50+
socket_stat.st_mode & S_IWGRP) {
51+
unlink(socket->addr.sun_path);
52+
}
53+
+ */
54+
55+
return 0;
56+
err_fd:
57+
diff --git a/tests/test-runner.c b/tests/test-runner.c
58+
index c0247b5..47280d1 100644
59+
--- a/tests/test-runner.c
60+
+++ b/tests/test-runner.c
61+
@@ -27,6 +27,7 @@
62+
#define _GNU_SOURCE
63+
64+
#include <unistd.h>
65+
+#include <signal.h>
66+
#include <stdio.h>
67+
#include <stdlib.h>
68+
#include <sys/types.h>
69+
--
70+
2.25.1
71+

userland/cross-file.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ cpp = 'x86_64-aero-g++'
44
ar = 'x86_64-aero-ar'
55
strip = 'x86_64-aero-strip'
66
ld = 'x86_64-aero-ld'
7+
pkgconfig = 'x86_64-aero-pkg-config'
78

89
[host_machine]
910
system = 'aero'

userland/native-file.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[binaries]
2+
pkgconfig = 'host-pkg-config'

0 commit comments

Comments
 (0)