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" |
| 16 | INC_PR = "r8" |
| 17 | |
| 18 | XORG_PN = "xorg-server" |
| 19 | SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.bz2" |
| 20 | SRC_URI += "file://macro_tweak.patch" |
| 21 | |
| 22 | S = "${WORKDIR}/${XORG_PN}-${PV}" |
| 23 | |
| 24 | inherit autotools pkgconfig |
| 25 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 26 | inherit distro_features_check |
| 27 | REQUIRED_DISTRO_FEATURES = "x11" |
| 28 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | PROTO_DEPS = "randrproto renderproto fixesproto damageproto xextproto xproto xf86dgaproto xf86miscproto xf86vidmodeproto compositeproto recordproto resourceproto videoproto scrnsaverproto xineramaproto fontsproto kbproto inputproto bigreqsproto xcmiscproto presentproto" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 30 | LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 31 | DEPENDS = "${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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 47 | PACKAGES =+ "${PN}-sdl \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 48 | ${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 | |
| 71 | SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 72 | INSANE_SKIP_${MLPREFIX}xf86-video-modesetting = "xorg-driver-abi" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 73 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 74 | XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp xf86-input-libinput" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 75 | RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}" |
| 76 | RRECOMMENDS_${PN}-xwayland += "${XSERVER_RRECOMMENDS}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 77 | RDEPENDS_${PN}-xvfb += "xkeyboard-config" |
| 78 | RDEPENDS_${PN}-module-exa = "${PN} (= ${EXTENDPKGV})" |
| 79 | |
| 80 | 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" |
| 81 | FILES_${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la" |
| 82 | FILES_${PN}-doc += "${libdir}/X11/doc ${datadir}/X11/xkb/compiled/README.compiled ${localstatedir}/lib/xkb/README.compiled" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 83 | FILES_${PN}-sdl = "${bindir}/Xsdl" |
| 84 | FILES_${PN}-fbdev = "${bindir}/Xfbdev" |
| 85 | FILES_${PN}-xvfb = "${bindir}/Xvfb" |
| 86 | 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" |
| 87 | FILES_${PN}-xephyr = "${bindir}/Xephyr" |
| 88 | FILES_${PN}-xwayland = "${bindir}/Xwayland" |
| 89 | FILES_${PN}-multimedia-modules = "${libdir}/xorg/modules/multimedia/*drv*" |
| 90 | FILES_${PN}-extension-dri = "${libdir}/xorg/modules/extensions/libdri.so" |
| 91 | FILES_${PN}-extension-dri2 = "${libdir}/xorg/modules/extensions/libdri2.so" |
| 92 | FILES_${PN}-extension-glx = "${libdir}/xorg/modules/extensions/libglx.so" |
| 93 | FILES_${PN}-extension-record = "${libdir}/xorg/modules/extensions/librecord.so" |
| 94 | FILES_${PN}-extension-extmod = "${libdir}/xorg/modules/extensions/libextmod.so" |
| 95 | FILES_${PN}-extension-dbe = "${libdir}/xorg/modules/extensions/libdbe.so" |
| 96 | FILES_${PN}-module-libint10 = "${libdir}/xorg/modules/libint10.so" |
| 97 | FILES_${PN}-module-libafb = "${libdir}/xorg/modules/libafb.so" |
| 98 | FILES_${PN}-module-libwfb = "${libdir}/xorg/modules/libwfb.so" |
| 99 | FILES_${PN}-module-libmfb = "${libdir}/xorg/modules/libmfb.so" |
| 100 | FILES_${PN}-module-libcfb = "${libdir}/xorg/modules/libcfb.so" |
| 101 | FILES_${PN}-module-exa = "${libdir}/xorg/modules/libexa.so" |
| 102 | FILES_${PN}-module-xaa = "${libdir}/xorg/modules/libxaa.so" |
| 103 | FILES_${PN}-module-libxf1bpp = "${libdir}/xorg/modules/libxf1bpp.so" |
| 104 | FILES_${PN}-module-libxf4bpp = "${libdir}/xorg/modules/libxf4bpp.so" |
| 105 | FILES_xf86-video-modesetting = "${libdir}/xorg/modules/drivers/modesetting_drv.so" |
| 106 | |
| 107 | EXTRA_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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 120 | " |
| 121 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 122 | OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 123 | PACKAGECONFIG ??= "dri2 udev ${XORG_CRYPTO} \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 124 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 125 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl wayland', 'xwayland', '', d)} \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 126 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 127 | " |
| 128 | |
| 129 | PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev" |
| 130 | PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,glproto virtual/mesa xf86driproto" |
| 131 | PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto" |
| 132 | # DRI3 requires xshmfence to also be enabled |
| 133 | PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 134 | PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,glproto virtual/libgl virtual/libx11" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 135 | PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy virtual/libgbm,libegl" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 136 | PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind" |
| 137 | PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence" |
| 138 | PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" |
| 139 | PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus," |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 140 | PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 141 | PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,xineramaproto" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 142 | PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland wayland-native wayland-protocols libepoxy" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 143 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 144 | # Xorg requires a SHA1 implementation, pick one |
| 145 | XORG_CRYPTO ??= "openssl" |
| 146 | PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl" |
| 147 | PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle" |
| 148 | PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt" |
| 149 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 150 | do_install_append () { |
| 151 | # Its assumed base-files creates this for us |
| 152 | rmdir ${D}${localstatedir}/log/ |
| 153 | } |
| 154 | |
| 155 | # Add runtime provides for the ABI versions of the video and input subsystems, |
| 156 | # so that drivers can depend on the relevant version. |
| 157 | python populate_packages_prepend() { |
| 158 | import subprocess |
| 159 | |
| 160 | # Set PKG_CONFIG_PATH so pkg-config looks at the .pc files that are going |
| 161 | # into the new package, not the staged ones. |
| 162 | newenv = dict(os.environ) |
| 163 | newenv["PKG_CONFIG_PATH"] = d.expand("${PKGD}${libdir}/pkgconfig/") |
| 164 | |
| 165 | def get_abi(name): |
| 166 | abis = { |
| 167 | "video": "abi_videodrv", |
| 168 | "input": "abi_xinput" |
| 169 | } |
| 170 | p = subprocess.Popen(args="pkg-config --variable=%s xorg-server" % abis[name], |
| 171 | shell=True, env=newenv, stdout=subprocess.PIPE) |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 172 | stdout, stderr = p.communicate() |
| 173 | output = stdout.decode("utf-8").split(".")[0] |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 174 | mlprefix = d.getVar('MLPREFIX') or '' |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 175 | return "%sxorg-abi-%s-%s" % (mlprefix, name, output) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 176 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 177 | pn = d.getVar("PN") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 178 | d.appendVar("RPROVIDES_" + pn, " " + get_abi("input")) |
| 179 | d.appendVar("RPROVIDES_" + pn, " " + get_abi("video")) |
| 180 | } |