Aurelien Larcher
2018-01-20 2136604c82fa97645ec6488d4a395fdaebb7eba4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
 
#
# Copyright 2015 Alexander Pyhalov
# Copyright 2015 Ken Mays
#
 
include ../../../make-rules/shared-macros.mk
 
COMPONENT_NAME= mesa
COMPONENT_VERSION= 13.0.6
COMPONENT_REVISION= 4
COMPONENT_SUMMARY= The Mesa 3-D Graphics Library
COMPONENT_SRC= mesa-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= mesa-$(COMPONENT_VERSION).tar.xz
COMPONENT_ARCHIVE_HASH= \
  sha256:29ef104a7fc082d352b1599bd6cb1d040be424ccd22f5e0eb7ee9b0e9acd3597
COMPONENT_ARCHIVE_URL= \
  https://mesa.freedesktop.org/archive/older-versions/13.x/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
COMPONENT_PROJECT_URL = http://www.mesa3d.org/
 
include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/configure.mk
include $(WS_MAKE_RULES)/ips.mk
 
PATCH_LEVEL=0
 
ARCHLIBSUBDIR.64=/$(MACH64)
ARCHLIBSUBDIR=$(ARCHLIBSUBDIR.$(BITS))
 
SERVERMOD_SUBDIR.64=/$(MACH64)
SERVERMOD_SUBDIR=$(SERVERMOD_SUBDIR.$(BITS))
X11_SERVERMODS_DIR=/usr/lib/xorg/modules
X11_SERVERLIBS_DIR=/usr/lib/xorg
 
COMPONENT_POST_UNPACK_ACTION +=  ( cp -r $(COMPONENT_DIR)/srcs/* $(SOURCE_DIR) )
COMPONENT_PREP_ACTION += ( cd $(SOURCE_DIR) && \
                           libtoolize --copy --force && \
                           aclocal -I m4 && \
                           automake -c -f -a && \
                           autoconf)
 
CONFIGURE_SCRIPT = $(@D)/configure
 
 
# Missing files in build dir for configure without this.
COMPONENT_PRE_CONFIGURE_ACTION =        (cp -a $(SOURCE_DIR)/* $(@D) )
 
# Add include paths and linker paths needed for DRM modules
CPPFLAGS = -I/usr/X11/include/drm -D__EXTENSIONS__
 
LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
                -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) 
 
LD_OPTIONS += -M $(COMPONENT_DIR)/mapfile.externs
 
DRI_DRIVER_LIST=i915 i965 r200 radeon swrast
 
# Command line options to GNU autoconf configure script
CONFIGURE_OPTIONS += --disable-dri3
CONFIGURE_OPTIONS += --with-dri-driverdir='$(X11_SERVERMODS_DIR)/dri$(SERVERMOD_SUBDIR)'
CONFIGURE_OPTIONS += --with-dri-drivers='$(DRI_DRIVER_LIST)'
CONFIGURE_OPTIONS += --disable-gallium-llvm
CONFIGURE_OPTIONS += --enable-egl
CONFIGURE_OPTIONS += --enable-gbm
CONFIGURE_OPTIONS += --with-gallium-drivers=
CONFIGURE_OPTIONS += --enable-shared-glapi
CONFIGURE_OPTIONS += --enable-texture-float
CONFIGURE_OPTIONS += --enable-osmesa
CONFIGURE_OPTIONS += --with-sha1=libcrypto
CONFIGURE_OPTIONS += --disable-glx-tls
CONFIGURE_OPTIONS += --disable-shader-cache
CONFIGURE_OPTIONS += --sysconfdir=/etc
 
CONFIGURE_ENV+=PYTHON=$(PYTHON)
CONFIGURE_ENV+=CPPFLAGS="$(CPPFLAGS)"
 
COMPONENT_BUILD_ARGS =
 
build: $(BUILD_32_and_64)
 
install: $(INSTALL_32_and_64)
 
# Build dependencies
REQUIRED_PACKAGES += x11/header/dri2proto
REQUIRED_PACKAGES += x11/header/dri3proto
REQUIRED_PACKAGES += x11/header/glproto
REQUIRED_PACKAGES += x11/header/presentproto
REQUIRED_PACKAGES += x11/library/libpthread-stubs
REQUIRED_PACKAGES += system/header/header-drm
 
# Auto-generated dependencies
REQUIRED_PACKAGES += library/expat
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/g++-4-runtime
REQUIRED_PACKAGES += system/library/gcc-6-runtime
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += x11/library/glu
REQUIRED_PACKAGES += x11/library/libdrm
REQUIRED_PACKAGES += x11/library/libx11
REQUIRED_PACKAGES += x11/library/libxcb
REQUIRED_PACKAGES += x11/library/libxdamage
REQUIRED_PACKAGES += x11/library/libxext
REQUIRED_PACKAGES += x11/library/libxfixes
REQUIRED_PACKAGES += x11/library/libxxf86vm