1
0

Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 LIBMYSQLCLIENT_DEV
  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. $(eval $(call PKG_template,LIBMYSQLCLIENT_DEV,libmysqlclient-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  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. libmysqlclient-dev-install:
  85. ${INSTALL_DIR} ${IDIR_LIBMYSQLCLIENT_DEV}/usr/include
  86. ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBMYSQLCLIENT_DEV}/usr/include
  87. ${INSTALL_DIR} ${IDIR_LIBMYSQLCLIENT_DEV}/usr/bin
  88. ${INSTALL_BIN} ${WRKINST}/usr/bin/mysql_config \
  89. ${IDIR_LIBMYSQLCLIENT_DEV}/usr/bin
  90. include ${TOPDIR}/mk/pkg-bottom.mk