blob: 615ad6d9bda0085dede07d5f8052169c835a597b [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "The X.Org X server"
2HOMEPAGE = "http://www.x.org"
3SECTION = "x11/base"
4LICENSE = "MIT-X"
5LIC_FILES_CHKSUM = "file://COPYING;md5=5df87950af51ac2c5822094553ea1880"
6
7# xf86-*-* packages depend on an X server built with the xfree86 DDX
8# so we have a virtual to represent that:
9# deprecated, we should use virtual/xserver instead
10PROVIDES = "virtual/xserver-xf86"
11
12# Other packages tend to just care that there is *an* X server:
13PROVIDES += "virtual/xserver"
14
15PE = "2"
16INC_PR = "r8"
17
18XORG_PN = "xorg-server"
19SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.bz2"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020
Brad Bishop19323692019-04-05 15:28:33 -040021CVE_PRODUCT = "xorg-server"
22
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023S = "${WORKDIR}/${XORG_PN}-${PV}"
24
25inherit autotools pkgconfig
26
Patrick Williamsf1e5d692016-03-30 15:21:19 -050027inherit distro_features_check
28REQUIRED_DISTRO_FEATURES = "x11"
29
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080030PROTO_DEPS = "xorgproto"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050031LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} font-util"
33
34# Split out some modules and extensions from the main package
35# These aren't needed for basic operations and only take up space:
36# 32.0k libdri.so
37# 91.0k libexa.so
38# 336.0k libglx.so
39# 1360k libint10.so
40# 180.0k libwfb.so
41# 320.0k libxaa.so
42# 124.0k libxf1bpp.so
43# 84.0k libxf4bpp.so
44# librecord.so
45# libextmod.so
46# libdbe.so
47
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050048PACKAGES =+ "${PN}-sdl \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049 ${PN}-fbdev \
50 ${PN}-xvfb \
51 ${PN}-utils \
52 ${PN}-xephyr \
53 ${PN}-xwayland \
54 ${PN}-multimedia-modules \
55 ${PN}-extension-dri \
56 ${PN}-extension-dri2 \
57 ${PN}-extension-glx \
58 ${PN}-extension-record \
59 ${PN}-extension-extmod \
60 ${PN}-extension-dbe \
61 ${PN}-module-libint10 \
62 ${PN}-module-libafb \
63 ${PN}-module-libwfb \
64 ${PN}-module-libmfb \
65 ${PN}-module-libcfb \
66 ${PN}-module-exa \
67 ${PN}-module-xaa \
68 ${PN}-module-libxf1bpp \
69 ${PN}-module-libxf4bpp \
70 xf86-video-modesetting"
71
72SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060073INSANE_SKIP_${MLPREFIX}xf86-video-modesetting = "xorg-driver-abi"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050074
Brad Bishop6e60e8b2018-02-01 10:27:11 -050075XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp xf86-input-libinput"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050076RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}"
77RRECOMMENDS_${PN}-xwayland += "${XSERVER_RRECOMMENDS}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050078RDEPENDS_${PN}-xvfb += "xkeyboard-config"
79RDEPENDS_${PN}-module-exa = "${PN} (= ${EXTENDPKGV})"
80
81FILES_${PN} = "${bindir} ${libdir}/X11/Options ${libdir}/X11/Cards ${libdir}/X11/getconfig ${libdir}/X11/etc ${libdir}/modules/*.so ${libdir}/xorg/modules/*.so /etc/X11 ${libdir}/xorg/protocol.txt ${datadir}/X11/xorg.conf.d"
82FILES_${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la"
83FILES_${PN}-doc += "${libdir}/X11/doc ${datadir}/X11/xkb/compiled/README.compiled ${localstatedir}/lib/xkb/README.compiled"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050084FILES_${PN}-sdl = "${bindir}/Xsdl"
85FILES_${PN}-fbdev = "${bindir}/Xfbdev"
86FILES_${PN}-xvfb = "${bindir}/Xvfb"
87FILES_${PN}-utils = "${bindir}/scanpci ${bindir}/pcitweak ${bindir}/ioport ${bindir}/in[bwl] ${bindir}/out[bwl] ${bindir}/mmap[rw] ${bindir}/gtf ${bindir}/getconfig ${bindir}/getconfig.pl"
88FILES_${PN}-xephyr = "${bindir}/Xephyr"
89FILES_${PN}-xwayland = "${bindir}/Xwayland"
90FILES_${PN}-multimedia-modules = "${libdir}/xorg/modules/multimedia/*drv*"
91FILES_${PN}-extension-dri = "${libdir}/xorg/modules/extensions/libdri.so"
92FILES_${PN}-extension-dri2 = "${libdir}/xorg/modules/extensions/libdri2.so"
93FILES_${PN}-extension-glx = "${libdir}/xorg/modules/extensions/libglx.so"
94FILES_${PN}-extension-record = "${libdir}/xorg/modules/extensions/librecord.so"
95FILES_${PN}-extension-extmod = "${libdir}/xorg/modules/extensions/libextmod.so"
96FILES_${PN}-extension-dbe = "${libdir}/xorg/modules/extensions/libdbe.so"
97FILES_${PN}-module-libint10 = "${libdir}/xorg/modules/libint10.so"
98FILES_${PN}-module-libafb = "${libdir}/xorg/modules/libafb.so"
99FILES_${PN}-module-libwfb = "${libdir}/xorg/modules/libwfb.so"
100FILES_${PN}-module-libmfb = "${libdir}/xorg/modules/libmfb.so"
101FILES_${PN}-module-libcfb = "${libdir}/xorg/modules/libcfb.so"
102FILES_${PN}-module-exa = "${libdir}/xorg/modules/libexa.so"
103FILES_${PN}-module-xaa = "${libdir}/xorg/modules/libxaa.so"
104FILES_${PN}-module-libxf1bpp = "${libdir}/xorg/modules/libxf1bpp.so"
105FILES_${PN}-module-libxf4bpp = "${libdir}/xorg/modules/libxf4bpp.so"
106FILES_xf86-video-modesetting = "${libdir}/xorg/modules/drivers/modesetting_drv.so"
107
108EXTRA_OECONF += "--with-fop=no \
109 --with-pic \
110 --disable-static \
111 --disable-record \
112 --disable-dmx \
113 --disable-xnest \
114 --enable-xvfb \
115 --enable-composite \
116 --without-dtrace \
117 --with-int10=x86emu \
118 --sysconfdir=/etc/X11 \
119 --localstatedir=/var \
120 --with-xkb-output=/var/lib/xkb \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500121"
122
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500123OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500124PACKAGECONFIG ??= "dri2 udev ${XORG_CRYPTO} \
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500125 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500126 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl wayland', 'xwayland', '', d)} \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800127 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-logind', '', d)} \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500128"
129
130PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800131PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,xorgproto virtual/mesa"
132PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,xorgproto"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500133# DRI3 requires xshmfence to also be enabled
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800134PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,xorgproto"
135PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,xorgproto virtual/libgl virtual/libx11"
Brad Bishop316dfdd2018-06-25 12:45:53 -0400136PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy virtual/libgbm,libegl"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500137PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
138PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence"
139PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
140PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus,"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500141PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800142PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,xorgproto"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500143PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland wayland-native wayland-protocols libepoxy"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500144
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500145# Xorg requires a SHA1 implementation, pick one
146XORG_CRYPTO ??= "openssl"
147PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl"
148PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle"
149PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt"
150
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500151do_install_append () {
152 # Its assumed base-files creates this for us
153 rmdir ${D}${localstatedir}/log/
154}
155
156# Add runtime provides for the ABI versions of the video and input subsystems,
157# so that drivers can depend on the relevant version.
158python populate_packages_prepend() {
159 import subprocess
160
161 # Set PKG_CONFIG_PATH so pkg-config looks at the .pc files that are going
162 # into the new package, not the staged ones.
163 newenv = dict(os.environ)
164 newenv["PKG_CONFIG_PATH"] = d.expand("${PKGD}${libdir}/pkgconfig/")
165
166 def get_abi(name):
167 abis = {
168 "video": "abi_videodrv",
169 "input": "abi_xinput"
170 }
171 p = subprocess.Popen(args="pkg-config --variable=%s xorg-server" % abis[name],
172 shell=True, env=newenv, stdout=subprocess.PIPE)
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600173 stdout, stderr = p.communicate()
174 output = stdout.decode("utf-8").split(".")[0]
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500175 mlprefix = d.getVar('MLPREFIX') or ''
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600176 return "%sxorg-abi-%s-%s" % (mlprefix, name, output)
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500177
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500178 pn = d.getVar("PN")
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500179 d.appendVar("RPROVIDES_" + pn, " " + get_abi("input"))
180 d.appendVar("RPROVIDES_" + pn, " " + get_abi("video"))
181}