PKGBUILD 9.4 KB
Newer Older
Eric Vidal's avatar
Eric Vidal committed
1
2
3
4
5
6
# Maintainer: Eric Vidal <eric@obarun.org>
# based on the original https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/xorg-server
# 						Maintainer: AndyRTR <andyrtr@archlinux.org>
# 						Maintainer: Jan de Groot <jgc@archlinux.org>

pkgbase=xorg-server
Eric Vidal's avatar
Eric Vidal committed
7
8
pkgname=('xorg-server-rootless' 'xorg-server-xephyr-rootless' 'xorg-server-xdmx-rootless' 'xorg-server-xvfb-rootless'
		'xorg-server-xnest-rootless' 'xorg-server-xwayland-rootless' 'xorg-server-common-rootless' 'xorg-server-devel-rootless')
Eric Vidal's avatar
Eric Vidal committed
9
pkgver=1.20.5
Eric Vidal's avatar
Eric Vidal committed
10
pkgrel=2
Eric Vidal's avatar
Eric Vidal committed
11
12
arch=('x86_64')
license=('custom')
Eric Vidal's avatar
Eric Vidal committed
13
groups=('xorg')
Eric Vidal's avatar
Eric Vidal committed
14
url="http://xorg.freedesktop.org"
Eric Vidal's avatar
Eric Vidal committed
15
16
17
18
19
20
21
22
23
24
25
26
27
28
makedepends=('xorgproto' 'pixman' 'libx11' 'mesa' 'mesa-libgl' 'xtrans'
             'libxkbfile' 'libxfont2' 'libpciaccess' 'libxv'
             'libxmu' 'libxrender' 'libxi' 'libxaw' 'libdmx' 'libxtst' 'libxres'
             'xorg-xkbcomp' 'xorg-util-macros' 'xorg-font-util' 'libepoxy'
             'xcb-util' 'xcb-util-image' 'xcb-util-renderutil' 'xcb-util-wm' 'xcb-util-keysyms'
             'libxshmfence' 'libunwind' 'wayland-protocols' 'egl-wayland' 'meson') # 'git')
#_commit=d0d1a694f967af770fba0d36043fd5218ff20984 # branch 1.19

#source=("git+https://anongit.freedesktop.org/git/xorg/xserver.git#commit=$_commit"
source=(https://xorg.freedesktop.org/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2
        'xwayland-config.h.meson.in::https://cgit.freedesktop.org/xorg/xserver/plain/include/xwayland-config.h.meson.in?id=xorg-server-1.20.0'
        xserver-autobind-hotplug.patch
        xvfb-run # with updates from FC master
        xvfb-run.1
Eric Vidal's avatar
Eric Vidal committed
29
        0001-v2-FS-58644.patch
Eric Vidal's avatar
Eric Vidal committed
30
        0002-fix-libshadow-2.patch)
Eric Vidal's avatar
Eric Vidal committed
31
32
33
34
validpgpkeys=('7B27A3F1A6E18CD9588B4AE8310180050905E40C'
              'C383B778255613DFDB409D91DB221A6900000011'
              'DD38563A8A8224537D1F90E45B8A2D50A0ECD0D3'
              '995ED5C8A6138EB0961F18474C09DD83CAAA50B2')
Eric Vidal's avatar
Eric Vidal committed
35
sha512sums=('625f0626b122cf95600abe382c3217348999357a0e2d2443092f1b67cff1c98d7ef09303884ceaeac181e0555dc56b0d4d44bda45cc464dac2d9a50c5b32d631'
Eric Vidal's avatar
Eric Vidal committed
36
37
38
39
            'd707e0870367de2665c3b82f09564d17ed3f62c9e8b4bd471c11af1fb1e9249e306e92c7961a04e355756eec9f5271bc8e66999e56c73c31bc9da4127ff30a8e'
            'd84f4d63a502b7af76ea49944d1b21e2030dfd250ac1e82878935cf631973310ac9ba1f0dfedf10980ec6c7431d61b7daa4b7bbaae9ee477b2c19812c1661a22'
            '55bbf520333f6e818b0125b37179a7039b69a0d3d2242b80a08da003d94cbf6c1fb912d880abcce318a85d7947e3eff8fbc4cdf57d7118572e8ebc56c4569af6'
            'de5e2cb3c6825e6cf1f07ca0d52423e17f34d70ec7935e9dd24be5fb9883bf1e03b50ff584931bd3b41095c510ab2aa44d2573fd5feaebdcb59363b65607ff22'
Eric Vidal's avatar
Eric Vidal committed
40
            'f05c18354a3cf5b5b0fa97c4a887cfd688297e39d7ddc93b5900357119a689a060321019aeec9ca9c1366ea4b65b7875b2a9cadb84e46d2c193c15e6df22fcd8'
Eric Vidal's avatar
Eric Vidal committed
41
            '9cb9a979dfc2de4fac384a1044b368bb97c8b0b524523aa2a96ef55c673ab5350c50cc79ad103655f40c2e0002cdcc2e1646fade3ac78641616d182e7c500be7')
