~ubuntu-branches/ubuntu/quantal/mesa/quantal

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2012-08-23 15:37:30 UTC
  • mfrom: (1.7.6)
  • Revision ID: package-import@ubuntu.com-20120823153730-c499sefj7btu4386
Tags: 9.0~git20120821.c1114c61-0ubuntu1
* Merge from unreleased debian git.
  - Includes support for ATI Trinity PCI IDs (LP: #1009089)
* rules, control, libgl1-mesa-swx11*: Remove swx11 support.
* Refresh patches:
  - drop 115_llvm_dynamic_linking.diff,
    117_nullptr_check_in_query_version.patch, and
    118_glsl_initialize_samplers.patch, all upstream
  - disable 116_use_shared_galliumcore.diff until it's reviewed and
    reworked to apply
* not-installed, libegl1-mesa-drivers-install.linux.in: Updated to
  match the single-pass build.
* libgl1-mesa-dri.*install.in: Drop libglsl.so, it's included in
  libdricore.so now.
* rules: Don't disable GLU on the common flags, we need to build it
  on the dri target.
* libglu*install.in: Fix the source file paths to match the build target.
  Drop the static lib from -dev since only shared libs get built.
* libgl1-mesa-dev.install.in: Fix the source file paths to match the
  build target.
* libgl1-mesa-dri.install.linux.in: Don't try to install libgallium.so,
  which isn't built yet.
* rules: Enable llvmpipe on armhf to see if it works or not.
* rules: Remove bin/install-sh on clean, and don't create a symlink for
  it.
* control: Add Pre-Depends on dpkg-dev due to the binaries using xz
  compression.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
include debian/not-installed
38
38
 
39
39
# build the following configurations by default
40
 
CONFIGS = swx11+glu \
41
 
          swx11+glu-static \
42
 
          dri \
43
 
          osmesa \
44
 
          osmesa-static \
45
 
          osmesa16 \
46
 
          osmesa16-static \
47
 
          osmesa32 \
48
 
          osmesa32-static
 
40
CONFIGS = dri
49
41
 
50
42
STAMP_DIR = debian/stamp
51
43
STAMP = $(STAMP_DIR)/$(DEB_BUILD_GNU_TYPE)
55
47
include /usr/share/quilt/quilt.make
56
48
 
57
49
confflags-common = \
58
 
        --disable-glu \
59
50
        CFLAGS="$(CFLAGS)" \
60
51
        CXXFLAGS="$(CXXFLAGS)"
61
52
 
74
65
  ifeq ($(DEB_HOST_ARCH_OS), linux)
75
66
# Gallium drivers require libdrm-{nouveau,radeon}, only available on Linux
76
67
        GALLIUM_DRIVERS += nouveau r600 r300 svga
 
68
#
77
69
# Although the KMS egl drivers will probably build on kfreebsd & hurd
78
70
# only linux actually has KMS drivers implemented at this point.
79
71
        EGL_DISPLAYS += drm
84
76
    endif
85
77
    ifneq (,$(filter $(DEB_HOST_ARCH_CPU), amd64 i386))
86
78
        DRI_DRIVERS += i915 i965
 
79
        # Radeonsi needs LLVM, so only build it on the subset of archs
 
80
        # where we have LLVM enabled.
 
81
        GALLIUM_DRIVERS += radeonsi
87
82
    endif
88
83
  endif
89
84
 
90
85
 
91
 
# Build the llvmpipe driver only on amd64, i386 until it's tested elsewhere
92
 
  ifeq (,$(filter $(DEB_HOST_ARCH_CPU), amd64 i386))
 
86
# Build the llvmpipe driver only on amd64, i386 and armhf until it's tested
 
87
# elsewhere
 
88
  ifeq (,$(filter $(DEB_HOST_ARCH_CPU), amd64 i386 arm))
93
89
        DRI_DRIVERS += swrast
94
90
  else
95
91
        GALLIUM_DRIVERS += swrast
98
94
  # LLVM is required for r300g and recommended for swrastg on x86:
99
95
  ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 kfreebsd-amd64 kfreebsd-i386))
100
96
        confflags_GALLIUM += --enable-gallium-llvm
 
97
        confflags_GALLIUM += --with-llvm-shared-libs
101
98
  endif
102
99
 
103
100
        confflags_DIRECT_RENDERING = --enable-driglx-direct
108
105
endif
109
106
 
110
107
confflags-dri = \
111
 
        --with-driver=dri \
 
