Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= mysql
  5. PKG_VERSION:= 5.1.41
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= b5d39e8789174753f3c782959729e68c
  8. PKG_DESCR:= MySQL client library
  9. PKG_SECTION:= libs
  10. PKG_DEPENDS:= libncurses zlib
  11. PKG_BUILDDEP+= ncurses zlib readline
  12. PKG_URL:= http://www.mysql.com
  13. PKG_SITES= ${MASTER_SITE_MYSQL:=Downloads/MySQL-5.1/}
  14. PKG_HOST_DEPENDS:= !cygwin
  15. include ${TOPDIR}/mk/package.mk
  16. $(eval $(call PKG_template,LIBMYSQLCLIENT,libmysqlclient,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  17. BUILD_STYLE:= manual
  18. INSTALL_STYLE:= manual
  19. CONFIGURE_ENV+= OPTIMIZE_CFLAGS="${TARGET_CFLAGS}" \
  20. OPTIMIZE_CXXFLAGS="${TARGET_CFLAGS}" \
  21. ac_cv_lib_nsl_gethostbyname_r=no \
  22. ac_cv_lib_nsl_yp_get_default_domain=no \
  23. ac_cv_sys_restartable_syscalls=yes \
  24. mysql_cv_sys_os=Linux \
  25. mysql_cv_compress=yes \
  26. ac_cv_sys_restartable_syscalls=no \
  27. ac_cv_conv_longlong_to_float=yes \
  28. mysql_cv_gcc_atomic_builtins=yes \
  29. mysql_cv_gethostname_style=glibc2
  30. CONFIGURE_ARGS+= --disable-assembler \
  31. --with-pthread \
  32. --with-atomic-ops=rwlocks \
  33. --with-unix-socket-path=/tmp/.mysql.sock \
  34. --with-named-thread-libs=-lpthread \
  35. --without-libwrap \
  36. --without-pstack \
  37. --with-low-memory \
  38. --without-server \
  39. --without-embedded-server \
  40. --without-query-cache \
  41. --without-ssl \
  42. --without-docs \
  43. --without-readline \
  44. --with-machine-type=${CPU_ARCH}
  45. HOSTTOOLFLAGS= CC="${HOSTCC}" \
  46. CXX='c++' \
  47. CFLAGS='${HOSTCFLAGS} -DHOSTCOMPILE=1' \
  48. CXXFLAGS='${HOSTCFLAGS}' \
  49. LDFLAGS='${HOSTLDFLAGS}' \
  50. CPPFLAGS='${HOSTCPPFLAGS}' \
  51. CXXLINK='c++ ${HOSTCFLAGS} ${HOSTLDFLAGS} -o $$@' \
  52. LINK='${HOSTCC} ${HOSTCFLAGS} ${HOSTLDFLAGS} -o $$@'
  53. ifneq (${OStype},Linux)
  54. HOSTTOOLFLAGS+= LIBS='-lm -lz'
  55. endif
  56. do-build:
  57. ${MAKE} -C "${WRKBUILD}" \
  58. SUBDIRS="include" \
  59. DESTDIR="${WRKINST}" \
  60. all install
  61. ${MAKE} -C "${WRKBUILD}/libmysql" \
  62. LINK="${HOSTCC} -o conf_to_src -lc" \
  63. ${HOSTTOOLFLAGS} \
  64. conf_to_src
  65. ${MAKE} -C "${WRKBUILD}" \
  66. CFLAGS="${TARGET_CFLAGS}" \
  67. SUBDIRS="libmysql" \
  68. DESTDIR="${WRKINST}" \
  69. all install
  70. ${MAKE} -C "${WRKBUILD}" \
  71. CFLAGS="${TARGET_CFLAGS}" \
  72. SUBDIRS="scripts" \
  73. DESTDIR="${WRKINST}" \
  74. bin_SCRIPTS="mysql_config" \
  75. all install
  76. do-install:
  77. ${INSTALL_DIR} ${IDIR_LIBMYSQLCLIENT}/usr/lib
  78. ${CP} ${WRKINST}/usr/lib/mysql/libmysqlclient.so* \
  79. ${IDIR_LIBMYSQLCLIENT}/usr/lib
  80. include ${TOPDIR}/mk/pkg-bottom.mk