Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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_CXXFLAGS}" \
  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. BUILD_LFLAGS= CC="${CC_FOR_BUILD}" \
  47. CXX='${CXX_FOR_BUILD}' \
  48. CFLAGS='${CFLAGS_FOR_BUILD} -DHOSTCOMPILE=1' \
  49. CXXFLAGS='${CXXFLAGS_FOR_BUILD}' \
  50. LDFLAGS='${LDFLAGS_FOR_BUILD}' \
  51. CPPFLAGS='${CPPFLAGS_FOR_BUILD}' \
  52. CXXLINK='${CXX_FOR_BUILD} ${CFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD} -o $$@' \
  53. LINK='${CC_FOR_BUILD} ${CFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD} -o $$@'
  54. ifneq (${OStype},Linux)
  55. BUILD_FLAGS+= 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="${CC_FOR_BUILD} -o conf_to_src -lc" \
  64. ${BUILD_FLAGS} \
  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. $(SED) "s,\(^pkgincludedir='\)\(.*\),\1${STAGING_TARGET_DIR}\2," \
  82. ${WRKINST}/usr/bin/mysql_config
  83. include ${TOPDIR}/mk/pkg-bottom.mk