annotate src/mesa.mk @ 4778:a50783d698b2

mesa.mk: Update to mesa 18.1.5 and build with llvm on Windows systems Disable osmesa for Linux builds. * mesa-1-fixes.patch: Update for mesa 18.1.5. * mesa-2-fixes.patch, mingw-mesa-1-fixes.patch: Delete. * dist-files.mk: Update.
author John W. Eaton <jwe@octave.org>
date Mon, 30 Jul 2018 11:27:32 -0400
parents 1a99b0de71dc
children a99cf8dbe52d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3785
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
1 # This file is part of MXE Octave.
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
2 # See index.html for further information.
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
3
4488
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
4 PKG := mesa
4778
a50783d698b2 mesa.mk: Update to mesa 18.1.5 and build with llvm on Windows systems
John W. Eaton <jwe@octave.org>
parents: 4660
diff changeset
5 $(PKG)_VERSION := 18.1.5
a50783d698b2 mesa.mk: Update to mesa 18.1.5 and build with llvm on Windows systems
John W. Eaton <jwe@octave.org>
parents: 4660
diff changeset
6 $(PKG)_CHECKSUM := 1ca7d5f5d12c95f8da137be34223229b9f0594fe
4481
7d6f1fd0d672 update osmesa package to version 7.2.1
John W. Eaton <jwe@octave.org>
parents: 3929
diff changeset
7 $(PKG)_SUBDIR := mesa-$($(PKG)_VERSION)
7d6f1fd0d672 update osmesa package to version 7.2.1
John W. Eaton <jwe@octave.org>
parents: 3929
diff changeset
8 $(PKG)_FILE := mesa-$($(PKG)_VERSION).tar.xz
7d6f1fd0d672 update osmesa package to version 7.2.1
John W. Eaton <jwe@octave.org>
parents: 3929
diff changeset
9 $(PKG)_URL := ftp://ftp.freedesktop.org/pub/mesa/$($(PKG)_FILE)
4778
a50783d698b2 mesa.mk: Update to mesa 18.1.5 and build with llvm on Windows systems
John W. Eaton <jwe@octave.org>
parents: 4660
diff changeset
10 $(PKG)_DEPS := build-mako expat zlib llvm s2tc
4488
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
11 ifeq ($(MXE_WINDOWS_BUILD),yes)
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
12 ifeq ($(USE_SYSTEM_OPENGL),no)
4513
1fdd8063e38d mesa: windows: optionally build opengl target; build in release mode
John W. Eaton <jwe@octave.org>
parents: 4511
diff changeset
13 $(PKG)_SCONS_OPENGL_OPTIONS := libgl-gdi
4488
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
14 endif
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
15 else
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
16 ifeq ($(USE_SYSTEM_OPENGL),yes)
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
17 $(PKG)_CONFIGURE_OPENGL_OPTIONS := \
4500
102c3d608dd6 mesa: enable egl when building opengl.
John W. Eaton <jwe@octave.org>
parents: 4497
diff changeset
18 --disable-opengl --disable-egl --disable-gles1 --disable-gles2 \
4497
e7d902eeefda mesa: also disable gles1 and gles2 if opengl is disabled.
John W. Eaton <jwe@octave.org>
parents: 4488
diff changeset
19 --disable-dri --disable-glx \
4488
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
20 --with-gallium-drivers="" --with-dri-drivers="" \
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
21 --with-platforms=""
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
22 else
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
23 $(PKG)_CONFIGURE_OPENGL_OPTIONS := \
4500
102c3d608dd6 mesa: enable egl when building opengl.
John W. Eaton <jwe@octave.org>
parents: 4497
diff changeset
24 --enable-opengl --enable-egl --enable-gles1 --enable-gles2 \
4511
0117b5797a5c mesa: Depend on llvm for native opengl builds.
John W. Eaton <jwe@octave.org>
parents: 4507
diff changeset
25 --with-gallium-drivers="swrast" --with-dri-drivers="" \
4488
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
26 --with-platforms="x11"
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
27 ifeq ($(USE_SYSTEM_X11_LIBS),no)
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
28 $(PKG)_DEPS += dri2proto glproto libdrm libxshmfence x11 xdamage xext xfixes
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
29 endif
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
30 endif
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
31 endif
3785
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
32
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
33 define $(PKG)_UPDATE
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
34 echo 'Warning: Updates are temporarily disabled for package $(PKG).' >&2;
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
35 echo $($(PKG)_VERSION)
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
36 endef
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
37
3790
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
38 ifeq ($(MXE_WINDOWS_BUILD),yes)
3803
f2776007d295 osmesa: update for win64
John D
parents: 3790
diff changeset
39 ifeq ($(ENABLE_WINDOWS_64),yes)
f2776007d295 osmesa: update for win64
John D
parents: 3790
diff changeset
40 $(PKG)_MACHINE := x86_64
f2776007d295 osmesa: update for win64
John D
parents: 3790
diff changeset
41 else
f2776007d295 osmesa: update for win64
John D
parents: 3790
diff changeset
42 $(PKG)_MACHINE := x86
f2776007d295 osmesa: update for win64
John D
parents: 3790
diff changeset
43 endif
3790
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
44 define $(PKG)_BUILD
4778
a50783d698b2 mesa.mk: Update to mesa 18.1.5 and build with llvm on Windows systems
John W. Eaton <jwe@octave.org>
parents: 4660
diff changeset
45 cd '$(1)' && LLVM=$(HOST_PREFIX) scons platform=windows toolchain=crossmingw machine=$($(PKG)_MACHINE) verbose=1 build=release $($(PKG)_SCONS_OPENGL_OPTIONS)
3790
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
46
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
47 ## Do the scons config files have useful install targets?
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
48 $(INSTALL) -d '$(3)$(HOST_INCDIR)/GL';
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
49 for f in '$(1)/include/GL/*.h' ; do \
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
50 $(INSTALL) -m 644 $$f '$(3)$(HOST_INCDIR)/GL'; \
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
51 done
4513
1fdd8063e38d mesa: windows: optionally build opengl target; build in release mode
John W. Eaton <jwe@octave.org>
parents: 4511
diff changeset
52
1fdd8063e38d mesa: windows: optionally build opengl target; build in release mode
John W. Eaton <jwe@octave.org>
parents: 4511
diff changeset
53 if [ -f '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/libgl-gdi/opengl32.dll' ]; then \
4778
a50783d698b2 mesa.mk: Update to mesa 18.1.5 and build with llvm on Windows systems
John W. Eaton <jwe@octave.org>
parents: 4660
diff changeset
54 $(INSTALL) -d '$(3)$(HOST_BINDIR)'; \
4513
1fdd8063e38d mesa: windows: optionally build opengl target; build in release mode
John W. Eaton <jwe@octave.org>
parents: 4511
diff changeset
55 $(INSTALL) -m 755 '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/libgl-gdi/opengl32.dll' '$(3)$(HOST_BINDIR)/opengl32.dll'; \
1fdd8063e38d mesa: windows: optionally build opengl target; build in release mode
John W. Eaton <jwe@octave.org>
parents: 4511
diff changeset
56 fi
3790
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
57 endef
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
58 else
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
59 define $(PKG)_BUILD
3785
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
60 mkdir '$(1)/.build'
3825
b6f31861c73e osmesa:call autoreconf
John Donoghue
parents: 3803
diff changeset
61 cd '$(1)' && autoreconf -fi -I m4
3788
f6d63f2a2de6 allow osmesa to build; remove it from octave deps for Windows systems
John W. Eaton <jwe@octave.org>
parents: 3787
diff changeset
62 cd '$(1)/.build' && $($(PKG)_CONFIGURE_ENV) '$(1)/configure' \
3785
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
63 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
64 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
65 --prefix='$(HOST_PREFIX)' \
4488
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
66 $($(PKG)_CONFIGURE_OPENGL_OPTIONS) \
4778
a50783d698b2 mesa.mk: Update to mesa 18.1.5 and build with llvm on Windows systems
John W. Eaton <jwe@octave.org>
parents: 4660
diff changeset
67 --disable-osmesa \
4488
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
68 --disable-gbm \
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
69 --disable-xvmc \
8f9bee27223f optionally build mesa OpenGL library
John W. Eaton <jwe@octave.org>
parents: 4481
diff changeset
70 --enable-texture-float \
3785
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
71 && $(CONFIGURE_POST_HOOK)
3787
282bc5054a7f (incompletely) attempt to make osmesa actually build for Windows
John W. Eaton <jwe@octave.org>
parents: 3785
diff changeset
72
282bc5054a7f (incompletely) attempt to make osmesa actually build for Windows
John W. Eaton <jwe@octave.org>
parents: 3785
diff changeset
73 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' install DESTDIR='$(3)'
3790
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
74 endef
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
75 endif