blob: 489a4285002c6f14ff7284733c83eba280dc5fe5 [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
21S = "${WORKDIR}/${XORG_PN}-${PV}"
22
23inherit autotools pkgconfig
24
Patrick Williamsf1e5d692016-03-30 15:21:19 -050025inherit distro_features_check
26REQUIRED_DISTRO_FEATURES = "x11"
27
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080028PROTO_DEPS = "xorgproto"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050029LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} font-util"
31
32# Split out some modules and extensions from the main package
33# These aren't needed for basic operations and only take up space:
34# 32.0k libdri.so
35# 91.0k libexa.so
36# 336.0k libglx.so
37# 1360k libint10.so
38# 180.0k libwfb.so
39# 320.0k libxaa.so
40# 124.0k libxf1bpp.so
41# 84.0k libxf4bpp.so
42# librecord.so
43# libextmod.so
44# libdbe.so
45
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050046PACKAGES =+ "${PN}-sdl \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050047 ${PN}-fbdev \
48 ${PN}-xvfb \
49 ${PN}-utils \
50 ${PN}-xephyr \
51 ${PN}-xwayland \
52 ${PN}-multimedia-modules \
53 ${PN}-extension-dri \
54 ${PN}-extension-dri2 \
55 ${PN}-extension-glx \
56 ${PN}-extension-record \
57 ${PN}-extension-extmod \
58 ${PN}-extension-dbe \
59 ${PN}-module-libint10 \
60 ${PN}-module-libafb \
61 ${PN}-module-libwfb \
62 ${PN}-module-libmfb \
63 ${PN}-module-libcfb \
64 ${PN}-module-exa \
65 ${PN}-module-xaa \
66 ${PN}-module-libxf1bpp \
67 ${PN}-module-libxf4bpp \
68 xf86-video-modesetting"
69
70SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060071INSANE_SKIP_${MLPREFIX}xf86-video-modesetting = "xorg-driver-abi"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050072
Brad Bishop6e60e8b2018-02-01 10:27:11 -050073XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp xf86-input-libinput"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050074RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}"
75RRECOMMENDS_${PN}-xwayland += "${XSERVER_RRECOMMENDS}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050076RDEPENDS_${PN}-xvfb += "xkeyboard-config"
77RDEPENDS_${PN}-module-exa = "${PN} (= ${EXTENDPKGV})"
78
79FILES_${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"
80FILES_${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la"
81FILES_${PN}-doc += "${libdir}/X11/doc ${datadir}/X11/xkb/compiled/README.compiled ${localstatedir}/lib/xkb/README.compiled"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050082FILES_${PN}-sdl = "${bindir}/Xsdl"
83FILES_${PN}-fbdev = "${bindir}/Xfbdev"
84FILES_${PN}-xvfb = "${bindir}/Xvfb"
85FILES_${PN}-utils = "${bindir}/scanpci ${bindir}/pcitweak ${bindir}/ioport ${bindir}/in[bwl] ${bindir}/out[bwl] ${bindir}/mmap[rw] ${bindir}/gtf ${bindir}/getconfig ${bindir}/getconfig.pl"
86FILES_${PN}-xephyr = "${bindir}/Xephyr"
87FILES_${PN}-xwayland = "${bindir}/Xwayland"
88FILES_${PN}-multimedia-modules = "${libdir}/xorg/modules/multimedia/*drv*"
89FILES_${PN}-extension-dri = "${libdir}/xorg/modules/extensions/libdri.so"
90FILES_${PN}-extension-dri2 = "${libdir}/xorg/modules/extensions/libdri2.so"
91FILES_${PN}-extension-glx = "${libdir}/xorg/modules/extensions/libglx.so"
92FILES_${PN}-extension-record = "${libdir}/xorg/modules/extensions/librecord.so"
93FILES_${PN}-extension-extmod = "${libdir}/xorg/modules/extensions/libextmod.so"
94FILES_${PN}-extension-dbe = "${libdir}/xorg/modules/extensions/libdbe.so"
95FILES_${PN}-module-libint10 = "${libdir}/xorg/modules/libint10.so"
96FILES_${PN}-module-libafb = "${libdir}/xorg/modules/libafb.so"
97FILES_${PN}-module-libwfb = "${libdir}/xorg/modules/libwfb.so"
98FILES_${PN}-module-libmfb = "${libdir}/xorg/modules/libmfb.so"
99FILES_${PN}-module-libcfb = "${libdir}/xorg/modules/libcfb.so"
100FILES_${PN}-module-exa = "${libdir}/xorg/modules/libexa.so"
101FILES_${PN}-module-xaa = "${libdir}/xorg/modules/libxaa.so"
102FILES_${PN}-module-libxf1bpp = "${libdir}/xorg/modules/libxf1bpp.so"
103FILES_${PN}-module-libxf4bpp = "${libdir}/xorg/modules/libxf4bpp.so"
104FILES_xf86-video-modesetting = "${libdir}/xorg/modules/drivers/modesetting_drv.so"
105
106EXTRA_OECONF += "--with-fop=no \
107 --with-pic \
108 --disable-static \
109 --disable-record \
110 --disable-dmx \
111 --disable-xnest \
112 --enable-xvfb \
113 --enable-composite \
114 --without-dtrace \
115 --with-int10=x86emu \
116 --sysconfdir=/etc/X11 \
117 --localstatedir=/var \
118 --with-xkb-output=/var/lib/xkb \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500119"
120
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500121OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500122PACKAGECONFIG ??= "dri2 udev ${XORG_CRYPTO} \
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500123 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500124 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl wayland', 'xwayland', '', d)} \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800125 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-logind', '', d)} \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500126"
127
128PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800129PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,xorgproto virtual/mesa"
130PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,xorgproto"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500131# DRI3 requires xshmfence to also be enabled
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800132PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,xorgproto"
133PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,xorgproto virtual/libgl virtual/libx11"
Brad Bishop316dfdd2018-06-25 12:45:53 -0400134PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy virtual/libgbm,libegl"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500135PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
136PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence"
137PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
138PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus,"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500139PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800140PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,xorgproto"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500141PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland wayland-native wayland-protocols libepoxy"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500142
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500143# Xorg requires a SHA1 implementation, pick one
144XORG_CRYPTO ??= "openssl"
145PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl"
146PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle"
147PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt"
148
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500149do_install_append () {
150 # Its assumed base-files creates this for us
151 rmdir ${D}${localstatedir}/log/
152}
153
154# Add runtime provides for the ABI versions of the video and input subsystems,
155# so that drivers can depend on the relevant version.
156python populate_packages_prepend() {
157 import subprocess
158
159 # Set PKG_CONFIG_PATH so pkg-config looks at the .pc files that are going
160 # into the new package, not the staged ones.
161 newenv = dict(os.environ)
162 newenv["PKG_CONFIG_PATH"] = d.expand("${PKGD}${libdir}/pkgconfig/")
163
164 def get_abi(name):
165 abis = {
166 "video": "abi_videodrv",
167 "input": "abi_xinput"
168 }
169 p = subprocess.Popen(args="pkg-config --variable=%s xorg-server" % abis[name],
170 shell=True, env=newenv, stdout=subprocess.PIPE)
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600171 stdout, stderr = p.communicate()
172 output = stdout.decode("utf-8").split(".")[0]
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500173 mlprefix = d.getVar('MLPREFIX') or ''
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600174 return "%sxorg-abi-%s-%s" % (mlprefix, name, output)
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500175
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500176 pn = d.getVar("PN")
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500177 d.appendVar("RPROVIDES_" + pn, " " + get_abi("input"))
178 d.appendVar("RPROVIDES_" + pn, " " + get_abi("video"))
179}