Makefile 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # $OpenBSD: Makefile,v 1.76 2017/05/25 22:57:42 sthen Exp $
  2. MULTI_PACKAGES = -graphics -main
  3. COMMENT-main = ML language with complete class-based objective system
  4. COMMENT-graphics = OCaml Graphics library providing basic drawing primitives
  5. # XXX Don't even think of updating ocaml alone.
  6. # Do check that the ports that depend on it still work, or repair them.
  7. # Don't forget to bump version in ocaml.port.mk, too!
  8. VERSION=4.03.0
  9. REVISION= 0
  10. PKGNAME-main = ocaml-${VERSION}
  11. PKGNAME-graphics = ocaml-graphics-${VERSION}
  12. # OCaml has no binary compatibility between releases.
  13. PKGSPEC-main = ocaml-=${VERSION}
  14. CATEGORIES= lang
  15. # Remove last version component ocaml-X.XX.X -> ocaml-X.XX
  16. BASENAME = ${DISTNAME:C/\.[^.]*$//}
  17. MASTER_SITES= http://caml.inria.fr/pub/distrib/${BASENAME}/
  18. DOCFILES= ${BASENAME}-refman-html.tar.gz
  19. DISTFILES= ${DISTNAME}.tar.gz ${DOCFILES}
  20. DISTNAME = ocaml-${VERSION}
  21. HOMEPAGE= https://ocaml.org/
  22. MAINTAINER= Anil Madhavapeddy <avsm@openbsd.org>
  23. # QPL/LGPL
  24. PERMIT_PACKAGE_CDROM= Yes
  25. CONFIGURE_STYLE= simple dest
  26. CONFIGURE_ARGS+=-prefix ${PREFIX}
  27. CONFIGURE_ARGS+=-aspp '${CC} ${CFLAGS} -c'
  28. CONFIGURE_ARGS+=-cc '${CC} ${CFLAGS}'
  29. CONFIGURE_ARGS+=-x11include ${X11BASE}/include -x11lib ${X11BASE}/lib
  30. CONFIGURE_ENV+=OPENBSD_LOCALBASE="${LOCALBASE}"
  31. USE_GMAKE= Yes
  32. RUN_DEPENDS-graphics += lang/ocaml
  33. WANTLIB-main = c curses m pthread
  34. WANTLIB-graphics = X11
  35. .if ${MACHINE_ARCH} != aarch64
  36. # for libbfd; devel/gdb doesn't build on aarch64 yet.
  37. BUILD_DEPENDS += devel/gdb
  38. WANTLIB-main += iberty z
  39. .endif
  40. .include <bsd.port.arch.mk>
  41. .if ${PROPERTIES:Mocaml_native}
  42. ALL_TARGET= world bootstrap opt opt.opt
  43. PKG_ARGS += -Dnative=1
  44. TEST_DEPENDS += ${BUILD_PKGPATH}
  45. .if ${PROPERTIES:Mocaml_native_dynlink}
  46. PKG_ARGS += -Ddynlink=1
  47. .else
  48. PKG_ARGS += -Ddynlink=0
  49. .endif
  50. .else
  51. ALL_TARGET= world bootstrap
  52. PKG_ARGS += -Dnative=0
  53. NO_TEST = yes
  54. .endif
  55. post-install:
  56. @${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ocaml/html/libref
  57. @${INSTALL_DATA} ${WRKDIR}/htmlman/*.{html,gif,css} \
  58. ${PREFIX}/share/doc/ocaml/html
  59. @${INSTALL_DATA} ${WRKDIR}/htmlman/libref/* \
  60. ${PREFIX}/share/doc/ocaml/html/libref
  61. @${INSTALL_DATA} \
  62. ${WRKSRC}/{LICENSE,Changes} \
  63. ${PREFIX}/share/doc/ocaml
  64. # PFRAG.native was generated from PLIST with:
  65. # egrep '(ocamlopt|\.cmx|\.cmxa|\.cmxs|\.opt|opt\.1|opt.cmi|\.native|\.o)$'
  66. # XXX one test in the suite (testsocket.ml) requires an active
  67. # connection to internet
  68. do-test:
  69. @cd ${WRKSRC}/testsuite && ulimit -Sn 256 && ${MAKE_PROGRAM} all
  70. .include <bsd.port.mk>