2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"). You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright 2011-2013, EveryCity Ltd. All rights reserved.
13 # Copyright 2016-2017, Wiselabs Software Ltda - http://www.wiselabs.com.br . All rights reserved.
14 # Copyright 2019, Michal Nowak
15 # Copyright 2022, erwinlem
16 # Copyright 2022, Daniel Bell
17 # Copyright 2023,2024 Friedrich Kink
21 USE_PARALLEL_BUILD
= yes
22 include ..
/..
/..
/make-rules
/shared-macros.mk
24 COMPONENT_NAME
= mariadb
25 COMPONENT_VERSION
= 10.6.18
26 COMPONENT_MAJOR_VERSION
=$(subst $(space
),.
,$(wordlist
1,2,$(subst .
, ,$(HUMAN_VERSION
))))
27 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
28 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
29 COMPONENT_ARCHIVE_HASH
= sha256
:6898a1111f47130709e28ba2c7bd1a57e4bb57101f6e109e597d51e6d385cf18
30 COMPONENT_PROJECT_URL
= https
://www.mariadb.org
/
31 # For the source files look at https://dlm.mariadb.com/browse/mariadb_server/163
32 COMPONENT_ARCHIVE_URL
= https
://dlm.mariadb.com
/3795487/MariaDB
/$(COMPONENT_SRC
)/source
/$(COMPONENT_ARCHIVE
)
33 COMPONENT_SIG_URL
= https
://dlm.mariadb.com
/3795488/MariaDB
/$(COMPONENT_SRC
)/source
/$(COMPONENT_ARCHIVE
).asc
34 COMPONENT_LICENSE
= GPL-2.0
-only
35 COMPONENT_LICENSE_FILE
= COPYING
37 include $(WS_MAKE_RULES
)/common.mk
39 MARIADBV
= $(subst .
,,$(COMPONENT_MAJOR_VERSION
))
42 RANLIB
=/usr
/bin
/granlib
43 PCRE_INCLUDE
=/usr
/include/pcre
47 CPPFLAGS
+= -I
$(PCRE_INCLUDE
) -I
$(JAVA_HOME
)/include/solaris
48 # Prevents "Text relocation remains referenced against symbol offset
49 # in file ../../sql/mysqld_dtrace_all.o" error
50 LDFLAGS
+= -Bsymbolic
-mimpure-text
-lrt
-L
$(OPENSSL_PREFIX
)/lib
/$(MACH64
)
52 CONFIGURE_PREFIX
=/usr
/mariadb
/$(COMPONENT_MAJOR_VERSION
)
53 CONFDIR
=/etc
/mariadb
/$(COMPONENT_MAJOR_VERSION
)
54 DATA_PREFIX
=/var
/mariadb
/$(COMPONENT_MAJOR_VERSION
)
56 CMAKE_PLUGINDIR
.64 = lib
/$(MACH64
)/plugin
58 CMAKE_OPTIONS
+= -DCMAKE_C_COMPILER
=$(CC
)
59 CMAKE_OPTIONS
+= -DCMAKE_CXX_COMPILER
=$(CXX
)
60 CMAKE_OPTIONS
+= -DCMAKE_AR
=$(AR
)
61 CMAKE_OPTIONS
+= -DCMAKE_RANLIB
=$(RANLIB
)
63 CMAKE_OPTIONS
+= -DINSTALL_LAYOUT
=SVR4
64 CMAKE_OPTIONS
+= -DCMAKE_INSTALL_PREFIX
=$(CONFIGURE_PREFIX
)
65 CMAKE_OPTIONS
+= -DINSTALL_BINDIR
=$(CMAKE_BINDIR.
$(BITS
))
66 CMAKE_OPTIONS
+= -DINSTALL_INFODIR
=bin
67 CMAKE_OPTIONS
+= -DINSTALL_INCLUDEDIR
=include
68 CMAKE_OPTIONS
+= -DINSTALL_LIBDIR
=$(CMAKE_LIBDIR.
$(BITS
))
69 CMAKE_OPTIONS
+= -DINSTALL_PLUGINDIR
=$(CMAKE_PLUGINDIR.
$(BITS
))
70 CMAKE_OPTIONS
+= -DINSTALL_MANDIR
=man
71 CMAKE_OPTIONS
+= -DINSTALL_SHAREDIR
=share
72 CMAKE_OPTIONS
+= -DINSTALL_MYSQLSHAREDIR
=share
73 CMAKE_OPTIONS
+= -DINSTALL_SBINDIR
=$(CMAKE_BINDIR.
$(BITS
))
74 CMAKE_OPTIONS
+= -DINSTALL_SCRIPTDIR
=$(CMAKE_BINDIR.
$(BITS
))
75 CMAKE_OPTIONS
+= -DMYSQL_DATADIR
=$(DATA_PREFIX
)/data
76 CMAKE_OPTIONS
+= -DSYSCONFDIR
=$(CONFDIR
)
77 CMAKE_OPTIONS
+= -DINSTALL_SYSCONFDIR
=$(CONFDIR
)
78 CMAKE_OPTIONS
+= -DENABLE_DTRACE
=ON
79 CMAKE_OPTIONS
+= -DWITH_READLINE
=ON
80 CMAKE_OPTIONS
+= -DWITH_EMBEDDED_SERVER
=ON
81 CMAKE_OPTIONS
+= -DWITHOUT_MROONGA_STORAGE_ENGINE
=ON
82 CMAKE_OPTIONS
+= -DHAVE_VISIBILITY_HIDDEN
=0
83 CMAKE_OPTIONS
+= -DMY_CONTEXT_USE_UCONTEXT
=1
84 CMAKE_OPTIONS
+= -DWITH_EXTRA_CHARSETS
=complex
85 CMAKE_OPTIONS
+= -DWITH_ZLIB
=system
86 CMAKE_OPTIONS
+= -DWITH_PCRE
=system
87 CMAKE_OPTIONS
+= -DWITH_SSL
=system
88 CMAKE_OPTIONS
+= -DINSTALL_SUPPORTFILESDIR
=share
/mysql
89 CMAKE_OPTIONS
+= -DCMAKE_BUILD_TYPE
=Release
90 CMAKE_OPTIONS
+= -DCMAKE_REQUIRED_INCLUDES
="$(PCRE_INCLUDE) $(OPENSSL_INCDIR)"
91 CMAKE_OPTIONS
+= -DWITH_INNOBASE_STORAGE_ENGINE
=1
92 CMAKE_OPTIONS
+= -DWITH_INNODB_MEMCACHED
=ON
93 CMAKE_OPTIONS
+= -DWITH_COMMENT
="OpenIndiana MariaDB"
94 CMAKE_OPTIONS
+= -DWITH_XTRADB_STORAGE_ENGINE
=1
95 CMAKE_OPTIONS
+= -DWITH_CSV_STORAGE_ENGINE
=1
96 CMAKE_OPTIONS
+= -DCOMPILATION_COMMENT
="OpenIndiana package"
97 CMAKE_OPTIONS
+= -DJAVA_INCLUDE_PATH
=$(JAVA_HOME
)/include
98 CMAKE_OPTIONS
+= -DJAVA_AWT_LIBRARY
=/usr
/java
/jre
/lib
/$(MACH64
)/libjawt.so
99 CMAKE_OPTIONS
+= -DJAVA_JVM_LIBRARY
=/usr
/java
/jre
/lib
/$(MACH64
)/server
/libjvm.so
100 CMAKE_OPTIONS
+= -DMARIADB_UNIX_ADDR
=/tmp
/mariadb
$(MARIADBV
).sock
101 CMAKE_OPTIONS
+= -DMYSQL_UNIX_ADDR
=/tmp
/mariadb
$(MARIADBV
).sock
102 CMAKE_OPTIONS
+= -DPLUGIN_ROCKSDB
=NO
104 CMAKE_ENV
+= CPPFLAGS
="$(CPPFLAGS) -I$(OPENSSL_INCDIR)"
107 COMPONENT_TEST_DIR
= $(@D
)/mysql-test
108 COMPONENT_TEST_CMD
= .
/mtr
109 COMPONENT_TEST_ARGS
+= --parallel
=$(PARALLEL_JOBS
)
110 COMPONENT_TEST_ARGS
+= --mem
111 COMPONENT_TEST_ARGS
+= --force
112 COMPONENT_TEST_ARGS
+= --retry
=0
113 COMPONENT_TEST_ARGS
+= --force-restart
114 COMPONENT_TEST_ARGS
+= --max-test-fail
=0
115 COMPONENT_TEST_ARGS
+= --skip-test-list
=$(COMPONENT_DIR
)/files
/disabled-tests
117 MARIADB_TEST_TRANSFORMS
+= -n
118 MARIADB_TEST_TRANSFORMS
+= -e
's/ */ /g' # Collapse spaces
119 MARIADB_TEST_TRANSFORMS
+= -e
's/ \] [0-9]*$$/ \]/' # Timing
120 MARIADB_TEST_TRANSFORMS
+= -e
's/ w[0-9]\{1,\} / /' # Worker number
121 MARIADB_TEST_TRANSFORMS
+= -e
'/\[ [^ ]\{1,\} \]/p' # Print test results only
123 # Mangle test results and sort them
124 COMPONENT_TEST_TRANSFORMS
+= \
126 $(GSED) -u -n -e '/^-\{32\}/q' ; \
127 $(GSED) -u $(MARIADB_TEST_TRANSFORMS) -e '/^-\{32\}/Q' | $(SORT) ; \
128 print "--------------------------------" ; \
130 ) | $(COMPONENT_TEST_TRANSFORMER) -e '/^Spent /d'"
131 # Skipped tests that require debug build could vary
132 COMPONENT_TEST_TRANSFORMS
+= "-e '/\[ skipped \] Requires debug build$$/d'"
133 COMPONENT_TEST_TRANSFORMS
+= "-e '/\[ skipped \] Extra checkpoint 1 after/d'"
134 # Because of above the final stat of skipped tests could vary as well
135 COMPONENT_TEST_TRANSFORMS
+= "-e '/^[0-9]\{1,\} tests were skipped/d'"
137 # Manually added test dependencies
138 TEST_REQUIRED_PACKAGES
+= library
/perl-5
/dbd-mariadb
139 TEST_REQUIRED_PACKAGES
+= library
/perl-5
/dbi
141 # Auto-generated dependencies
142 REQUIRED_PACKAGES
+= $(GCC_RUNTIME_PKG
)
143 REQUIRED_PACKAGES
+= $(GXX_RUNTIME_PKG
)
144 REQUIRED_PACKAGES
+= $(OPENSSL_PKG
)
145 REQUIRED_PACKAGES
+= SUNWcs
146 REQUIRED_PACKAGES
+= compress
/bzip2
147 REQUIRED_PACKAGES
+= compress
/xz
148 REQUIRED_PACKAGES
+= compress
/zstd
149 REQUIRED_PACKAGES
+= library
/libxml2
150 REQUIRED_PACKAGES
+= library
/lz4
151 REQUIRED_PACKAGES
+= library
/lzo
152 REQUIRED_PACKAGES
+= library
/pcre2
153 REQUIRED_PACKAGES
+= library
/security
/cracklib
154 REQUIRED_PACKAGES
+= library
/unixodbc
155 REQUIRED_PACKAGES
+= library
/zlib
156 REQUIRED_PACKAGES
+= runtime
/perl
157 REQUIRED_PACKAGES
+= service
/security
/kerberos-5
158 REQUIRED_PACKAGES
+= shell/ksh93
159 REQUIRED_PACKAGES
+= system
/library
160 REQUIRED_PACKAGES
+= system
/library
/math
161 REQUIRED_PACKAGES
+= system
/library
/security
/gss
162 REQUIRED_PACKAGES
+= web
/curl