Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # $OpenBSD: Makefile,v 1.6 2017/01/09 10:32:33 juanfra Exp $
  2. ONLY_FOR_ARCHS = i386 amd64
  3. COMMENT = statically typed, imperative programming language
  4. VERSION = 0.16.0
  5. DISTNAME = nim-${VERSION}
  6. EXTRACT_SUFX = .tar.xz
  7. CATEGORIES = lang
  8. HOMEPAGE = http://nim-lang.org/
  9. MASTER_SITES = http://nim-lang.org/download/ \
  10. http://download.tuxfamily.org/jod/lang/nim/
  11. # MIT
  12. PERMIT_PACKAGE_CDROM = Yes
  13. WANTLIB = c m
  14. post-patch:
  15. mkdir -p ${WRKSRC}/nimcache-port
  16. mkdir -p ${WRKSRC}/nimcache-port-test
  17. perl -i -pe "s#NIM_PORT_PATH#${PATH}#" ${WRKSRC}/koch.nim
  18. perl -i -pe "s#NIM_PORT_CACHE#${WRKSRC}/nimcache-port-test#" \
  19. ${WRKSRC}/koch.nim
  20. do-build:
  21. cd ${WRKSRC} && ${SETENV} CC="${CC}" LINKER="${CC}" \
  22. CFLAGS="${CFLAGS}" sh build.sh
  23. # slow machines can get a head of themselves and fail to link
  24. cd ${WRKSRC} && bin/nim c -d:release --parallelBuild:1 \
  25. --nimcache:"${WRKSRC}/nimcache-port" --listFullPaths \
  26. --listCmd --putenv:"PATH=${PATH}" koch
  27. cd ${WRKSRC} && ./koch boot -d:release --parallelBuild:1 \
  28. --nimcache:"${WRKSRC}/nimcache-port" --listFullPaths \
  29. --listCmd --putenv:"PATH=${PATH}"
  30. do-install:
  31. ${INSTALL_PROGRAM_DIR} ${PREFIX}/bin
  32. ${INSTALL_PROGRAM} ${WRKSRC}/bin/nim ${PREFIX}/bin
  33. ${INSTALL_DATA_DIR} ${PREFIX}/lib/nim
  34. cp -R ${WRKSRC}/lib/* ${PREFIX}/lib/nim
  35. chown -R ${LIBOWN}:${LIBGRP} ${PREFIX}/lib/nim
  36. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/nim
  37. ${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${PREFIX}/share/doc/nim
  38. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/nim
  39. ${INSTALL_DATA} ${WRKSRC}/config/*.cfg ${PREFIX}/share/examples/nim
  40. do-test:
  41. cd ${WRKSRC} && ${SETENV} ./koch test all -d:release \
  42. --parallelBuild:1 --listFullPaths --listCmd \
  43. --nimcache:"${WRKSRC}/nimcache-port-test" \
  44. --putenv:"PATH=${PATH}"
  45. .include <bsd.port.mk>