Mercurial > mxe-octave
comparison src/mesa.mk @ 4488:8f9bee27223f
optionally build mesa OpenGL library
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 05 Oct 2017 10:44:53 -0400 |
parents | src/osmesa.mk@7d6f1fd0d672 |
children | e7d902eeefda |
comparison
equal
deleted
inserted
replaced
4487:7b73612f57b9 | 4488:8f9bee27223f |
---|---|
1 # This file is part of MXE Octave. | |
2 # See index.html for further information. | |
3 | |
4 PKG := mesa | |
5 $(PKG)_VERSION := 17.2.1 | |
6 $(PKG)_CHECKSUM := 7429e74a0ef12ea9d60b41b2b852898b3da0b238 | |
7 $(PKG)_SUBDIR := mesa-$($(PKG)_VERSION) | |
8 $(PKG)_FILE := mesa-$($(PKG)_VERSION).tar.xz | |
9 $(PKG)_URL := ftp://ftp.freedesktop.org/pub/mesa/$($(PKG)_FILE) | |
10 $(PKG)_DEPS := build-mako zlib | |
11 ifeq ($(MXE_WINDOWS_BUILD),yes) | |
12 ifeq ($(USE_SYSTEM_OPENGL),no) | |
13 $(PKG)_CONFIGURE_OPENGL_OPTIONS := libgl-gdi | |
14 endif | |
15 else | |
16 ifeq ($(USE_SYSTEM_OPENGL),yes) | |
17 $(PKG)_CONFIGURE_OPENGL_OPTIONS := \ | |
18 --disable-opengl --disable-dri --disable-glx \ | |
19 --with-gallium-drivers="" --with-dri-drivers="" \ | |
20 --with-platforms="" | |
21 else | |
22 $(PKG)_CONFIGURE_OPENGL_OPTIONS := \ | |
23 --enable-opengl --enable-dri --enable-glx="dri" \ | |
24 --with-gallium-drivers="" --with-dri-drivers="swrast" \ | |
25 --with-platforms="x11" | |
26 ifeq ($(USE_SYSTEM_X11_LIBS),no) | |
27 $(PKG)_DEPS += dri2proto glproto libdrm libxshmfence x11 xdamage xext xfixes | |
28 endif | |
29 endif | |
30 endif | |
31 | |
32 define $(PKG)_UPDATE | |
33 echo 'Warning: Updates are temporarily disabled for package $(PKG).' >&2; | |
34 echo $($(PKG)_VERSION) | |
35 endef | |
36 | |
37 ifeq ($(MXE_WINDOWS_BUILD),yes) | |
38 ifeq ($(ENABLE_WINDOWS_64),yes) | |
39 $(PKG)_MACHINE := x86_64 | |
40 else | |
41 $(PKG)_MACHINE := x86 | |
42 endif | |
43 define $(PKG)_BUILD | |
44 cd '$(1)' && scons platform=windows toolchain=crossmingw machine=$($(PKG)_MACHINE) verbose=1 osmesa $($(PKG)_CONFIGURE_OPENGL_OPTIONS) | |
45 | |
46 ## Do the scons config files have useful install targets? | |
47 $(INSTALL) -d '$(3)$(HOST_INCDIR)/GL'; | |
48 for f in '$(1)/include/GL/*.h' ; do \ | |
49 $(INSTALL) -m 644 $$f '$(3)$(HOST_INCDIR)/GL'; \ | |
50 done | |
51 $(INSTALL) -d '$(3)$(HOST_BINDIR)'; | |
52 $(INSTALL) -m 755 '$(1)/build/windows-$($(PKG)_MACHINE)-debug/mesa/drivers/osmesa/osmesa.dll' '$(3)$(HOST_BINDIR)/osmesa.dll'; | |
53 $(INSTALL) -d '$(3)$(HOST_LIBDIR)'; | |
54 $(INSTALL) -m 644 '$(1)/build/windows-$($(PKG)_MACHINE)-debug/mesa/drivers/osmesa/libosmesa.a' '$(3)$(HOST_LIBDIR)/libOSMesa.a'; | |
55 endef | |
56 else | |
57 define $(PKG)_BUILD | |
58 mkdir '$(1)/.build' | |
59 cd '$(1)' && autoreconf -fi -I m4 | |
60 cd '$(1)/.build' && $($(PKG)_CONFIGURE_ENV) '$(1)/configure' \ | |
61 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \ | |
62 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ | |
63 --prefix='$(HOST_PREFIX)' \ | |
64 $($(PKG)_CONFIGURE_OPENGL_OPTIONS) \ | |
65 --enable-osmesa \ | |
66 --disable-gbm \ | |
67 --disable-egl \ | |
68 --disable-xvmc \ | |
69 --disable-llvm \ | |
70 --enable-texture-float \ | |
71 && $(CONFIGURE_POST_HOOK) | |
72 | |
73 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' install DESTDIR='$(3)' | |
74 endef | |
75 endif |