|
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) 2016, Oracle and/or its affiliates. All rights reserved. |
|
22 # |
|
23 |
|
24 # MySQL 5.7 is compiled using GCC. Note that the MySQL Server 5.7 for |
|
25 # Solaris dowloaded from http://dev.mysql.com/downloads/mysql/ is a |
|
26 # hybrid, the server part is compiled using GCC and the client library |
|
27 # is compiled using SunStudio and the "stlport4" C++ runtime |
|
28 # library. In this build both server and client is compiled using GCC. |
|
29 COMPILER = gcc |
|
30 |
|
31 BUILD_BITS= 64 |
|
32 export PARFAIT_BUILD=no |
|
33 include ../../make-rules/shared-macros.mk |
|
34 |
|
35 COMPONENT_NAME = mysql |
|
36 COMPONENT_VERSION = 5.7.11 |
|
37 COMPONENT_SRC = $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
38 COMPONENT_ARCHIVE = $(COMPONENT_NAME)-boost-$(COMPONENT_VERSION).tar.gz |
|
39 COMPONENT_ARCHIVE_HASH= \ |
|
40 sha256:ab21347ba004a5aa349b911d829a14e79b1e36e4bcd007d39d75212071414e28 |
|
41 COMPONENT_ARCHIVE_URL = http://cdn.mysql.com/Downloads/MySQL-5.7/$(COMPONENT_ARCHIVE) |
|
42 COMPONENT_PROJECT_URL = http://dev.mysql.com/ |
|
43 COMPONENT_BUGDB = database/mysql |
|
44 |
|
45 #We use cp(1) instead of cloney because we use TAR to copy files and the TAR |
|
46 #used doesn't handle long links |
|
47 CLONEY=echo |
|
48 COMPONENT_PRE_BUILD_ACTION = $(CP) -r $(SOURCE_DIR)/* $(@D); |
|
49 |
|
50 BUILD_STYLE= cmake |
|
51 TEST_TARGET= $(NO_TESTS) |
|
52 SYSTEM_TEST_TARGET= $(NO_TESTS) |
|
53 include $(WS_MAKE_RULES)/common.mk |
|
54 |
|
55 # MySQL being one of Oracle's own product doesn't require to have a TPNO |
|
56 # License number, but it uses Boost, which does have such a requirement. |
|
57 TPNO=24164 |
|
58 |
|
59 # This component uses cmake to generate Makefiles and thus does not |
|
60 # run any configure script |
|
61 CMAKE = $(shell which cmake) |
|
62 CMAKE_PREFIX = $(USRDIR)/mysql/5.7 |
|
63 CONFDIR = $(ETCDIR)/mysql/5.7 |
|
64 DATA_PREFIX = $(VARDIR)/mysql/5.7 |
|
65 |
|
66 # The install layout differs from "INSTALL_LAYOUT=STANDALONE" in that |
|
67 # we put scripts into the "bin" directory and the "lib" directory has |
|
68 # an architecture subdirectory. We also use a simplified CFLAGS/CXXFLAGS |
|
69 # setting and let the MySQL CMake setup add the other flags. |
|
70 # For "lib", 64-bit uses subdir but 32-bit does not |
|
71 CMAKE_BINDIR.64 = bin |
|
72 CMAKE_LIBDIR.64 = lib/$(MACH64) |
|
73 CMAKE_PLUGINDIR.64 = lib/$(MACH64)/plugin |
|
74 |
|
75 # Providing component specific build options to cmake |
|
76 CMAKE_OPTIONS += -DBUILD_CONFIG=mysql_release |
|
77 CMAKE_OPTIONS += -DINSTALL_LAYOUT=STANDALONE |
|
78 CMAKE_OPTIONS += -DCMAKE_INSTALL_PREFIX=$(CMAKE_PREFIX) |
|
79 CMAKE_OPTIONS += -DINSTALL_BINDIR=$(CMAKE_BINDIR.$(BITS)) |
|
80 CMAKE_OPTIONS += -DINSTALL_SBINDIR=$(CMAKE_BINDIR.$(BITS)) |
|
81 CMAKE_OPTIONS += -DINSTALL_SCRIPTDIR=$(CMAKE_BINDIR.$(BITS)) |
|
82 CMAKE_OPTIONS += -DINSTALL_LIBDIR=$(CMAKE_LIBDIR.$(BITS)) |
|
83 CMAKE_OPTIONS += -DINSTALL_PLUGINDIR=$(CMAKE_PLUGINDIR.$(BITS)) |
|
84 CMAKE_OPTIONS += -DSYSCONFDIR=$(CONFDIR) |
|
85 CMAKE_OPTIONS += -DMYSQL_DATADIR=$(DATA_PREFIX) |
|
86 CMAKE_OPTIONS += -DENABLED_LOCAL_INFILE=ON |
|
87 CMAKE_OPTIONS += -DCMAKE_CXX_COMPILER=$(CXX) |
|
88 CMAKE_OPTIONS += -DCMAKE_C_COMPILER=$(CC) |
|
89 |
|
90 CMAKE_OPTIONS += '-DCOMPILATION_COMMENT=MySQL Community Server (GPL)' |
|
91 CMAKE_OPTIONS += -DFEATURE_SET=community |
|
92 |
|
93 CMAKE_OPTIONS += -DWITH_SSL=bundled |
|
94 CMAKE_OPTIONS += -DENABLE_DTRACE=1 |
|
95 CMAKE_OPTIONS += -DWITH_INNODB_MEMCACHED=1 |
|
96 CMAKE_OPTIONS += -DWITH_BOOST=boost |
|
97 CMAKE_OPTIONS += -DWITH_EMBEDDED_SERVER=1 |
|
98 CMAKE_OPTIONS += -DWITH_EMBEDDED_SHARED_LIBRARY=1 |
|
99 CMAKE_OPTIONS += -DDISABLE_STATIC=ON |
|
100 CMAKE_OPTIONS += -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE |
|
101 |
|
102 verify-p5m: |
|
103 $(MAKE) $(MAKEFLAGS) sample-manifest METADATA_TEMPLATE= |
|
104 # For easier parsing, remove backslash+newline |
|
105 perl -pe 's,\\\n,,' $(BUILD_DIR)/manifest-$(MACH)-generated.p5m \ |
|
106 > $(BUILD_DIR)/manifest-generated.p5m |
|
107 # Generate a new version of "mysql-57test.p5m.include" |
|
108 cat $(BUILD_DIR)/manifest-generated.p5m | \ |
|
109 egrep -v mangled | egrep '/(mysql-test|sql-bench)(/|$$)' \ |
|
110 > $(BUILD_DIR)/mysql-57test.p5m.include |
|
111 -diff -U0 mysql-57test.p5m.include $(BUILD_DIR)/mysql-57test.p5m.include > \ |
|
112 $(BUILD_DIR)/mysql-57test.p5m.include.diff |
|
113 @if [ -s $(BUILD_DIR)/mysql-57test.p5m.include.diff ] ; then \ |
|
114 echo "ERROR: \"mysql-57test.p5m.include\" need to be updated, you can find the new suggested content in" ; \ |
|
115 echo " \"$(BUILD_DIR)/mysql-57test.p5m.include\", see" ; \ |
|
116 echo " \"$(BUILD_DIR)/mysql-57test.p5m.include.diff\"" ; \ |
|
117 exit 1 ; \ |
|
118 fi |
|
119 # Find all file names outside "mysql-test" and "sql-bench" |
|
120 # If you for some reason deliberately want to leave out some |
|
121 # file from the IPS package but yet install if building from |
|
122 # source, you add a "egrep -v ...." below |
|
123 cat $(BUILD_DIR)/manifest-generated.p5m | \ |
|
124 egrep -v mangled | egrep -v '/(mysql-test|sql-bench)(/|$$)' | \ |
|
125 perl -ne 'm,^(file|link)\s+path=([^ \n]+), and print $$2, "\n"' | sort \ |
|
126 > $(BUILD_DIR)/all-installed |
|
127 perl -pe 's,\\\n,,' *.p5m | \ |
|
128 perl -ne 'm,^(file|link)\s+path=([^ \n]+), and print $$2, "\n"' | sort \ |
|
129 > $(BUILD_DIR)/all-specified |
|
130 comm -2 -3 build/all-installed build/all-specified > build/missing-specifications |
|
131 @if [ -s $(BUILD_DIR)/missing-specifications ] ; then \ |
|
132 echo "ERROR: A file installed is not packaged, i.e. not mentioned in any \"*.p5m\" file, see" ; \ |
|
133 echo " \"$(BUILD_DIR)/missing-specifications\"" ; \ |
|
134 exit 1 ; \ |
|
135 fi |
|
136 @echo "No problems found!" |
|
137 |
|
138 REQUIRED_PACKAGES += database/mysql-57/client |
|
139 REQUIRED_PACKAGES += runtime/perl-522 |
|
140 REQUIRED_PACKAGES += shell/bash |
|
141 REQUIRED_PACKAGES += shell/ksh93 |
|
142 REQUIRED_PACKAGES += system/core-os |
|
143 REQUIRED_PACKAGES += system/library |
|
144 REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime |
|
145 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime |
|
146 REQUIRED_PACKAGES += system/library/math |
|
147 REQUIRED_PACKAGES += system/network |