108
        --enable-dri \
112
109
        --with-dri-drivers="$(DRI_DRIVERS)" \
113
110
        --with-dri-driverdir=/usr/lib/$(DEB_HOST_MULTIARCH)/dri \
 
111
        --with-dri-searchpath='/usr/lib/$(DEB_HOST_MULTIARCH)/dri:\$$$${ORIGIN}/dri:/usr/lib/dri' \
 
112
        --enable-osmesa \
114
113
        --enable-glx-tls \
115
114
        --enable-shared-dricore \
116
115
        --enable-shared-glapi \
123
122
        $(confflags_OPENVG) \
124
123
        $(confflags-common)
125
124
 
126
 
confflags-osmesa = \
127
 
        --disable-egl \
128
 
        --with-gallium-drivers= \
129
 
        --with-driver=osmesa \
130
 
        $(confflags-common)
131
 
 
132
 
confflags-osmesa-static = \
133
 
        --disable-egl \
134
 
        --with-gallium-drivers= \
135
 
        --with-driver=osmesa \
136
 
        --enable-static \
137
 
        $(confflags-common)
138
 
 
139
 
confflags-osmesa16 = \
140
 
        --disable-egl \
141
 
        --with-gallium-drivers= \
142
 
        --with-driver=osmesa \
143
 
        --with-osmesa-bits=16 \
144
 
        $(confflags-common)
145
 
 
146
 
confflags-osmesa16-static = \
147
 
        --disable-egl \
148
 
        --with-gallium-drivers= \
149
 
        --with-driver=osmesa \
150
 
        --with-osmesa-bits=16 \
151
 
        --enable-static \
152
 
        $(confflags-common)
153
 
 
154
 
confflags-osmesa32 = \
155
 
        --disable-egl \
156
 
        --with-gallium-drivers= \
157
 
        --with-driver=osmesa \
158
 
        --with-osmesa-bits=32 \
159
 
        $(confflags-common)
160
 
 
161
 
confflags-osmesa32-static = \
162
 
        --disable-egl \
163
 
        --with-gallium-drivers= \
164
 
        --with-driver=osmesa \
165
 
        --with-osmesa-bits=32 \
166
 
        --enable-static \
167
 
        $(confflags-common)
168
 
 
169
 
confflags-swx11+glu = \
170
 
        --disable-egl \
171
 
        --with-gallium-drivers= \
172
 
        --with-driver=xlib \
173
 
        --disable-egl \
174
 
        CFLAGS="$(CFLAGS)" \
175
 
        CXXFLAGS="$(CXXFLAGS)"
176
 
 
177
 
confflags-swx11+glu-static = \
178
 
        --disable-egl \
179
 
        --with-gallium-drivers= \
180
 
        --with-driver=xlib \
181
 
        --enable-static \
182
 
        --disable-egl \
183
 
        CFLAGS="$(CFLAGS)" \
184
 
        CXXFLAGS="$(CXXFLAGS)"
185
 
 
186
 
confflags-swx11+glu-i386-i686 = \
187
 
        --disable-egl \
188
 
        --with-gallium-drivers= \
189
 
        --with-driver=xlib \
190
 
        --disable-egl \
191
 
        --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)/i686/cmov \
192
 
        CFLAGS="$(CFLAGS) -march=i686" \
193
 
        CXXFLAGS="$(CXXFLAGS) -march=i686"
194
 
 
195
 
autotools_files = bin/config.guess bin/config.sub
196
 
 
197
125
configure: $(QUILT_STAMPFN) configure.ac
198
 
        for file in $(autotools_files); do cp $$file $$file.pristine; done
199
126
        autoreconf -vfi
200
127
 
201
128
# list the configurations that will built
264
191
        rm -f conftest* */conftest*
265
192
        rm -rf autom4te.cache */autom4te.cache
266
193
        rm -rf build
267
 
        rm -rf configure config.guess config.sub config.h.in
 
194
        rm -rf configure bin/config.guess bin/config.sub config.h.in
268
195
        rm -rf $$(find -name Makefile.in)
269
 
        rm -rf aclocal.m4 missing depcomp install-sh ltmain.sh
 
196
        rm -rf aclocal.m4 bin/missing bin/depcomp install-sh bin/ltmain.sh
 
197
        rm -f bin/ar-lib bin/compile bin/ylwrap bin/install-sh
270
198
        rm -rf $(STAMP_DIR)
