Skip to content

Commit af1e571

Browse files
authored
Merge pull request #133 from jkloetzke/prj-blueprint
Adaptations to get xorg and weston running on x86
2 parents 2aeea6f + 07e0a16 commit af1e571

25 files changed

Lines changed: 839 additions & 49 deletions

classes/init.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Config:
2+
CONFIG_INIT:
3+
type: choice
4+
choice:
5+
systemd:
6+
sysvinit/sysv:
7+
sysvinit/busybox:
8+
19
buildVars: [CONFIG_INIT]
210
buildSetup: |
311
# Checks if the init system is the sysv sysvinit variant.
@@ -17,3 +25,9 @@ buildSetup: |
1725
{
1826
[[ ${CONFIG_INIT:-} == "sysvinit" ]] || initIsSysvinitSysv || initIsSysvinitBusybox
1927
}
28+
29+
# Check if the init system is systemd
30+
initIsSystemd()
31+
{
32+
[[ ${CONFIG_INIT:-} == systemd ]]
33+
}

classes/xorg/font-util.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
depends:
2+
- tools:
3+
target-toolchain: host-compat-toolchain
4+
use: [tools]
5+
depends:
6+
- graphics::fonts::font-util
7+
8+
buildTools: [fontUtil]
9+
buildScript: |
10+
PKG_CONFIG_LIBDIR+=":${BOB_TOOL_PATHS[fontUtil]}/../lib/pkgconfig"

recipes/core/dbus.yaml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
inherit: [meson]
1+
inherit: [meson, init]
22

33
metaEnvironment:
44
PKG_DESCRIPTION: "D-Bus is a simple system for interprocess communication and coordination."
@@ -13,6 +13,12 @@ depends:
1313
- libs::expat-tgt
1414
- libs::glib-tgt
1515

