~ubuntu-branches/ubuntu/precise/mesa/precise-updates

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Robert Hooker
  • Date: 2012-02-02 12:05:48 UTC
  • mfrom: (1.7.1) (3.3.27 sid)
  • Revision ID: package-import@ubuntu.com-20120202120548-nvkma85jq0h4coix
Tags: 8.0~rc2-0ubuntu4
Drop drisearchdir handling, it is no longer needed with multiarch
and dri-alternates being removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
endif
21
21
 
22
22
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
23
 
DEB_BUILD_ARCH     ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
24
23
DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
25
24
DEB_HOST_ARCH_OS   ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
26
25
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
33
32
        confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
34
33
endif
35
34
 
36
 
# choose which configurations to build
37
 
include debian/scripts/choose-configs
38
 
 
39
35
# keep a list of files we don't install (yet), but since it's a bit
40
36
# large, use an external file:
41
37
include debian/not-installed
42
38
 
43
39
# build the following configurations by default
44
 
CONFIGS = $(SWX11_GLU_CONFIGS) \
 
40
CONFIGS = swx11+glu \
 
41
          swx11+glu-static \
45
42
          dri \
46
43
          osmesa \
47
44
          osmesa-static \
59
56
 
60
57
confflags-common = \
61
58
        --disable-glu \
62
 
        --disable-glut \
63
 
        --disable-glw \
64
59
        CFLAGS="$(CFLAGS)" \
65
60
        CXXFLAGS="$(CXXFLAGS)"
66
61
 
67
 
DRI_DRIVERS = swrast
 
62
DRI_DRIVERS =
 
63
GALLIUM_DRIVERS =
68
64
 
69
65
# hurd doesn't do direct rendering
70
66
ifeq ($(DEB_HOST_ARCH_OS), hurd)
71
67
        confflags_DIRECT_RENDERING = --disable-driglx-direct
72
68
        confflags_EGL = --disable-egl
73
69
        confflags_GALLIUM = --with-gallium-drivers=
 
70
        DRI_DRIVERS += swrast
74
71
else
75
72
        EGL_DISPLAYS = x11
76
 
        GALLIUM_DRIVERS = swrast
77
73
 
78
74
  ifeq ($(DEB_HOST_ARCH_OS), linux)
79
75
# Gallium drivers require libdrm-{nouveau,radeon}, only available on Linux
80
 
        GALLIUM_DRIVERS += nouveau r600
 
76
        GALLIUM_DRIVERS += nouveau r600 r300 svga
81
77
# Although the KMS egl drivers will probably build on kfreebsd & hurd
82
78
# only linux actually has KMS drivers implemented at this point.
83
79
        EGL_DISPLAYS += drm wayland
86
82
  endif
87
83
 
88
84
  ifneq ($(DEB_HOST_ARCH), s390)
89
 
        DRI_DRIVERS += mga r128 r200 r300 r600 radeon savage tdfx
90
 
  endif
91
 
  ifeq ($(DEB_HOST_ARCH_CPU), i386)
92
 
        DRI_DRIVERS += i810 i915 i965 sis unichrome
93
 
        GALLIUM_DRIVERS += i915
94
 
  else ifeq ($(DEB_HOST_ARCH_CPU), amd64)
95
 
        DRI_DRIVERS += i915 i965 sis unichrome
96
 
        GALLIUM_DRIVERS += i915
97
 
  endif
98
 
 
99
 
  # LLVM is required for r300g, and x86-ish:
100
 
  ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 armel))
101
 
        GALLIUM_DRIVERS += r300
 
85
        DRI_DRIVERS += r200 radeon
 
86
  endif
 
87
 
 
88
# Build the llvmpipe driver only on amd64, i386 until it's tested elsewhere
 
89
  ifeq (,$(filter $(DEB_HOST_ARCH_CPU), amd64 i386))
 
90
        DRI_DRIVERS += swrast
 
91
  else
 
92
        GALLIUM_DRIVERS += swrast
 
93
        DRI_DRIVERS += i915 i965
 
