5882N/A#
5882N/A# CDDL HEADER START
5882N/A#
5882N/A# The contents of this file are subject to the terms of the
5882N/A# Common Development and Distribution License (the "License").
5882N/A# You may not use this file except in compliance with the License.
5882N/A#
5882N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5882N/A# or http://www.opensolaris.org/os/licensing.
5882N/A# See the License for the specific language governing permissions
5882N/A# and limitations under the License.
5882N/A#
5882N/A# When distributing Covered Code, include this CDDL HEADER in each
5882N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5882N/A# If applicable, add the following below this CDDL HEADER, with the
5882N/A# fields enclosed by brackets "[]" replaced with your own identifying
5882N/A# information: Portions Copyright [yyyy] [name of copyright owner]
5882N/A#
5882N/A# CDDL HEADER END
5882N/A#
5882N/A# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
5882N/A#
5882N/A
5882N/A# MySQL 5.7 is compiled using GCC. Note that the MySQL Server 5.7 for
5882N/A# Solaris dowloaded from http://dev.mysql.com/downloads/mysql/ is a
5882N/A# hybrid, the server part is compiled using GCC and the client library
5882N/A# is compiled using SunStudio and the "stlport4" C++ runtime
5882N/A# library. In this build both server and client is compiled using GCC.
5882N/ACOMPILER = gcc
5882N/A
5882N/ABUILD_BITS= 64
5882N/Aexport PARFAIT_BUILD=no
5882N/Ainclude ../../make-rules/shared-macros.mk
5882N/A
5882N/ACOMPONENT_NAME = mysql
5882N/ACOMPONENT_VERSION = 5.7.11
5882N/ACOMPONENT_SRC = $(COMPONENT_NAME)-$(COMPONENT_VERSION)
5882N/ACOMPONENT_ARCHIVE = $(COMPONENT_NAME)-boost-$(COMPONENT_VERSION).tar.gz
5882N/ACOMPONENT_ARCHIVE_HASH= \
5882N/A sha256:ab21347ba004a5aa349b911d829a14e79b1e36e4bcd007d39d75212071414e28
5882N/ACOMPONENT_ARCHIVE_URL = http://cdn.mysql.com/Downloads/MySQL-5.7/$(COMPONENT_ARCHIVE)
5882N/ACOMPONENT_PROJECT_URL = http://dev.mysql.com/
5882N/ACOMPONENT_BUGDB = database/mysql
5882N/A
6008N/A# Requires new pkgmogrify feature, available in S12 but not 11.3, so do not
6008N/A# publish.
6008N/Aifeq ($(BUILD_TYPE), evaluation)
6008N/ABUILD_64=
6008N/AINSTALL_64=
6008N/APUBLISH_STAMP=
6008N/Aendif
6008N/A
5882N/A#We use cp(1) instead of cloney because we use TAR to copy files and the TAR
5882N/A#used doesn't handle long links
5882N/ACLONEY=echo
5882N/ACOMPONENT_PRE_BUILD_ACTION = $(CP) -r $(SOURCE_DIR)/* $(@D);
5882N/A
5882N/ABUILD_STYLE= cmake
5882N/ATEST_TARGET= $(NO_TESTS)
5882N/ASYSTEM_TEST_TARGET= $(NO_TESTS)
5882N/Ainclude $(WS_MAKE_RULES)/common.mk
5882N/A
5882N/A# MySQL being one of Oracle's own product doesn't require to have a TPNO
5882N/A# License number, but it uses Boost, which does have such a requirement.
5882N/ATPNO=24164
5882N/A
5882N/A# This component uses cmake to generate Makefiles and thus does not
5882N/A# run any configure script
5882N/ACMAKE = $(shell which cmake)
5882N/ACMAKE_PREFIX = $(USRDIR)/mysql/5.7
5882N/ACONFDIR = $(ETCDIR)/mysql/5.7
5882N/ADATA_PREFIX = $(VARDIR)/mysql/5.7
5882N/A
5882N/A# The install layout differs from "INSTALL_LAYOUT=STANDALONE" in that
5882N/A# we put scripts into the "bin" directory and the "lib" directory has
5882N/A# an architecture subdirectory. We also use a simplified CFLAGS/CXXFLAGS
5882N/A# setting and let the MySQL CMake setup add the other flags.
5882N/A# For "lib", 64-bit uses subdir but 32-bit does not
5882N/ACMAKE_BINDIR.64 = bin
5882N/ACMAKE_LIBDIR.64 = lib/$(MACH64)
5882N/ACMAKE_PLUGINDIR.64 = lib/$(MACH64)/plugin
5882N/A
5882N/A# Providing component specific build options to cmake
5882N/ACMAKE_OPTIONS += -DBUILD_CONFIG=mysql_release
5882N/ACMAKE_OPTIONS += -DINSTALL_LAYOUT=STANDALONE
5882N/ACMAKE_OPTIONS += -DCMAKE_INSTALL_PREFIX=$(CMAKE_PREFIX)
5882N/ACMAKE_OPTIONS += -DINSTALL_BINDIR=$(CMAKE_BINDIR.$(BITS))
5882N/ACMAKE_OPTIONS += -DINSTALL_SBINDIR=$(CMAKE_BINDIR.$(BITS))
5882N/ACMAKE_OPTIONS += -DINSTALL_SCRIPTDIR=$(CMAKE_BINDIR.$(BITS))
5882N/ACMAKE_OPTIONS += -DINSTALL_LIBDIR=$(CMAKE_LIBDIR.$(BITS))
5882N/ACMAKE_OPTIONS += -DINSTALL_PLUGINDIR=$(CMAKE_PLUGINDIR.$(BITS))
5882N/ACMAKE_OPTIONS += -DSYSCONFDIR=$(CONFDIR)
5882N/ACMAKE_OPTIONS += -DMYSQL_DATADIR=$(DATA_PREFIX)
5882N/ACMAKE_OPTIONS += -DENABLED_LOCAL_INFILE=ON
5882N/ACMAKE_OPTIONS += -DCMAKE_CXX_COMPILER=$(CXX)
5882N/ACMAKE_OPTIONS += -DCMAKE_C_COMPILER=$(CC)
5882N/A
5882N/ACMAKE_OPTIONS += '-DCOMPILATION_COMMENT=MySQL Community Server (GPL)'
5882N/ACMAKE_OPTIONS += -DFEATURE_SET=community
5882N/A
5882N/ACMAKE_OPTIONS += -DWITH_SSL=bundled
5882N/ACMAKE_OPTIONS += -DENABLE_DTRACE=1
5882N/ACMAKE_OPTIONS += -DWITH_INNODB_MEMCACHED=1
5882N/ACMAKE_OPTIONS += -DWITH_BOOST=boost
5882N/ACMAKE_OPTIONS += -DWITH_EMBEDDED_SERVER=1
5882N/ACMAKE_OPTIONS += -DWITH_EMBEDDED_SHARED_LIBRARY=1
5882N/ACMAKE_OPTIONS += -DDISABLE_STATIC=ON
5882N/ACMAKE_OPTIONS += -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE
5882N/A
5882N/Averify-p5m:
5882N/A $(MAKE) $(MAKEFLAGS) sample-manifest METADATA_TEMPLATE=
5882N/A # For easier parsing, remove backslash+newline
5882N/A perl -pe 's,\\\n,,' $(BUILD_DIR)/manifest-$(MACH)-generated.p5m \
5882N/A > $(BUILD_DIR)/manifest-generated.p5m
5882N/A # Generate a new version of "mysql-57test.p5m.include"
5882N/A cat $(BUILD_DIR)/manifest-generated.p5m | \
5882N/A egrep -v mangled | egrep '/(mysql-test|sql-bench)(/|$$)' \
5882N/A > $(BUILD_DIR)/mysql-57test.p5m.include
5882N/A -diff -U0 mysql-57test.p5m.include $(BUILD_DIR)/mysql-57test.p5m.include > \
5882N/A $(BUILD_DIR)/mysql-57test.p5m.include.diff
5882N/A @if [ -s $(BUILD_DIR)/mysql-57test.p5m.include.diff ] ; then \
5882N/A echo "ERROR: \"mysql-57test.p5m.include\" need to be updated, you can find the new suggested content in" ; \
5882N/A echo " \"$(BUILD_DIR)/mysql-57test.p5m.include\", see" ; \
5882N/A echo " \"$(BUILD_DIR)/mysql-57test.p5m.include.diff\"" ; \
5882N/A exit 1 ; \
5882N/A fi
5882N/A # Find all file names outside "mysql-test" and "sql-bench"
5882N/A # If you for some reason deliberately want to leave out some
5882N/A # file from the IPS package but yet install if building from
5882N/A # source, you add a "egrep -v ...." below
5882N/A cat $(BUILD_DIR)/manifest-generated.p5m | \
5882N/A egrep -v mangled | egrep -v '/(mysql-test|sql-bench)(/|$$)' | \
5882N/A perl -ne 'm,^(file|link)\s+path=([^ \n]+), and print $$2, "\n"' | sort \
5882N/A > $(BUILD_DIR)/all-installed
5882N/A perl -pe 's,\\\n,,' *.p5m | \
5882N/A perl -ne 'm,^(file|link)\s+path=([^ \n]+), and print $$2, "\n"' | sort \
5882N/A > $(BUILD_DIR)/all-specified
5882N/A comm -2 -3 build/all-installed build/all-specified > build/missing-specifications
5882N/A @if [ -s $(BUILD_DIR)/missing-specifications ] ; then \
5882N/A echo "ERROR: A file installed is not packaged, i.e. not mentioned in any \"*.p5m\" file, see" ; \
5882N/A echo " \"$(BUILD_DIR)/missing-specifications\"" ; \
5882N/A exit 1 ; \
5882N/A fi
5882N/A @echo "No problems found!"
5882N/A
5882N/AREQUIRED_PACKAGES += database/mysql-57/client
5882N/AREQUIRED_PACKAGES += runtime/perl-522
5882N/AREQUIRED_PACKAGES += shell/bash
5882N/AREQUIRED_PACKAGES += shell/ksh93
5882N/AREQUIRED_PACKAGES += system/core-os
5882N/AREQUIRED_PACKAGES += system/library
5882N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
5882N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
5882N/AREQUIRED_PACKAGES += system/library/math
5882N/AREQUIRED_PACKAGES += system/network