Aurelien Larcher
2018-05-22 f5010fe9316920bd94de91639b3b87ffe72ffe4b
commit | author | age
3cad62 1 #
AC 2 # CDDL HEADER START
3 #
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
7 #
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20
21 #
485742 22 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
e8579e 23 # Copyright 2015 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
567766 24 # Copyright 2016 Andreas Wacknitz <a.wacknitz@gmx.de>
3cad62 25 #
7999b2 26
MS 27 # parfait seems to hang on libcmsysTestDynload.so.bc, so for
28 # now we have to disable it.
29 PARFAIT_BUILD=no
3cad62 30
9d45d0 31 include ../../../make-rules/shared-macros.mk
3cad62 32
AC 33 COMPONENT_NAME=        cmake
fce66d 34 COMPONENT_VERSION=    3.9.6
db7b47 35 COMPONENT_MAJOR_VERSION=    3.9
485742 36 COMPONENT_FMRI=    developer/build/cmake
567766 37 COMPONENT_LICENSE=    BSD, MIT, GPLv2, Curl, PD
AW 38 COMPONENT_LICENSE_FILE= cmake.license
39 COMPONENT_CLASSIFICATION=Development/Distribution Tools
40 COMPONENT_SUMMARY=A cross-platform, open-source make system
485742 41 COMPONENT_DESCRIPTION= \
AL 42 CMake is a family of tools designed to build, test and package software. \
43 It is used to control the software compilation process using simple platform \
44 and compiler-independent configuration files. \
45 CMake generates native makefiles and workspaces that can be used in the \
33f4ef 46 workspaces that can be used in the compiler environment of your choice.
3cad62 47 COMPONENT_SRC=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
AC 48 COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
35e110 49 COMPONENT_ARCHIVE_HASH=    \
fce66d 50   sha256:7410851a783a41b521214ad987bb534a7e4a65e059651a2514e6ebfc8f46b218
485742 51 COMPONENT_ARCHIVE_URL= \
AL 52   https://www.cmake.org/files/v$(COMPONENT_MAJOR_VERSION)/$(COMPONENT_ARCHIVE)
53 COMPONENT_PROJECT_URL=  https://www.cmake.org/
3cad62 54
567766 55 include $(WS_MAKE_RULES)/prep.mk
AW 56 include $(WS_MAKE_RULES)/configure.mk
57 include $(WS_MAKE_RULES)/ips.mk
3cad62 58
AC 59 # Need to remove this option from LD_OPTIONS (only affects sparc build);
60 # it causes a SegFault failure in kwsys/testSystemInformation
61 # when testing on sparc
62 LD_MAP_NOEXBSS=
63
64 LDFLAGS +=    $($(COMPILER)_NORUNPATH)
65
9d45d0 66 CONFIGURE_ENV +=    MAKE="$(GMAKE)"
3cad62 67
485742 68 # Remove undesriable /opt/csw lines from the Modules/*.cmake files.
AL 69 COMPONENT_PREP_ACTION += \
70     cd $(COMPONENT_SRC)/Modules; $(GNU_GREP) -l '/opt/csw' *.cmake | \
71     /usr/bin/xargs -I \{\} $(GSED) -i -e '/^[ ]*\/opt\/csw/d' \{\}
72
73 # Remove files polluting the generated manifest
74 COMPONENT_PRE_INSTALL_ACTION = \
75     $(FIND) $(SOURCE_DIR) -name '*.~1~' -exec $(RM) {} \;
76
e8579e 77 CONFIGURE_OPTIONS  =    --prefix=$(CONFIGURE_PREFIX)
485742 78 CONFIGURE_OPTIONS +=    --datadir=/share/cmake-$(COMPONENT_MAJOR_VERSION)
AL 79 CONFIGURE_OPTIONS +=    --docdir=/share/doc/cmake-$(COMPONENT_MAJOR_VERSION)
e8579e 80 CONFIGURE_OPTIONS +=     --mandir=/share/man
J'S 81
5b42e7 82 # Use system-installed third-party libraries, rather than the private
485742 83 # copies in the cmake source.
5b42e7 84 CONFIGURE_OPTIONS +=    --system-curl
AC 85 CONFIGURE_OPTIONS +=    --system-expat
86 CONFIGURE_OPTIONS +=    --system-zlib
87 CONFIGURE_OPTIONS +=    --system-bzip2
485742 88 CONFIGURE_OPTIONS +=    --system-libarchive
AL 89 CONFIGURE_OPTIONS +=     --system-liblzma
3cad62 90
9d45d0 91 COMPONENT_BUILD_ENV +=    CC="$(CC)"
AS 92 COMPONENT_BUILD_ENV +=    CXX="$(CXX)"
93 COMPONENT_BUILD_ENV +=    LDFLAGS="$(LDFLAGS)"
94 COMPONENT_BUILD_ENV +=    MAKE="$(GMAKE)"
3cad62 95 COMPONENT_BUILD_TARGETS =    all
5b42e7 96
485742 97 # Pass cmake "major" version number to the publish phase to hopefully reduce
AL 98 # the amount of change needed between each update.
99 PKG_MACROS+= CMAKE_MAJOR_VERSION=$(COMPONENT_MAJOR_VERSION)
100
1d52aa 101 ASLR_MODE = $(ASLR_ENABLE)
AC 102
5b42e7 103 # Need C and C++ compiler locations for cmake tests
485742 104 COMPONENT_TEST_ENV += LANG=C
5b42e7 105 COMPONENT_TEST_ENV += CC="$(CC)"
AC 106 COMPONENT_TEST_ENV += CXX="$(CXX)"
485742 107 COMPONENT_TEST_ENV += CFLAGS="$(CFLAGS)"
AL 108 COMPONENT_TEST_ENV += CXXFLAGS="$(CXXFLAGS)"
109 COMPONENT_TEST_ENV += LDFLAGS="$(LDFLAGS)"
110
111 # Results output is different on Intel vs. SPARC.
112 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
3cad62 113
AC 114 COMPONENT_TEST_TARGETS =    test
115
485742 116 COMPONENT_TEST_TRANSFORMS += \
AL 117     '-e "s/\s\s*[0-9][0-9]*\.[0-9][0-9]* sec/ SEC sec/"' \
118     '-e "s/\][0-9][0-9]*\.[0-9][0-9]* sec/\]SEC sec/"' \
119     '-e "/bin/ctest/d"' \
120     '-e "/Test project/d"' \
121     '-e "/^[mM]ake/d"' \
122     '-e "s|^make.*: Leaving directory.*$$|XXX_REMOVE_XXX|g" ' \
123     '-e "s|^make.*: Entering directory.*$$|XXX_REMOVE_XXX|g" ' \
124     '-e "/^XXX_REMOVE_XXX$$/d" '
3cad62 125
485742 126 # common targets
3cad62 127 build:        $(BUILD_32)
AC 128
129 install:    $(INSTALL_32)
130
131 test:        $(TEST_32)
132
485742 133 # Auto-generated dependencies
567766 134 REQUIRED_PACKAGES += library/expat
AW 135 REQUIRED_PACKAGES += library/libarchive
136 REQUIRED_PACKAGES += library/ncurses
137 REQUIRED_PACKAGES += library/zlib
138 REQUIRED_PACKAGES += system/library
f5010f 139 REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
969846 140 REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
567766 141 REQUIRED_PACKAGES += system/library/math
AW 142 REQUIRED_PACKAGES += web/curl