Makefile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # $OpenBSD: Makefile,v 1.55 2017/06/12 21:31:20 schwarze Exp $
  2. # archs with atomic ops
  3. ONLY_FOR_ARCHS-server= alpha aarch64 amd64 i386 mips64 mips64el powerpc sparc64
  4. ONLY_FOR_ARCHS-tests= ${ONLY_FOR_ARCHS-server}
  5. COMMENT-main= multithreaded SQL database (client)
  6. COMMENT-server= multithreaded SQL database (server)
  7. COMMENT-tests= multithreaded SQL database (regression test suite/benchmark)
  8. VERSION= 10.0.30
  9. DISTNAME= mariadb-${VERSION}
  10. PKGNAME-main= mariadb-client-${VERSION}
  11. PKGNAME-server= mariadb-server-${VERSION}
  12. PKGNAME-tests= mariadb-tests-${VERSION}
  13. REVISION= 3
  14. EPOCH= 1
  15. CATEGORIES= databases
  16. MASTER_SITES= http://mariadb.mirror.iweb.com//${DISTNAME}/source/ \
  17. http://ftp.osuosl.org/pub/mariadb/${DISTNAME}/source/ \
  18. LIB_VERSION= 27
  19. SHARED_LIBS= mysqlclient_r ${LIB_VERSION}.0 \
  20. mysqlclient ${LIB_VERSION}.0
  21. HOMEPAGE= http://mariadb.org/
  22. MAINTAINER= Brad Smith <brad@comstyle.com>
  23. # GPLv2 and LGPLv2.1
  24. PERMIT_PACKAGE_CDROM= Yes
  25. WANTLIB= c crypto m pthread ssl ${LIBCXX} z
  26. WANTLIB-main= curses readline ${WANTLIB}
  27. WANTLIB-server= mysqlclient ${WANTLIB}
  28. WANTLIB-tests= mysqlclient ${WANTLIB}
  29. LOCALSTATEDIR= ${BASELOCALSTATEDIR}/mysql
  30. SOCKET_DIR= /var/run/mysql
  31. SUBST_VARS= SOCKET_DIR
  32. MODULES= devel/cmake
  33. BUILD_DEPENDS= devel/bison
  34. RUN_DEPENDS-server= ${BASE_PKGPATH}>=10.0v1,<10.1v1 \
  35. databases/p5-DBD-mysql
  36. LIB_DEPENDS-server= ${BASE_PKGPATH}>=10.0v1,<10.1v1
  37. LIB_DEPENDS-tests= ${BASE_PKGPATH}>=10.0v1,<10.1v1
  38. CONFIGURE_ARGS+=-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
  39. -DINSTALL_DOCDIR="share/doc/mysql" \
  40. -DINSTALL_DOCREADMEDIR="share/doc/mysql" \
  41. -DINSTALL_INCLUDEDIR="include/mysql" \
  42. -DINSTALL_INFODIR="info" \
  43. -DINSTALL_LIBDIR="lib/mysql" \
  44. -DINSTALL_MANDIR="man" \
  45. -DINSTALL_MYSQLDATADIR="${LOCALSTATEDIR}" \
  46. -DINSTALL_MYSQLSHAREDIR="share/mysql" \
  47. -DINSTALL_MYSQLTESTDIR="share/mysql-test" \
  48. -DINSTALL_PLUGINDIR="lib/mysql/plugin" \
  49. -DINSTALL_SBINDIR="libexec" \
  50. -DINSTALL_SCRIPTDIR="bin" \
  51. -DINSTALL_SHAREDIR="share" \
  52. -DINSTALL_SQLBENCHDIR="share/mysql-bench" \
  53. -DINSTALL_SUPPORTFILESDIR="share/examples/mysql" \
  54. -DMYSQL_UNIX_ADDR="${SOCKET_DIR}/mysql.sock" \
  55. -DCOMPILATION_COMMENT='OpenBSD port: ${FULLPKGNAME-server}' \
  56. -DWITH_PCRE=bundled \
  57. -DWITH_SSL=system \
  58. -DCONNECT_WITH_LIBXML2=Off
  59. # The Mroonga and TokuDB storage engines do not build at the
  60. # moment on OpenBSD.
  61. # It is still not enabled due to a linking issue with liblz4.
  62. CONFIGURE_ARGS+=-DWITHOUT_MROONGA_STORAGE_ENGINE=1
  63. # One more or more issues to look into.
  64. CONFIGURE_ARGS+=-DWITHOUT_TOKUDB_STORAGE_ENGINE=1
  65. MULTI_PACKAGES= -main -server -tests
  66. .include <bsd.port.arch.mk>
  67. .if !${BUILD_PACKAGES:M-server}
  68. CONFIGURE_ARGS+=-DWITHOUT_SERVER=On
  69. .endif
  70. .if !${BUILD_PACKAGES:M-tests}
  71. CONFIGURE_ARGS+=-DWITH_UNIT_TESTS=Off
  72. .endif
  73. pre-configure:
  74. @${SUBST_CMD} ${WRKSRC}/cmake/mysql_version.cmake
  75. post-install:
  76. @cd ${PREFIX}/lib && \
  77. ln -sf mysql/libmysqlclient.so.${LIBmysqlclient_VERSION} . && \
  78. ln -sf mysql/libmysqlclient_r.so.${LIBmysqlclient_r_VERSION} .
  79. .if ${BUILD_PACKAGES:M-tests}
  80. do-regress:
  81. @cd ${WRKBUILD}/mysql-test && ./mysql-test-run.pl --force --verbose --max-test-fail=0
  82. .else
  83. NO_TEST= Yes
  84. .endif
  85. .include <bsd.port.mk>