94
  endif
 
95
 
 
96
  # LLVM is required for r300g and recommended for swrastg on x86:
 
97
  ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 kfreebsd-amd64 kfreebsd-i386))
102
98
        confflags_GALLIUM += --enable-gallium-llvm
103
99
  endif
104
100
 
116
112
        --enable-glx-tls \
117
113
        --enable-shared-dricore \
118
114
        --enable-shared-glapi \
 
115
        --enable-texture-float \
 
116
        --enable-xa \
119
117
        $(confflags_DIRECT_RENDERING) \
120
118
        $(confflags_EGL) \
121
119
        $(confflags_GALLIUM) \
170
168
        --disable-egl \
171
169
        --with-gallium-drivers= \
172
170
        --with-driver=xlib \
173
 
        --disable-gl-osmesa \
174
171
        --disable-egl \
175
 
        --disable-glut \
176
 
        --disable-glw \
177
172
        CFLAGS="$(CFLAGS)" \
178
173
        CXXFLAGS="$(CXXFLAGS)"
179
174
 
181
176
        --disable-egl \
182
177
        --with-gallium-drivers= \
183
178
        --with-driver=xlib \
184
 
        --disable-gl-osmesa \
185
179
        --enable-static \
186
180
        --disable-egl \
187
 
        --disable-glut \
188
 
        --disable-glw \
189
181
        CFLAGS="$(CFLAGS)" \
190
182
        CXXFLAGS="$(CXXFLAGS)"
191
183
 
193
185
        --disable-egl \
194
186
        --with-gallium-drivers= \
195
187
        --with-driver=xlib \
196
 
        --disable-gl-osmesa \
197
 
        --disable-glut \
198
188
        --disable-egl \
199
 
        --disable-glw \
200
189
        --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)/i686/cmov \
201
190
        CFLAGS="$(CFLAGS) -march=i686" \
202
191
        CXXFLAGS="$(CXXFLAGS) -march=i686"
203
192
 
204
 
# Add /usr/lib/dri-alternates for classic fallback for gallium drivers
205
 
ifeq ($(DEB_BUILD_ARCH),i386)
206
 
        confflags-dri += --with-dri-searchpath=/usr/lib/$(DEB_HOST_MULTIARCH)/dri:/usr/lib/dri:/usr/lib/$(DEB_HOST_MULTIARCH)/dri-alternates:/usr/lib/dri-alternates:/usr/lib32/dri:/usr/lib32/dri-alternates
207
 
else
208
 
        confflags-dri += --with-dri-searchpath=/usr/lib/$(DEB_HOST_MULTIARCH)/dri:/usr/lib/dri:/usr/lib/$(DEB_HOST_MULTIARCH)/dri-alternates:/usr/lib/dri-alternates
209
 
endif
210
 
 
211
193
configure: $(QUILT_STAMPFN) configure.ac
212
194
        autoreconf -vfi
213
195
 
229
211
        # We do this only once, and outside the build trees, so that
230
212
        # pkgstriptranslations doesn't get confused.
231
213
        $(MAKE) -C src/mesa/drivers/dri/common/xmlpool pot
 
214
 
232
215
        >$@
233
216
 
234
217
$(STAMP)-build-%: configure
261
244
                $(MAKE) -C $(DEB_BUILD_DIR)/$$config DESTDIR=$(CURDIR)/debian/tmp install; \
262
245
        done
263
246
        $(MAKE) -C $(DEB_BUILD_DIR)/dri DESTDIR=$(CURDIR)/debian/tmp/dri install
264
 
        for file in mesa-common-dev.install libopenvg1-mesa.install \
265
 
                    libopenvg1-mesa-dev.install libgles2-mesa.install \
266
 
                    libgles1-mesa-dev.links libgles2-mesa-dev.links \
267
 
                    libopenvg1-mesa-dev.links \
268
 
                    libgles2-mesa-dev.install libgles1-mesa.install \
269
 
                    libgles1-mesa-dev.install libgl1-mesa-glx.install \
