|
1 # |
|
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 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
|
22 # |
|
23 |
|
24 export PARFAIT_BUILD=no |
|
25 |
|
26 include ../../make-rules/shared-macros.mk |
|
27 |
|
28 COMPONENT_NAME = mysql |
|
29 COMPONENT_VERSION = 5.6.21 |
|
30 COMPONENT_SRC = $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
31 COMPONENT_ARCHIVE = $(COMPONENT_SRC).tar.gz |
|
32 COMPONENT_ARCHIVE_HASH= \ |
|
33 sha256:ea4daf6a8f4b1a9c62e416249a08fbdcbf686667d738004ef82044def96feb7c |
|
34 COMPONENT_ARCHIVE_URL = http://downloads.mysql.com/archives/mysql-5.6/$(COMPONENT_ARCHIVE) |
|
35 COMPONENT_PROJECT_URL = http://dev.mysql.com/ |
|
36 COMPONENT_BUGDB = database/mysql |
|
37 COMPILER = gcc |
|
38 |
|
39 include $(WS_MAKE_RULES)/prep.mk |
|
40 include $(WS_MAKE_RULES)/justmake.mk |
|
41 include $(WS_MAKE_RULES)/ips.mk |
|
42 |
|
43 # Enable ASLR for this component |
|
44 ASLR_MODE = $(ASLR_ENABLE) |
|
45 |
|
46 # This component uses cmake to generate Makefiles and thus does not |
|
47 # run any configure script |
|
48 CMAKE = /usr/bin/cmake |
|
49 CMAKE_PREFIX = /usr/mysql/5.6 |
|
50 CONFDIR = /etc/mysql/5.6 |
|
51 DATA_PREFIX = /var/mysql/5.6 |
|
52 |
|
53 CMAKE_BINDIR.32 = bin/$(MACH32) |
|
54 CMAKE_BINDIR.64 = bin |
|
55 CMAKE_LIBDIR.32 = lib |
|
56 CMAKE_LIBDIR.64 = lib/$(MACH64) |
|
57 CMAKE_PLUGINDIR.32 = lib/plugin |
|
58 CMAKE_PLUGINDIR.64 = lib/$(MACH64)/plugin |
|
59 CMAKE_CFLAGS.64 = -m64 |
|
60 CMAKE_CXXFLAGS.64 = -m64 |
|
61 |
|
62 # Providing component specific build options to cmake |
|
63 CMAKE_OPTIONS += -DBUILD_CONFIG=mysql_release |
|
64 CMAKE_OPTIONS += -DINSTALL_LAYOUT=STANDALONE |
|
65 CMAKE_OPTIONS += -DCMAKE_INSTALL_PREFIX=$(CMAKE_PREFIX) |
|
66 CMAKE_OPTIONS += -DINSTALL_BINDIR=$(CMAKE_BINDIR.$(BITS)) |
|
67 CMAKE_OPTIONS += -DINSTALL_SBINDIR=$(CMAKE_BINDIR.$(BITS)) |
|
68 CMAKE_OPTIONS += -DINSTALL_SCRIPTDIR=$(CMAKE_BINDIR.$(BITS)) |
|
69 CMAKE_OPTIONS += -DINSTALL_LIBDIR=$(CMAKE_LIBDIR.$(BITS)) |
|
70 CMAKE_OPTIONS += -DINSTALL_PLUGINDIR=$(CMAKE_PLUGINDIR.$(BITS)) |
|
71 CMAKE_OPTIONS += -DSYSCONFDIR=$(CONFDIR) |
|
72 CMAKE_OPTIONS += -DMYSQL_DATADIR=$(DATA_PREFIX) |
|
73 CMAKE_OPTIONS += -DWITH_SSL=bundled |
|
74 CMAKE_OPTIONS += -DWITH_READLINE=ON |
|
75 CMAKE_OPTIONS += -DENABLE_DTRACE=1 |
|
76 CMAKE_OPTIONS += -DHAVE_REAL_DTRACE_INSTRUMENTING=ON |
|
77 CMAKE_OPTIONS += -DWITH_EXTRA_CHARSETS=complex |
|
78 CMAKE_OPTIONS += -DENABLED_LOCAL_INFILE=ON |
|
79 CMAKE_OPTIONS += -DWITH_ARCHIVE_STORAGE_ENGINE=1 |
|
80 CMAKE_OPTIONS += -DWITH_BLACKHOLE_STORAGE_ENGINE=1 |
|
81 CMAKE_OPTIONS += -DWITH_EXAMPLE_STORAGE_ENGINE=1 |
|
82 CMAKE_OPTIONS += -DWITH_FEDERATED_STORAGE_ENGINE=1 |
|
83 CMAKE_OPTIONS += -DWITH_INNOBASE_STORAGE_ENGINE=1 |
|
84 CMAKE_OPTIONS += -DCMAKE_CXX_COMPILER=$(CXX) |
|
85 CMAKE_OPTIONS += -DCMAKE_C_COMPILER=$(CC) |
|
86 CMAKE_OPTIONS += -DCMAKE_C_FLAGS=$(CMAKE_CFLAGS.$(BITS)) |
|
87 CMAKE_OPTIONS += -DCMAKE_CXX_FLAGS=$(CMAKE_CXXFLAGS.$(BITS)) |
|
88 CMAKE_OPTIONS += '-DCOMPILATION_COMMENT=MySQL Community Server (GPL)' |
|
89 CMAKE_OPTIONS += -DFEATURE_SET=community |
|
90 |
|
91 COMPONENT_PRE_BUILD_ACTION += cd $(@D); |
|
92 COMPONENT_PRE_BUILD_ACTION += export LDFLAGS=$(CMAKE_CXXFLAGS.$(BITS)); |
|
93 COMPONENT_PRE_BUILD_ACTION += echo Running cmake with $(CMAKE_OPTIONS); |
|
94 COMPONENT_PRE_BUILD_ACTION += $(CMAKE) . $(CMAKE_OPTIONS); |
|
95 |
|
96 build: $(BUILD_32_and_64) |
|
97 |
|
98 install: $(INSTALL_32_and_64) |
|
99 |
|
100 test: $(NO_TESTS) |
|
101 |
|
102 REQUIRED_PACKAGES += developer/build/cmake |
|
103 REQUIRED_PACKAGES += library/security/openssl |
|
104 REQUIRED_PACKAGES += runtime/perl-512 |
|
105 REQUIRED_PACKAGES += runtime/perl-516 |
|
106 REQUIRED_PACKAGES += shell/ksh93 |
|
107 REQUIRED_PACKAGES += system/core-os |
|
108 REQUIRED_PACKAGES += system/library |
|
109 REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime |
|
110 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime |
|
111 REQUIRED_PACKAGES += system/library/math |
|
112 REQUIRED_PACKAGES += system/network |