Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # $OpenBSD: Makefile,v 1.6 2017/05/31 08:08:17 espie Exp $
  2. COMMENT = crypto and TLS for C++11
  3. VERSION = 2.1.0
  4. DISTNAME = Botan-${VERSION}
  5. PKGNAME = botan2-${VERSION}
  6. SHARED_LIBS = botan-2 1.0
  7. CATEGORIES = security
  8. HOMEPAGE = https://botan.randombit.net/
  9. MAINTAINER = Alexander Bluhm <bluhm@openbsd.org>
  10. # BSD 2-Clause
  11. PERMIT_PACKAGE_CDROM = Yes
  12. WANTLIB = bz2 c m lzma pthread z
  13. MASTER_SITES = ${HOMEPAGE}releases/
  14. SUPDISTFILES = ${DISTFILES}.asc
  15. EXTRACT_SUFX = .tgz
  16. MODULES = lang/python
  17. MODPY_RUNDEP = No
  18. COMPILER = gcc
  19. LIB_DEPENDS = archivers/bzip2 \
  20. archivers/xz
  21. SEPARATE_BUILD = Yes
  22. CONFIGURE_STYLE = simple
  23. CONFIGURE_SCRIPT = ${WRKSRC}/configure.py
  24. CONFIGURE_ARGS = --with-build-dir=${WRKBUILD} \
  25. --prefix=${PREFIX} \
  26. --destdir=${DESTDIR}${PREFIX} \
  27. --distribution-info="`uname -sr`" \
  28. --with-bzip2 \
  29. --with-lzma \
  30. --with-zlib \
  31. --without-sphinx
  32. .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
  33. PKG_ARGS = -Dx86=1
  34. .else
  35. PKG_ARGS = -Dx86=0
  36. .endif
  37. SUBST_VARS = CXX CXXFLAGS LIBbotan-2_VERSION
  38. pre-configure:
  39. ${SUBST_CMD} ${WRKSRC}/src/build-data/cc/gcc.txt
  40. ${SUBST_CMD} ${WRKSRC}/src/build-data/os/openbsd.txt
  41. ln -sf ${MODPY_BIN} ${WRKDIR}/bin/python
  42. do-test:
  43. cd ${WRKSRC} && LD_LIBRARY_PATH=${WRKBUILD} ${WRKBUILD}/botan-test
  44. post-install:
  45. ${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \
  46. ${PREFIX}/lib/python${MODPY_VERSION}/site-packages/botan2.py
  47. cd ${PREFIX}/share/doc && mv botan-${VERSION} botan-2
  48. .include <bsd.port.mk>
  49. # clang does not have /usr/local in its path, but more importantly,
  50. # if we don't explicitly configure for it, it passes as a good enough gcc,
  51. # and then we get lots of warnings for unknown warning options...
  52. .if ${PROPERTIES:Mclang}
  53. CONFIGURE_ARGS += --with-external-includedir=${LOCALBASE}/include \
  54. --with-external-libdir=${LOCALBASE}/lib \
  55. --cc=clang
  56. .endif