270
 
                    libgl1-mesa-glx-i686.install libgl1-mesa-dri.install \
271
 
                    libgl1-mesa-dri.install.linux libegl1-mesa.install \
272
 
                    libegl1-mesa-dev.links libegl1-mesa.postinst \
273
 
                    libegl1-mesa.prerm libgl1-mesa-dri-experimental.install \
274
 
                    libegl1-mesa-drivers.install libegl1-mesa-dev.install \
275
 
                    libgl1-mesa-dev.install libgl1-mesa-dev.links \
276
 
                    libgl1-mesa-swx11-dev.install libgl1-mesa-swx11.install \
277
 
                    libgl1-mesa-swx11-dev.links \
278
 
                    libgl1-mesa-glx.postinst libgl1-mesa-glx.prerm \
279
 
                    libgl1-mesa-swx11.postinst libgl1-mesa-swx11.prerm \
280
 
                    libgbm1.install libgbm-dev.install \
281
 
                    libglapi-mesa.install; \
 
247
        for file in debian/*.in; \
282
248
        do \
283
249
                sed -e"s,\$${DEB_HOST_MULTIARCH},$(DEB_HOST_MULTIARCH),g" \
284
 
                        debian/$${file}.in > debian/$$file; \
 
250
                        $${file} > $${file%%.in}; \
285
251
        done
286
252
 
287
253
clean: unpatch
288
254
        dh_testdir
289
 
        dh_testroot
290
255
        rm -rf .pc
291
256
 
292
257
        rm -f config.cache config.log config.status
298
263
        rm -rf $$(find -name Makefile.in)
299
264
        rm -rf aclocal.m4 missing depcomp install-sh ltmain.sh
300
265
        rm -rf $(STAMP_DIR)
 
266
        for file in debian/*.in; do rm -f $${file%%.in}; done
 
267
        # And for pkgstriptranslation's benefit…
 
268
        rm -f src/mesa/drivers/dri/common/xmlpool/xmlpool.pot
301
269
 
302
270
        dh_clean
303
271
 
304
272
# Build architecture-independent files here.
305
273
binary-indep: install
306
274
 
 
275
allpkg = $(shell dh_listpackages -s)
 
276
dbgpkg = $(filter %-dbg, $(allpkg))
 
277
otherpkg = $(filter-out %-dbg, $(allpkg))
 
278
havedbgpkg = $(patsubst %-dbg,%,$(dbgpkg))
 
279
nodbgpkg = $(filter-out $(havedbgpkg),$(otherpkg))
307
280
 
308
281
# Build architecture-dependent files here.
309
282
binary-arch: install
328
301
        rm debian/tmp/dri/usr/lib/${DEB_HOST_MULTIARCH}/libglapi.so
329
302
 
330
303
        dh_install -s --fail-missing
331
 
        # Install arch-dependent drivers
332
 
ifneq (,$(filter r300,$(GALLIUM_DRIVERS)))
333
 
        dh_install -plibgl1-mesa-dri build/dri/$(DEB_HOST_MULTIARCH)/gallium/r300_dri.so usr/lib/${DEB_HOST_MULTIARCH}/dri
334
 
endif
335
 
ifneq (,$(filter i915,$(GALLIUM_DRIVERS)))
336
 
        dh_install -plibgl1-mesa-dri-experimental build/dri/$(DEB_HOST_MULTIARCH)/gallium/i915_dri.so usr/lib/${DEB_HOST_MULTIARCH}/dri-alternates
337
 
endif
338
304
 
 
305
# If the llvmpipe driver was built, copy it to the package dir
 
306
ifneq (,$(filter swrast,$(GALLIUM_DRIVERS)))
 
307
        dh_install -plibgl1-mesa-dri build/dri/$(DEB_HOST_MULTIARCH)/gallium/swrast_dri.so \
 
308
                usr/lib/${DEB_HOST_MULTIARCH}/dri
 
309
endif
339
310
 
340
311
        # Create an ld.so.conf which says where to find libGL from Mesa
341
312
        echo "/usr/lib/$(DEB_HOST_MULTIARCH)/mesa" \
349
320
 
350
321
        # Create an ld.so.conf which says where to find libEGL, libGLES{1,2} 
351
322
        # and libOpenVG from Mesa.
352
 
 
353
323
        echo "/usr/lib/$(DEB_HOST_MULTIARCH)/mesa-egl" \
354
324
        > $(CURDIR)/debian/libegl1-mesa/usr/lib/$(DEB_HOST_MULTIARCH)/mesa-egl/ld.so.conf
355
325
 
357
327
        dh_lintian -s
358
328
        dh_link -s
359
329
        # Install bug control and script:
360
 
        set -e; for p in `dh_listpackages -s`; do \
 
330
        set -e; for p in $(allpkg); do \
361
331
                install -d debian/$$p/usr/share/bug/$$p && \
362
332
                install -m 644 debian/local/control debian/$$p/usr/share/bug/$$p && \
363
333
                install -m 755 debian/local/script  debian/$$p/usr/share/bug/$$p; \
364
334
        done
365
 
        dh_strip -plibgl1-mesa-swx11 --dbg-package=libgl1-mesa-swx11-dbg
366
 
        dh_strip -plibgl1-mesa-glx --dbg-package=libgl1-mesa-glx-dbg
367
 
        dh_strip -plibgl1-mesa-dri --dbg-package=libgl1-mesa-dri-dbg
368
 
        dh_strip -plibgl1-mesa-dri-experimental --dbg-package=libgl1-mesa-dri-experimental-dbg
369
 
        dh_strip -plibopenvg1-mesa --dbg-package=libopenvg1-mesa-dbg
370
 
        dh_strip -plibgbm1 --dbg-package=libgbm1-dbg
371
 
        dh_strip -plibegl1-mesa --dbg-package=libegl1-mesa-dbg
372
 
        dh_strip -plibglapi-mesa --dbg-package=libglapi-mesa-dbg
373
 
        dh_strip -plibgles1-mesa --dbg-package=libgles1-mesa-dbg
374
 
        dh_strip -plibgles2-mesa --dbg-package=libgles2-mesa-dbg
375
 
        dh_strip -plibegl1-mesa-drivers --dbg-package=libegl1-mesa-drivers-dbg
 
335
        set -e; for p in $(havedbgpkg); do \
 
336
                dh_strip -p$${p} --dbg-package=$${p}-dbg; \
 
337
        done
376
338
        # dh_strip -s --remaining-packages doesn't work with resumed
377
339
        # builds (see changelog for mesa 7.10-1):
378
 
        dh_strip \
379
 
                -plibegl1-mesa-dev \
380
 
                -plibgbm-dev \
381
 
                -plibgl1-mesa-dev \
382
 
                -plibgl1-mesa-swx11-dev \
383
 
                -plibgles1-mesa-dev \
384
 
                -plibgles2-mesa-dev \
385
 
                -plibglu1-mesa \
386
 
                -plibglu1-mesa-dev \
387
 
                -plibopenvg1-mesa-dev \
388
 
                -plibosmesa6 \
389
 
                -plibosmesa6-dev \
390
 
                -pmesa-common-dev
 
340
        dh_strip $(foreach p,$(nodbgpkg),-p$(p))
391
341
        dh_compress -s
392
342
        dh_fixperms -s
393
343
ifeq (,$(filter sparc sparc64,$(DEB_HOST_ARCH)))
410
360
/usr/lib/$(DEB_HOST_MULTIARCH)/mesa-egl
411
361
        dh_gencontrol -s
412
362
        dh_md5sums -s
413
 
        dh_builddeb -s -- -Zlzma
 
363
        dh_builddeb $(foreach pkg,$(dbgpkg),-p$(pkg)) -- -Zxz
 
364
        dh_builddeb $(foreach pkg,$(otherpkg),-p$(pkg))
414
365
 
415
366
binary: binary-indep binary-arch
416
367
.PHONY: configs build clean binary-indep binary-arch binary install