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) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
|
22 # |
|
23 include ../../make-rules/shared-macros.mk |
|
24 |
|
25 COMPONENT_NAME= mysql |
|
26 COMPONENT_VERSION= 5.1.37 |
|
27 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
28 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
29 COMPONENT_ARCHIVE_HASH= \ |
|
30 sha256:6a4596462d4447a79a0ad607ea1475ba0599651e2d82305a7f7dade038827f0c |
|
31 COMPONENT_ARCHIVE_URL= http://downloads.mysql.com/archives/mysql-5.1/$(COMPONENT_ARCHIVE) |
|
32 COMPONENT_PROJECT_URL= http://dev.mysql.com/ |
|
33 COMPONENT_BUGDB= database/mysql |
|
34 |
|
35 include ../../make-rules/prep.mk |
|
36 include ../../make-rules/configure.mk |
|
37 include ../../make-rules/ips.mk |
|
38 |
|
39 # Enable ASLR for this component |
|
40 ASLR_MODE = $(ASLR_ENABLE) |
|
41 |
|
42 PATCH_LEVEL=0 |
|
43 |
|
44 COMPONENT_PRE_CONFIGURE_ACTION = \ |
|
45 ( cd $(COMPONENT_SRC) ; \ |
|
46 $(TOUCH) configure.in config/ac-macros/* ; sleep 5 ; \ |
|
47 $(TOUCH) aclocal.m4 config.h.in ; sleep 5 ; \ |
|
48 $(TOUCH) configure ; sleep 5 ; \ |
|
49 /usr/bin/find . -name Makefile.in | /usr/bin/xargs $(TOUCH) ; \ |
|
50 /usr/bin/find . -type d -exec $(CHMOD) 755 "{}" \; ; \ |
|
51 /usr/bin/find . -type f -exec $(CHMOD) ugo+r "{}" \; ; \ |
|
52 ) |
|
53 |
|
54 CONFIGURE_PREFIX=/usr/mysql/5.1 |
|
55 CONFDIR=/etc/mysql/5.1 |
|
56 DATA_PREFIX=/var/mysql/5.1 |
|
57 CONFIGURE_MANDIR=$(CONFIGURE_PREFIX)/man |
|
58 |
|
59 # Although -norunpath is set in CXXFLAGS, we need to append |
|
60 # the -norunpath option here, so it's picked up when building |
|
61 # shared libraries (CC -G) |
|
62 CXX += $(studio_NORUNPATH) |
|
63 |
|
64 # C common compiler flags |
|
65 CFLAGS += -xstrconst -xprefetch=auto -xprefetch_level=3 -fns=no -fsimple=1 -xbuiltin=%none \ |
|
66 -xlibmil -xlibmopt -xnorunpath |
|
67 |
|
68 # C++ common compiler flags |
|
69 CXXFLAGS += -DDBUG_OFF -noex -DBIG_TABLES -DHAVE_RWLOCK_T $(CC_PIC) $($(COMPILER)_opt) \ |
|
70 $($(COMPILER)_MT) -xprefetch=auto -xprefetch_level=3 -fns=no -fsimple=1 -xbuiltin=%none \ |
|
71 -xlibmil -xlibmopt |
|
72 |
|
73 #build environment common to both 32 & 64bit builds |
|
74 COMPONENT_BUILD_ENV += CFLAGS="$(CFLAGS)" |
|
75 COMPONENT_BUILD_ENV += LDFLAGS="$(LDFLAGS)" |
|
76 |
|
77 # build environment applicable to only 32bit |
|
78 COMPONENT_BUILD_ENV.32 += CXXFLAGS="$(CXXFLAGS)" |
|
79 |
|
80 #build environment applicable to only 64bit |
|
81 COMPONENT_BUILD_ENV.64 += CXXFLAGS="$(CXXFLAGS) -features=no%except" |
|
82 |
|
83 #common configure options for both 32 & 64bits |
|
84 CONFIGURE_OPTIONS += ac_cv_func_stpcpy=no |
|
85 CONFIGURE_OPTIONS += --localstatedir=$(DATA_PREFIX)/data |
|
86 CONFIGURE_OPTIONS += --datadir=$(CONFIGURE_PREFIX)/share |
|
87 CONFIGURE_OPTIONS += --sharedstatedir=$(CONFIGURE_PREFIX)/com |
|
88 CONFIGURE_OPTIONS += --includedir=$(CONFIGURE_PREFIX)/include |
|
89 CONFIGURE_OPTIONS += --oldincludedir=$(CONFIGURE_PREFIX)/include |
|
90 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_PREFIX)/docs |
|
91 CONFIGURE_OPTIONS += --sysconfdir=$(CONFDIR) |
|
92 CONFIGURE_OPTIONS += --enable-thread-safe-client |
|
93 CONFIGURE_OPTIONS += --with-mysqld-libs=-lmtmalloc |
|
94 CONFIGURE_OPTIONS += --with-client-ldflags=-static |
|
95 CONFIGURE_OPTIONS += --with-mysqld-ldflags=-static |
|
96 CONFIGURE_OPTIONS += --with-pic |
|
97 CONFIGURE_OPTIONS += --with-big-tables |
|
98 CONFIGURE_OPTIONS += --with-ssl |
|
99 CONFIGURE_OPTIONS += --with-readline |
|
100 CONFIGURE_OPTIONS += --with-extra-charsets=complex |
|
101 CONFIGURE_OPTIONS += --with-plugins=archive,blackhole,csv,myisam,example,federated,innobase,myisammrg |
|
102 CONFIGURE_OPTIONS += --enable-local-infile |
|
103 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
|
104 CONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)" |
|
105 CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" |
|
106 CONFIGURE_OPTIONS += studio_NORUNPATH="$(studio_NORUNPATH)" |
|
107 |
|
108 CONFIGURE_OPTIONS.32 += --libexecdir=$(CONFIGURE_PREFIX)/bin |
|
109 CONFIGURE_OPTIONS.32 += --enable-dtrace DTRACEFLAGS='-32' |
|
110 |
|
111 CONFIGURE_OPTIONS.64 += --libexecdir=$(CONFIGURE_PREFIX)/bin/$(MACH64) |
|
112 CONFIGURE_OPTIONS.64 += --enable-dtrace DTRACEFLAGS='-64' |
|
113 |
|
114 # Do not apply the standard licence transforms for this component. |
|
115 LICENSE_TRANSFORMS = |
|
116 |
|
117 build: $(BUILD_32_and_64) |
|
118 |
|
119 install: $(INSTALL_32_and_64) |
|
120 |
|
121 test: $(NO_TESTS) |
|
122 |
|
123 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
|
124 |
|
125 include ../../make-rules/depend.mk |
|