xserver-xorg.inc 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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. INC_PR = "r8"
  14. XORG_PN = "xorg-server"
  15. SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.bz2"
  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. "
  106. OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence"
  107. PACKAGECONFIG ??= "dga dri2 udev ${XORG_CRYPTO} \
  108. ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \
  109. ${@bb.utils.contains('DISTRO_FEATURES', 'opengl wayland', 'xwayland', '', 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. }
  136. # Add runtime provides for the ABI versions of the video and input subsystems,
  137. # so that drivers can depend on the relevant version.
  138. python populate_packages_prepend() {
  139. import subprocess
  140. # Set PKG_CONFIG_PATH so pkg-config looks at the .pc files that are going
  141. # into the new package, not the staged ones.
  142. newenv = dict(os.environ)
  143. newenv["PKG_CONFIG_PATH"] = d.expand("${PKGD}${libdir}/pkgconfig/")
  144. def get_abi(name):
  145. abis = {
  146. "video": "abi_videodrv",
  147. "input": "abi_xinput"
  148. }
  149. p = subprocess.Popen(args="pkg-config --variable=%s xorg-server" % abis[name],
  150. shell=True, env=newenv, stdout=subprocess.PIPE)
  151. stdout, stderr = p.communicate()
  152. output = stdout.decode("utf-8").split(".")[0]
  153. mlprefix = d.getVar('MLPREFIX') or ''
  154. return "%sxorg-abi-%s-%s" % (mlprefix, name, output)
  155. pn = d.getVar("PN")
  156. d.appendVar("RPROVIDES_" + pn, " " + get_abi("input"))
  157. d.appendVar("RPROVIDES_" + pn, " " + get_abi("video"))
  158. }