Eric Vidal's avatar
Eric Vidal committed
42

Eric Vidal's avatar
Eric Vidal committed
43
prepare() {
Eric Vidal's avatar
Eric Vidal committed
44
45
46
47
  cp xwayland-config.h.meson.in ${pkgbase}-${pkgver}/include/

  #cd xserver
  cd "${pkgbase}-${pkgver}"
Eric Vidal's avatar
Eric Vidal committed
48
49
50
51

  # patch from Fedora, not yet merged
  patch -Np1 -i ../xserver-autobind-hotplug.patch
  
Eric Vidal's avatar
Eric Vidal committed
52
53
54
  # https://bugs.freedesktop.org/show_bug.cgi?id=106588
  patch -Np1 -i ../0001-v2-FS-58644.patch
  
Eric Vidal's avatar
Eric Vidal committed
55
56
57
  # Fix libshadow.so: libfb.so => not found - FS#58731
  # https://bugs.freedesktop.org/show_bug.cgi?id=106656
  patch -Np1 -i ../0002-fix-libshadow-2.patch
Eric Vidal's avatar
Eric Vidal committed
58

Eric Vidal's avatar
Eric Vidal committed
59
60
61
62
63
64
65
66
67
}

build() {
  # Since pacman 5.0.2-2, hardened flags are now enabled in makepkg.conf
  # With them, module fail to load with undefined symbol.
  # See https://bugs.archlinux.org/task/55102 / https://bugs.archlinux.org/task/54845
  export CFLAGS=${CFLAGS/-fno-plt}
  export CXXFLAGS=${CXXFLAGS/-fno-plt}
  export LDFLAGS=${LDFLAGS/,-z,now}
Eric Vidal's avatar
Eric Vidal committed
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104


  arch-meson ${pkgbase}-$pkgver build \
    -D os_vendor="Obarun" \
    -D ipv6=true \
    -D dmx=true \
    -D xvfb=true \
    -D xnest=true \
    -D xcsecurity=true \
    -D xorg=true \
    -D xephyr=true \
    -D xwayland=true \
    -D xwayland_eglstream=true \
    -D glamor=true \
    -D udev=true \
    -D suid_wrapper=false \
    -D xkb_dir=/usr/share/X11/xkb \
    -D xkb_output_dir=/var/lib/xkb \
    -D systemd_logind=false 
     

  # Print config
  meson configure build
  ninja -C build
 
  # fake installation to be seperated into packages
  DESTDIR="${srcdir}/fakeinstall" ninja -C build install
}

_install() {
  local src f dir
  for src; do
    f="${src#fakeinstall/}"
    dir="${pkgdir}/${f%/*}"
    install -m755 -d "${dir}"
    mv -v "${src}" "${dir}/"
  done
Eric Vidal's avatar
Eric Vidal committed
105
106
}

Eric Vidal's avatar
Eric Vidal committed
107
package_xorg-server-common-rootless() {
Eric Vidal's avatar
Eric Vidal committed
108
  pkgdesc="Xorg server common files"
Eric Vidal's avatar
Eric Vidal committed
109
  depends=(xkeyboard-config xorg-xkbcomp xorg-setxkbmap)
Eric Vidal's avatar
Eric Vidal committed
110
111
  conflicts=('xorg-server-common')
  provides=('xorg-server-common')
Eric Vidal's avatar
Eric Vidal committed
112
 
Eric Vidal's avatar
Eric Vidal committed
113
  
Eric Vidal's avatar
Eric Vidal committed
114
  _install fakeinstall/usr/lib/xorg/protocol.txt
Eric Vidal's avatar
Eric Vidal committed
115
  _install fakeinstall/usr/share/man/man1/Xserver.1
Eric Vidal's avatar
Eric Vidal committed
116

Eric Vidal's avatar
Eric Vidal committed
117
118
119
  install -m644 -Dt "${pkgdir}/var/lib/xkb/" "${pkgbase}-${pkgver}"/xkb/README.compiled
  # license
  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase}-${pkgver}"/COPYING
Eric Vidal's avatar
Eric Vidal committed
120
121
}

