annotate src/osmesa.mk @ 3790:a169ad26bac2

use scons to build osmesa on windows systems
author John W. Eaton <jwe@octave.org>
date Sun, 15 Feb 2015 13:33:36 -0500
parents f6d63f2a2de6
children f2776007d295
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
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
4 PKG := osmesa
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
5 $(PKG)_VERSION := 10.2.2
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
6 $(PKG)_CHECKSUM := 2cc7c5b80fd2ddbf540acf47dbaec68e8cab16a4
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
7 $(PKG)_SUBDIR := Mesa-$($(PKG)_VERSION)
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
8 $(PKG)_FILE := MesaLib-$($(PKG)_VERSION).tar.bz2
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
9 $(PKG)_URL := ftp://ftp.freedesktop.org/pub/mesa/current/$($(PKG)_FILE)
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
10 $(PKG)_DEPS :=
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
11
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
12 define $(PKG)_UPDATE
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
13 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
14 echo $($(PKG)_VERSION)
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
15 endef
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
16
3790
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
17 ifeq ($(MXE_WINDOWS_BUILD),yes)
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
18 define $(PKG)_BUILD
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
19 ## FIXME: is machine=x86 the correct thing for 64-bit Windows builds?
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
20 cd '$(1)' && scons platform=windows toolchain=crossmingw machine=x86 verbose=1 osmesa
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
21
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
22 ## 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
23 $(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
24 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
25 $(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
26 done
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
27 $(INSTALL) -d '$(3)$(HOST_BINDIR)';
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
28 $(INSTALL) -m 755 '$(1)/build/windows-x86-debug/mesa/drivers/osmesa/osmesa.dll' '$(3)$(HOST_BINDIR)/osmesa.dll';
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
29 $(INSTALL) -d '$(3)$(HOST_LIBDIR)';
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
30 $(INSTALL) -m 644 '$(1)/build/windows-x86-debug/mesa/drivers/osmesa/libosmesa.a' '$(3)$(HOST_LIBDIR)/libOSMesa.a';
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
31 endef
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
32 else
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
33 define $(PKG)_BUILD
3785
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
34 mkdir '$(1)/.build'
3788
f6d63f2a2de6 allow osmesa to build; remove it from octave deps for Windows systems
John W. Eaton <jwe@octave.org>
parents: 3787
diff changeset
35 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
36 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
37 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
38 --prefix='$(HOST_PREFIX)' \
3790
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
39 --enable-osmesa --disable-dri --disable-egl --disable-xvmc \
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
40 --disable-glx --disable-shared-glapi --disable-gallium-llvm \
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
41 --with-gallium-drivers="" --with-dri-drivers="" \
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
42 --with-egl-platforms="" --enable-texture-float \
3785
e1e69acf0bb2 osmesa: added for offscreen rendering with OpenGL toolkits
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
43 && $(CONFIGURE_POST_HOOK)
3787
282bc5054a7f (incompletely) attempt to make osmesa actually build for Windows
John W. Eaton <jwe@octave.org>
parents: 3785
diff changeset
44
282bc5054a7f (incompletely) attempt to make osmesa actually build for Windows
John W. Eaton <jwe@octave.org>
parents: 3785
diff changeset
45 $(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
46 endef
a169ad26bac2 use scons to build osmesa on windows systems
John W. Eaton <jwe@octave.org>
parents: 3788
diff changeset
47 endif