Makefile 2.5 KB

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