Plasma mobile, weston: use lightdm, elogind (!379)

Move Wayland meta packages to LightDM and replace ConsoleKit2 for
elogind for Plasma.

Now we don't need the hacky scripts in /etc/profile.d anymore!
This change requires elogind for both Weston and Plasma Mobile. Using
elogind allows us to use one patch less in kwin. Weston has logind
(which elogind provides) support disabled in Alpine Linux, so I put the
package in temp/ with it enabled for now, but will upstream this change
to Alpine.

Remove consolekit2 dependency in postmarketos-ui-xfce4.

[ci:skip-build]: already built successfully.
This commit is contained in:
Bart Ribbers 2019-05-24 21:51:10 +02:00 committed by Oliver Smith
parent 120fec4fa4
commit a4c298f829
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
21 changed files with 292 additions and 130 deletions

View file

@ -2,13 +2,13 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kscreenlocker
pkgver=5.15.5
pkgrel=1
pkgrel=2
pkgdesc="Library and components for secure lock screen architecture"
arch="all !armhf"
url="https://www.kde.org/workspaces/plasmadesktop/"
license="GPL-2.0"
depends="linux-pam"
depends_dev="kcmutils-dev consolekit2-dev linux-pam-dev kidletime-dev kwayland-dev kdeclarative-dev qt5-qtdeclarative-dev kcrash-dev kglobalaccel-dev ki18n-dev ktextwidgets-dev qt5-qtx11extras-dev kwindowsystem-dev kxmlgui-dev kconfig-dev sonnet-dev kconfigwidgets-dev kauth-dev kcoreaddons-dev kcodecs-dev kwidgetsaddons-dev kservice-dev kpackage-dev knotifications-dev solid-dev"
depends="linux-pam elogind"
depends_dev="kcmutils-dev linux-pam-dev kidletime-dev kwayland-dev kdeclarative-dev qt5-qtdeclarative-dev kcrash-dev kglobalaccel-dev ki18n-dev ktextwidgets-dev qt5-qtx11extras-dev kwindowsystem-dev kxmlgui-dev kconfig-dev sonnet-dev kconfigwidgets-dev kauth-dev kcoreaddons-dev kcodecs-dev kwidgetsaddons-dev kservice-dev kpackage-dev knotifications-dev solid-dev"
makedepends="$depends_dev extra-cmake-modules kdoctools-dev libxcursor xcb-util-keysyms-dev"
source="https://download.kde.org/stable/plasma/$pkgver/$pkgname-$pkgver.tar.xz
kde.pam

View file

