Dash:
[t2-trunk.git] / package / xorg / xorg-server / modular-x-conf.in
blob4953d55381aeb311dc8da772a61c81ad6a9a0b09
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3
4 # T2 SDE: package/.../xorg-server/modular-x-conf.in
5 # Copyright (C) 2004 - 2019 The T2 SDE Project
6
7 # More information can be found in the files COPYING and README.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; version 2 of the License. A copy of the
12 # GNU General Public License can be found in the file COPYING.
13 # --- T2-COPYRIGHT-NOTE-END ---
15 if [ $prefix_auto = 1 ] && ! atstage toolchain; then
16         prefix="${SDECFG_PKG_X11_PREFIX:-usr/X11R7}"
17         set_confopt
20 if atstage cross; then
21   xorg_core_cache() {
22         local sdkdir="`pkg-config --variable=sdkdir xorg-server | sed 's,/,_,g'`"
23         local have_drm
24         pkginstalled libdrm && have_drm=yes || have_drm=no
26         cat >> config.cache <<-EOT
27 ac_cv_file_${sdkdir}_dri_h=$have_drm
28 ac_cv_file_${sdkdir}_sarea_h=$have_drm
29 ac_cv_file_${sdkdir}_dristruct_h=$have_drm
30 ac_cv_file_${sdkdir}_damage_h=$have_drm
31 EOT
32   }
33   hook_add preconf 8 'xorg_core_cache'
36 # in the past we suppressed generating those cache files, however then e.g.
37 # the virtual X server needed to build / install some packages does not work
38 flistdel="$flistdel|.*fonts/.*fonts\.(dir|scale|cache.*)|var/cache/fontconfig.*"
40 # needed due to inconsistent app-defaults dir handling
41 for ad in usr/X11/lib/X11/app-defaults usr/X11/lib64/X11/app-defaults \
42                 \$prefix/lib/X11/app-defaults \$prefix/lib64/X11/app-defaults \
43                 usr/X11/lib/app-defaults usr/X11/lib64/app-defaults; do
44         var_append INSTALL_WRAPPER_FILTER "|" "sed -e 's,$ad,etc/X11/app-defaults,'"
45 done
47 var_remove_regex makeopt ' ' 'CC=.*' # maybe do this generically for configure
48 atstage native || var_append extraconfopt ' ' '--disable-malloc0returnsnull'