16+
- if: "$(eq,${CONFIG_INIT:-},systemd)"
17+
depends:
18+
- core::systemd-libsystemd-dev
19+
- use: []
20+
name: core::systemd-libsystemd-tgt
21+
1622
checkoutSCM:
1723
scm: url
1824
url: https://dbus.freedesktop.org/releases/dbus/dbus-${PKG_VERSION}.tar.xz
@@ -27,8 +33,6 @@ Config:
2733
buildVars: [DBUS_DEBUG]
2834
buildScript: |
2935
CONFIG_OPTS=(\
30-
"-Ddatadir=/etc" \
31-
"-Dsysconfdir=/legacy" \
3236
"-Dinotify=enabled" \
3337
"-Dxml_docs=disabled" \
3438
"-Ddoxygen_docs=disabled" \
@@ -43,12 +47,34 @@ buildScript: |
4347
else
4448
CONFIG_OPTS+=("-Dstats=false")
4549
fi
50+
51+
if initIsSystemd ; then
52+
CONFIG_OPTS+=(
53+
-Dsystemd=enabled
54+
-Dsystemd_system_unitdir=/usr/lib/systemd/system
55+
-Dsystemd_user_unitdir=/usr/lib/systemd/user
56+
)
57+
else
58+
CONFIG_OPTS+=( -Dsystemd=disabled )
59+
fi
60+
4661
mesonBuild $1 ${CONFIG_OPTS[@]}
4762
4863
multiPackage:
64+
"":
65+
depends:
66+
- use: []
67+
name: core::dbus-tgt
68+
packageScript: |
69+
mesonPackageBin
70+
mkdir -p .bob
71+
cat >.bob/dbus.user-table <<EOF
72+
messagebus -1 messagebus -1 * /run/dbus - dbus DBus messagebus user
73+
EOF
74+
provideDeps: [ "*-tgt" ]
4975
dev:
5076
provideDeps: ['*-dev']
5177
packageScript: mesonPackageDev $1 "/usr/lib/dbus-1.0/***"
5278
tgt:
5379
provideDeps: ['*-tgt']
54-
packageScript: mesonPackageTgt
80+
packageScript: mesonPackageLib

recipes/core/seatd.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
inherit: [meson, init]
22

33
metaEnvironment:
4-
PKG_VERSION: "0.8.0"
4+
PKG_VERSION: "0.9.1"
55
PKG_LICENSE: "MIT"
66

7+
depends:
8+
- if: "$(eq,${CONFIG_INIT:-}-${SYSTEMD_LOGIND:-},systemd-1)"
9+
depends:
10+
- core::systemd-libsystemd-dev
11+
- use: []
12+
name: core::systemd-libsystemd-tgt
13+
14+
privateEnvironment:
15+
ENABLE_LOGIND: "$(if-then-else,$(eq,${CONFIG_INIT:-}-${SYSTEMD_LOGIND:-},systemd-1),systemd,disabled)"
16+
717
checkoutSCM:
818
scm: url
919
url: https://git.sr.ht/~kennylevinsen/seatd/archive/${PKG_VERSION}.tar.gz
10-
digestSHA1: e33c99d9b0dce48f82618de2849ef3128305d28a
20+
digestSHA1: cde15ad79adf2de055c717ea31b1e1e8ba230b6b
1121
stripComponents: 1
1222

23+
buildVars: [ENABLE_LOGIND]
1324
buildScript: |
1425
mesonBuild $1 \
1526
-Dman-pages=disabled \
1627
-Dexamples=disabled \
1728
-Dwerror=false \
18-
-Dlibseat-logind=disabled \
29+
-Dlibseat-logind=$ENABLE_LOGIND \
1930
-Dlibseat-builtin=enabled
2031
2132
# add init script
@@ -32,9 +43,10 @@ multiPackage:
3243
multiPackage:
3344
dev:
3445
packageScript: mesonPackageDev
46+
provideDeps: [ "core::systemd-libsystemd-dev" ]
3547
tgt:
3648
depends:
3749
- name: core::seatd
3850
use: []
3951
packageScript: mesonPackageLib
40-
provideDeps: [ "core::seatd" ]
52+
provideDeps: [ "core::seatd", "core::systemd-libsystemd-tgt" ]

recipes/core/systemd.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,15 @@ depends:
4848
- kernel::kmod-lib-tgt
4949
- libs::libxcrypt-tgt
5050

51+
- if: "$SYSTEMD_LOGIND"
52+
depends:
53+
- core::linux-pam-dev
54+
- use: []
55+
name: core::linux-pam-tgt
56+
5157
checkoutSCM:
5258
scm: url
53-
url: https://github.com/systemd/systemd/archive/refs/tags/${PKG_VERSION}.tar.gz
59+
url: ${GITHUB_MIRROR}/systemd/systemd/archive/refs/tags/${PKG_VERSION}.tar.gz
5460
digestSHA1: 508c4cae4a78fb84d2daf0fe31412cc5c6177460
5561
stripComponents: 1
5662

@@ -86,6 +92,7 @@ buildScript: |
8692
-Dnologin-path=/usr/sbin/nologin
8793
8894
# Feature switches
95+
-Dpam=${BOOL[$SYSTEMD_LOGIND]}
8996
-Danalyze=${BOOL[$SYSTEMD_ANALYZE]}
9097
-Dcoredump=${BOOL[$SYSTEMD_COREDUMP]}
9198
-Dhwdb=${BOOL[$SYSTEMD_HWDB]}

recipes/graphics/fonts/font-util.yaml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,18 @@ checkoutSCM:
1616
buildScript: |
1717
autotoolsBuild $1
1818
19-
multiPackage:
20-
dev:
21-
packageScript: autotoolsPackageDev $1 "/usr/share/***"
19+
packageScript: |
20+
# The tools need to be accompanied by the .pc-file and other data...
21+
autotoolsPackageDev
22+
autotoolsPackageTgt
2223
23-
tgt:
24-
packageScript: autotoolsPackageTgt $1 "/usr/share/***"
25-
"":
26-
depends:
27-
- name: graphics::fonts::font-util-tgt
28-
use: []
29-
provideDeps: ['*-tgt']
30-
packageScript: autotoolsPackageBin $1
31-
provideTools:
32-
fontUtil: "usr/bin"
24+
# Workaround so that 'fontrootdir' is not affected by pc-file
25+
# relocation.
26+
sed -i -e '/^prefix=/c prefix=/dummy' \
27+
-e '/^libdir=/c libdir=${prefix}/lib' \
28+
-e '/^datarootdir=/c datarootdir=/usr/share' \
29+
-e '/^mapdir=/c mapdir=/dummy/share/fonts/X11/util' \
30+
usr/lib/pkgconfig/fontutil.pc
31+
32+
provideTools:
33+
fontUtil: "usr/bin"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
inherit: [autotools, "xorg::font-util"]
2+
3+
metaEnvironment:
4+
PKG_VERSION: "1.0.5"
5+
PKG_LICENSE: LicenseRef-xorg-font-alias
6+
PKG_LICENSE_PATH: |
7+
xorg-font-alias:COPYING
8+
9+
checkoutSCM:
10+
scm: url
11+
url: https://xorg.freedesktop.org/releases/individual/font/font-alias-${PKG_VERSION}.tar.xz
12+
digestSHA256: 9f89e217bb73e0e3636a0a493fbf8b7c995156e0c53d9a0476d201b67c2d6b6e
13+
stripComponents: 1
14+
15+
depends:
16+
- tools:
17+
target-toolchain: host-compat-toolchain
18+
use: [tools]
19+
depends:
20+
- graphics::xorg::utils::bdftopcf
21+
22+
- graphics::xorg::utils::util-macros-dev
23+
24+
buildTools: [bdftopcf]
25+
buildScript: |
26+
autotoolsBuild "$1"
27+
28+
packageScript: |
29+
autotoolsPackageTgt
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
inherit: [autotools, "xorg::font-util"]
2+
3+
metaEnvironment:
4+
PKG_VERSION: "1.0.4"
5+
PKG_LICENSE: LicenseRef-xorg-font-cursor-misc
6+
PKG_LICENSE_PATH: |
7+
xorg-font-cursor-misc:COPYING
8+
9+
checkoutSCM:
10+
scm: url
11+
url: https://xorg.freedesktop.org/releases/individual/font/font-cursor-misc-${PKG_VERSION}.tar.xz
12+
digestSHA256: 25d9c9595013cb8ca08420509993a6434c917e53ca1fec3f63acd45a19d4f982
13+
stripComponents: 1
14+
15+
depends:
16+
- tools:
17+
target-toolchain: host-compat-toolchain
18+
use: [tools]
19+
depends:
20+
- graphics::xorg::utils::bdftopcf
21+
22+
- graphics::xorg::utils::util-macros-dev
23+
24+
buildTools: [bdftopcf]
25+
buildScript: |
26+
autotoolsBuild "$1"
27+
28+
packageScript: |
29+
autotoolsPackageTgt
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
inherit: [autotools, "xorg::font-util"]
2+
3+
metaEnvironment:
4+
PKG_VERSION: "1.1.3"
5+
PKG_LICENSE: LicenseRef-xorg-font-misc-misc
6+
PKG_LICENSE_PATH: |
7+
xorg-font-misc-misc:COPYING
8+
9+
checkoutSCM:
10+
scm: url
11+
url: https://xorg.freedesktop.org/releases/individual/font/font-misc-misc-${PKG_VERSION}.tar.xz
12+
digestSHA256: 79abe361f58bb21ade9f565898e486300ce1cc621d5285bec26e14b6a8618fed
13+
stripComponents: 1
14+
15+
depends:
16+
- tools:
17+
target-toolchain: host-compat-toolchain
18+
use: [tools]
19+
depends:
20+
- graphics::xorg::utils::bdftopcf
21+
22+
- graphics::xorg::utils::util-macros-dev
23+
24+
buildTools: [bdftopcf]
25+
buildScript: |
26+
autotoolsBuild "$1"
27+
28+
packageScript: |
29+
autotoolsPackageTgt

recipes/graphics/wayland/weston.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,11 @@ buildScript: |
6868
-Dbackend-drm=true \
6969
-Drenderer-gl=true
7070
71-
# install profile file
72-
install -D -m 0644 $<@weston/weston.sh@> \
73-
install/etc/profile.d/weston.sh
74-
7571
# add init script
7672
if initIsAnySysvinit; then
73+
# install profile file
74+
install -D -m 0644 $<@weston/weston.sh@> \
75+
install/etc/profile.d/weston.sh
7776
install -D -m 0755 $<@weston/S80weston.sh@> \
7877
install/etc/init.d/S80weston.sh
7978
fi

0 commit comments

Comments
 (0)