temp/xorg-server: temporarily fork from alpine (+depends) (MR 1768)
Add it to pmOS for arm, until they are in Alpine again. Related: https://postmarketos.org/edge/2020/12/01/xorg-server-moved/ [ci:skip-vercheck]: pkgrel doesn't need to be -r0
This commit is contained in:
parent
e544c65b7e
commit
01d2a8e767
19 changed files with 1202 additions and 0 deletions
46
temp/libxfont2/APKBUILD
Normal file
46
temp/libxfont2/APKBUILD
Normal file
|
@ -0,0 +1,46 @@
|
|||
# Forked from Alpine
|
||||
# https://postmarketos.org/edge/2020/12/01/xorg-server-moved/
|
||||
|
||||
pkgname=libxfont2
|
||||
pkgver=2.0.4
|
||||
pkgrel=0
|
||||
pkgdesc="X.Org X11 libXfont2 runtime library"
|
||||
url="https://www.x.org"
|
||||
arch="armhf armv7 aarch64"
|
||||
license="MIT"
|
||||
options="!check" # No test suite.
|
||||
makedepends="$depends_dev libfontenc-dev freetype-dev zlib-dev xtrans
|
||||
util-macros autoconf automake libtool xorgproto"
|
||||
subpackages="$pkgname-dev"
|
||||
source="https://www.x.org/pub/individual/lib/libXfont2-$pkgver.tar.bz2"
|
||||
builddir="$srcdir/libXfont2-$pkgver"
|
||||
|
||||
# secfixes:
|
||||
# 2.0.3-r0:
|
||||
# - CVE-2017-16611
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
autoreconf -vif
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$builddir"
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--localstatedir=/var \
|
||||
--disable-static \
|
||||
--without-fop
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
||||
sha512sums="7cf6c58e520e48e24fc4f05fec760fcbeaaac0cedeed57dded262c855e1515cc34cd033222945a0b016f6857b83009fc2a6946c7d632c2f7bb0060f8e8a8a106 libXfont2-2.0.4.tar.bz2"
|
34
temp/xauth/APKBUILD
Normal file
34
temp/xauth/APKBUILD
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Forked from Alpine
|
||||
# https://postmarketos.org/edge/2020/12/01/xorg-server-moved/
|
||||
|
||||
pkgname=xauth
|
||||
pkgver=1.1
|
||||
pkgrel=0
|
||||
pkgdesc="X.Org authorization settings program"
|
||||
url="http://xorg.freedesktop.org/"
|
||||
arch="armhf armv7 aarch64"
|
||||
options="!check" # Requires unpackaged, unmaintained 'cmdtest' package
|
||||
license="custom"
|
||||
makedepends="libxau-dev libxext-dev libxmu-dev libx11-dev util-macros"
|
||||
subpackages="$pkgname-doc"
|
||||
source="https://www.x.org/releases/individual/app/xauth-$pkgver.tar.bz2"
|
||||
|
||||
build() {
|
||||
cd "$builddir"
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--localstatedir=/var
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
make DESTDIR="$pkgdir" install
|
||||
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
|
||||
}
|
||||
|
||||
sha512sums="b6ecd59a853a491ef45bf8cfbff63bed36645f81cb79ae9d18458b57f7502bccf92f0d979d3337578518646f680ad379e67b1dac15a927cbb11372733e7a3a0c xauth-1.1.tar.bz2"
|
45
temp/xcb-util-image/APKBUILD
Normal file
45
temp/xcb-util-image/APKBUILD
Normal file
|
@ -0,0 +1,45 @@
|
|||
# Forked from Alpine
|
||||
# https://postmarketos.org/edge/2020/12/01/xorg-server-moved/
|
||||
|
||||
pkgname=xcb-util-image
|
||||
pkgver=0.4.0
|
||||
pkgrel=1
|
||||
pkgdesc="X C-language Binding - port of Xlib XImage and XShmImage"
|
||||
url="https://xcb.freedesktop.org/"
|
||||
arch="armhf armv7 aarch64"
|
||||
license="MIT"
|
||||
depends=
|
||||
depends_dev="xcb-util-dev"
|
||||
makedepends="$depends_dev m4 util-macros"
|
||||
checkdepends="check-dev"
|
||||
install=""
|
||||
replaces="xcb-util"
|
||||
subpackages="$pkgname-dev"
|
||||
source="https://xcb.freedesktop.org/dist/xcb-util-image-$pkgver.tar.gz
|
||||
"
|
||||
|
||||
build() {
|
||||
cd "$builddir"
|
||||
export CFLAGS="$CFLAGS -std=gnu99"
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--localstatedir=/var
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$builddir"
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
||||
sha512sums="2e580d205e4a054763146c70d735014c7e018322a43c76b07a306c091dca81b140cbbf6db41252e9204ff742f119b69e143b3fdc1fb13bd9d0b9e8e22eda2cd3 xcb-util-image-0.4.0.tar.gz"
|
43
temp/xcb-util-keysyms/APKBUILD
Normal file
43
temp/xcb-util-keysyms/APKBUILD
Normal file
|
@ -0,0 +1,43 @@
|
|||
# Forked from Alpine
|
||||
# https://postmarketos.org/edge/2020/12/01/xorg-server-moved/
|
||||
|
||||
pkgname=xcb-util-keysyms
|
||||
pkgver=0.4.0
|
||||
pkgrel=1
|
||||
pkgdesc="X C-language Binding - X constants and keycodes"
|
||||
url="https://xcb.freedesktop.org/"
|
||||
arch="armhf armv7 aarch64"
|
||||
license="MIT"
|
||||
depends=
|
||||
depends_dev="xcb-util-dev"
|
||||
makedepends="$depends_dev m4"
|
||||
checkdepends="check-dev"
|
||||
install=""
|
||||
replaces="xcb-util"
|
||||
subpackages="$pkgname-dev"
|
||||
source="https://xcb.freedesktop.org/dist/xcb-util-keysyms-$pkgver.tar.gz"
|
||||
|
||||
build() {
|
||||
cd "$builddir"
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--localstatedir=/var
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$builddir"
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
||||
sha512sums="d92959e11241e479a8f6c55d2a1f0d507a8e7baa8dd469b01167b6307ed87bba26e0c68808cf0de90ba4d6081aad786276998b9784b81433b4f1cb9054573755 xcb-util-keysyms-0.4.0.tar.gz"
|
43
temp/xcb-util-renderutil/APKBUILD
Normal file
43
temp/xcb-util-renderutil/APKBUILD
Normal file
|
@ -0,0 +1,43 @@
|
|||
# Forked from Alpine
|
||||
# https://postmarketos.org/edge/2020/12/01/xorg-server-moved/
|
||||
|
||||
pkgname=xcb-util-renderutil
|
||||
pkgver=0.3.9
|
||||
pkgrel=1
|
||||
pkgdesc="X C-language Binding - Convenience functions for XRender extension"
|
||||
url="https://xcb.freedesktop.org/"
|
||||
arch="armhf armv7 aarch64"
|
||||
license="MIT"
|
||||
depends=
|
||||
depends_dev="xcb-util-dev"
|
||||
makedepends="$depends_dev m4 util-macros"
|
||||
checkdepends="check-dev"
|
||||
install=""
|
||||
replaces="xcb-util"
|
||||
subpackages="$pkgname-dev"
|
||||
source="https://xcb.freedesktop.org/dist/xcb-util-renderutil-$pkgver.tar.gz"
|
||||
|
||||
build() {
|
||||
cd "$builddir"
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--localstatedir=/var
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$builddir"
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
||||
sha512sums="c666f9eae18fa3fb603086e86ee4efc66dbed17b696bec637f07ea1334715cee01e03db26340ed3d1338887f4940cd3a435e4df8b36e59f439a0a2b8a0879463 xcb-util-renderutil-0.3.9.tar.gz"
|
43
temp/xcb-util-wm/APKBUILD
Normal file
43
temp/xcb-util-wm/APKBUILD
Normal file
|
@ -0,0 +1,43 @@
|
|||
# Forked from Alpine
|
||||
# https://postmarketos.org/edge/2020/12/01/xorg-server-moved/
|
||||
|
||||
pkgname=xcb-util-wm
|
||||
pkgver=0.4.1
|
||||
pkgrel=1
|
||||
pkgdesc="X C-language Binding - helpers for ICCCM and EWMH"
|
||||
url="https://xcb.freedesktop.org/"
|
||||
arch="armhf armv7 aarch64"
|
||||
license="MIT"
|
||||
depends=
|
||||
depends_dev="xcb-util-dev"
|
||||
makedepends="$depends_dev m4 util-macros"
|
||||
checkdepends="check"
|
||||
install=""
|
||||
replaces="xcb-util"
|
||||
subpackages="$pkgname-dev"
|
||||
source="https://xcb.freedesktop.org/dist/xcb-util-wm-$pkgver.tar.gz"
|
||||
|
||||
build() {
|
||||
cd "$builddir"
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--localstatedir=/var
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$builddir"
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
||||
sha512sums="063d852367088a7129aacce95e7d81cb0925b146191e1114171e58f5a65dcb8cc7f4fb5a9ecb49e9da2e2d8be75375f5cfaafc04b756179750e230fb486b9e22 xcb-util-wm-0.4.1.tar.gz"
|
20
temp/xinit/06_move_serverauthfile_into_tmp.patch
Normal file
20
temp/xinit/06_move_serverauthfile_into_tmp.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
Move startx auth files in /tmp so they are removed on reboot.
|
||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=357736
|
||||
The trap patch didn't seem to work on reboot.
|
||||
---
|
||||
startx.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: xinit/startx.cpp
|
||||
===================================================================
|
||||
--- xinit.orig/startx.cpp
|
||||
+++ xinit/startx.cpp
|
||||
@@ -273,7 +273,7 @@
|
||||
dummy=0
|
||||
|
||||
XCOMM create a file with auth information for the server. ':0' is a dummy.
|
||||
- xserverauthfile=$HOME/.serverauth.$$
|
||||
+ xserverauthfile=`mktemp -p /tmp serverauth.XXXXXXXXXX`
|
||||
trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM
|
||||
xauth -q -f "$xserverauthfile" << EOF
|
||||
add :$dummy . $mcookie
|
53
temp/xinit/APKBUILD
Normal file
53
temp/xinit/APKBUILD
Normal file
|
@ -0,0 +1,53 @@
|
|||
# Forked from Alpine
|
||||
# https://postmarketos.org/edge/2020/12/01/xorg-server-moved/
|
||||
|
||||
pkgname=xinit
|
||||
pkgver=1.4.1
|
||||
pkgrel=0
|
||||
pkgdesc="X.Org initialisation program"
|
||||
url="http://xorg.freedesktop.org"
|
||||
arch="armhf armv7 aarch64"
|
||||
license="MIT"
|
||||
options="!check" # No test suite.
|
||||
subpackages="$pkgname-doc"
|
||||
depends="xauth mcookie xmodmap xrdb"
|
||||
makedepends="libx11-dev util-macros"
|
||||
source="https://www.x.org/releases/individual/app/xinit-$pkgver.tar.bz2
|
||||
06_move_serverauthfile_into_tmp.patch
|
||||
xinitrc
|
||||
xsession.skel
|
||||
Xsession
|
||||
xserverrc"
|
||||
|
||||
builddir="$srcdir"/$pkgname-$pkgver
|
||||
build() {
|
||||
cd "$builddir"
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--localstatedir=/var \
|
||||
--with-xinitdir=/etc/X11/xinit
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
make DESTDIR="$pkgdir" install
|
||||
chmod +x "$pkgdir"/usr/bin/startx
|
||||
install -m755 -d "$pkgdir"/etc/skel
|
||||
install -m755 -D "$srcdir"/xinitrc "$pkgdir"/etc/X11/xinit/xinitrc
|
||||
install -m755 -D "$srcdir"/Xsession "$pkgdir"/etc/X11/xinit/Xsession
|
||||
install -m755 "$srcdir"/xsession.skel "$pkgdir"/etc/skel/.xsession
|
||||
install -m755 "$srcdir"/xserverrc "$pkgdir"/etc/X11/xinit/xserverrc
|
||||
mkdir -p "$pkgdir"/etc/X11/xinit/xinitrc.d
|
||||
}
|
||||
|
||||
sha512sums="6cbc5d025a891c419f3f4493381b2fca57a67d78df866d2f16a83426f86bad6eca7f240fac12b25cbcc63df0fec41f625407184e044898602d66483715315340 xinit-1.4.1.tar.bz2
|
||||
2296c10a5d74bff42d9642a4787dc3f2b77492fc81174af48dc88cd3c8fa49c7f70147b790d8c82c2df6c910d9d412965999e7a342ca28697a97b5d522669edd 06_move_serverauthfile_into_tmp.patch
|
||||
761db2ff2b501724ba8a7fde9df3d93851797a261871af205773159949bd74b4c1ac7c1afe0b816dce03825a5d7165caa474141cfb2ea82408abfe4719775ce0 xinitrc
|
||||
448bc6c7987a4735b6584e307cd5c53092b1a338043293f5f110d11818dd1b80508401a3b6f09525c82a16a88f293b37011d8ca112460b0f95d26897e3e0619e xsession.skel
|
||||
b311032a751bb21d6c49ffe1dfc67beb577b5d5bec4a4c12612c4c0f9b9d6d2a07f7435c7d2fe9ab4c318546ee0cb9d4ff3f7ef908e756a818da529e913e667d Xsession
|
||||
f86d96d76bcb340021e7904925f0029f8662e4dfc32489198b3a8695dca069da496539e2287249c763fe9c4d8d5d591fd18fe49a0bee822cbbd0eb712efbb89b xserverrc"
|
55
temp/xinit/Xsession
Normal file
55
temp/xinit/Xsession
Normal file
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# X session wrapper
|
||||
|
||||
echo "Running X session wrapper"
|
||||
|
||||
# Load profile
|
||||
for file in /etc/profile "$HOME/.profile" /etc/xprofile "$HOME/.xprofile"; do
|
||||
if [ -f "$file" ]; then
|
||||
echo "Loading profile from $file";
|
||||
. "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
# Load resources
|
||||
for file in /etc/X11/Xresources "$HOME/.Xresources"; do
|
||||
if [ -f "$file" ]; then
|
||||
echo "Loading resource: $file"
|
||||
xrdb -nocpp -merge "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
# Load keymaps
|
||||
use_xkbmap=false
|
||||
for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do
|
||||
if [ -f "$file" ]; then
|
||||
echo "Loading keymap: $file"
|
||||
setxkbmap `cat "$file"` && use_xkbmap=true
|
||||
fi
|
||||
done
|
||||
|
||||
# Load xmodmap if not using XKB
|
||||
if ! $use_xkbmap; then
|
||||
for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do
|
||||
if [ -f "$file" ]; then
|
||||
echo "Loading modmap: $file"
|
||||
xmodmap "$file"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Run all system xinitrc shell scripts.
|
||||
xinitdir="/etc/X11/xinit/xinitrc.d"
|
||||
if [ -d "$xinitdir" ]; then
|
||||
for script in $xinitdir/*; do
|
||||
echo "Loading xinit script $script"
|
||||
if [ -x "$script" -a ! -d "$script" ]; then
|
||||
. "$script"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo "X session wrapper complete, running session $@"
|
||||
|
||||
exec $@
|
51
temp/xinit/xinitrc
Normal file
51
temp/xinit/xinitrc
Normal file
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
|
||||
|
||||
userresources=$HOME/.Xresources
|
||||
usermodmap=$HOME/.Xmodmap
|
||||
xinitdir=/etc/X11
|
||||
sysresources=$xinitdir/Xresources
|
||||
sysmodmap=$xinitdir/Xmodmap
|
||||
|
||||
# merge in defaults and keymaps
|
||||
|
||||
if [ -f $sysresources ]; then
|
||||
xrdb -merge $sysresources
|
||||
fi
|
||||
|
||||
if [ -f $sysmodmap ]; then
|
||||
xmodmap $sysmodmap
|
||||
fi
|
||||
|
||||
if [ -f $userresources ]; then
|
||||
xrdb -merge $userresources
|
||||
fi
|
||||
|
||||
if [ -f $usermodmap ]; then
|
||||
xmodmap $usermodmap
|
||||
fi
|
||||
|
||||
# First try ~/.xinitrc
|
||||
if [ -f "$HOME/.xinitrc" ]; then
|
||||
XINITRC="$HOME/.xinitrc"
|
||||
if [ -x $XINITRC ]; then
|
||||
# if the x bit is set on .xinitrc
|
||||
# it means the xinitrc is not a
|
||||
# shell script but something else
|
||||
exec $XINITRC "$@"
|
||||
else
|
||||
exec /bin/sh "$HOME/.xinitrc" "$@"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
||||
for f in /etc/X11/xinit/xinitrc.d/?* ; do
|
||||
[ -x "$f" ] && . "$f"
|
||||
done
|
||||
unset f
|
||||
fi
|
||||
|
||||
for p in startxfce4 startfluxbox xfce4-terminal \
|
||||
mrxvt urxvt st xterm; do
|
||||
command -v "$p" >/dev/null && exec "$p"
|
||||
done
|
2
temp/xinit/xserverrc
Normal file
2
temp/xinit/xserverrc
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
exec /usr/bin/X -nolisten tcp "$@"
|
10
temp/xinit/xsession.skel
Normal file
10
temp/xinit/xsession.skel
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
#
|
||||
# ~/.xsession
|
||||
#
|
||||
# Executed by xdm/gdm/kdm at login
|
||||
#
|
||||
|
||||
/bin/sh -l ~/.xinitrc
|
||||
|
35
temp/xmodmap/APKBUILD
Normal file
35
temp/xmodmap/APKBUILD
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Forked from Alpine
|
||||
# https://postmarketos.org/edge/2020/12/01/xorg-server-moved/
|
||||
|
||||
pkgname=xmodmap
|
||||
pkgver=1.0.10
|
||||
pkgrel=0
|
||||
pkgdesc="Utility for modifying keymaps and pointer button mappings in X"
|
||||
url="http://xorg.freedesktop.org/"
|
||||
arch="armhf armv7 aarch64"
|
||||
license="MIT"
|
||||
options="!check" # No test suite.
|
||||
depends=""
|
||||
makedepends="libx11-dev util-macros"
|
||||
subpackages="$pkgname-doc"
|
||||
source="https://www.x.org/releases/individual/app/$pkgname-$pkgver.tar.bz2"
|
||||
|
||||
build () {
|
||||
cd "$builddir"
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--localstatedir=/var
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
make DESTDIR="$pkgdir" install
|
||||
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
|
||||
}
|
||||
|
||||
sha512sums="324c7dcef843186088f16b3bc47485eb3c9b4331e56ce43b692deb4bb3d4f4f27512480e91a379cceac8383df920dc5e37cd825246b50b6343291cec48134c04 xmodmap-1.0.10.tar.bz2"
|
|
@ -0,0 +1,29 @@
|
|||
From 1efee15daaaf7c7c3ea7f9fd6d5c8ec8605a09c7 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 3 Sep 2020 17:50:26 -0600
|
||||
Subject: [PATCH] compiler.h: ensure IOPortBase is declared extern on mips
|
||||
|
||||
This is needed to fix compilation with -fcommon on GCC, which
|
||||
is the default in GCC 10.
|
||||
|
||||
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
|
||||
---
|
||||
hw/xfree86/common/compiler.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
|
||||
index 2b2008b3f..c7d617eb1 100644
|
||||
--- a/hw/xfree86/common/compiler.h
|
||||
+++ b/hw/xfree86/common/compiler.h
|
||||
@@ -525,7 +525,7 @@ xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset,
|
||||
#define PORT_SIZE short
|
||||
#endif
|
||||
|
||||
-_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
|
||||
+extern _X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
|
||||
|
||||
static __inline__ void
|
||||
outb(unsigned PORT_SIZE port, unsigned char val)
|
||||
--
|
||||
2.28.0
|
||||
|
180
temp/xorg-server/APKBUILD
Normal file
180
temp/xorg-server/APKBUILD
Normal file
|
@ -0,0 +1,180 @@
|
|||
# Forked from Alpine
|
||||
# https://postmarketos.org/edge/2020/12/01/xorg-server-moved/
|
||||
|
||||
pkgname=xorg-server
|
||||
pkgver=1.20.9
|
||||
pkgrel=1
|
||||
pkgdesc="X.Org X servers"
|
||||
url="https://www.x.org/wiki"
|
||||
arch="armhf armv7 aarch64"
|
||||
license="MIT"
|
||||
options="suid !check"
|
||||
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc xvfb $pkgname-xephyr
|
||||
$pkgname-xnest $pkgname-xwayland"
|
||||
# the modesetting driver is now shipped with xorg server
|
||||
replaces="xf86-video-modesetting"
|
||||
depends="
|
||||
font-misc-misc
|
||||
font-cursor-misc
|
||||
xkeyboard-config
|
||||
xkbcomp
|
||||
xinit
|
||||
"
|
||||
depends_dev="
|
||||
libepoxy-dev
|
||||
libxfont2-dev
|
||||
mesa-dev
|
||||
libpciaccess-dev
|
||||
"
|
||||
makedepends="
|
||||
$depends_dev
|
||||
meson
|
||||
xorgproto
|
||||
xtrans
|
||||
libxshmfence-dev
|
||||
pixman-dev
|
||||
xkbcomp-dev
|
||||
libxkbfile-dev
|
||||
nettle-dev
|
||||
wayland-dev
|
||||
wayland-protocols
|
||||
libdrm-dev
|
||||
libxext-dev
|
||||
libx11-dev
|
||||
libxau-dev
|
||||
eudev-dev
|
||||
libxcb-dev
|
||||
xcb-util-dev
|
||||
xcb-util-image-dev
|
||||
xcb-util-keysyms-dev
|
||||
xcb-util-renderutil-dev
|
||||
xcb-util-wm-dev
|
||||
libxdmcp-dev
|
||||
"
|
||||
source="https://www.x.org/releases/individual/xserver/xorg-server-$pkgver.tar.bz2
|
||||
xwayland-glx.patch
|
||||
link-libshadow.patch
|
||||
e50c85f4ebf559a3bac4817b41074c43d4691779.patch
|
||||
0001-compiler.h-ensure-IOPortBase-is-declared-extern-on-m.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
# 1.20.9-r0:
|
||||
# - CVE-2020-14362
|
||||
# - CVE-2020-14361
|
||||
# - CVE-2020-14346
|
||||
# - CVE-2020-14345
|
||||
# 1.20.8-r4:
|
||||
# - CVE-2020-14347
|
||||
# 1.20.3-r0:
|
||||
# - CVE-2018-14665
|
||||
# 1.19.5-r0:
|
||||
# - CVE-2017-12176
|
||||
# - CVE-2017-12177
|
||||
# - CVE-2017-12178
|
||||
# - CVE-2017-12179
|
||||
# - CVE-2017-12180
|
||||
# - CVE-2017-12181
|
||||
# - CVE-2017-12182
|
||||
# - CVE-2017-12183
|
||||
# - CVE-2017-12184
|
||||
# - CVE-2017-12185
|
||||
# - CVE-2017-12186
|
||||
# - CVE-2017-12187
|
||||
# - CVE-2017-13721
|
||||
# - CVE-2017-13723
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
sed -i -e 's/termio.h/termios.h/' hw/xfree86/os-support/xf86_OSlib.h
|
||||
}
|
||||
|
||||
build() {
|
||||
# xorg modules does not work with the -z now and it seems like we
|
||||
# cannot pass over the linker flag to .so files. so we tweak the
|
||||
# gcc specs.
|
||||
export CFLAGS="$CFLAGS -D_GNU_SOURCE -D__gid_t=gid_t -D__uid_t=uid_t"
|
||||
export LDFLAGS="$LDFLAGS -Wl,-z,lazy"
|
||||
_fontroot="/usr/share/fonts"
|
||||
|
||||
abuild-meson \
|
||||
--sysconfdir=/etc/X11 \
|
||||
-Dxorg=true \
|
||||
-Dxephyr=true \
|
||||
-Dxwayland=true \
|
||||
-Dglamor=true \
|
||||
-Dxwayland_eglstream=false \
|
||||
-Dxnest=true \
|
||||
-Ddmx=false \
|
||||
-Dxvfb=true \
|
||||
-Dxwin=false \
|
||||
-Ddefault_font_path=$_fontroot/misc,$_fontroot/100dpi:unscaled,$_fontroot/75dpi:unscaled,$_fontroot/TTF,$_fontroot/Type1 \
|
||||
-Dglx=true \
|
||||
-Dxdmcp=true \
|
||||
-Dxdm-auth-1=true \
|
||||
-Dxcsecurity=true \
|
||||
-Dsecure-rpc=false \
|
||||
-Dipv6=true \
|
||||
-Dxkb_dir=/usr/share/X11/xkb \
|
||||
-Dxkb_output_dir=/var/lib/xkb \
|
||||
-Dos_vendor="${DISTRO_NAME:-Alpine Linux}" \
|
||||
-Dlisten_tcp=false \
|
||||
-Dlisten_unix=true \
|
||||
-Dlisten_local=true \
|
||||
-Dsuid_wrapper=true \
|
||||
-Dpciaccess=true \
|
||||
-Dudev=true \
|
||||
-Dhal=false \
|
||||
-Dsystemd_logind=false \
|
||||
-Ddpms=true \
|
||||
-Ddri1=true \
|
||||
-Ddri2=true \
|
||||
-Ddri3=true \
|
||||
. output
|
||||
meson compile ${JOBS:+-j ${JOBS}} -C output
|
||||
}
|
||||
|
||||
check() {
|
||||
meson test --no-rebuild -v -C output
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" meson install --no-rebuild -C output
|
||||
|
||||
chmod u+s "$pkgdir"/usr/bin/Xorg
|
||||
ln -s /usr/bin/Xorg "$pkgdir"/usr/bin/X
|
||||
|
||||
# Don't conflict with xf86-input-evdev
|
||||
rm -f "$pkgdir"/usr/share/X11/xorg.conf.d/10-evdev.conf
|
||||
|
||||
install -m755 -d "$pkgdir"/var/lib/xkb
|
||||
}
|
||||
|
||||
xvfb() {
|
||||
pkgdesc="Virtual Framebuffer 'fake' X server"
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/Xvfb "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
xephyr() {
|
||||
pkgdesc="kdrive based X Server which targets a window on a host X Server as its framebuffer"
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/Xephyr "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
xnest() {
|
||||
pkgdesc="A nested Xorg server"
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/Xnest "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
xwayland() {
|
||||
pkgdesc="run X clients under wayland"
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/Xwayland "$subpkgdir"/usr/bin/
|
||||
}
|
||||
sha512sums="d9b5f93e1b9763a89187d8b272aa7d4ce9709641b8539f4536708af153310e5a4931bffd4229c51a3b0e3b12da7838750aa71b635751fb4c0bb27438cce4e5e6 xorg-server-1.20.9.tar.bz2
|
||||
004c9a7d920af8825a311d32433bf64190d45583d57bb20b3c5ef39d8011ced7bf17b73296e56078ca791e6cd923594dacfe3fbf7af7c98934627e34559c85d8 xwayland-glx.patch
|
||||
d0f723e6033a77faec118adc64e9d4749270724cbb2b86ca5ff796e1fbaef2d01ebcbb2904d48132b58f3ecf0781b2583744b671b17b7d51a1748f4b461932b0 link-libshadow.patch
|
||||
e1a4c630e2bbf9ab47c81d48f2de98e302a0e3d5c2896d07804dc36eef1cd0a4e076bd2ed1be70c0d3b024501e5f540abf1b11548ede74c1af3c82183553a728 e50c85f4ebf559a3bac4817b41074c43d4691779.patch
|
||||
a91f861588233c363a7939194d1582114ea216117e5f046b971d6571cb79445ceaaf0a1c6f66781da5b139d9ab8bd260d5dc3ff8c3279410865807561bf4fcee 0001-compiler.h-ensure-IOPortBase-is-declared-extern-on-m.patch"
|
|
@ -0,0 +1,31 @@
|
|||
From e50c85f4ebf559a3bac4817b41074c43d4691779 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Fri, 26 Oct 2018 17:47:30 -0700
|
||||
Subject: [PATCH] Fix segfault on probing a non-PCI platform device on a system
|
||||
with PCI.
|
||||
|
||||
Some Broadcom set-top-box boards have PCI busses, but the GPU is still
|
||||
probed through DT. We would dereference a null busid here in that
|
||||
case.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
hw/xfree86/common/xf86platformBus.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
|
||||
index cef47da03d..dadbac6c8f 100644
|
||||
--- a/hw/xfree86/common/xf86platformBus.c
|
||||
+++ b/hw/xfree86/common/xf86platformBus.c
|
||||
@@ -289,7 +289,7 @@ xf86platformProbe(void)
|
||||
for (i = 0; i < xf86_num_platform_devices; i++) {
|
||||
char *busid = xf86_platform_odev_attributes(i)->busid;
|
||||
|
||||
- if (pci && (strncmp(busid, "pci:", 4) == 0)) {
|
||||
+ if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) {
|
||||
platform_find_pci_info(&xf86_platform_devices[i], busid);
|
||||
}
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
31
temp/xorg-server/link-libshadow.patch
Normal file
31
temp/xorg-server/link-libshadow.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
From a530b6e8923f2b9153a773c8618a1e2f41619288 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Tue, 30 Apr 2019 18:01:27 -0400
|
||||
Subject: [PATCH] meson: Fix libshadow.so linkage
|
||||
|
||||
Don't link against fb, it's the driver's responsibility to load that
|
||||
first. Underlinking like this is unpleasant but this matches what
|
||||
autotools does.
|
||||
|
||||
Fixes: xorg/xserver#540
|
||||
---
|
||||
hw/xfree86/dixmods/meson.build | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/dixmods/meson.build b/hw/xfree86/dixmods/meson.build
|
||||
index 835d23215..0562b630f 100644
|
||||
--- a/hw/xfree86/dixmods/meson.build
|
||||
+++ b/hw/xfree86/dixmods/meson.build
|
||||
@@ -34,7 +34,7 @@ shared_module(
|
||||
c_args: xorg_c_args,
|
||||
dependencies: common_dep,
|
||||
link_whole: libxserver_miext_shadow,
|
||||
- link_with: [fb, e],
|
||||
+ link_with: e,
|
||||
|
||||
install: true,
|
||||
install_dir: module_dir,
|
||||
--
|
||||
2.22.0
|
||||
|
||||
|
419
temp/xorg-server/xwayland-glx.patch
Normal file
419
temp/xorg-server/xwayland-glx.patch
Normal file
|
@ -0,0 +1,419 @@
|
|||
diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build
|
||||
index 36bf213..c8746e5 100644
|
||||
--- a/hw/xwayland/meson.build
|
||||
+++ b/hw/xwayland/meson.build
|
||||
@@ -54,6 +54,9 @@ xwayland_glamor = []
|
||||
eglstream_srcs = []
|
||||
if build_glamor
|
||||
srcs += 'xwayland-glamor.c'
|
||||
+ if build_glx
|
||||
+ srcs += 'xwayland-glx.c'
|
||||
+ endif
|
||||
if gbm_dep.found()
|
||||
srcs += 'xwayland-glamor-gbm.c'
|
||||
endif
|
||||
@@ -80,10 +83,15 @@ if build_glamor
|
||||
xwayland_glamor += glamor
|
||||
endif
|
||||
|
||||
+wayland_inc = [ inc, ]
|
||||
+if build_glx
|
||||
+ wayland_inc += glx_inc
|
||||
+endif
|
||||
+
|
||||
executable(
|
||||
'Xwayland',
|
||||
srcs,
|
||||
- include_directories: inc,
|
||||
+ include_directories: wayland_inc,
|
||||
dependencies: [
|
||||
common_dep,
|
||||
xwayland_dep,
|
||||
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
|
||||
index 48e330a..dcfc7f1 100644
|
||||
--- a/hw/xwayland/xwayland-glamor.c
|
||||
+++ b/hw/xwayland/xwayland-glamor.c
|
||||
@@ -31,6 +31,9 @@
|
||||
|
||||
#include <glamor.h>
|
||||
#include <glamor_context.h>
|
||||
+#ifdef GLXEXT
|
||||
+#include "glx_extinit.h"
|
||||
+#endif
|
||||
|
||||
static void
|
||||
glamor_egl_make_current(struct glamor_context *glamor_ctx)
|
||||
@@ -262,5 +265,9 @@ xwl_glamor_init(struct xwl_screen *xwl_screen)
|
||||
ErrorF("Failed to initialize glamor Xv extension\n");
|
||||
#endif
|
||||
|
||||
+#ifdef GLXEXT
|
||||
+ GlxPushProvider(&glamor_provider);
|
||||
+#endif
|
||||
+
|
||||
return TRUE;
|
||||
}
|
||||
diff --git a/hw/xwayland/xwayland-glx.c b/hw/xwayland/xwayland-glx.c
|
||||
new file mode 100644
|
||||
index 0000000..71c9aad
|
||||
--- /dev/null
|
||||
+++ b/hw/xwayland/xwayland-glx.c
|
||||
@@ -0,0 +1,344 @@
|
||||
+/*
|
||||
+ * Copyright © 2019 Red Hat, Inc.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the "Software"),
|
||||
+ * to deal in the Software without restriction, including without limitation
|
||||
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
+ * and/or sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice (including the next
|
||||
+ * paragraph) shall be included in all copies or substantial portions of the
|
||||
+ * Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
+ * DEALINGS IN THE SOFTWARE.
|
||||
+ *
|
||||
+ * Authors:
|
||||
+ * Adam Jackson <ajax@redhat.com>
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * Sets up GLX capabilities based on the EGL capabilities of the glamor
|
||||
+ * renderer for the screen. Without this you will get whatever swrast
|
||||
+ * can do, which often does not include things like multisample visuals.
|
||||
+ */
|
||||
+
|
||||
+#include <xwayland-config.h>
|
||||
+#include "xwayland.h"
|
||||
+#define MESA_EGL_NO_X11_HEADERS
|
||||
+// #include <EGL/egl.h>
|
||||
+#include <epoxy/egl.h>
|
||||
+#include "glxserver.h"
|
||||
+#include "glxutil.h"
|
||||
+#include "compint.h"
|
||||
+#include <X11/extensions/composite.h>
|
||||
+#include "glamor_context.h"
|
||||
+#include "glamor.h"
|
||||
+
|
||||
+/* Can't get these from <GL/glx.h> since it pulls in client headers */
|
||||
+#define GLX_RGBA_BIT 0x00000001
|
||||
+#define GLX_WINDOW_BIT 0x00000001
|
||||
+#define GLX_PIXMAP_BIT 0x00000002
|
||||
+#define GLX_PBUFFER_BIT 0x00000004
|
||||
+#define GLX_NONE 0x8000
|
||||
+#define GLX_SLOW_CONFIG 0x8001
|
||||
+#define GLX_TRUE_COLOR 0x8002
|
||||
+#define GLX_DIRECT_COLOR 0x8003
|
||||
+#define GLX_NON_CONFORMANT_CONFIG 0x800D
|
||||
+#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
+#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
|
||||
+#define GLX_SWAP_UNDEFINED_OML 0x8063
|
||||
+
|
||||
+struct egl_config {
|
||||
+ __GLXconfig base;
|
||||
+ EGLConfig config;
|
||||
+};
|
||||
+
|
||||
+struct egl_screen {
|
||||
+ __GLXscreen base;
|
||||
+ EGLDisplay display;
|
||||
+ EGLConfig *configs;
|
||||
+};
|
||||
+
|
||||
+static void
|
||||
+egl_screen_destroy(__GLXscreen *_screen)
|
||||
+{
|
||||
+ struct egl_screen *screen = (struct egl_screen *)_screen;
|
||||
+
|
||||
+ /* XXX do we leak the fbconfig list? */
|
||||
+
|
||||
+ free(screen->configs);
|
||||
+ __glXScreenDestroy(_screen);
|
||||
+ free(_screen);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+egl_drawable_destroy(__GLXdrawable *draw)
|
||||
+{
|
||||
+ free(draw);
|
||||
+}
|
||||
+
|
||||
+static GLboolean
|
||||
+egl_drawable_swap_buffers(ClientPtr client, __GLXdrawable *draw)
|
||||
+{
|
||||
+ return GL_FALSE;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+egl_drawable_copy_sub_buffer(__GLXdrawable *draw, int x, int y, int w, int h)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+egl_drawable_wait_x(__GLXdrawable *draw)
|
||||
+{
|
||||
+ glamor_block_handler(draw->pDraw->pScreen);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+egl_drawable_wait_gl(__GLXdrawable *draw)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+static __GLXdrawable *
|
||||
+egl_create_glx_drawable(ClientPtr client, __GLXscreen *screen,
|
||||
+ DrawablePtr draw, XID drawid, int type,
|
||||
+ XID glxdrawid, __GLXconfig *modes)
|
||||
+{
|
||||
+ __GLXdrawable *ret;
|
||||
+
|
||||
+ ret = calloc(1, sizeof *ret);
|
||||
+ if (!ret)
|
||||
+ return NULL;
|
||||
+
|
||||
+ if (!__glXDrawableInit(ret, screen, draw, type, glxdrawid, modes)) {
|
||||
+ free(ret);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ ret->destroy = egl_drawable_destroy;
|
||||
+ ret->swapBuffers = egl_drawable_swap_buffers;
|
||||
+ ret->copySubBuffer = egl_drawable_copy_sub_buffer;
|
||||
+ ret->waitX = egl_drawable_wait_x;
|
||||
+ ret->waitGL = egl_drawable_wait_gl;
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * TODO:
|
||||
+ *
|
||||
+ * - figure out sRGB
|
||||
+ * - bindToTextureTargets is suspicious
|
||||
+ * - better channel mask setup
|
||||
+ * - drawable type masks is suspicious
|
||||
+ */
|
||||
+static struct egl_config *
|
||||
+translate_eglconfig(struct egl_screen *screen, EGLConfig hc,
|
||||
+ struct egl_config *chain, Bool direct_color,
|
||||
+ Bool double_buffer)
|
||||
+{
|
||||
+ EGLint value;
|
||||
+ struct egl_config *c = calloc(1, sizeof *c);
|
||||
+
|
||||
+ if (!c)
|
||||
+ return chain;
|
||||
+
|
||||
+ /* constants. changing these requires (at least) new EGL extensions */
|
||||
+ c->base.stereoMode = GL_FALSE;
|
||||
+ c->base.numAuxBuffers = 0;
|
||||
+ c->base.level = 0;
|
||||
+ c->base.transparentAlpha = 0;
|
||||
+ c->base.transparentIndex = 0;
|
||||
+ c->base.transparentPixel = GLX_NONE;
|
||||
+ c->base.visualSelectGroup = 0;
|
||||
+ c->base.indexBits = 0;
|
||||
+ c->base.optimalPbufferWidth = 0;
|
||||
+ c->base.optimalPbufferHeight = 0;
|
||||
+ c->base.bindToMipmapTexture = 0;
|
||||
+ c->base.bindToTextureTargets = GLX_DONT_CARE;
|
||||
+ c->base.sRGBCapable = 0;
|
||||
+ c->base.swapMethod = GLX_SWAP_UNDEFINED_OML;
|
||||
+
|
||||
+ /* this is... suspect */
|
||||
+ c->base.drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT;
|
||||
+
|
||||
+ /* hmm */
|
||||
+ c->base.bindToTextureRgb = GL_TRUE;
|
||||
+ c->base.bindToTextureRgba = GL_TRUE;
|
||||
+
|
||||
+ /*
|
||||
+ * glx conformance failure: there's no such thing as accumulation
|
||||
+ * buffers in EGL. they should be emulable with shaders and fbos,
|
||||
+ * but i'm pretty sure nobody's using this feature since it's
|
||||
+ * entirely software. note that glx conformance merely requires
|
||||
+ * that an accum buffer _exist_, not a minimum bitness.
|
||||
+ */
|
||||
+ c->base.accumRedBits = 0;
|
||||
+ c->base.accumGreenBits = 0;
|
||||
+ c->base.accumBlueBits = 0;
|
||||
+ c->base.accumAlphaBits = 0;
|
||||
+
|
||||
+ /* parametric state */
|
||||
+ if (direct_color)
|
||||
+ c->base.visualType = GLX_DIRECT_COLOR;
|
||||
+ else
|
||||
+ c->base.visualType = GLX_TRUE_COLOR;
|
||||
+
|
||||
+ if (double_buffer)
|
||||
+ c->base.doubleBufferMode = GL_TRUE;
|
||||
+ else
|
||||
+ c->base.doubleBufferMode = GL_FALSE;
|
||||
+
|
||||
+ /* direct-mapped state */
|
||||
+#define GET(attr, slot) \
|
||||
+ eglGetConfigAttrib(screen->display, hc, attr, &c->base.slot)
|
||||
+ GET(EGL_RED_SIZE, redBits);
|
||||
+ GET(EGL_GREEN_SIZE, greenBits);
|
||||
+ GET(EGL_BLUE_SIZE, blueBits);
|
||||
+ GET(EGL_ALPHA_SIZE, alphaBits);
|
||||
+ GET(EGL_BUFFER_SIZE, rgbBits);
|
||||
+ GET(EGL_DEPTH_SIZE, depthBits);
|
||||
+ GET(EGL_STENCIL_SIZE, stencilBits);
|
||||
+ GET(EGL_TRANSPARENT_RED_VALUE, transparentRed);
|
||||
+ GET(EGL_TRANSPARENT_GREEN_VALUE, transparentGreen);
|
||||
+ GET(EGL_TRANSPARENT_BLUE_VALUE, transparentBlue);
|
||||
+ GET(EGL_SAMPLE_BUFFERS, sampleBuffers);
|
||||
+ GET(EGL_SAMPLES, samples);
|
||||
+ if (c->base.renderType & GLX_PBUFFER_BIT) {
|
||||
+ GET(EGL_MAX_PBUFFER_WIDTH, maxPbufferWidth);
|
||||
+ GET(EGL_MAX_PBUFFER_HEIGHT, maxPbufferHeight);
|
||||
+ GET(EGL_MAX_PBUFFER_PIXELS, maxPbufferPixels);
|
||||
+ }
|
||||
+#undef GET
|
||||
+
|
||||
+ /* derived state: config caveats */
|
||||
+ eglGetConfigAttrib(screen->display, hc, EGL_CONFIG_CAVEAT, &value);
|
||||
+ if (value == EGL_NONE)
|
||||
+ c->base.visualRating = GLX_NONE;
|
||||
+ else if (value == EGL_SLOW_CONFIG)
|
||||
+ c->base.visualRating = GLX_SLOW_CONFIG;
|
||||
+ else if (value == EGL_NON_CONFORMANT_CONFIG)
|
||||
+ c->base.visualRating = GLX_NON_CONFORMANT_CONFIG;
|
||||
+ /* else panic */
|
||||
+
|
||||
+ /* derived state: float configs */
|
||||
+ c->base.renderType = GLX_RGBA_BIT;
|
||||
+ if (eglGetConfigAttrib(screen->display, hc, EGL_COLOR_COMPONENT_TYPE_EXT,
|
||||
+ &value) == EGL_TRUE) {
|
||||
+ if (value == EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT) {
|
||||
+ c->base.renderType = GLX_RGBA_FLOAT_BIT_ARB;
|
||||
+ }
|
||||
+ /* else panic */
|
||||
+ }
|
||||
+
|
||||
+ /* map to the backend's config */
|
||||
+ c->config = hc;
|
||||
+
|
||||
+ /*
|
||||
+ * XXX do something less ugly
|
||||
+ */
|
||||
+ if (c->base.renderType == GLX_RGBA_BIT) {
|
||||
+ if (c->base.rgbBits == 24 || c->base.rgbBits == 32) {
|
||||
+ c->base.redMask = 0xff0000;
|
||||
+ c->base.greenMask = 0x00ff00;
|
||||
+ c->base.blueMask = 0x0000ff;
|
||||
+ if (c->base.alphaBits)
|
||||
+ /* assume all remaining bits are alpha */
|
||||
+ c->base.alphaMask = 0xff000000;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ c->base.next = chain ? &chain->base : NULL;
|
||||
+ return c;
|
||||
+}
|
||||
+
|
||||
+static __GLXconfig *
|
||||
+egl_mirror_configs(ScreenPtr pScreen, struct egl_screen *screen)
|
||||
+{
|
||||
+ int i, j, k, nconfigs;
|
||||
+ struct egl_config *c = NULL;
|
||||
+ EGLConfig *host_configs = NULL;
|
||||
+ Bool offon[] = { FALSE, TRUE };
|
||||
+
|
||||
+ eglGetConfigs(screen->display, NULL, 0, &nconfigs);
|
||||
+ if (!(host_configs = calloc(nconfigs, sizeof *host_configs)))
|
||||
+ return NULL;
|
||||
+
|
||||
+ eglGetConfigs(screen->display, host_configs, nconfigs, &nconfigs);
|
||||
+
|
||||
+ /* We walk the EGL configs backwards to make building the
|
||||
+ * ->next chain easier.
|
||||
+ */
|
||||
+ for (i = nconfigs - 1; i > 0; i--)
|
||||
+ for (j = 0; j < 2; j++) /* direct_color */
|
||||
+ for (k = 0; k < 2; k++) /* direct_color */
|
||||
+ c = translate_eglconfig(screen, host_configs[i], c,
|
||||
+ /* direct_color */ offon[j],
|
||||
+ /* double_buffer */ offon[k]
|
||||
+ );
|
||||
+
|
||||
+ screen->configs = host_configs;
|
||||
+ return c ? &c->base : NULL;
|
||||
+}
|
||||
+
|
||||
+static __GLXscreen *
|
||||
+egl_screen_probe(ScreenPtr pScreen)
|
||||
+{
|
||||
+ struct egl_screen *screen;
|
||||
+ struct xwl_screen *xwl_screen = xwl_screen_get(pScreen);
|
||||
+ __GLXscreen *base;
|
||||
+
|
||||
+ if (enableIndirectGLX)
|
||||
+ return NULL; /* not implemented */
|
||||
+
|
||||
+ if (!(screen = calloc(1, sizeof *screen)))
|
||||
+ return NULL;
|
||||
+
|
||||
+ base = &screen->base;
|
||||
+ base->destroy = egl_screen_destroy;
|
||||
+ base->createDrawable = egl_create_glx_drawable;
|
||||
+ /* base.swapInterval = NULL; */
|
||||
+
|
||||
+ screen->display = xwl_screen->glamor_ctx->display;
|
||||
+
|
||||
+ __glXInitExtensionEnableBits(screen->base.glx_enable_bits);
|
||||
+ __glXEnableExtension(base->glx_enable_bits, "GLX_ARB_context_flush_control");
|
||||
+ __glXEnableExtension(base->glx_enable_bits, "GLX_ARB_create_context");
|
||||
+ __glXEnableExtension(base->glx_enable_bits, "GLX_ARB_create_context_no_error");
|
||||
+ __glXEnableExtension(base->glx_enable_bits, "GLX_ARB_create_context_profile");
|
||||
+ __glXEnableExtension(base->glx_enable_bits, "GLX_ARB_create_context_robustness");
|
||||
+ __glXEnableExtension(base->glx_enable_bits, "GLX_ARB_fbconfig_float");
|
||||
+ __glXEnableExtension(base->glx_enable_bits, "GLX_EXT_create_context_es2_profile");
|
||||
+ __glXEnableExtension(base->glx_enable_bits, "GLX_EXT_create_context_es_profile");
|
||||
+ __glXEnableExtension(base->glx_enable_bits, "GLX_EXT_fbconfig_packed_float");
|
||||
+ __glXEnableExtension(base->glx_enable_bits, "GLX_EXT_framebuffer_sRGB");
|
||||
+ __glXEnableExtension(base->glx_enable_bits, "GLX_EXT_no_config_context");
|
||||
+ __glXEnableExtension(base->glx_enable_bits, "GLX_EXT_texture_from_pixmap");
|
||||
+ __glXEnableExtension(base->glx_enable_bits, "GLX_MESA_copy_sub_buffer");
|
||||
+ // __glXEnableExtension(base->glx_enable_bits, "GLX_SGI_swap_control");
|
||||
+
|
||||
+ base->fbconfigs = egl_mirror_configs(pScreen, screen);
|
||||
+ if (!base->fbconfigs) {
|
||||
+ free(screen);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ __glXScreenInit(base, pScreen);
|
||||
+ __glXsetGetProcAddress(eglGetProcAddress);
|
||||
+
|
||||
+ return base;
|
||||
+}
|
||||
+
|
||||
+__GLXprovider glamor_provider = {
|
||||
+ egl_screen_probe,
|
||||
+ "glamor",
|
||||
+ NULL
|
||||
+};
|
||||
diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
|
||||
index 0854df4..a4804fe 100644
|
||||
--- a/hw/xwayland/xwayland.h
|
||||
+++ b/hw/xwayland/xwayland.h
|
||||
@@ -488,4 +488,9 @@ static inline void xwl_glamor_init_eglstream(struct xwl_screen *xwl_screen)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef GLXEXT
|
||||
+#include "glx_extinit.h"
|
||||
+extern __GLXprovider glamor_provider;
|
||||
+#endif
|
||||
+
|
||||
#endif
|
32
temp/xrdb/APKBUILD
Normal file
32
temp/xrdb/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Forked from Alpine
|
||||
# https://postmarketos.org/edge/2020/12/01/xorg-server-moved/
|
||||
|
||||
pkgname=xrdb
|
||||
pkgver=1.2.0
|
||||
pkgrel=1
|
||||
pkgdesc="X server resource database utility"
|
||||
url="http://xorg.freedesktop.org"
|
||||
arch="armhf armv7 aarch64"
|
||||
license="MIT"
|
||||
options="!check" # No test suite.
|
||||
makedepends="libxmu-dev libx11-dev util-macros"
|
||||
subpackages="$pkgname-doc"
|
||||
source="https://www.x.org/releases/individual/app/xrdb-$pkgver.tar.bz2"
|
||||
|
||||
build() {
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--localstatedir=/var \
|
||||
--with-cpp=/usr/bin/cpp # optional run-time dependency
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
||||
sha512sums="14e1cdfb2152fb28f1f4641b177ab236648d7e967a95b952bf4cfce8d3e1ef085e85385354e3381aaf644462e8888a1847f755ab4016ecb4cb4a715b001dd2ef xrdb-1.2.0.tar.bz2"
|
Loading…
Reference in a new issue