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 | |
| 26 | PROTO_DEPS = "randrproto renderproto fixesproto damageproto xextproto xproto xf86dgaproto xf86miscproto xf86vidmodeproto compositeproto recordproto resourceproto videoproto scrnsaverproto xineramaproto fontsproto kbproto inputproto bigreqsproto xcmiscproto presentproto" |
| 27 | LIB_DEPS = "pixman libxfont xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess openssl libgcrypt" |
| 28 | DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} font-util" |
| 29 | |
| 30 | # Split out some modules and extensions from the main package |
| 31 | # These aren't needed for basic operations and only take up space: |
| 32 | # 32.0k libdri.so |
| 33 | # 91.0k libexa.so |
| 34 | # 336.0k libglx.so |
| 35 | # 1360k libint10.so |
| 36 | # 180.0k libwfb.so |
| 37 | # 320.0k libxaa.so |
| 38 | # 124.0k libxf1bpp.so |
| 39 | # 84.0k libxf4bpp.so |
| 40 | # librecord.so |
| 41 | # libextmod.so |
| 42 | # libdbe.so |
| 43 | |
| 44 | PACKAGES =+ "${PN}-security-policy \ |
| 45 | ${PN}-sdl \ |
| 46 | ${PN}-fbdev \ |
| 47 | ${PN}-xvfb \ |
| 48 | ${PN}-utils \ |
| 49 | ${PN}-xephyr \ |
| 50 | ${PN}-xwayland \ |
| 51 | ${PN}-multimedia-modules \ |
| 52 | ${PN}-extension-dri \ |
| 53 | ${PN}-extension-dri2 \ |
| 54 | ${PN}-extension-glx \ |
| 55 | ${PN}-extension-record \ |
| 56 | ${PN}-extension-extmod \ |
| 57 | ${PN}-extension-dbe \ |
| 58 | ${PN}-module-libint10 \ |
| 59 | ${PN}-module-libafb \ |
| 60 | ${PN}-module-libwfb \ |
| 61 | ${PN}-module-libmfb \ |
| 62 | ${PN}-module-libcfb \ |
| 63 | ${PN}-module-exa \ |
| 64 | ${PN}-module-xaa \ |
| 65 | ${PN}-module-libxf1bpp \ |
| 66 | ${PN}-module-libxf4bpp \ |
| 67 | xf86-video-modesetting" |
| 68 | |
| 69 | SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver" |
| 70 | INSANE_SKIP_xf86-video-modesetting = "xorg-driver-abi" |
| 71 | |
| 72 | RRECOMMENDS_${PN} += "${PN}-security-policy xkeyboard-config rgb xserver-xf86-config xkbcomp" |
| 73 | RDEPENDS_${PN}-xvfb += "xkeyboard-config" |
| 74 | RDEPENDS_${PN}-module-exa = "${PN} (= ${EXTENDPKGV})" |
| 75 | |
| 76 | 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" |
| 77 | FILES_${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la" |
| 78 | FILES_${PN}-doc += "${libdir}/X11/doc ${datadir}/X11/xkb/compiled/README.compiled ${localstatedir}/lib/xkb/README.compiled" |
| 79 | FILES_${PN}-dbg += "${libdir}/xorg/modules/.debug \ |
| 80 | ${libdir}/xorg/modules/*/.debug \ |
| 81 | ${libdir}/xorg/modules/*/*/.debug \ |
| 82 | " |
| 83 | FILES_${PN}-security-policy += "${libdir}/xserver/SecurityPolicy" |
| 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" |
| 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 \ |
| 121 | --with-sha1=libcrypto \ |
| 122 | " |
| 123 | |
| 124 | PACKAGECONFIG ??= "dri2 udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri glx', '', d)} \ |
| 125 | ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "xwayland", "", d)} \ |
| 126 | " |
| 127 | |
| 128 | PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev" |
| 129 | PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,glproto virtual/mesa xf86driproto" |
| 130 | PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto" |
| 131 | # DRI3 requires xshmfence to also be enabled |
| 132 | PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto" |
| 133 | PACKAGECONFIG[glx] = "--enable-glx --enable-glx-tls,--disable-glx,glproto virtual/libgl virtual/libx11" |
| 134 | PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind" |
| 135 | PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence" |
| 136 | PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" |
| 137 | PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus," |
| 138 | PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,xineramaproto" |
| 139 | PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland libepoxy" |
| 140 | |
| 141 | do_install_append () { |
| 142 | # Its assumed base-files creates this for us |
| 143 | rmdir ${D}${localstatedir}/log/ |
| 144 | } |
| 145 | |
| 146 | # Add runtime provides for the ABI versions of the video and input subsystems, |
| 147 | # so that drivers can depend on the relevant version. |
| 148 | python populate_packages_prepend() { |
| 149 | import subprocess |
| 150 | |
| 151 | # Set PKG_CONFIG_PATH so pkg-config looks at the .pc files that are going |
| 152 | # into the new package, not the staged ones. |
| 153 | newenv = dict(os.environ) |
| 154 | newenv["PKG_CONFIG_PATH"] = d.expand("${PKGD}${libdir}/pkgconfig/") |
| 155 | |
| 156 | def get_abi(name): |
| 157 | abis = { |
| 158 | "video": "abi_videodrv", |
| 159 | "input": "abi_xinput" |
| 160 | } |
| 161 | p = subprocess.Popen(args="pkg-config --variable=%s xorg-server" % abis[name], |
| 162 | shell=True, env=newenv, stdout=subprocess.PIPE) |
| 163 | output = p.communicate()[0] |
| 164 | mlprefix = d.getVar('MLPREFIX', True) or '' |
| 165 | return "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0]) |
| 166 | |
| 167 | pn = d.getVar("PN", True) |
| 168 | d.appendVar("RPROVIDES_" + pn, " " + get_abi("input")) |
| 169 | d.appendVar("RPROVIDES_" + pn, " " + get_abi("video")) |
| 170 | } |