mysql.mk 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ################################################################################
  2. #
  3. # mysql
  4. #
  5. ################################################################################
  6. MYSQL_VERSION_MAJOR = 5.1
  7. MYSQL_VERSION = $(MYSQL_VERSION_MAJOR).73
  8. MYSQL_SOURCE = mysql-$(MYSQL_VERSION).tar.gz
  9. MYSQL_SITE = http://downloads.skysql.com/archives/mysql-$(MYSQL_VERSION_MAJOR)
  10. MYSQL_INSTALL_STAGING = YES
  11. MYSQL_DEPENDENCIES = readline ncurses
  12. MYSQL_AUTORECONF = YES
  13. MYSQL_LICENSE = GPLv2
  14. MYSQL_LICENSE_FILES = README COPYING
  15. MYSQL_CONF_ENV = \
  16. ac_cv_sys_restartable_syscalls=yes \
  17. ac_cv_path_PS=/bin/ps \
  18. ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null" \
  19. ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes \
  20. ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no \
  21. ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes \
  22. mysql_cv_new_rl_interface=yes
  23. MYSQL_CONF_OPT = \
  24. --without-ndb-binlog \
  25. --without-docs \
  26. --without-man \
  27. --without-libedit \
  28. --without-readline \
  29. --with-low-memory \
  30. --enable-thread-safe-client
  31. ifeq ($(BR2_PACKAGE_MYSQL_SERVER),y)
  32. MYSQL_DEPENDENCIES += host-mysql host-bison
  33. HOST_MYSQL_DEPENDENCIES =
  34. HOST_MYSQL_CONF_OPT = \
  35. --with-embedded-server
  36. MYSQL_CONF_OPT += \
  37. --disable-dependency-tracking \
  38. --with-atomic-ops=up \
  39. --with-embedded-server \
  40. --without-query-cache \
  41. --without-plugin-partition \
  42. --without-plugin-daemon_example \
  43. --without-plugin-ftexample \
  44. --without-plugin-archive \
  45. --without-plugin-blackhole \
  46. --without-plugin-example \
  47. --without-plugin-federated \
  48. --without-plugin-ibmdb2i \
  49. --without-plugin-innobase \
  50. --without-plugin-innodb_plugin \
  51. --without-plugin-ndbcluster
  52. # Debugging is only available for the server, so no need for
  53. # this if-block outside of the server if-block
  54. ifeq ($(BR2_ENABLE_DEBUG),y)
  55. MYSQL_CONF_OPT += --with-debug=full
  56. else
  57. MYSQL_CONF_OPT += --without-debug
  58. endif
  59. define HOST_MYSQL_BUILD_CMDS
  60. $(MAKE) -C $(@D)/include my_config.h
  61. $(MAKE) -C $(@D)/mysys libmysys.a
  62. $(MAKE) -C $(@D)/strings libmystrings.a
  63. $(MAKE) -C $(@D)/vio libvio.a
  64. $(MAKE) -C $(@D)/dbug libdbug.a
  65. $(MAKE) -C $(@D)/regex libregex.a
  66. $(MAKE) -C $(@D)/sql gen_lex_hash
  67. endef
  68. define HOST_MYSQL_INSTALL_CMDS
  69. $(INSTALL) -m 0755 $(@D)/sql/gen_lex_hash $(HOST_DIR)/usr/bin/
  70. endef
  71. else
  72. MYSQL_CONF_OPT += \
  73. --without-server
  74. endif
  75. define MYSQL_REMOVE_TEST_PROGS
  76. rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench
  77. endef
  78. define MYSQL_ADD_MYSQL_LIB_PATH
  79. echo "/usr/lib/mysql" >> $(TARGET_DIR)/etc/ld.so.conf
  80. endef
  81. MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_REMOVE_TEST_PROGS
  82. MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_MYSQL_LIB_PATH
  83. $(eval $(autotools-package))
  84. $(eval $(host-autotools-package))