kumquat-buildroot/package/oracle-mysql/oracle-mysql.mk

139 lines
4.1 KiB
Makefile
Raw Normal View History

################################################################################
#
# oracle-mysql
#
################################################################################
ORACLE_MYSQL_VERSION_MAJOR = 5.1
ORACLE_MYSQL_VERSION = $(ORACLE_MYSQL_VERSION_MAJOR).73
ORACLE_MYSQL_SOURCE = mysql-$(ORACLE_MYSQL_VERSION).tar.gz
ORACLE_MYSQL_SITE = http://dev.mysql.com/get/Downloads/MySQL-$(ORACLE_MYSQL_VERSION_MAJOR)
ORACLE_MYSQL_INSTALL_STAGING = YES
ORACLE_MYSQL_DEPENDENCIES = ncurses
ORACLE_MYSQL_AUTORECONF = YES
ORACLE_MYSQL_LICENSE = GPL-2.0
ORACLE_MYSQL_LICENSE_FILES = README COPYING
ORACLE_MYSQL_SELINUX_MODULES = mysql
ORACLE_MYSQL_PROVIDES = mysql
package/oracle-mysql: add mysql_config to ORACLE_MYSQL_CONFIG_SCRIPTS Add mysql_config to ORACLE_MYSQL_CONFIG_SCRIPTS so the per-package fix added by commit a18c828bed99d7e0db5128224ffcda4897cd8e80 will be applied to this file which will avoid the following build failures with libodb-mysql, open2300 or rsyslog: configure:3286: /home/giuliobenetti/autobuild/run/instance-3/output-1/per-package/libodb-mysql/host/bin/powerpc-buildroot-linux-uclibc-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -rdynamic -L/home/giuliobenetti/autobuild/run/instance-3/output-1/per-package/libodb-mysql/host/powerpc-buildroot-linux-uclibc/sysroot/usr/lib/mysql -lmysqlclient -L/home/giuliobenetti/autobuild/run/instance-3/output-1/per-package/oracle-mysql/host/powerpc-buildroot-linux-uclibc/sysroot/usr/lib -lz -lnsl -lm >&5 /home/giuliobenetti/autobuild/run/instance-3/output-1/per-package/libodb-mysql/host/bin/../lib/gcc/powerpc-buildroot-linux-uclibc/10.3.0/../../../../powerpc-buildroot-linux-uclibc/bin/ld: cannot find /lib/libc.so.1 /home/giuliobenetti/autobuild/run/instance-3/output-1/per-package/libodb-mysql/host/bin/../lib/gcc/powerpc-buildroot-linux-uclibc/10.3.0/../../../../powerpc-buildroot-linux-uclibc/bin/ld: cannot find /usr/lib/uclibc_nonshared.a /home/giuliobenetti/autobuild/run/instance-3/output-1/per-package/libodb-mysql/host/bin/../lib/gcc/powerpc-buildroot-linux-uclibc/10.3.0/../../../../powerpc-buildroot-linux-uclibc/bin/ld: cannot find /lib/ld-uClibc.so.1 Fixes: - http://autobuild.buildroot.org/results/9e3c09dd3d9bd55de14fc89a1d17ba9c008b195b - http://autobuild.buildroot.org/results/b42c8c86e9574ba9f2c04daa3476206270241a66 - http://autobuild.buildroot.org/results/08156c934e9b4d946c354dbaf78ea5d9ae9a4701 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-11-14 17:09:35 +01:00
ORACLE_MYSQL_CONFIG_SCRIPTS = mysql_config
# Unix socket. This variable can also be consulted by other buildroot packages
MYSQL_SOCKET = /run/mysql/mysql.sock
ORACLE_MYSQL_CONF_ENV = \
ac_cv_sys_restartable_syscalls=yes \
ac_cv_path_PS=/bin/ps \
ac_cv_path_HOSTNAME=/bin/hostname \
ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null" \
ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes \
ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no \
ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes \
mysql_cv_new_rl_interface=yes
ORACLE_MYSQL_CONF_OPTS = \
--without-ndb-binlog \
--without-docs \
--without-man \
--without-libedit \
--with-readline \
--with-low-memory \
--enable-thread-safe-client \
--with-unix-socket-path=$(MYSQL_SOCKET) \
--disable-mysql-maintainer-mode
# host-oracle-mysql only installs what is needed to build mysql, i.e. the
# gen_lex_hash tool, and it only builds the parts that are needed to
# create this tool
HOST_ORACLE_MYSQL_DEPENDENCIES = host-zlib host-ncurses
HOST_ORACLE_MYSQL_CONF_OPTS = \
--with-embedded-server \
--disable-mysql-maintainer-mode
define HOST_ORACLE_MYSQL_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/include my_config.h
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/mysys libmysys.a
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/strings libmystrings.a
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/vio libvio.a
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/dbug libdbug.a
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/regex libregex.a
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/sql gen_lex_hash
endef
define HOST_ORACLE_MYSQL_INSTALL_CMDS
$(INSTALL) -m 0755 $(@D)/sql/gen_lex_hash $(HOST_DIR)/bin/
endef
ifeq ($(BR2_PACKAGE_OPENSSL),y)
ORACLE_MYSQL_DEPENDENCIES += openssl
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
ORACLE_MYSQL_DEPENDENCIES += zlib
ORACLE_MYSQL_CONF_OPTS += --with-zlib-dir=$(STAGING_DIR)/usr
else
ORACLE_MYSQL_CONF_OPTS += --without-zlib-dir
endif
ifeq ($(BR2_PACKAGE_ORACLE_MYSQL_SERVER),y)
ORACLE_MYSQL_DEPENDENCIES += host-oracle-mysql host-bison
ORACLE_MYSQL_CONF_OPTS += \
--localstatedir=/var/mysql \
--with-atomic-ops=up \
--with-embedded-server \
--without-query-cache \
--without-plugin-partition \
--without-plugin-daemon_example \
--without-plugin-ftexample \
--without-plugin-archive \
--without-plugin-blackhole \
--without-plugin-example \
--without-plugin-federated \
--without-plugin-ibmdb2i \
--without-plugin-innobase \
--without-plugin-innodb_plugin \
--without-plugin-ndbcluster
# Debugging is only available for the server, so no need for
# this if-block outside of the server if-block
ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y)
ORACLE_MYSQL_CONF_OPTS += --with-debug=full
else
ORACLE_MYSQL_CONF_OPTS += --without-debug
endif
define ORACLE_MYSQL_USERS
mysql -1 nobody -1 * /var/mysql - - MySQL daemon
endef
define ORACLE_MYSQL_ADD_FOLDER
$(INSTALL) -d $(TARGET_DIR)/var/mysql
endef
ORACLE_MYSQL_POST_INSTALL_TARGET_HOOKS += ORACLE_MYSQL_ADD_FOLDER
define ORACLE_MYSQL_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 $(ORACLE_MYSQL_PKGDIR)/S97mysqld \
$(TARGET_DIR)/etc/init.d/S97mysqld
endef
define ORACLE_MYSQL_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 $(ORACLE_MYSQL_PKGDIR)/mysqld.service \
$(TARGET_DIR)/usr/lib/systemd/system/mysqld.service
endef
else
ORACLE_MYSQL_CONF_OPTS += \
--without-server
endif
define ORACLE_MYSQL_REMOVE_TEST_PROGS
rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench
endef
ORACLE_MYSQL_POST_INSTALL_TARGET_HOOKS += ORACLE_MYSQL_REMOVE_TEST_PROGS
$(eval $(autotools-package))
$(eval $(host-autotools-package))