Makefile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. CONFIGURE_STYLE:= gnu
  18. CONFIGURE_ENV+= OPTIMIZE_CFLAGS="${TARGET_CFLAGS}" \
  19. OPTIMIZE_CXXFLAGS="${TARGET_CFLAGS}" \
  20. ac_cv_lib_nsl_gethostbyname_r=no \
  21. ac_cv_lib_nsl_yp_get_default_domain=no \
  22. ac_cv_sys_restartable_syscalls=yes \
  23. mysql_cv_sys_os=Linux \
  24. mysql_cv_compress=yes \
  25. ac_cv_sys_restartable_syscalls=no \
  26. ac_cv_conv_longlong_to_float=yes \
  27. mysql_cv_gcc_atomic_builtins=yes \
  28. mysql_cv_gethostname_style=glibc2
  29. CONFIGURE_ARGS+= --disable-assembler \
  30. --with-pthread \
  31. --with-atomic-ops=rwlocks \
  32. --with-unix-socket-path=/tmp/.mysql.sock \
  33. --with-named-thread-libs=-lpthread \
  34. --without-libwrap \
  35. --without-pstack \
  36. --with-low-memory \
  37. --without-server \
  38. --without-embedded-server \
  39. --without-query-cache \
  40. --without-ssl \
  41. --without-docs \
  42. --without-readline \
  43. --with-machine-type=${CPU_ARCH}
  44. HOSTTOOLFLAGS= CC="${HOSTCC}" \
  45. CXX='c++' \
  46. CFLAGS='${HOSTCFLAGS} -DHOSTCOMPILE=1' \
  47. CXXFLAGS='${HOSTCFLAGS}' \
  48. LDFLAGS='${HOSTLDFLAGS}' \
  49. CPPFLAGS='${HOSTCPPFLAGS}' \
  50. CXXLINK='c++ ${HOSTCFLAGS} ${HOSTLDFLAGS} -o $$@' \
  51. LINK='${HOSTCC} ${HOSTCFLAGS} ${HOSTLDFLAGS} -o $$@'
  52. ifneq (${OStype},Linux)
  53. HOSTTOOLFLAGS+= LIBS='-lm -lz'
  54. endif
  55. do-build:
  56. ${MAKE} -C "${WRKBUILD}" \
  57. SUBDIRS="include" \
  58. DESTDIR="${WRKINST}" \
  59. all install
  60. ${MAKE} -C "${WRKBUILD}/libmysql" \
  61. LINK="${HOSTCC} -o conf_to_src -lc" \
  62. ${HOSTTOOLFLAGS} \
  63. conf_to_src
  64. ${MAKE} -C "${WRKBUILD}" \
  65. CFLAGS="${TARGET_CFLAGS}" \
  66. SUBDIRS="libmysql" \
  67. DESTDIR="${WRKINST}" \
  68. all install
  69. ${MAKE} -C "${WRKBUILD}" \
  70. CFLAGS="${TARGET_CFLAGS}" \
  71. SUBDIRS="scripts" \
  72. DESTDIR="${WRKINST}" \
  73. bin_SCRIPTS="mysql_config" \
  74. all install
  75. do-install:
  76. ${INSTALL_DIR} ${IDIR_LIBMYSQLCLIENT}/usr/lib
  77. ${CP} ${WRKINST}/usr/lib/mysql/libmysqlclient.so* \
  78. ${IDIR_LIBMYSQLCLIENT}/usr/lib
  79. include ${TOPDIR}/mk/pkg-bottom.mk