Initial commit
[kopensolaris-gnu/patches.git] / xorg-server-1.4.2.diff
1 diff -uraN xorg-server-1.4.2.orig/debian/patches/96_kopensolaris-gnu xorg-server-1.4.2/debian/patches/96_kopensolaris-gnu
2 --- xorg-server-1.4.2.orig/debian/patches/96_kopensolaris-gnu   1969-12-31 19:00:00.000000000 -0500
3 +++ xorg-server-1.4.2/debian/patches/96_kopensolaris-gnu        2008-10-07 15:25:56.779376792 -0400
4 @@ -0,0 +1,309 @@
5 +--- a/configure
6 ++++ b/configure
7 +@@ -5157,7 +5157,7 @@
8 +   ;;
9
10 + # This must be Linux ELF.
11 +-linux* | k*bsd*-gnu)
12 ++linux* | k*bsd*-gnu | kopensolaris*-gnu)
13 +   lt_cv_deplibs_check_method=pass_all
14 +   ;;
15
16 +@@ -7511,7 +7511,7 @@
17 +   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
18 +   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
19 +   ;;
20 +-linux* | k*bsd*-gnu)
21 ++linux* | k*bsd*-gnu | kopensolaris*-gnu)
22 +   if test "$host_cpu" = ia64; then
23 +     symcode='[ABCDGIRSTW]'
24 +     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
25 +@@ -8793,7 +8793,7 @@
26 +       lt_prog_compiler_static='-Bstatic'
27 +       ;;
28
29 +-    linux* | k*bsd*-gnu)
30 ++    linux* | k*bsd*-gnu | kopensolaris*-gnu)
31 +       case $cc_basename in
32 +       icc* | ecc*)
33 +       lt_prog_compiler_wl='-Wl,'
34 +@@ -9253,7 +9253,7 @@
35 +       archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
36 +       ;;
37
38 +-    gnu* | linux* | k*bsd*-gnu)
39 ++    gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
40 +       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
41 +       tmp_addflag=
42 +       case $cc_basename,$host_cpu in
43 +@@ -10519,7 +10519,7 @@
44 +   ;;
45
46 + # This must be Linux ELF.
47 +-linux* | k*bsd*-gnu)
48 ++linux* | k*bsd*-gnu | kopensolaris*-gnu)
49 +   version_type=linux
50 +   need_lib_prefix=no
51 +   need_version=no
52 +@@ -12963,7 +12963,7 @@
53 +     hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
54 +     hardcode_libdir_separator_CXX=:
55 +     ;;
56 +-  linux* | k*bsd*-gnu)
57 ++  linux* | k*bsd*-gnu | kopensolaris*-gnu)
58 +     case $cc_basename in
59 +       KCC*)
60 +       # Kuck and Associates, Inc. (KAI) C++ Compiler
61 +@@ -13741,7 +13741,7 @@
62 +           ;;
63 +       esac
64 +       ;;
65 +-      linux* | k*bsd*-gnu)
66 ++      linux* | k*bsd*-gnu | kopensolaris*-gnu)
67 +       case $cc_basename in
68 +         KCC*)
69 +           # KAI C++ Compiler
70 +@@ -14077,7 +14077,7 @@
71 +   cygwin* | mingw*)
72 +     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
73 +   ;;
74 +-  linux* | k*bsd*-gnu)
75 ++  linux* | k*bsd*-gnu | kopensolaris*-gnu)
76 +     link_all_deplibs_CXX=no
77 +   ;;
78 +   *)
79 +@@ -14497,7 +14497,7 @@
80 +   ;;
81
82 + # This must be Linux ELF.
83 +-linux* | k*bsd*-gnu)
84 ++linux* | k*bsd*-gnu | kopensolaris*-gnu)
85 +   version_type=linux
86 +   need_lib_prefix=no
87 +   need_version=no
88 +@@ -15477,7 +15477,7 @@
89 +       lt_prog_compiler_static_F77='-Bstatic'
90 +       ;;
91
92 +-    linux* | k*bsd*-gnu)
93 ++    linux* | k*bsd*-gnu | kopensolaris*-gnu)
94 +       case $cc_basename in
95 +       icc* | ecc*)
96 +       lt_prog_compiler_wl_F77='-Wl,'
97 +@@ -15937,7 +15937,7 @@
98 +       archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
99 +       ;;
100
101 +-    gnu* | linux* | k*bsd*-gnu)
102 ++    gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
103 +       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
104 +       tmp_addflag=
105 +       case $cc_basename,$host_cpu in
106 +@@ -17131,7 +17131,7 @@
107 +   ;;
108
109 + # This must be Linux ELF.
110 +-linux* | k*bsd*-gnu)
111 ++linux* | k*bsd*-gnu | kopensolaris*-gnu)
112 +   version_type=linux
113 +   need_lib_prefix=no
114 +   need_version=no
115 +@@ -18091,7 +18091,7 @@
116 +       lt_prog_compiler_static_GCJ='-Bstatic'
117 +       ;;
118
119 +-    linux* | k*bsd*-gnu)
120 ++    linux* | k*bsd*-gnu | kopensolaris*-gnu)
121 +       case $cc_basename in
122 +       icc* | ecc*)
123 +       lt_prog_compiler_wl_GCJ='-Wl,'
124 +@@ -18551,7 +18551,7 @@
125 +       archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
126 +       ;;
127
128 +-    gnu* | linux* | k*bsd*-gnu)
129 ++    gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
130 +       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
131 +       tmp_addflag=
132 +       case $cc_basename,$host_cpu in
133 +@@ -19765,7 +19765,7 @@
134 +   ;;
135
136 + # This must be Linux ELF.
137 +-linux* | k*bsd*-gnu)
138 ++linux* | k*bsd*-gnu | kopensolaris*-gnu)
139 +   version_type=linux
140 +   need_lib_prefix=no
141 +   need_version=no
142 +@@ -33453,7 +33453,8 @@
143 +                       ;;
144 +               esac
145 +               ;;
146 +-        solaris*)
147 ++        solaris* | kopensolaris*-gnu)
148 ++              XORG_OS="solaris"
149 +               XORG_OS="solaris"
150 +               XORG_OS_SUBDIR="solaris"
151 +               # This really should be tests for specific features, but the #ifdef's
152 +@@ -33461,7 +33462,14 @@
153 +               # fixed yet
154 +               { echo "$as_me:$LINENO: checking Solaris version" >&5
155 + echo $ECHO_N "checking Solaris version... $ECHO_C" >&6; }
156 +-              OS_MINOR=`echo ${host_os}|sed -e 's/^.*solaris2\.//' -e s'/\..*$//'`
157 ++              case $host_os in
158 ++                kopensolaris*-gnu)
159 ++                  OS_MINOR=11
160 ++                  ;;
161 ++                *)
162 ++                  OS_MINOR=`echo ${host_os}|sed -e 's/^.*solaris2\.//' -e s'/\..*$//'`
163 ++                  ;;
164 ++              esac
165 +               if test "${OS_MINOR}" -ge 7 ; then
166 +                       { echo "$as_me:$LINENO: result: Solaris ${OS_MINOR}" >&5
167 + echo "${ECHO_T}Solaris ${OS_MINOR}" >&6; }
168 +--- a/configure.ac
169 ++++ b/configure.ac
170 +@@ -1415,14 +1415,21 @@
171 +                       ;;
172 +               esac
173 +               ;;
174 +-        solaris*)
175 ++        solaris* | kopensolaris*-gnu)
176 +               XORG_OS="solaris"
177 +               XORG_OS_SUBDIR="solaris"
178 +               # This really should be tests for specific features, but the #ifdef's
179 +               # were done as a simple version check in XFree86 4.x and haven't been 
180 +               # fixed yet
181 +               AC_MSG_CHECKING([Solaris version])
182 +-              OS_MINOR=`echo ${host_os}|sed -e 's/^.*solaris2\.//' -e s'/\..*$//'`
183 ++              case $host_os in
184 ++                kopensolaris*-gnu)
185 ++                  OS_MINOR=11
186 ++                  ;;
187 ++                *)
188 ++                  OS_MINOR=`echo ${host_os}|sed -e 's/^.*solaris2\.//' -e s'/\..*$//'`
189 ++                  ;;
190 ++              esac
191 +               if test "${OS_MINOR}" -ge 7 ; then
192 +                       AC_MSG_RESULT(Solaris ${OS_MINOR})
193 +               else
194 +--- a/hw/xfree86/os-support/xf86_OSlib.h
195 ++++ b/hw/xfree86/os-support/xf86_OSlib.h
196 +@@ -98,6 +98,10 @@
197 + /**************************************************************************/
198 + /* SYSV386 (SVR3, SVR4), including Solaris                                */
199 + /**************************************************************************/
200 ++#if defined(__OpenSolaris_kernel__)
201 ++# define SVR4 1
202 ++# define sun
203 ++#endif
204 + #if (defined(SYSV) || defined(SVR4)) && \
205 +     !defined(DGUX) && !defined(sgi) && \
206 +     (defined(sun) || defined(i386))
207 +--- a/aclocal.m4
208 ++++ b/aclocal.m4
209 +@@ -1694,7 +1694,7 @@
210 +   ;;
211
212 + # This must be Linux ELF.
213 +-linux* | k*bsd*-gnu)
214 ++linux* | k*bsd*-gnu | kopensolaris*-gnu)
215 +   version_type=linux
216 +   need_lib_prefix=no
217 +   need_version=no
218 +@@ -2512,7 +2512,7 @@
219 +   ;;
220
221 + # This must be Linux ELF.
222 +-linux* | k*bsd*-gnu)
223 ++linux* | k*bsd*-gnu | kopensolaris*-gnu)
224 +   lt_cv_deplibs_check_method=pass_all
225 +   ;;
226
227 +@@ -3398,7 +3398,7 @@
228 +     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
229 +     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
230 +     ;;
231 +-  linux* | k*bsd*-gnu)
232 ++  linux* | k*bsd*-gnu | kopensolaris*-gnu)
233 +     case $cc_basename in
234 +       KCC*)
235 +       # Kuck and Associates, Inc. (KAI) C++ Compiler
236 +@@ -4845,7 +4845,7 @@
237 +   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
238 +   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
239 +   ;;
240 +-linux* | k*bsd*-gnu)
241 ++linux* | k*bsd*-gnu | kopensolaris*-gnu)
242 +   if test "$host_cpu" = ia64; then
243 +     symcode='[[ABCDGIRSTW]]'
244 +     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
245 +@@ -5164,7 +5164,7 @@
246 +           ;;
247 +       esac
248 +       ;;
249 +-      linux* | k*bsd*-gnu)
250 ++      linux* | k*bsd*-gnu | kopensolaris*-gnu)
251 +       case $cc_basename in
252 +         KCC*)
253 +           # KAI C++ Compiler
254 +@@ -5430,7 +5430,7 @@
255 +       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
256 +       ;;
257
258 +-    linux* | k*bsd*-gnu)
259 ++    linux* | k*bsd*-gnu | kopensolaris*-gnu)
260 +       case $cc_basename in
261 +       icc* | ecc*)
262 +       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
263 +@@ -5592,7 +5592,7 @@
264 +   cygwin* | mingw*)
265 +     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
266 +   ;;
267 +-  linux* | k*bsd*-gnu)
268 ++  linux* | k*bsd*-gnu | kopensolaris*-gnu)
269 +     _LT_AC_TAGVAR(link_all_deplibs, $1)=no
270 +   ;;
271 +   *)
272 +@@ -5768,7 +5768,7 @@
273 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
274 +       ;;
275
276 +-    gnu* | linux* | k*bsd*-gnu)
277 ++    gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
278 +       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
279 +       tmp_addflag=
280 +       case $cc_basename,$host_cpu in
281 +--- a/config.guess
282 ++++ b/config.guess
283 +@@ -828,6 +828,10 @@
284 +       # the GNU system
285 +       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
286 +       exit ;;
287 ++    *:GNU/kOpenSolaris:*:*)
288 ++      # like linux, we don't need to record the version number
289 ++      echo ${UNAME_MACHINE}-unknown-kopensolaris-gnu
290 ++      exit ;;
291 +     *:GNU/*:*:*)
292 +       # other systems with GNU libc and userland
293 +       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
294 +--- a/config.sub
295 ++++ b/config.sub
296 +@@ -122,7 +122,7 @@
297 + case $maybe_os in
298 +   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
299 +   uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
300 +-  storm-chaos* | os2-emx* | rtmk-nova*)
301 ++  storm-chaos* | os2-emx* | rtmk-nova* | kopensolaris*-gnu* )
302 +     os=-$maybe_os
303 +     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
304 +     ;;
305 +@@ -1258,7 +1258,7 @@
306 +             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
307 +             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
308 +             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
309 +-            | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
310 ++            | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -kopensolaris*-gnu* )
311 +       # Remember, each alternative MUST END IN *, to match a version number.
312 +               ;;
313 +       -qnx*)
314 diff -uraN xorg-server-1.4.2.orig/debian/patches/series xorg-server-1.4.2/debian/patches/series
315 --- xorg-server-1.4.2.orig/debian/patches/series        2008-10-07 15:26:05.000000000 -0400
316 +++ xorg-server-1.4.2/debian/patches/series     2008-10-07 15:25:18.758976442 -0400
317 @@ -33,3 +33,4 @@
318  93_xprint_fonts_fix
319  94_xprint_XSERVER_LIBS
320  95_xprint_disable_dbus
321 +96_kopensolaris-gnu