@ -1,30 +0,0 @@
From dd721ba4d51d0c090f765fb6acd8fa86ede6b806 Mon Sep 17 00:00:00 2001
From: Bhushan Shah <bhush94@gmail.com>
Date: Mon, 2 Jul 2018 11:50:37 +0530
Subject: [PATCH 2/2] Revert "libinput/connection: Don't hardcode seat0
anymore"
This reverts commit ddda524974d99249570e72d17f34215a735b2acc.
---
libinput/connection.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libinput/connection.cpp b/libinput/connection.cpp
index 7664659d6..82c374d71 100644
--- a/libinput/connection.cpp
+++ b/libinput/connection.cpp
@@ -135,8 +135,9 @@ Connection *Connection::create(QObject *parent)
s_context = nullptr;
return nullptr;
}
- if (!s_context->assignSeat(LogindIntegration::self()->seat().toUtf8().constData())) {
- qCWarning(KWIN_LIBINPUT) << "Failed to assign seat" << LogindIntegration::self()->seat();
+ // TODO: don't hardcode seat name
+ if (!s_context->assignSeat("seat0")) {
+ qCWarning(KWIN_LIBINPUT) << "Failed to assign seat seat0";
delete s_context;
s_context = nullptr;
return nullptr;
--
2.17.1

View file

@ -3,7 +3,7 @@
pkgname=kwin
pkgver=5.15.5
_pkgver="$pkgver"
pkgrel=1
pkgrel=2
pkgdesc="An easy to use, but flexible, composited Window Manager"
arch="all !armhf"
url="https://www.kde.org/workspaces/plasmadesktop/"
@ -13,7 +13,6 @@ depends_dev="qt5-qtdeclarative-dev qt5-qtscript-dev qt5-qtsensors-dev qt5-qtx11e
makedepends="$depends_dev extra-cmake-modules qt5-qttools-dev kdoctools-dev libxkbcommon-dev libepoxy-dev libinput-dev xcb-util-cursor-dev libdrm-dev eudev-dev xcb-util-wm-dev"
source="https://download.kde.org/stable/plasma/$pkgver/$pkgname-$_pkgver.tar.xz
0001-Revert-udev-Only-handle-devices-from-the-current-sea.patch
0002-Revert-libinput-connection-Don-t-hardcode-seat0-anym.patch
0001-Disable-finding-of-qml-modules.patch"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
options="!check" # Fails due to requiring running X11
@ -39,5 +38,4 @@ package() {
}
sha512sums="2ea3af33cf79e7acde996c87507d277f114f2491ff3090cb0335ce6d026ae06c6ad83aa3fd5b86bbb01791cca747291ce801fc2d93d20e6d7b88f709893a3f53 kwin-5.15.5.tar.xz
a34ff6926f020117fafd8a31c18a183eecb3e0a5fe6c3f2784f531171552350615fb06cbac2f3a1248011eb83ec32fc9df4b64f82443dee1d8e90c1be49e2690 0001-Revert-udev-Only-handle-devices-from-the-current-sea.patch
a534a3d388f066f84813148743eda1da1be000907ddf2c762c098a7ce38fcc1992eaa74763c47d98e82b83e38a03a828f4f3368e7e7ab733714f993646af7c8b 0002-Revert-libinput-connection-Don-t-hardcode-seat0-anym.patch
d9e5900b4349d2869be51e89ebcf8e9ea73a830196f40f682ea9d6f56719ae9f54025d7f33c68e71c56e128aa7c6014388d18a6572c1a8c33341c405285156b2 0001-Disable-finding-of-qml-modules.patch"

View file

@ -2,7 +2,7 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=plasma-phone-components
pkgver=0_git20190505
pkgrel=2
pkgrel=3
_commit="cec97e231b6106eb5c69fd9b774769cd3c8e72b1"
pkgdesc="Modules providing phone functionality for Plasma"
arch="all"
@ -13,7 +13,9 @@ makedepends="extra-cmake-modules kpeople-dev qt5-qtdeclarative-dev kactivities-d
install="$pkgname.post-install
$pkgname.post-upgrade
$pkgname.post-deinstall"
source="$pkgname-$_commit.tar.gz::https://invent.kde.org/kde/$pkgname/-/archive/$_commit/$pkgname-$_commit.tar.gz"
source="$pkgname-$_commit.tar.gz::https://invent.kde.org/kde/$pkgname/-/archive/$_commit/$pkgname-$_commit.tar.gz
startplasmamobile
plasma-mobile.desktop"
builddir="$srcdir/$pkgname-$_commit"
build() {
@ -33,6 +35,14 @@ check() {
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
DESTDIR="$pkgdir" make install
install -D -m755 "$srcdir"/startplasmamobile \
"$pkgdir"/usr/bin/startplasmamobile
install -Dm644 "$srcdir"/plasma-mobile.desktop \
"$pkgdir"/usr/share/wayland-sessions/plasma-mobile-2.desktop
}
sha512sums="2c941ecc1b4c054c09753c19db1cf00157d5d51b3f2f0067125e67a6311eb26419a295df6fec52467e1019a833ee054e62db2ca58ad0219061bbcb7ca961393a plasma-phone-components-cec97e231b6106eb5c69fd9b774769cd3c8e72b1.tar.gz"
sha512sums="2c941ecc1b4c054c09753c19db1cf00157d5d51b3f2f0067125e67a6311eb26419a295df6fec52467e1019a833ee054e62db2ca58ad0219061bbcb7ca961393a plasma-phone-components-cec97e231b6106eb5c69fd9b774769cd3c8e72b1.tar.gz
bfa5df2bb635899b6b88816dd02073d6949303f1282c3acd91fd8bc1e92b10db2fbfa167d2df6c6e11ecb763b6b94ed0451b5b1ddc504543402e6a9ce6bb985c startplasmamobile
7f4bdbd30cda4c9e23293b7bb1eb6e8536ada056cb3bcc9a6cc3db7bbc2277eac67b519992b7e46afdf5c720df9c696b43a6a9e9f82ed7ebe3937d8c0bf4d55d plasma-mobile.desktop"

View file

@ -0,0 +1,11 @@
[Desktop Entry]
Name=Plasma Mobile
Name[en]=Plasma Mobile
Comment=This session logs you into Plasma Mobile
Comment[en]=This session logs you into Plasma Mobile
Exec=dbus-run-session /usr/bin/startplasmamobile
TryExec=/usr/bin/startplasmamobile
Icon=
Type=Application
X-DesktopNames=Plasma Mobile
Keywords=launch;Plasma;mobile;desktop;session;

View file

@ -0,0 +1,29 @@
#!/bin/sh
udevadm trigger
udevadm settle
export QML2_IMPORT_PATH=/usr/lib/qt/qml:/usr/lib/qt5/qml
export QT_QPA_PLATFORMTHEME=KDE
export QT_QUICK_CONTROLS_STYLE=Plasma
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export XDG_CURRENT_DESKTOP=KDE
export KDE_SESSION_VERSION=5
export PLASMA_PLATFORM=phone
export QT_VIRTUALKEYBOARD_STYLE=Plasma
export QT_QUICK_CONTROLS_MOBILE=true
sleep 2
if [ -d "/dev/dri" ]; then
kwin_wayland --drm --xwayland plasma-phone 2>&1 | logger -t "$(whoami):plasma-mobile"
else
# NOTE: using GALLIUM_DRIVER=llvmpipe might give you better performance (or not work at all.)
# If it does give you a performance gain, please open an issue to discuss how to implement this properly.
export GALLIUM_DRIVER=softpipe
export KWIN_COMPOSE=Q
export LIBGL_ALWAYS_SOFTWARE=1
echo "startplasmamobile: using software rendering with: ${GALLIUM_DRIVER}" | logger -t "$(whoami):plasma-mobile"
kwin_wayland --framebuffer --xwayland plasma-phone 2>&1 | logger -t "$(whoami):plasma-mobile"
fi

View file

@ -2,12 +2,12 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=plasma-workspace
pkgver=5.15.5
pkgrel=2
pkgrel=3
pkgdesc="KDE Plasma Workspace"
arch="all !armhf"
url="https://www.kde.org/workspaces/plasmadesktop/"
license="GPL-2.0"
depends="kwin iso-codes qt5-qtwayland kactivitymanagerd kinit milou consolekit2 plasma-integration frameworkintegration"
depends="kwin iso-codes qt5-qtwayland kactivitymanagerd kinit milou plasma-integration frameworkintegration"
depends_dev="krunner-dev kdesignerplugin-dev kdesignerplugin qt5-qtwayland-dev qt5-qtdeclarative-dev kxmlrpcclient-dev kdelibs4support-dev plasma-framework-dev knotifyconfig-dev kcmutils-dev kdesu-dev kwallet-dev ksysguard kwin-dev kguiaddons-dev kjsembed-dev knewstuff-dev qt5-qtx11extras-dev ktexteditor-dev libksysguard-dev kwallet-dev attica-qt-dev kitemmodels-dev kscreenlocker-dev qt5-qtscript-dev karchive-dev kcrash-dev kpackage-dev kactivities-dev kdeclarative-dev kpty-dev kjs-dev ktextwidgets-dev sonnet-dev kauth-dev kconfigwidgets-dev ki18n-dev kcodecs-dev kwidgetsaddons-dev kservice-dev kxmlgui-dev kwindowsystem-dev kcoreaddons-dev kconfig-dev kemoticons-dev kiconthemes-dev kinit-dev knotifications-dev kio-dev kbookmarks-dev kparts-dev kcompletion-dev kitemviews-dev kjobwidgets-dev solid-dev kunitconversion-dev kdbusaddons-dev kidletime-dev kglobalaccel-dev phonon-qt5-dev kwayland-dev baloo-dev prison-dev kholidays-dev networkmanager-qt-dev"
makedepends="$depends_dev extra-cmake-modules kdoctools-dev gpsd iso-codes-dev libxtst-dev xcb-util-image-dev libxrender-dev"
source="https://download.kde.org/stable/plasma/$pkgver/$pkgname-$pkgver.tar.xz"

View file

@ -17,8 +17,7 @@ build() {
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_LIBEXECDIR=lib
-DCMAKE_INSTALL_LIBDIR=lib
make
}

View file

@ -0,0 +1,5 @@
# This file gets removed with postmarketos-ui-plasma-mobile, even if modified!
[Seat:*]
autologin-user=username
autologin-user-timeout=0
autologin-session=plasma-mobile-2

View file

@ -2,39 +2,39 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=postmarketos-ui-plasma-mobile
pkgver=1
pkgrel=29
pkgrel=30
pkgdesc="(Wayland) Mobile variant of KDE Plasma, optimized for touchscreen (slow without hardware acceleration!)"
url="https://wiki.postmarketos.org/wiki/Plasma_Mobile"
arch="noarch !armhf"
license="GPL-3.0-or-later"
# dbus-x11 provides dbus-launch
depends="plasma-phone-components dbus dbus-x11 plasma-settings breeze-icons kscreen qt5-qtvirtualkeyboard pulseaudio pulseaudio-utils consolekit2 powerdevil polkit-kde-agent kwayland-integration postmarketos-artwork-wallpapers qmlkonsole plasma-angelfish pix index plasma-camera postmarketos-demos"
depends="plasma-phone-components dbus dbus-x11 plasma-settings breeze-icons kscreen qt5-qtvirtualkeyboard pulseaudio pulseaudio-utils elogind powerdevil polkit-kde-agent kwayland-integration postmarketos-artwork-wallpapers qmlkonsole plasma-angelfish pix index plasma-camera postmarketos-demos lightdm xorg-server"
install="$pkgname.post-install"
source="start_plasma.sh kwinrc kdeglobals qtlogging.ini org.kde.phone.homescreen.js unlock-plasma"
source="kwinrc kdeglobals qtlogging.ini org.kde.phone.homescreen.js unlock-plasma 60-lightdm-autologin.conf"
options="!check"
package() {
install -D -m644 "$srcdir"/start_plasma.sh \
"$pkgdir"/etc/profile.d/start_plasma.sh
install -Dm644 "$srcdir"/60-lightdm-autologin.conf \
"$pkgdir"/usr/share/lightdm/lightdm.conf.d/60-autologin.conf
install -D -m644 "$srcdir"/kwinrc \
install -Dm644 "$srcdir"/kwinrc \
"$pkgdir"/etc/xdg/kwinrc
install -D -m644 "$srcdir"/kdeglobals \
install -Dm644 "$srcdir"/kdeglobals \
"$pkgdir"/etc/xdg/kdeglobals
install -D -m644 "$srcdir"/qtlogging.ini \
install -Dm644 "$srcdir"/qtlogging.ini \
"$pkgdir"/etc/skel/.config/QtProject/qtlogging.ini
install -D -m644 "$srcdir"/org.kde.phone.homescreen.js \
install -Dm644 "$srcdir"/org.kde.phone.homescreen.js \
"$pkgdir"/usr/share/plasma/look-and-feel/org.kde.plasma.phone/contents/plasmoidsetupscripts/org.kde.phone.homescreen.js
install -D -m755 "$srcdir"/unlock-plasma \
install -Dm755 "$srcdir"/unlock-plasma \
"$pkgdir"/usr/bin/unlock-plasma
}
sha512sums="dcd92bb600895533858a55df705c832a3bd369d1e536f61d4a52b7eacd9cc4c9071b4bab38261226780b158949516fc4a209b022ff70660f2c01116ae5f06539 start_plasma.sh
a95d3bbd1e8051c9b394ad7a26e4beb2d1be8d3c38189819da61fd42b1c7fd3948c4737bc9246eee23eaf5fd9451cd6362fb06442f3d8f967f930d3bcc5cfbe9 kwinrc
sha512sums="a95d3bbd1e8051c9b394ad7a26e4beb2d1be8d3c38189819da61fd42b1c7fd3948c4737bc9246eee23eaf5fd9451cd6362fb06442f3d8f967f930d3bcc5cfbe9 kwinrc
93d6c3e76b6e8d3c8c5424fcb921595ad3569e1aba1b03255b977230b33146dc73a97327e455e8a539018cb02c3bf1a700dd951622f798b50f36c5d381a1b342 kdeglobals
341f0b866c315f37868ef3e7137cce8b53a0e8e6164e5af71b3e8e2fa68321afbf0652d76124ef84bade1393f701748852ac939aef9daff7e272a0df827780eb qtlogging.ini
50dbb5e0b1550776ca6fc5b91468412b23d49aa502af77cf7d5d15af11eaf61b1632b205f42eac3274bf28a0b7b278a4d6bfc98c6c12ea29830fd258bad5107d org.kde.phone.homescreen.js
41d6774c09a7f14b95ddae6df85d22c6f78960574e70e1ae653616b04f18182750aecdb66ca5c8c4b86d36845b8ab3d0d7820d86459f7967d389178108fc947f unlock-plasma"
e5dcc82c0e58288fd7a8f805e60fa777fab71c68355f085a0e4f25b05526491476fdb6decbc7c0495626d6736a53bfc8e8f34a3231210858998e19cd6fbc89a0 unlock-plasma
4845e9090668baf164c587ad1ee669116955911608e9f6751d480c7eae93ac19d662a78be07721475651c37c580278519c085ad6fed692ce9d7f2778982d0c99 60-lightdm-autologin.conf"

View file

@ -1,10 +1,5 @@
#!/bin/sh
# Autologin on tty1, let busybox autoconfigure 2-6
autologin="$(getent passwd 10000 | cut -d ":" -f 1)"
for i in 1 2 3 4 5 6; do
old="^tty$i::respawn:/sbin/getty 38400 tty$i"
new="# tty$i::respawn:/sbin/getty 38400 tty$i"
[ "$i" == "1" ] && new="tty1::respawn:/bin/login -f $autologin"
sed -i -e "s.$old.$new.g" /etc/inittab
done
sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/60-autologin.conf
rc-update add lightdm default

View file

@ -1,37 +0,0 @@
if test -z "${XDG_RUNTIME_DIR}"; then
export XDG_RUNTIME_DIR=/tmp/$(id -u)-runtime-dir
if ! test -d "${XDG_RUNTIME_DIR}"; then
mkdir "${XDG_RUNTIME_DIR}"
chmod 0700 "${XDG_RUNTIME_DIR}"
fi
if [ $(tty) = "/dev/tty1" ]; then
udevadm trigger
udevadm settle
export QML2_IMPORT_PATH=/usr/lib/qt/qml:/usr/lib/qt5/qml
export QT_QPA_PLATFORMTHEME=KDE
export QT_QUICK_CONTROLS_STYLE=Plasma
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export XDG_CURRENT_DESKTOP=KDE
export KDE_SESSION_VERSION=5
export PLASMA_PLATFORM=phone
export QT_VIRTUALKEYBOARD_STYLE=Plasma
export QT_QUICK_CONTROLS_MOBILE=true
sleep 2
if [ -d "/dev/dri" ]; then
dbus-run-session ck-launch-session kwin_wayland --drm --xwayland plasma-phone 2>&1 | logger -t "$(whoami):plasma-mobile"
else
# NOTE: using GALLIUM_DRIVER=llvmpipe might give you better performance (or not work at all.)
# If it does give you a performance gain, please open an issue to discuss how to implement this properly.
export GALLIUM_DRIVER=softpipe
export KWIN_COMPOSE=Q
export LIBGL_ALWAYS_SOFTWARE=1
echo "start_plasma.sh: using software rendering with: ${GALLIUM_DRIVER}" | logger -t "$(whoami):plasma-mobile"
dbus-run-session ck-launch-session kwin_wayland --framebuffer --xwayland plasma-phone 2>&1 | logger -t "$(whoami):plasma-mobile"
fi
fi
fi

View file

@ -1,5 +1,2 @@
#!/bin/sh
sudo qdbus-qt5 --system \
org.freedesktop.ConsoleKit \
/org/freedesktop/ConsoleKit/Session1 \
org.freedesktop.ConsoleKit.Session.Unlock
sudo loginctl unlock-sessions

View file

@ -0,0 +1,5 @@
# This file gets removed with postmarketos-ui-weston, even if modified!
[Seat:*]
autologin-user=username
autologin-user-timeout=0
autologin-session=weston

View file

@ -1,25 +1,26 @@
pkgname=postmarketos-ui-weston
pkgver=4
pkgrel=7
pkgrel=8
pkgdesc="(Wayland) Reference compositor (demo, not a phone interface)"
url="https://postmarketos.org"
arch="noarch"
license="GPL3+"
depends="weston-clients weston weston-shell-desktop weston-backend-fbdev
weston-backend-drm weston-backend-x11 weston-terminal
weston-xwayland xorg-server-xwayland postmarketos-demos
postmarketos-artwork-wallpapers"
license="GPL-3.0-or-later"
depends="weston-clients weston weston-shell-desktop weston-backend-fbdev weston-backend-drm weston-backend-x11 weston-terminal weston-xwayland xorg-server-xwayland postmarketos-demos postmarketos-artwork-wallpapers elogind lightdm xorg-server"
makedepends=""
install="$pkgname.post-install"
subpackages=""
source="start_weston.sh weston.ini.default"
source="start_weston.sh weston.ini.default 60-lightdm-autologin.conf"
options="!check"
package() {
install -Dm644 "$srcdir"/60-lightdm-autologin.conf \
"$pkgdir"/usr/share/lightdm/lightdm.conf.d/60-autologin.conf
install -Dm644 "$srcdir"/start_weston.sh \
"$pkgdir"/etc/profile.d/start_weston.sh
install -Dm644 "$srcdir"/weston.ini.default \
"$pkgdir"/etc/xdg/weston/weston.ini.default
}
sha512sums="4b758b67b3bbc8415c4845c7c7f0bb49e17b2ced75f61c64239752476711c04e1f8a5ebba93ad8ab25937c46f943468247e1f1edf8ef749f36d8d57200feb72b start_weston.sh
b712c9d4c846437656781656ec15e9b7e238a9244e0b77bf84b67f6661d44f68718330706f69ccb8b4d7f6182b8f17f273018ca461c0c40e49b9185f6eec168d weston.ini.default"
b712c9d4c846437656781656ec15e9b7e238a9244e0b77bf84b67f6661d44f68718330706f69ccb8b4d7f6182b8f17f273018ca461c0c40e49b9185f6eec168d weston.ini.default
6800b81055c854ef69c0084341e31841d4b06d1d894542f1e125d0d70b6606f11218bda0d29dab9a48594b4c2f815a540f91bfba6c2c22c3378040c41fe4bbb1 60-lightdm-autologin.conf"

View file

@ -1,15 +1,5 @@
#!/bin/sh
# Autologin on tty1, let busybox autoconfigure 2-6
autologin="$(getent passwd 10000 | cut -d ":" -f 1)"
for i in 1 2 3 4 5 6; do
old="^tty$i::respawn:/sbin/getty 38400 tty$i"
new="# tty$i::respawn:/sbin/getty 38400 tty$i"
[ "$i" == "1" ] && new="tty1::respawn:/bin/login -f $autologin"
sed -i -e "s.$old.$new.g" /etc/inittab
done
sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/60-autologin.conf
# Create weston-launch group and add user to it
[ $(getent group weston-launch) ] || groupadd weston-launch
username="$(getent passwd 10000 | cut -d ":" -f 1)"
usermod -a -G weston-launch "$username"
rc-update add lightdm default

View file

@ -5,11 +5,9 @@ pkgdesc="(X11) Lightweight GTK+2 desktop (stylus recommended)"
url="https://gitlab.com/postmarketOS/xfce4-phone"
arch="noarch"
license="GPL-3.0+"
depends="xfce4 xorg-server mesa-egl postmarketos-artwork-wallpapers
faenza-icon-theme xfce4-battery-plugin network-manager-applet
xfce4-mixer gnome-keyring consolekit2 lxpolkit gtk+2.0 lightdm"
depends="xfce4 xorg-server mesa-egl postmarketos-artwork-wallpapers faenza-icon-theme xfce4-battery-plugin network-manager-applet xfce4-mixer gnome-keyring lxpolkit gtk+2.0 lightdm"
install="$pkgname.post-install $pkgname.pre-deinstall $pkgname.post-deinstall"
source="$pkgname-$pkgver.tar.gz::https://gitlab.com/postmarketOS/xfce4-phone/-/archive/${pkgver}/xfce4-phone-${pkgver}.tar.gz
source="$pkgname-$pkgver.tar.gz::https://gitlab.com/postmarketOS/xfce4-phone/-/archive/$pkgver/xfce4-phone-$pkgver.tar.gz
60-lightdm-autologin.conf"
options="!check"
builddir="$srcdir/xfce4-phone-$pkgver"

128
temp/weston/APKBUILD Normal file
View file

@ -0,0 +1,128 @@
# Forked from Alpine to enable logind support
# https://github.com/alpinelinux/aports/pull/8035
pkgname=weston
pkgver=6.0.0
pkgrel=1
_libname=lib$pkgname
_libdir=$_libname-${pkgver%%.*}
pkgdesc="The reference Wayland server"
url="https://wayland.freedesktop.org/"
arch="all !s390x !ppc64le"
license="MIT"
depends=""
makedepends="wayland-protocols libxkbcommon-dev xkeyboard-config
libinput-dev libunwind-dev mtdev-dev libxcursor-dev glu-dev
pango-dev colord-dev libwebp-dev libva-dev dbus-dev
linux-pam-dev wayland-dev libevdev-dev libjpeg-turbo-dev
freerdp-dev lcms2-dev gstreamer-dev gst-plugins-base-dev meson
elogind-dev"
_cms="cms-colord cms-static"
_shell="shell-desktop shell-fullscreen shell-ivi"
_client="info terminal wcap-decode"
_backend="backend-drm backend-fbdev backend-headless
backend-x11 backend-wayland
"
for _sub in $_cms $_shell $_client $_backend; do
subpackages="$subpackages $pkgname-$_sub:_sub"
done
subpackages="$pkgname-dev $pkgname-doc $subpackages
$pkgname-clients $_libname-desktop:_libd $_libname:libs
$pkgname-xwayland $pkgname-desktop-x11:_x11:noarch
"
source="https://wayland.freedesktop.org/releases/$pkgname-$pkgver.tar.xz
timespec.patch
weston-launch-custom-error-function.patch
"
builddir="$srcdir/$pkgname-$pkgver"
# weston-launch requires suid
options="!check suid"
install="$pkgname.pre-install"
build() {
cd "$builddir"
meson \
-Dprefix=/usr \
-Dlauncher-logind=true \
-Dsystemd=false \
-Dsimple-dmabuf-drm=auto \
build
ninja -C build
}
# Does not run through, see also:
# https://github.com/alpinelinux/aports/pull/1689
check() {
ninja -C "$builddir"/build test
}
package() {
DESTDIR="$pkgdir" ninja -C "$builddir"/build install
}
libs() {
depends="xkeyboard-config"
default_libs
}
_libd() {
pkgdesc="Desktop shells abstraction library for libweston compositors"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/*desktop* "$subpkgdir"/usr/lib
}
clients() {
pkgdesc="Weston example clients"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/$pkgname-* "$subpkgdir"/usr/bin
}
xwayland() {
pkgdesc="Wayland module to run X Clients"
mkdir -p "$subpkgdir"/usr/lib/$_libdir
mv "$pkgdir"/usr/lib/$_libdir/xwayland.so \
"$subpkgdir"/usr/lib/$_libdir
}
_x11() {
pkgdesc="Weston desktop helper pack (x11 backend)"
depends="$pkgname $pkgname-shell-desktop $pkgname-xwayland
$pkgname-backend-x11 $pkgname-terminal"
mkdir -p "$subpkgdir"
}
_sub() {
local name path
case $subpkgname in
*-cms-*)
name=${subpkgname#$pkgname-cms-}
path=/usr/lib/$pkgname
pkgdesc="Weston CMS module: $name"
name=cms-$name.so
;;
*-shell-*)
name=${subpkgname#$pkgname-shell-}
path=/usr/lib/$pkgname
pkgdesc="Weston shell: $name"
name=*$name-shell*
;;
*-backend-*)
name=${subpkgname#$pkgname-backend-}
path=/usr/lib/$_libdir
pkgdesc="Weston backend: $name"
name=$name-backend.so
grep -q cairo "$pkgdir"/$path/$name && depends="mesa-dri-swrast"
;;
*)
name=$subpkgname
path=/usr/bin
[ -x "$pkgdir"/$path/$name ] || name=${subpkgname#$pkgname-}
pkgdesc="Weston client: $name"
;;
esac
mkdir -p "$subpkgdir"/$path || return 1
mv "$pkgdir"/$path/$name "$subpkgdir"/$path
}
sha512sums="127ab64b689f202acca4d9461e4decfd42357e4bbb63493af257b3b20b693a8ab4207b3c6b97663cefeed200505aad5f32b6a064db2e53fa1e201877613b394f weston-6.0.0.tar.xz
3e596af4bf0a6b06a5d28376043db111fe1c161ead04501fa6d2c667b5a21889cca3354d1bdc4ac794841bef68ed5e1a7a84e44e7d510e947e3673195706caed timespec.patch
3f742a29075fd447995cdda283d12655910925811b22a28fc279bcc7cf5c7c1a888cd391bec42d934b3bad24578504c642882100f15647178f6f6f89a8405916 weston-launch-custom-error-function.patch"

View file

@ -0,0 +1,10 @@
--- a/tests/timespec-test.c
+++ b/tests/timespec-test.c
@@ -25,6 +25,7 @@
#include "config.h"
+#include <time.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>

View file

@ -0,0 +1,48 @@
https://patchwork.freedesktop.org/patch/112884/
error.h is a gnu extension and not available in other
popular libcs like musl. This patch provides a replacement.
Signed-off-by: Murray Calavera <murray.calavera@gmail.com>
---
libweston/weston-launch.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
index 140fde1..84f7d60 100644
--- a/libweston/weston-launch.c
+++ b/libweston/weston-launch.c
@@ -33,7 +33,6 @@
#include <poll.h>
#include <errno.h>
-#include <error.h>
#include <getopt.h>
#include <sys/types.h>
@@ -112,6 +111,25 @@ struct weston_launch {
union cmsg_data { unsigned char b[4]; int fd; };
+static void
+error(int status, int errnum, const char *msg, ...)
+{
+ va_list args;
+
+ fputs("weston-launch: ", stderr);
+ va_start(args, msg);
+ vfprintf(stderr, msg, args);
+ va_end(args);
+
+ if (errnum)
+ fprintf(stderr, ": %s\n", strerror(errnum));
+ else
+ fputc('\n', stderr);
+
+ if (status)
+ exit(status);
+}
+
static gid_t *
read_groups(void)
{

View file

@ -0,0 +1,5 @@
#!/bin/sh
addgroup -S weston-launch 2>/dev/null
exit 0