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.0.85
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= f672ec5154f8ea3db87fec5e0b227f4c
  8. PKG_DESCR:= MySQL client library
  9. PKG_SECTION:= libs
  10. PKG_DEPENDS:= libncurses zlib
  11. PKG_URL:= http://www.mysql.com
  12. PKG_SITES= ${MASTER_SITE_MYSQL:=Downloads/MySQL-5.0/}
  13. include ${TOPDIR}/mk/package.mk
  14. $(eval $(call PKG_template,LIBMYSQLCLIENT,libmysqlclient,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  15. CONFIGURE_STYLE:= gnu
  16. CONFIGURE_ENV+= OPTIMIZE_CFLAGS="${TARGET_CFLAGS}" \
  17. OPTIMIZE_CXXFLAGS="${TARGET_CFLAGS}" \
  18. ac_cv_lib_nsl_gethostbyname_r=no \
  19. ac_cv_lib_nsl_yp_get_default_domain=no \
  20. ac_cv_sys_restartable_syscalls=yes \
  21. mysql_cv_sys_os=Linux \
  22. mysql_cv_compress=yes \
  23. ac_cv_sys_restartable_syscalls=no \
  24. ac_cv_conv_longlong_to_float=yes \
  25. mysql_cv_gethostname_style=glibc2
  26. CONFIGURE_ARGS+= --disable-assembler \
  27. --with-pthread \
  28. --without-raid \
  29. --with-unix-socket-path=/tmp/.mysql.sock \
  30. --with-named-thread-libs=-lpthread \
  31. --without-libwrap \
  32. --without-pstack \
  33. --with-low-memory \
  34. --without-server \
  35. --without-embedded-server \
  36. --without-query-cache \
  37. --without-mysqlfs \
  38. --without-vio \
  39. --without-openssl \
  40. --without-docs \
  41. --without-bench \
  42. --without-innodb \
  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