blob: f4c5469b5619095b05b2201f37c30e6c9c6c2aee [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"
20SRC_URI += "file://macro_tweak.patch"
21
22S = "${WORKDIR}/${XORG_PN}-${PV}"
23
24inherit autotools pkgconfig
25
Patrick Williamsf1e5d692016-03-30 15:21:19 -050026inherit distro_features_check
27REQUIRED_DISTRO_FEATURES = "x11"
28
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029PROTO_DEPS = "randrproto renderproto fixesproto damageproto xextproto xproto xf86dgaproto xf86miscproto xf86vidmodeproto compositeproto recordproto resourceproto videoproto scrnsaverproto xineramaproto fontsproto kbproto inputproto bigreqsproto xcmiscproto presentproto"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050030LIB_DEPS = "pixman libxfont xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} font-util"
32
33# Split out some modules and extensions from the main package
34# These aren't needed for basic operations and only take up space:
35# 32.0k libdri.so
36# 91.0k libexa.so
37# 336.0k libglx.so
38# 1360k libint10.so
39# 180.0k libwfb.so
40# 320.0k libxaa.so
41# 124.0k libxf1bpp.so
42# 84.0k libxf4bpp.so
43# librecord.so
44# libextmod.so
45# libdbe.so
46
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050047PACKAGES =+ "${PN}-sdl \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050048 ${PN}-fbdev \
49 ${PN}-xvfb \
50 ${PN}-utils \
51 ${PN}-xephyr \
52 ${PN}-xwayland \
53 ${PN}-multimedia-modules \
54 ${PN}-extension-dri \
55 ${PN}-extension-dri2 \
56 ${PN}-extension-glx \
57 ${PN}-extension-record \
58 ${PN}-extension-extmod \
59 ${PN}-extension-dbe \
60 ${PN}-module-libint10 \
61 ${PN}-module-libafb \
62 ${PN}-module-libwfb \
63 ${PN}-module-libmfb \
64 ${PN}-module-libcfb \
65 ${PN}-module-exa \
66 ${PN}-module-xaa \
67 ${PN}-module-libxf1bpp \
68 ${PN}-module-libxf4bpp \
69 xf86-video-modesetting"
70
71SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver"
72INSANE_SKIP_xf86-video-modesetting = "xorg-driver-abi"
73
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050074XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp"
75RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}"
76RRECOMMENDS_${PN}-xwayland += "${XSERVER_RRECOMMENDS}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050077RDEPENDS_${PN}-xvfb += "xkeyboard-config"
78RDEPENDS_${PN}-module-exa = "${PN} (= ${EXTENDPKGV})"
79
80FILES_${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"
81FILES_${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la"
82FILES_${PN}-doc += "${libdir}/X11/doc ${datadir}/X11/xkb/compiled/README.compiled ${localstatedir}/lib/xkb/README.compiled"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050083FILES_${PN}-sdl = "${bindir}/Xsdl"
84FILES_${PN}-fbdev = "${bindir}/Xfbdev"
85FILES_${PN}-xvfb = "${bindir}/Xvfb"
86FILES_${PN}-utils = "${bindir}/scanpci ${bindir}/pcitweak ${bindir}/ioport ${bindir}/in[bwl] ${bindir}/out[bwl] ${bindir}/mmap[rw] ${bindir}/gtf ${bindir}/getconfig ${bindir}/getconfig.pl"
87FILES_${PN}-xephyr = "${bindir}/Xephyr"
88FILES_${PN}-xwayland = "${bindir}/Xwayland"
89FILES_${PN}-multimedia-modules = "${libdir}/xorg/modules/multimedia/*drv*"
90FILES_${PN}-extension-dri = "${libdir}/xorg/modules/extensions/libdri.so"
91FILES_${PN}-extension-dri2 = "${libdir}/xorg/modules/extensions/libdri2.so"
92FILES_${PN}-extension-glx = "${libdir}/xorg/modules/extensions/libglx.so"
93FILES_${PN}-extension-record = "${libdir}/xorg/modules/extensions/librecord.so"
94FILES_${PN}-extension-extmod = "${libdir}/xorg/modules/extensions/libextmod.so"
95FILES_${PN}-extension-dbe = "${libdir}/xorg/modules/extensions/libdbe.so"
96FILES_${PN}-module-libint10 = "${libdir}/xorg/modules/libint10.so"
97FILES_${PN}-module-libafb = "${libdir}/xorg/modules/libafb.so"
98FILES_${PN}-module-libwfb = "${libdir}/xorg/modules/libwfb.so"
99FILES_${PN}-module-libmfb = "${libdir}/xorg/modules/libmfb.so"
100FILES_${PN}-module-libcfb = "${libdir}/xorg/modules/libcfb.so"
101FILES_${PN}-module-exa = "${libdir}/xorg/modules/libexa.so"
102FILES_${PN}-module-xaa = "${libdir}/xorg/modules/libxaa.so"
103FILES_${PN}-module-libxf1bpp = "${libdir}/xorg/modules/libxf1bpp.so"
104FILES_${PN}-module-libxf4bpp = "${libdir}/xorg/modules/libxf4bpp.so"
105FILES_xf86-video-modesetting = "${libdir}/xorg/modules/drivers/modesetting_drv.so"
106
107EXTRA_OECONF += "--with-fop=no \
108 --with-pic \
109 --disable-static \
110 --disable-record \
111 --disable-dmx \
112 --disable-xnest \
113 --enable-xvfb \
114 --enable-composite \
115 --without-dtrace \
116 --with-int10=x86emu \
117 --sysconfdir=/etc/X11 \
118 --localstatedir=/var \
119 --with-xkb-output=/var/lib/xkb \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500120"
121
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500122PACKAGECONFIG ??= "dri2 udev ${XORG_CRYPTO} \
123 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri glx', '', d)} \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500124 ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "xwayland", "", d)} \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500125 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd", "", d)} \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500126"
127
128PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev"
129PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,glproto virtual/mesa xf86driproto"
130PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto"
131# DRI3 requires xshmfence to also be enabled
132PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500133PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,glproto virtual/libgl virtual/libx11"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500134PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
135PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence"
136PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
137PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus,"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500138PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500139PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,xineramaproto"
140PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland libepoxy"
141
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500142# Xorg requires a SHA1 implementation, pick one
143XORG_CRYPTO ??= "openssl"
144PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl"
145PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle"
146PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt"
147
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500148do_install_append () {
149 # Its assumed base-files creates this for us
150 rmdir ${D}${localstatedir}/log/
151}
152
153# Add runtime provides for the ABI versions of the video and input subsystems,
154# so that drivers can depend on the relevant version.
155python populate_packages_prepend() {
156 import subprocess
157
158 # Set PKG_CONFIG_PATH so pkg-config looks at the .pc files that are going
159 # into the new package, not the staged ones.
160 newenv = dict(os.environ)
161 newenv["PKG_CONFIG_PATH"] = d.expand("${PKGD}${libdir}/pkgconfig/")
162
163 def get_abi(name):
164 abis = {
165 "video": "abi_videodrv",
166 "input": "abi_xinput"
167 }
168 p = subprocess.Popen(args="pkg-config --variable=%s xorg-server" % abis[name],
169 shell=True, env=newenv, stdout=subprocess.PIPE)
170 output = p.communicate()[0]
171 mlprefix = d.getVar('MLPREFIX', True) or ''
172 return "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0])
173
174 pn = d.getVar("PN", True)
175 d.appendVar("RPROVIDES_" + pn, " " + get_abi("input"))
176 d.appendVar("RPROVIDES_" + pn, " " + get_abi("video"))
177}