xserver-xorg.inc 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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. # xf86-*-* packages depend on an X server built with the xfree86 DDX
  7. # so we have a virtual to represent that:
  8. # deprecated, we should use virtual/xserver instead
  9. PROVIDES = "virtual/xserver-xf86"
  10. # Other packages tend to just care that there is *an* X server:
  11. PROVIDES += "virtual/xserver"
  12. PE = "2"
  13. XORG_PN = "xorg-server"
  14. SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.xz"
  15. UPSTREAM_CHECK_REGEX = "xorg-server-(?P<pver>\d+(\.(?!99)\d+)+)\.tar"
  16. CVE_PRODUCT = "xorg-server"
  17. S = "${WORKDIR}/${XORG_PN}-${PV}"
  18. inherit autotools pkgconfig
  19. inherit features_check
  20. REQUIRED_DISTRO_FEATURES = "x11"
  21. LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess"
  22. DEPENDS = "xorgproto ${LIB_DEPS} font-util"
  23. # Split out some modules and extensions from the main package
  24. # These aren't needed for basic operations and only take up space:
  25. # 32.0k libdri.so
  26. # 91.0k libexa.so
  27. # 336.0k libglx.so
  28. # 1360k libint10.so
  29. # 180.0k libwfb.so
  30. # 320.0k libxaa.so
  31. # 124.0k libxf1bpp.so
  32. # 84.0k libxf4bpp.so
  33. # librecord.so
  34. # libextmod.so
  35. # libdbe.so
  36. PACKAGES =+ "${PN}-sdl \
  37. ${PN}-fbdev \
  38. ${PN}-xvfb \
  39. ${PN}-utils \
  40. ${PN}-xephyr \
  41. ${PN}-xwayland \
  42. ${PN}-multimedia-modules \
  43. ${PN}-extension-dri \
  44. ${PN}-extension-dri2 \
  45. ${PN}-extension-glx \
  46. ${PN}-extension-record \
  47. ${PN}-extension-extmod \
  48. ${PN}-extension-dbe \
  49. ${PN}-module-libint10 \
  50. ${PN}-module-libafb \
  51. ${PN}-module-libwfb \
  52. ${PN}-module-libmfb \
  53. ${PN}-module-libcfb \
  54. ${PN}-module-exa \
  55. ${PN}-module-xaa \
  56. ${PN}-module-libxf1bpp \
  57. ${PN}-module-libxf4bpp \
  58. xf86-video-modesetting"
  59. SUMMARY:xf86-video-modesetting = "X.Org X server -- modesetting display driver"
  60. INSANE_SKIP:${MLPREFIX}xf86-video-modesetting = "xorg-driver-abi"
  61. XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp xf86-input-libinput"
  62. RRECOMMENDS:${PN} += "${XSERVER_RRECOMMENDS}"
  63. RRECOMMENDS:${PN}-xwayland += "${XSERVER_RRECOMMENDS}"
  64. RDEPENDS:${PN}-xvfb += "xkeyboard-config"
  65. RDEPENDS:${PN}-module-exa = "${PN} (= ${EXTENDPKGV})"
  66. 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"
  67. FILES:${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la"
  68. FILES:${PN}-doc += "${libdir}/X11/doc ${datadir}/X11/xkb/compiled/README.compiled ${localstatedir}/lib/xkb/README.compiled"
  69. FILES:${PN}-sdl = "${bindir}/Xsdl"
  70. FILES:${PN}-fbdev = "${bindir}/Xfbdev"
  71. FILES:${PN}-xvfb = "${bindir}/Xvfb"
  72. 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"
  73. FILES:${PN}-xephyr = "${bindir}/Xephyr"
  74. FILES:${PN}-xwayland = "${bindir}/Xwayland"
  75. FILES:${PN}-multimedia-modules = "${libdir}/xorg/modules/multimedia/*drv*"
  76. FILES:${PN}-extension-dri = "${libdir}/xorg/modules/extensions/libdri.so"
  77. FILES:${PN}-extension-dri2 = "${libdir}/xorg/modules/extensions/libdri2.so"
  78. FILES:${PN}-extension-glx = "${libdir}/xorg/modules/extensions/libglx.so"
  79. FILES:${PN}-extension-record = "${libdir}/xorg/modules/extensions/librecord.so"
  80. FILES:${PN}-extension-extmod = "${libdir}/xorg/modules/extensions/libextmod.so"
  81. FILES:${PN}-extension-dbe = "${libdir}/xorg/modules/extensions/libdbe.so"
  82. FILES:${PN}-module-libint10 = "${libdir}/xorg/modules/libint10.so"
  83. FILES:${PN}-module-libafb = "${libdir}/xorg/modules/libafb.so"
  84. FILES:${PN}-module-libwfb = "${libdir}/xorg/modules/libwfb.so"
  85. FILES:${PN}-module-libmfb = "${libdir}/xorg/modules/libmfb.so"
  86. FILES:${PN}-module-libcfb = "${libdir}/xorg/modules/libcfb.so"
  87. FILES:${PN}-module-exa = "${libdir}/xorg/modules/libexa.so"
  88. FILES:${PN}-module-xaa = "${libdir}/xorg/modules/libxaa.so"
  89. FILES:${PN}-module-libxf1bpp = "${libdir}/xorg/modules/libxf1bpp.so"
  90. FILES:${PN}-module-libxf4bpp = "${libdir}/xorg/modules/libxf4bpp.so"
  91. FILES:xf86-video-modesetting = "${libdir}/xorg/modules/drivers/modesetting_drv.so"
  92. EXTRA_OECONF += "--with-fop=no \
  93. --with-pic \
  94. --disable-static \
  95. --disable-record \
  96. --disable-dmx \
  97. --disable-xnest \
  98. --enable-xvfb \
  99. --enable-composite \
  100. --without-dtrace \
  101. --with-int10=x86emu \
  102. --sysconfdir=/etc/X11 \
  103. --localstatedir=/var \
  104. --with-xkb-output=/var/lib/xkb \
  105. --with-os-name=Linux \
  106. "
  107. OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence"
  108. PACKAGECONFIG ??= "dga dri2 udev ${XORG_CRYPTO} \
  109. ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \
  110. ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-logind', '', d)} \
  111. "
  112. PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev"
  113. PACKAGECONFIG[dga] = "--enable-dga,--disable-dga"
  114. PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,virtual/mesa"
  115. PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2"
  116. # DRI3 requires xshmfence to also be enabled
  117. PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3"
  118. PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,virtual/libgl virtual/libx11"
  119. PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy virtual/libgbm,libegl"
  120. PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
  121. PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence"
  122. PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
  123. PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus,"
  124. PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd"
  125. PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama"
  126. PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland wayland-native wayland-protocols libepoxy"
  127. # Xorg requires a SHA1 implementation, pick one
  128. XORG_CRYPTO ??= "openssl"
  129. PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl"
  130. PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle"
  131. PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt"
  132. do_install:append () {
  133. # Its assumed base-files creates this for us
  134. rmdir ${D}${localstatedir}/log/
  135. sed -i -e 's,${libdir}/xorg/modules,${prefix}/lib*/xorg/modules,' ${D}${mandir}/man5/xorg.conf.5
  136. }
  137. # Add runtime provides for the ABI versions of the video and input subsystems,
  138. # so that drivers can depend on the relevant version.
  139. python populate_packages:prepend() {
  140. import subprocess
  141. # Set PKG_CONFIG_PATH so pkg-config looks at the .pc files that are going
  142. # into the new package, not the staged ones.
  143. newenv = dict(os.environ)
  144. newenv["PKG_CONFIG_PATH"] = d.expand("${PKGD}${libdir}/pkgconfig/")
  145. def get_abi(name):
  146. abis = {
  147. "video": "abi_videodrv",
  148. "input": "abi_xinput"
  149. }
  150. p = subprocess.Popen(args="pkg-config --variable=%s xorg-server" % abis[name],
  151. shell=True, env=newenv, stdout=subprocess.PIPE)
  152. stdout, stderr = p.communicate()
  153. output = stdout.decode("utf-8").split(".")[0]
  154. mlprefix = d.getVar('MLPREFIX') or ''
  155. return "%sxorg-abi-%s-%s" % (mlprefix, name, output)
  156. pn = d.getVar("PN")
  157. d.appendVar("RPROVIDES:" + pn, " " + get_abi("input"))
  158. d.appendVar("RPROVIDES:" + pn, " " + get_abi("video"))
  159. }