diff options
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver/xserver-xorg.inc')
-rw-r--r-- | meta/recipes-graphics/xorg-xserver/xserver-xorg.inc | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc new file mode 100644 index 0000000000..dd60884992 --- /dev/null +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc | |||
@@ -0,0 +1,159 @@ | |||
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=15b5bf9327341c81089137aec4830bfd" | ||
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}-multimedia-modules \ | ||
51 | ${PN}-extension-dri \ | ||
52 | ${PN}-extension-dri2 \ | ||
53 | ${PN}-extension-glx \ | ||
54 | ${PN}-extension-record \ | ||
55 | ${PN}-extension-extmod \ | ||
56 | ${PN}-extension-dbe \ | ||
57 | ${PN}-module-libint10 \ | ||
58 | ${PN}-module-libafb \ | ||
59 | ${PN}-module-libwfb \ | ||
60 | ${PN}-module-libmfb \ | ||
61 | ${PN}-module-libcfb \ | ||
62 | ${PN}-module-exa \ | ||
63 | ${PN}-module-xaa \ | ||
64 | ${PN}-module-libxf1bpp \ | ||
65 | ${PN}-module-libxf4bpp" | ||
66 | |||
67 | RRECOMMENDS_${PN} += "${PN}-security-policy xkeyboard-config rgb xserver-xf86-config xkbcomp" | ||
68 | RDEPENDS_${PN}-xvfb += "xkeyboard-config" | ||
69 | RDEPENDS_${PN}-module-exa = "${PN} (= ${EXTENDPKGV})" | ||
70 | |||
71 | 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" | ||
72 | FILES_${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la" | ||
73 | FILES_${PN}-doc += "${libdir}/X11/doc ${datadir}/X11/xkb/compiled/README.compiled ${localstatedir}/lib/xkb/README.compiled" | ||
74 | FILES_${PN}-dbg += "${libdir}/xorg/modules/.debug \ | ||
75 | ${libdir}/xorg/modules/*/.debug \ | ||
76 | ${libdir}/xorg/modules/*/*/.debug \ | ||
77 | " | ||
78 | FILES_${PN}-security-policy += "${libdir}/xserver/SecurityPolicy" | ||
79 | FILES_${PN}-sdl = "${bindir}/Xsdl" | ||
80 | FILES_${PN}-fbdev = "${bindir}/Xfbdev" | ||
81 | FILES_${PN}-xvfb = "${bindir}/Xvfb" | ||
82 | 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" | ||
83 | FILES_${PN}-xephyr = "${bindir}/Xephyr" | ||
84 | FILES_${PN}-multimedia-modules = "${libdir}/xorg/modules/multimedia/*drv*" | ||
85 | FILES_${PN}-extension-dri = "${libdir}/xorg/modules/extensions/libdri.so" | ||
86 | FILES_${PN}-extension-dri2 = "${libdir}/xorg/modules/extensions/libdri2.so" | ||
87 | FILES_${PN}-extension-glx = "${libdir}/xorg/modules/extensions/libglx.so" | ||
88 | FILES_${PN}-extension-record = "${libdir}/xorg/modules/extensions/librecord.so" | ||
89 | FILES_${PN}-extension-extmod = "${libdir}/xorg/modules/extensions/libextmod.so" | ||
90 | FILES_${PN}-extension-dbe = "${libdir}/xorg/modules/extensions/libdbe.so" | ||
91 | FILES_${PN}-module-libint10 = "${libdir}/xorg/modules/libint10.so" | ||
92 | FILES_${PN}-module-libafb = "${libdir}/xorg/modules/libafb.so" | ||
93 | FILES_${PN}-module-libwfb = "${libdir}/xorg/modules/libwfb.so" | ||
94 | FILES_${PN}-module-libmfb = "${libdir}/xorg/modules/libmfb.so" | ||
95 | FILES_${PN}-module-libcfb = "${libdir}/xorg/modules/libcfb.so" | ||
96 | FILES_${PN}-module-exa = "${libdir}/xorg/modules/libexa.so" | ||
97 | FILES_${PN}-module-xaa = "${libdir}/xorg/modules/libxaa.so" | ||
98 | FILES_${PN}-module-libxf1bpp = "${libdir}/xorg/modules/libxf1bpp.so" | ||
99 | FILES_${PN}-module-libxf4bpp = "${libdir}/xorg/modules/libxf4bpp.so" | ||
100 | |||
101 | EXTRA_OECONF += "--with-fop=no \ | ||
102 | --with-pic \ | ||
103 | --disable-static \ | ||
104 | --disable-xinerama \ | ||
105 | --disable-record \ | ||
106 | --disable-dmx \ | ||
107 | --disable-xnest \ | ||
108 | --enable-xvfb \ | ||
109 | --enable-composite \ | ||
110 | --without-dtrace \ | ||
111 | --with-int10=x86emu \ | ||
112 | --sysconfdir=/etc/X11 \ | ||
113 | --localstatedir=/var \ | ||
114 | --with-xkb-output=/var/lib/xkb \ | ||
115 | --with-sha1=libcrypto \ | ||
116 | ac_cv_file__usr_share_sgml_X11_defs_ent=no \ | ||
117 | " | ||
118 | |||
119 | PACKAGECONFIG ??= "udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri dri2 glx', '', d)}" | ||
120 | PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev" | ||
121 | PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,glproto virtual/mesa xf86driproto" | ||
122 | PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto" | ||
123 | # DRI3 requires xshmfence to also be enabled | ||
124 | PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto" | ||
125 | PACKAGECONFIG[glx] = "--enable-glx --enable-glx-tls,--disable-glx,glproto virtual/libgl virtual/libx11" | ||
126 | PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind" | ||
127 | PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence" | ||
128 | PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" | ||
129 | |||
130 | do_install_append () { | ||
131 | # Its assumed base-files creates this for us | ||
132 | rmdir ${D}${localstatedir}/log/ | ||
133 | } | ||
134 | |||
135 | # Add runtime provides for the ABI versions of the video and input subsystems, | ||
136 | # so that drivers can depend on the relevant version. | ||
137 | python populate_packages_prepend() { | ||
138 | import subprocess | ||
139 | |||
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 | |||
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 | output = p.communicate()[0] | ||
153 | mlprefix = d.getVar('MLPREFIX', True) or '' | ||
154 | return "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0]) | ||
155 | |||
156 | pn = d.getVar("PN", True) | ||
157 | d.appendVar("RPROVIDES_" + pn, " " + get_abi("input")) | ||
158 | d.appendVar("RPROVIDES_" + pn, " " + get_abi("video")) | ||
159 | } | ||