1
0

Makefile 2.6 KB

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