271
199
        for file in debian/*.in; do rm -f $${file%%.in}; done
272
 
        # Those are auto-updated, grr:
273
 
        for file in $(autotools_files); do if [ -f $$file.pristine ]; then mv -f $$file.pristine $$file; fi; done
274
 
        ln -sf minstall bin/install-sh
 
200
        rm -f src/glsl/builtins/tools/texture_builtins.pyc
 
201
        rm -f src/mapi/glapi/gen/*.pyc
 
202
        rm -f src/mesa/main/*.pyc
275
203
 
276
204
        # And for pkgstriptranslation's benefit…
277
205
        rm -f src/mesa/drivers/dri/common/xmlpool/xmlpool.pot
296
224
        dh_installdocs -s
297
225
        dh_installexamples -s
298
226
 
299
 
        # Classic DRI and Gallium DRI are mixed up together here
300
 
        # Remove the whole tree to avoid false-positives in --list-missing, and
301
 
        # install the right files manually.
302
 
        rm -r debian/tmp/dri/usr/lib/$(DEB_HOST_MULTIARCH)/dri
303
 
 
304
227
        # Also get rid of other files which aren't installed. Do not
305
228
        # use -f to ensure we notice disappearing files:
306
229
        set -e; for file in $(NOT_INSTALLED); do rm debian/tmp/$$file; done
307
230
        # Files only in git, not in tarballs, OK to use rm -f here:
308
231
        set -e; for file in $(NOT_INSTALLED_EITHER); do rm -f debian/tmp/$$file; done
309
 
        # No need for this .so, libglapi is just a convenience library:
 
232
        # No need for these .so, they're just convenience libraries:
310
233
        rm debian/tmp/dri/usr/lib/${DEB_HOST_MULTIARCH}/libglapi.so
 
234
        rm debian/tmp/dri/usr/lib/${DEB_HOST_MULTIARCH}/libdricore*.so
 
235
#       rm debian/tmp/dri/usr/lib/${DEB_HOST_MULTIARCH}/libgallium*.so
 
236
        # purge .la files
 
237
        find debian/tmp/ -name '*.la' -exec rm '{}' ';'
311
238
 
312
239
        dh_install -s --fail-missing
313
240
 
314
 
# If the llvmpipe driver was built, copy it to the package dir
315
 
ifneq (,$(filter swrast,$(GALLIUM_DRIVERS)))
316
 
        dh_install -plibgl1-mesa-dri build/dri/$(DEB_HOST_MULTIARCH)/gallium/swrast_dri.so \
317
 
                usr/lib/${DEB_HOST_MULTIARCH}/dri
318
 
endif
319
 
 
320
241
        # Create an ld.so.conf which says where to find libGL from Mesa
321
242
        echo "/usr/lib/$(DEB_HOST_MULTIARCH)/mesa" \
322
243
        > $(CURDIR)/debian/libgl1-mesa-glx/usr/lib/$(DEB_HOST_MULTIARCH)/mesa/ld.so.conf
323
 
        echo "/usr/lib/$(DEB_HOST_MULTIARCH)/mesa" \
324
 
        > $(CURDIR)/debian/libgl1-mesa-swx11/usr/lib/$(DEB_HOST_MULTIARCH)/mesa/ld.so.conf
325
244
 
326
245
        # Empty directory for the alternative
327
246
        mkdir -p $(CURDIR)/debian/libgl1-mesa-glx/usr/lib/$(DEB_HOST_MULTIARCH)/xorg/x11-extra-modules
328
 
        mkdir -p $(CURDIR)/debian/libgl1-mesa-swx11/usr/lib/$(DEB_HOST_MULTIARCH)/xorg/x11-extra-modules
329
247
 
330
248
        # Create an ld.so.conf which says where to find libEGL, libGLES{1,2} 
331
249
        # and libOpenVG from Mesa.
369
287
/usr/lib/$(DEB_HOST_MULTIARCH)/mesa-egl
370
288
        dh_gencontrol -s
371
289
        dh_md5sums -s
372
 
        dh_builddeb $(foreach pkg,$(dbgpkg),-p$(pkg)) -- -Zxz
373
 
        dh_builddeb $(foreach pkg,$(otherpkg),-p$(pkg)) -- -Zlzma
 
290
        dh_builddeb -s -- -Zxz
374
291
 
375
292
binary: binary-indep binary-arch
376
293
.PHONY: configs build clean binary-indep binary-arch binary install