summaryrefslogtreecommitdiffstats
path: root/debian/patches/04_cleanup-osmesa-configs.patch
blob: 68bd4775e13187f964dbec98ce9da8ba49d8c523 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
Index: mesa/configs/linux-osmesa
===================================================================
--- mesa.orig/configs/linux-osmesa	2007-11-11 00:24:07.000000000 +0100
+++ mesa/configs/linux-osmesa	2007-11-11 00:33:20.000000000 +0100
@@ -9,8 +9,17 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+
+PIC_FLAGS  = -fPIC
+
+DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
+	-D_BSD_SOURCE -D_GNU_SOURCE \
+	-DPTHREADS -DUSE_XSHM -DHAVE_POSIX_MEMALIGN
+
+CFLAGS = -ansi -pedantic $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
+	$(ASM_FLAGS) -ffast-math
+
+CXXFLAGS = -ansi -pedantic $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
 
 # Work around aliasing bugs - developers should comment this out
 CFLAGS += -fno-strict-aliasing
@@ -26,3 +35,4 @@
 OSMESA_LIB_DEPS = -lm -lpthread
 GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
 APP_LIB_DEPS = -lOSMesa -lGLU
+
Index: mesa/configs/linux-osmesa-static
===================================================================
--- mesa.orig/configs/linux-osmesa-static	2007-11-11 00:24:01.000000000 +0100
+++ mesa/configs/linux-osmesa-static	2007-11-11 00:33:20.000000000 +0100
@@ -8,7 +8,8 @@
 
 # Compiler and flags
 MKLIB_OPTIONS = -static
+PIC_FLAGS =
 
 # Library names
-OSMESA_LIB_NAME = libOSMesa.a
+OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
 
Index: mesa/configs/linux-osmesa16
===================================================================
--- mesa.orig/configs/linux-osmesa16	2007-11-11 00:24:07.000000000 +0100
+++ mesa/configs/linux-osmesa16	2007-11-11 00:33:41.000000000 +0100
@@ -1,31 +1,19 @@
 # Configuration for 16 bits/channel OSMesa library on Linux
 
-include $(TOP)/configs/default
+include $(TOP)/configs/linux-osmesa
 
 CONFIG_NAME = linux-osmesa16
 
-# Compiler and flags
-CC = gcc
-CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
-
 # Work around aliasing bugs - developers should comment this out
 CFLAGS += -fno-strict-aliasing
 CXXFLAGS += -fno-strict-aliasing
-
+DEFINES += -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=32
 # Library names
 OSMESA_LIB = OSMesa16
-OSMESA_LIB_NAME = libOSMesa16.so
-
 
 # Directories
-SRC_DIRS = mesa glu
-DRIVER_DIRS = osmesa
 PROGRAM_DIRS = 
 
-
 # Dependencies
-OSMESA_LIB_DEPS = -lm -lpthread
-GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
-APP_LIB_DEPS = -lOSMesa16
+APP_LIB_DEPS = -l$(OSMESA_LIB)
+
Index: mesa/configs/linux-osmesa16-static
===================================================================
--- mesa.orig/configs/linux-osmesa16-static	2007-11-11 00:24:07.000000000 +0100
+++ mesa/configs/linux-osmesa16-static	2007-11-11 00:33:20.000000000 +0100
@@ -1,14 +1,10 @@
 # Configuration for 16 bits/channel OSMesa library on Linux
 
-include $(TOP)/configs/default
+include $(TOP)/configs/linux-osmesa16
 
 CONFIG_NAME = linux-osmesa16-static
 
 # Compiler and flags
-CC = gcc
-CXX = g++
-CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
 MKLIB_OPTIONS = -static
 PIC_FLAGS =
 
@@ -17,16 +13,5 @@
 CXXFLAGS += -fno-strict-aliasing
 
 # Library names
-OSMESA_LIB = OSMesa16
-OSMESA_LIB_NAME = libOSMesa16.a
+OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
 
-
-# Directories
-SRC_DIRS = mesa glu
-DRIVER_DIRS = osmesa
-PROGRAM_DIRS = 
-
-
-# Dependencies
-OSMESA_LIB_DEPS = -lm -lpthread
-APP_LIB_DEPS = -lOSMesa16
Index: mesa/configs/linux-osmesa32
===================================================================
--- mesa.orig/configs/linux-osmesa32	2007-11-11 00:24:07.000000000 +0100
+++ mesa/configs/linux-osmesa32	2007-11-11 00:33:51.000000000 +0100
@@ -1,31 +1,22 @@
 # Configuration for 32 bits/channel OSMesa library on Linux
 
-include $(TOP)/configs/default
+include $(TOP)/configs/linux-osmesa
 
 CONFIG_NAME = linux-osmesa32
 
 # Compiler and flags
-CC = gcc
-CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
 
 # Work around aliasing bugs - developers should comment this out
 CFLAGS += -fno-strict-aliasing
 CXXFLAGS += -fno-strict-aliasing
+DEFINES += -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
 
 # Library names
 OSMESA_LIB = OSMesa32
-OSMESA_LIB_NAME = libOSMesa32.so
-
 
 # Directories
-SRC_DIRS = mesa glu
-DRIVER_DIRS = osmesa
 PROGRAM_DIRS = 
 
-
 # Dependencies
-OSMESA_LIB_DEPS = -lm -lpthread
-GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
-APP_LIB_DEPS = -lOSMesa32
+APP_LIB_DEPS = -l$(OSMESA_LIB)
+
Index: mesa/configs/linux-osmesa32-static
===================================================================
--- mesa.orig/configs/linux-osmesa32-static	2007-11-11 00:24:01.000000000 +0100
+++ mesa/configs/linux-osmesa32-static	2007-11-11 00:33:20.000000000 +0100
@@ -1,28 +1,13 @@
 # Configuration for 32 bits/channel OSMesa library on Linux
 
-include $(TOP)/configs/default
+include $(TOP)/configs/linux-osmesa32
 
 CONFIG_NAME = linux-osmesa32-static
 
 # Compiler and flags
-CC = gcc
-CXX = g++
-CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
 MKLIB_OPTIONS = -static
-
+PIC_FLAGS =
 
 # Library names
-OSMESA_LIB = OSMesa32
-OSMESA_LIB_NAME = libOSMesa32.a
-
-
-# Directories
-SRC_DIRS = mesa glu
-DRIVER_DIRS = osmesa
-PROGRAM_DIRS = 
-
+OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
 
-# Dependencies
-OSMESA_LIB_DEPS = -lm -lpthread
-APP_LIB_DEPS = -lOSMesa32