Makefile 2.8 KB

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