2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2016 Aurelien Larcher. All rights reserved.
16 include ..
/..
/..
/make-rules
/shared-macros.mk
18 COMPONENT_NAME
= clang-40
22 COMPONENT_VERSION
= 4.0.1
23 COMPONENT_MAJOR_VERSION
= \
24 $(shell echo
$(COMPONENT_VERSION
) | sed
-e
's/\([0-9]\{1,\}\.[0-9]\{1,\}\).*/\1/')
25 COMPONENT_PROJECT_URL
= http
://llvm.org
/
26 COMPONENT_FMRI
= developer
/clang-40
27 COMPONENT_CLASSIFICATION
= Development
/C
28 COMPONENT_SUMMARY
= LLVM tools and Clang compiler
29 COMPONENT_SRC
= $(LLVM_NAME
)-$(COMPONENT_VERSION
).src
30 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.xz
31 COMPONENT_ARCHIVE_HASH
= \
32 sha256
:da783db1f82d516791179fe103c71706046561f7972b18f0049242dee6712b51
33 COMPONENT_ARCHIVE_URL
= \
34 http
://llvm.org
/releases
/$(COMPONENT_VERSION
)/$(COMPONENT_ARCHIVE
)
35 COMPONENT_LICENSE
= BSD
37 COMPONENT_ARCHIVE_1
= $(CLANG_NAME
)-$(COMPONENT_VERSION
).src.
tar.xz
38 COMPONENT_ARCHIVE_HASH_1
= \
39 sha256
:61738a735852c23c3bdbe52d035488cdb2083013f384d67c1ba36fabebd8769b
40 COMPONENT_ARCHIVE_URL_1
= http
://llvm.org
/releases
/$(COMPONENT_VERSION
)/$(COMPONENT_ARCHIVE_1
)
42 COMPONENT_BUILD_GMAKE_ARGS
= -j4
44 include $(WS_MAKE_RULES
)/prep.mk
45 include $(WS_MAKE_RULES
)/cmake.mk
46 include $(WS_MAKE_RULES
)/ips.mk
47 -include .local-
$(HOSTNAME
).mk
49 CMAKE_PREFIX
= /usr
/clang
/$(COMPONENT_MAJOR_VERSION
)
51 COMPONENT_POST_UNPACK_ACTION
+= \
52 $(UNPACK
) $(USERLAND_ARCHIVES
)$(COMPONENT_ARCHIVE_1
) && \
53 mv
$(CLANG_NAME
)-$(COMPONENT_VERSION
).src
$(COMPONENT_SRC
)/tools
/clang
55 COMPONENT_PRE_CONFIGURE_ACTION
= (cp
-a
$(SOURCE_DIR
)/* $(@D
))
57 COMPONENT_POST_INSTALL_ACTION
= \
58 for file in
`echo $(PROTO_DIR)/$(CMAKE_PREFIX)/bin/*`; do \
59 elfedit
-e
'dyn:runpath $(GCC_ROOT)/lib:$$ORIGIN/../lib' $$file ; \
62 `ggrep -rlh '^\#!*/usr/bin/env python' $(PROTO_DIR)/$(CMAKE_PREFIX)`; do \
63 sed
-i
-e
's,^\#!*/usr/bin/env python,\#!$(PYTHON),' $$file; \
66 COMPONENT_TEST_TARGETS
= check-all
67 COMPONENT_TEST_ENV
+= PATH
=/usr
/gnu
/bin
:/usr
/bin
69 CMAKE_OPTIONS
+= -DCMAKE_C_COMPILER
=$(CC
)
70 CMAKE_OPTIONS
+= -DCMAKE_CXX_COMPILER
=$(CXX
)
71 CMAKE_OPTIONS
+= -DGCC_INSTALL_PREFIX
=$(GCC_ROOT
)
72 CMAKE_OPTIONS
+= -DCMAKE_CXX_LINK_FLAGS
="-L$(GCC_ROOT)/lib -Wl,-rpath,$(GCC_ROOT)/lib"
73 CMAKE_OPTIONS
+= -DLLVM_ENABLE_ASSERTIONS
=ON
74 CMAKE_OPTIONS
+= -DCMAKE_BUILD_TYPE
="Release"
79 install: $(INSTALL_32
)
83 # Auto-generated dependencies
84 REQUIRED_PACKAGES
+= library
/libxml2
85 REQUIRED_PACKAGES
+= library
/zlib
86 REQUIRED_PACKAGES
+= runtime
/python-27
87 REQUIRED_PACKAGES
+= system
/library
88 REQUIRED_PACKAGES
+= system
/library
/g
++-6-runtime
89 REQUIRED_PACKAGES
+= system
/library
/gcc-6-runtime
90 REQUIRED_PACKAGES
+= system
/library
/math