Eric Vidal's avatar
Eric Vidal committed
122
package_xorg-server-rootless() {
Eric Vidal's avatar
Eric Vidal committed
123
  pkgdesc="Xorg X server"
Eric Vidal's avatar
Eric Vidal committed
124
125
126
127
  depends=(libepoxy libxfont2 pixman xorg-server-common-rootless libunwind 
           dbus libgl xf86-input-libinput nettle
           libpciaccess libdrm libxshmfence) # FS#52949

Eric Vidal's avatar
Eric Vidal committed
128
129
  # see xorg-server-*/hw/xfree86/common/xf86Module.h for ABI versions - we provide major numbers that drivers can depend on
  # and /usr/lib/pkgconfig/xorg-server.pc in xorg-server-devel pkg
Eric Vidal's avatar
Eric Vidal committed
130
  provides=('X-ABI-VIDEODRV_VERSION=24.0' 'X-ABI-XINPUT_VERSION=24.1' 'X-ABI-EXTENSION_VERSION=10.0' 'x-server' 'xorg-server')
Eric Vidal's avatar
Eric Vidal committed
131
  conflicts=('nvidia-utils<=331.20' 'glamor-egl' 'xf86-video-modesetting' 'xorg-server')
Eric Vidal's avatar
Eric Vidal committed
132
  replaces=('glamor-egl' 'xf86-video-modesetting')
Eric Vidal's avatar
Eric Vidal committed
133
  install=xorg-server-rootless.install
Eric Vidal's avatar
Eric Vidal committed
134

Eric Vidal's avatar
Eric Vidal committed
135
136
137
138
139
140
  
  _install fakeinstall/usr/bin/{Xorg,cvt,gtf}
  ln -s /usr/bin/Xorg "${pkgdir}/usr/bin/X"
  #_install fakeinstall/usr/lib/Xorg{,.wrap}
  _install fakeinstall/usr/lib/xorg/modules/*
  _install fakeinstall/usr/share/X11/xorg.conf.d/10-quirks.conf
Eric Vidal's avatar
Eric Vidal committed
141
142
143
  _install fakeinstall/usr/share/man/man1/{Xorg,cvt,gtf}.1
  _install fakeinstall/usr/share/man/man4/{exa,fbdevhw,modesetting}.4
  _install fakeinstall/usr/share/man/man5/{xorg.conf,xorg.conf.d}.5
Eric Vidal's avatar
Eric Vidal committed
144
145

  # distro specific files must be installed in /usr/share/X11/xorg.conf.d
Eric Vidal's avatar
Eric Vidal committed
146
  install -m755 -d "${pkgdir}/etc/X11/xorg.conf.d"
Eric Vidal's avatar
Eric Vidal committed
147

Eric Vidal's avatar
Eric Vidal committed
148
149
  # license
  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase}-${pkgver}"/COPYING
Eric Vidal's avatar
Eric Vidal committed
150
151
}

Eric Vidal's avatar
Eric Vidal committed
152
package_xorg-server-xephyr-rootless() {
Eric Vidal's avatar
Eric Vidal committed
153
  pkgdesc="A nested X server that runs as an X application"
Eric Vidal's avatar
Eric Vidal committed
154
155
156
  depends=(libxfont2 libgl libepoxy libunwind libxv pixman xorg-server-common-rootless
           xcb-util-image xcb-util-renderutil xcb-util-wm xcb-util-keysyms
           nettle libtirpc)
Eric Vidal's avatar
Eric Vidal committed
157
158
  conflicts=('xorg-server-xephyr')
  provides=('xorg-server-xephyr')
Eric Vidal's avatar
Eric Vidal committed
159
  
Eric Vidal's avatar
Eric Vidal committed
160
  _install fakeinstall/usr/bin/Xephyr
Eric Vidal's avatar
Eric Vidal committed
161
  _install fakeinstall/usr/share/man/man1/Xephyr.1
Eric Vidal's avatar
Eric Vidal committed
162

Eric Vidal's avatar
Eric Vidal committed
163
164
  # license
  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase}-${pkgver}"/COPYING
Eric Vidal's avatar
Eric Vidal committed
165
166
}

Eric Vidal's avatar
Eric Vidal committed
167
package_xorg-server-xvfb-rootless() {
Eric Vidal's avatar
Eric Vidal committed
168
  pkgdesc="Virtual framebuffer X server"
Eric Vidal's avatar
Eric Vidal committed
169
  depends=(libxfont2 libunwind pixman xorg-server-common-rootless xorg-xauth libgl nettle)
Eric Vidal's avatar
Eric Vidal committed
170
171
  conflicts=('xorg-server-xvfb')
  provides=('xorg-server-xvfb')
Eric Vidal's avatar
Eric Vidal committed
172
173
  
  _install fakeinstall/usr/bin/Xvfb
Eric Vidal's avatar
Eric Vidal committed
174
  _install fakeinstall/usr/share/man/man1/Xvfb.1
Eric Vidal's avatar
Eric Vidal committed
175
176

  install -m755 "${srcdir}/xvfb-run" "${pkgdir}/usr/bin/"
Eric Vidal's avatar
Eric Vidal committed
177
  install -m644 "${srcdir}/xvfb-run.1" "${pkgdir}/usr/share/man/man1/" # outda
Eric Vidal's avatar
Eric Vidal committed
178

Eric Vidal's avatar
Eric Vidal committed
179
180
  # license
  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase}-${pkgver}"/COPYING
Eric Vidal's avatar
Eric Vidal committed
181
182
}

Eric Vidal's avatar
Eric Vidal committed
183
package_xorg-server-xnest-rootless() {
Eric Vidal's avatar
Eric Vidal committed
184
  pkgdesc="A nested X server that runs as an X application"
Eric Vidal's avatar
Eric Vidal committed
185
  depends=(libxfont2 libxext pixman xorg-server-common-rootless nettle libtirpc)
Eric Vidal's avatar
Eric Vidal committed
186
187
  conflicts=('xorg-server-xnest')
  provides=('xorg-server-xnest')
Eric Vidal's avatar
Eric Vidal committed
188
  
Eric Vidal's avatar
Eric Vidal committed
189
  _install fakeinstall/usr/bin/Xnest
Eric Vidal's avatar
Eric Vidal committed
190
  _install fakeinstall/usr/share/man/man1/Xnest.1
Eric Vidal's avatar
Eric Vidal committed
191

Eric Vidal's avatar
Eric Vidal committed
192
193
  # license
  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase}-${pkgver}"/COPYING
Eric Vidal's avatar
Eric Vidal committed
194
195
}

Eric Vidal's avatar
Eric Vidal committed
196
package_xorg-server-xdmx-rootless() {
Eric Vidal's avatar
Eric Vidal committed
197
  pkgdesc="Distributed Multihead X Server and utilities"
Eric Vidal's avatar
Eric Vidal committed
198
199
  depends=(libxfont2 libxi libxaw libxrender libdmx libxfixes 
           pixman xorg-server-common-rootless nettle)
Eric Vidal's avatar
Eric Vidal committed
200
201
  conflicts=('xorg-server-xdmx')
  provides=('xorg-server-xdmx')
Eric Vidal's avatar
Eric Vidal committed
202
  
Eric Vidal's avatar
Eric Vidal committed
203
  _install fakeinstall/usr/bin/{Xdmx,dmx*,vdltodmx,xdmxconfig}
Eric Vidal's avatar
Eric Vidal committed
204
  _install fakeinstall/usr/share/man/man1/{Xdmx,dmxtodmx,vdltodmx,xdmxconfig}.1
Eric Vidal's avatar
Eric Vidal committed
205

Eric Vidal's avatar
Eric Vidal committed
206
207
  # license
  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase}-${pkgver}"/COPYING
Eric Vidal's avatar
Eric Vidal committed
208
209
}

Eric Vidal's avatar
Eric Vidal committed
210
package_xorg-server-xwayland-rootless() {
Eric Vidal's avatar
Eric Vidal committed
211
  pkgdesc="run X clients under wayland"
Eric Vidal's avatar
Eric Vidal committed
212
213
  depends=(libxfont2 libepoxy libunwind libgl pixman xorg-server-common-rootless
           nettle libtirpc)
Eric Vidal's avatar
Eric Vidal committed
214
215
  conflicts=('xorg-server-xwayland')
  provides=('xorg-server-xwayland')
Eric Vidal's avatar
Eric Vidal committed
216
  
Eric Vidal's avatar
Eric Vidal committed
217
  _install fakeinstall/usr/bin/Xwayland
Eric Vidal's avatar
Eric Vidal committed
218

Eric Vidal's avatar
Eric Vidal committed
219
220
  # license
  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase}-${pkgver}"/COPYING
Eric Vidal's avatar
Eric Vidal committed
221
222
}

Eric Vidal's avatar
Eric Vidal committed
223
package_xorg-server-devel-rootless() {
Eric Vidal's avatar
Eric Vidal committed
224
  pkgdesc="Development files for the X.Org X server"
Eric Vidal's avatar
Eric Vidal committed
225
  depends=('xorgproto' 'mesa' 'libpciaccess'
Eric Vidal's avatar
Eric Vidal committed
226
227
228
229
           # not technically required but almost every Xorg pkg needs it to build
           'xorg-util-macros')
  conflicts=('xorg-server-devel')
  provides=('xorg-server-devel')
Eric Vidal's avatar
Eric Vidal committed
230
  
Eric Vidal's avatar
Eric Vidal committed
231
232
233
234
235
236
237
238
239
  _install fakeinstall/usr/include/xorg/*
  _install fakeinstall/usr/lib/pkgconfig/xorg-server.pc
  _install fakeinstall/usr/share/aclocal/xorg-server.m4

  # license
  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgbase}-${pkgver}"/COPYING

  # make sure there are no files left to install
  find fakeinstall -depth -print0 | xargs -0 rmdir
Eric Vidal's avatar
Eric Vidal committed
240
}