xserver_xorg-server.mk 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. ################################################################################
  2. #
  3. # xserver_xorg-server
  4. #
  5. ################################################################################
  6. XSERVER_XORG_SERVER_VERSION = 1.20.9
  7. XSERVER_XORG_SERVER_SOURCE = xorg-server-$(XSERVER_XORG_SERVER_VERSION).tar.bz2
  8. XSERVER_XORG_SERVER_SITE = https://xorg.freedesktop.org/archive/individual/xserver
  9. XSERVER_XORG_SERVER_LICENSE = MIT
  10. XSERVER_XORG_SERVER_LICENSE_FILES = COPYING
  11. XSERVER_XORG_SERVER_INSTALL_STAGING = YES
  12. # xfont_font-util is needed only for autoreconf
  13. XSERVER_XORG_SERVER_AUTORECONF = YES
  14. XSERVER_XORG_SERVER_DEPENDENCIES = \
  15. xfont_font-util \
  16. xutil_util-macros \
  17. xlib_libX11 \
  18. xlib_libXau \
  19. xlib_libXdmcp \
  20. xlib_libXext \
  21. xlib_libXfixes \
  22. xlib_libXi \
  23. xlib_libXrender \
  24. xlib_libXres \
  25. xlib_libXft \
  26. xlib_libXcursor \
  27. xlib_libXinerama \
  28. xlib_libXrandr \
  29. xlib_libXdamage \
  30. xlib_libXxf86vm \
  31. xlib_libxkbfile \
  32. xlib_xtrans \
  33. xdata_xbitmaps \
  34. xorgproto \
  35. xkeyboard-config \
  36. pixman \
  37. mcookie \
  38. host-pkgconf
  39. # 1.20.8/0007-fix-for-ZDI-11426.patch
  40. XSERVER_XORG_SERVER_IGNORE_CVES += CVE-2020-14347
  41. # We force -O2 regardless of the optimization level chosen by the
  42. # user, as the X.org server is known to trigger some compiler bugs at
  43. # -Os on several architectures.
  44. XSERVER_XORG_SERVER_CONF_OPTS = \
  45. --disable-config-hal \
  46. --enable-record \
  47. --disable-xnest \
  48. --disable-xephyr \
  49. --disable-dmx \
  50. --disable-unit-tests \
  51. --with-builder-addr=buildroot@buildroot.org \
  52. CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/pixman-1 -O2" \
  53. --with-fontrootdir=/usr/share/fonts/X11/ \
  54. --$(if $(BR2_PACKAGE_XSERVER_XORG_SERVER_XVFB),en,dis)able-xvfb
  55. ifeq ($(BR2_PACKAGE_SYSTEMD),y)
  56. XSERVER_XORG_SERVER_CONF_OPTS += \
  57. --with-systemd-daemon \
  58. --enable-systemd-logind
  59. XSERVER_XORG_SERVER_DEPENDENCIES += \
  60. systemd
  61. else
  62. XSERVER_XORG_SERVER_CONF_OPTS += \
  63. --without-systemd-daemon \
  64. --disable-systemd-logind
  65. endif
  66. # Xwayland support needs libdrm, libepoxy, wayland and libxcomposite
  67. ifeq ($(BR2_PACKAGE_LIBDRM)$(BR2_PACKAGE_LIBEPOXY)$(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_WAYLAND_PROTOCOLS)$(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),yyyyy)
  68. XSERVER_XORG_SERVER_CONF_OPTS += --enable-xwayland
  69. XSERVER_XORG_SERVER_DEPENDENCIES += libdrm libepoxy wayland wayland-protocols xlib_libXcomposite
  70. else
  71. XSERVER_XORG_SERVER_CONF_OPTS += --disable-xwayland
  72. endif
  73. ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR),y)
  74. XSERVER_XORG_SERVER_CONF_OPTS += --enable-xorg
  75. XSERVER_XORG_SERVER_DEPENDENCIES += libpciaccess
  76. ifeq ($(BR2_PACKAGE_LIBDRM),y)
  77. XSERVER_XORG_SERVER_DEPENDENCIES += libdrm
  78. XSERVER_XORG_SERVER_CONF_OPTS += --enable-libdrm
  79. else
  80. XSERVER_XORG_SERVER_CONF_OPTS += --disable-libdrm
  81. endif
  82. else
  83. XSERVER_XORG_SERVER_CONF_OPTS += --disable-xorg
  84. endif
  85. ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE),y)
  86. XSERVER_XORG_SERVER_CONF_OPTS += \
  87. --enable-kdrive \
  88. --enable-xfbdev \
  89. --disable-glx \
  90. --disable-dri \
  91. --disable-xsdl
  92. define XSERVER_CREATE_X_SYMLINK
  93. ln -f -s Xfbdev $(TARGET_DIR)/usr/bin/X
  94. endef
  95. XSERVER_XORG_SERVER_POST_INSTALL_TARGET_HOOKS += XSERVER_CREATE_X_SYMLINK
  96. ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_EVDEV),y)
  97. XSERVER_XORG_SERVER_CONF_OPTS += --enable-kdrive-evdev
  98. else
  99. XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive-evdev
  100. endif
  101. ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_KBD),y)
  102. XSERVER_XORG_SERVER_CONF_OPTS += --enable-kdrive-kbd
  103. else
  104. XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive-kbd
  105. endif
  106. ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_MOUSE),y)
  107. XSERVER_XORG_SERVER_CONF_OPTS += --enable-kdrive-mouse
  108. else
  109. XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive-mouse
  110. endif
  111. else # modular
  112. XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive --disable-xfbdev
  113. endif
  114. ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
  115. XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri --enable-glx
  116. XSERVER_XORG_SERVER_DEPENDENCIES += libgl
  117. else
  118. XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri --disable-glx
  119. endif
  120. # Optional packages
  121. ifeq ($(BR2_PACKAGE_TSLIB),y)
  122. XSERVER_XORG_SERVER_DEPENDENCIES += tslib
  123. XSERVER_XORG_SERVER_CONF_OPTS += --enable-tslib LDFLAGS="-lts"
  124. endif
  125. ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
  126. XSERVER_XORG_SERVER_DEPENDENCIES += udev
  127. XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-udev
  128. # udev kms support depends on libdrm and dri2
  129. ifeq ($(BR2_PACKAGE_LIBDRM),y)
  130. XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-udev-kms
  131. else
  132. XSERVER_XORG_SERVER_CONF_OPTS += --disable-config-udev-kms
  133. endif
  134. endif
  135. ifeq ($(BR2_PACKAGE_DBUS),y)
  136. XSERVER_XORG_SERVER_DEPENDENCIES += dbus
  137. XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-dbus
  138. endif
  139. ifeq ($(BR2_PACKAGE_FREETYPE),y)
  140. XSERVER_XORG_SERVER_DEPENDENCIES += freetype
  141. endif
  142. ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
  143. XSERVER_XORG_SERVER_DEPENDENCIES += libunwind
  144. XSERVER_XORG_SERVER_CONF_OPTS += --enable-libunwind
  145. else
  146. XSERVER_XORG_SERVER_CONF_OPTS += --disable-libunwind
  147. endif
  148. ifeq ($(BR2_PACKAGE_XLIB_LIBXFONT2),y)
  149. XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libXfont2
  150. endif
  151. ifeq ($(BR2_PACKAGE_XLIB_LIBXFONT),y)
  152. XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libXfont
  153. endif
  154. ifneq ($(BR2_PACKAGE_XLIB_LIBXVMC),y)
  155. XSERVER_XORG_SERVER_CONF_OPTS += --disable-xvmc
  156. endif
  157. ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y)
  158. XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libXcomposite
  159. else
  160. XSERVER_XORG_SERVER_CONF_OPTS += --disable-composite
  161. endif
  162. ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR),y)
  163. XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri2
  164. ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y)
  165. XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libxshmfence
  166. XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri3
  167. ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGL)$(BR2_PACKAGE_LIBEPOXY),yyy)
  168. XSERVER_XORG_SERVER_DEPENDENCIES += libepoxy
  169. XSERVER_XORG_SERVER_CONF_OPTS += --enable-glamor
  170. else
  171. XSERVER_XORG_SERVER_CONF_OPTS += --disable-glamor
  172. endif
  173. else
  174. XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri3 --disable-glamor
  175. endif
  176. else
  177. XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri2 --disable-dri3 --disable-glamor
  178. endif
  179. ifeq ($(BR2_PACKAGE_XLIB_LIBXSCRNSAVER),y)
  180. XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libXScrnSaver
  181. XSERVER_XORG_SERVER_CONF_OPTS += --enable-screensaver
  182. else
  183. XSERVER_XORG_SERVER_CONF_OPTS += --disable-screensaver
  184. endif
  185. ifneq ($(BR2_PACKAGE_XLIB_LIBDMX),y)
  186. XSERVER_XORG_SERVER_CONF_OPTS += --disable-dmx
  187. endif
  188. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  189. XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libcrypto
  190. XSERVER_XORG_SERVER_DEPENDENCIES += openssl
  191. else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
  192. XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libgcrypt
  193. XSERVER_XORG_SERVER_DEPENDENCIES += libgcrypt
  194. else
  195. XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libsha1
  196. XSERVER_XORG_SERVER_DEPENDENCIES += libsha1
  197. endif
  198. define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD
  199. $(INSTALL) -D -m 0644 package/x11r7/xserver_xorg-server/xorg.service \
  200. $(TARGET_DIR)/usr/lib/systemd/system/xorg.service
  201. endef
  202. define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV
  203. $(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \
  204. $(TARGET_DIR)/etc/init.d/S40xorg
  205. endef
  206. $(eval $(autotools-package))