Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "The X.Org X server" |
| 2 | HOMEPAGE = "http://www.x.org" |
| 3 | SECTION = "x11/base" |
| 4 | LICENSE = "MIT-X" |
| 5 | LIC_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 |
| 10 | PROVIDES = "virtual/xserver-xf86" |
| 11 | |
| 12 | # Other packages tend to just care that there is *an* X server: |
| 13 | PROVIDES += "virtual/xserver" |
| 14 | |
| 15 | PE = "2" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 16 | |
| 17 | XORG_PN = "xorg-server" |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 18 | SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.xz" |
| 19 | |
| 20 | UPSTREAM_CHECK_REGEX = "xorg-server-(?P<pver>\d+(\.(?!99)\d+)+)\.tar" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | CVE_PRODUCT = "xorg-server" |
| 23 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 24 | S = "${WORKDIR}/${XORG_PN}-${PV}" |
| 25 | |
| 26 | inherit autotools pkgconfig |
| 27 | |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 28 | inherit features_check |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 29 | REQUIRED_DISTRO_FEATURES = "x11" |
| 30 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 31 | LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 32 | DEPENDS = "xorgproto ${LIB_DEPS} font-util" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 48 | PACKAGES =+ "${PN}-sdl \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 49 | ${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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 72 | SUMMARY:xf86-video-modesetting = "X.Org X server -- modesetting display driver" |
| 73 | INSANE_SKIP:${MLPREFIX}xf86-video-modesetting = "xorg-driver-abi" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 74 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 75 | XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp xf86-input-libinput" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 76 | RRECOMMENDS:${PN} += "${XSERVER_RRECOMMENDS}" |
| 77 | RRECOMMENDS:${PN}-xwayland += "${XSERVER_RRECOMMENDS}" |
| 78 | RDEPENDS:${PN}-xvfb += "xkeyboard-config" |
| 79 | RDEPENDS:${PN}-module-exa = "${PN} (= ${EXTENDPKGV})" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 80 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 81 | FILES:${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" |
| 82 | FILES:${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la" |
| 83 | FILES:${PN}-doc += "${libdir}/X11/doc ${datadir}/X11/xkb/compiled/README.compiled ${localstatedir}/lib/xkb/README.compiled" |
| 84 | FILES:${PN}-sdl = "${bindir}/Xsdl" |
| 85 | FILES:${PN}-fbdev = "${bindir}/Xfbdev" |
| 86 | FILES:${PN}-xvfb = "${bindir}/Xvfb" |
| 87 | FILES:${PN}-utils = "${bindir}/scanpci ${bindir}/pcitweak ${bindir}/ioport ${bindir}/in[bwl] ${bindir}/out[bwl] ${bindir}/mmap[rw] ${bindir}/gtf ${bindir}/getconfig ${bindir}/getconfig.pl" |
| 88 | FILES:${PN}-xephyr = "${bindir}/Xephyr" |
| 89 | FILES:${PN}-xwayland = "${bindir}/Xwayland" |
| 90 | FILES:${PN}-multimedia-modules = "${libdir}/xorg/modules/multimedia/*drv*" |
| 91 | FILES:${PN}-extension-dri = "${libdir}/xorg/modules/extensions/libdri.so" |
| 92 | FILES:${PN}-extension-dri2 = "${libdir}/xorg/modules/extensions/libdri2.so" |
| 93 | FILES:${PN}-extension-glx = "${libdir}/xorg/modules/extensions/libglx.so" |
| 94 | FILES:${PN}-extension-record = "${libdir}/xorg/modules/extensions/librecord.so" |
| 95 | FILES:${PN}-extension-extmod = "${libdir}/xorg/modules/extensions/libextmod.so" |
| 96 | FILES:${PN}-extension-dbe = "${libdir}/xorg/modules/extensions/libdbe.so" |
| 97 | FILES:${PN}-module-libint10 = "${libdir}/xorg/modules/libint10.so" |
| 98 | FILES:${PN}-module-libafb = "${libdir}/xorg/modules/libafb.so" |
| 99 | FILES:${PN}-module-libwfb = "${libdir}/xorg/modules/libwfb.so" |
| 100 | FILES:${PN}-module-libmfb = "${libdir}/xorg/modules/libmfb.so" |
| 101 | FILES:${PN}-module-libcfb = "${libdir}/xorg/modules/libcfb.so" |
| 102 | FILES:${PN}-module-exa = "${libdir}/xorg/modules/libexa.so" |
| 103 | FILES:${PN}-module-xaa = "${libdir}/xorg/modules/libxaa.so" |
| 104 | FILES:${PN}-module-libxf1bpp = "${libdir}/xorg/modules/libxf1bpp.so" |
| 105 | FILES:${PN}-module-libxf4bpp = "${libdir}/xorg/modules/libxf4bpp.so" |
| 106 | FILES:xf86-video-modesetting = "${libdir}/xorg/modules/drivers/modesetting_drv.so" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 107 | |
| 108 | EXTRA_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 \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 121 | --with-os-name=Linux \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 122 | " |
| 123 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 124 | OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 125 | PACKAGECONFIG ??= "dga dri2 udev ${XORG_CRYPTO} \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 126 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 127 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-logind', '', d)} \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 128 | " |
| 129 | |
| 130 | PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 131 | PACKAGECONFIG[dga] = "--enable-dga,--disable-dga" |
| 132 | PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,virtual/mesa" |
| 133 | PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 134 | # DRI3 requires xshmfence to also be enabled |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 135 | PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3" |
| 136 | PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,virtual/libgl virtual/libx11" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 137 | PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy virtual/libgbm,libegl" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 138 | PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind" |
| 139 | PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence" |
| 140 | PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" |
| 141 | PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus," |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 142 | PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 143 | PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 144 | PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland wayland-native wayland-protocols libepoxy" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 145 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 146 | # Xorg requires a SHA1 implementation, pick one |
| 147 | XORG_CRYPTO ??= "openssl" |
| 148 | PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl" |
| 149 | PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle" |
| 150 | PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt" |
| 151 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 152 | do_install:append () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 153 | # Its assumed base-files creates this for us |
| 154 | rmdir ${D}${localstatedir}/log/ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 155 | sed -i -e 's,${libdir}/xorg/modules,${prefix}/lib*/xorg/modules,' ${D}${mandir}/man5/xorg.conf.5 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 156 | } |
| 157 | |
| 158 | # Add runtime provides for the ABI versions of the video and input subsystems, |
| 159 | # so that drivers can depend on the relevant version. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 160 | python populate_packages:prepend() { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 161 | import subprocess |
| 162 | |
| 163 | # Set PKG_CONFIG_PATH so pkg-config looks at the .pc files that are going |
| 164 | # into the new package, not the staged ones. |
| 165 | newenv = dict(os.environ) |
| 166 | newenv["PKG_CONFIG_PATH"] = d.expand("${PKGD}${libdir}/pkgconfig/") |
| 167 | |
| 168 | def get_abi(name): |
| 169 | abis = { |
| 170 | "video": "abi_videodrv", |
| 171 | "input": "abi_xinput" |
| 172 | } |
| 173 | p = subprocess.Popen(args="pkg-config --variable=%s xorg-server" % abis[name], |
| 174 | shell=True, env=newenv, stdout=subprocess.PIPE) |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 175 | stdout, stderr = p.communicate() |
| 176 | output = stdout.decode("utf-8").split(".")[0] |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 177 | mlprefix = d.getVar('MLPREFIX') or '' |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 178 | return "%sxorg-abi-%s-%s" % (mlprefix, name, output) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 179 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 180 | pn = d.getVar("PN") |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 181 | d.appendVar("RPROVIDES:" + pn, " " + get_abi("input")) |
| 182 | d.appendVar("RPROVIDES:" + pn, " " + get_abi("video")) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 183 | } |