Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # $OpenBSD: Makefile,v 1.20 2017/04/04 21:40:01 jeremy Exp $
  2. COMMENT-main = object oriented script language with threads
  3. COMMENT-gdbm = gdbm interface for ruby
  4. COMMENT-tk = tk interface for ruby
  5. COMMENT-ri_docs = ri documentation files for ruby
  6. VERSION = 2.2.7
  7. RUBYLIBREV = 2.2
  8. DISTNAME = ruby-${VERSION}
  9. SHARED_LIBS = ruby22 1.3
  10. PKGNAME-main = ruby-${VERSION}
  11. PKGNAME-gdbm = ruby22-gdbm-${VERSION}
  12. PKGNAME-tk = ruby22-tk-${VERSION}
  13. PKGNAME-ri_docs = ruby22-ri_docs-${VERSION}
  14. PKG_ARCH-ri_docs = *
  15. WANTLIB-ri_docs = # empty
  16. NEXTVER = 2.3
  17. PKGSPEC-main = ruby->=${RUBYLIBREV},<${NEXTVER}
  18. CONFIGURE_ARGS = --program-suffix=22 \
  19. --with-soname=ruby22 \
  20. --with-ruby-version=minor \
  21. --with-mantype=doc \
  22. --enable-pthread \
  23. --enable-ipv6 \
  24. --without-bundled-libffi \
  25. --disable-option-checking
  26. CONFIGURE_ENV = LIBruby22_VERSION=${LIBruby22_VERSION} \
  27. ac_cv_prog_DOXYGEN="" \
  28. ac_cv_prog_DOT="" \
  29. DLDFLAGS="-L${LOCALBASE}/lib"
  30. MAKE_ENV = DLDFLAGS="-I${LOCALBASE}/lib"
  31. ALL_TARGET = V=1 main
  32. INSTALL_TARGET = V=1 install-nodoc
  33. WANTLIB-main = c crypto ffi gmp m ncurses pthread readline ssl \
  34. util yaml z
  35. LIB_DEPENDS-main = devel/gmp \
  36. devel/libyaml \
  37. devel/libffi
  38. PSEUDO_FLAVORS= no_tk no_ri_docs bootstrap
  39. # Do not build the RI docs on slow arches
  40. .if ${MACHINE_ARCH:Malpha} || ${MACHINE_ARCH:Marm} || ${MACHINE_ARCH:Mhppa}
  41. FLAVOR?= no_ri_docs bootstrap
  42. .else
  43. FLAVOR?=
  44. .endif
  45. MULTI_PACKAGES = -main -gdbm -tk -ri_docs
  46. .include <bsd.port.arch.mk>
  47. WANTLIB-gdbm = c m gdbm gmp pthread ruby22
  48. LIB_DEPENDS-gdbm = databases/gdbm \
  49. devel/gmp \
  50. lang/ruby/${REV},-main>=${VERSION},<${NEXTVER}
  51. RUN_DEPENDS-gdbm =
  52. .if ${BUILD_PACKAGES:M-tk}
  53. CONFIGURE_ARGS+= --with-tcl-include=${LOCALBASE}/include/tcl8.5 \
  54. --with-tk-include=${LOCALBASE}/include/tk8.5 \
  55. --with-tcllib=tcl85 \
  56. --with-tklib=tk85 \
  57. --with-X11-dir=${X11BASE}
  58. WANTLIB-tk = X11 c gmp m pthread ruby22 tcl85 tk85
  59. LIB_DEPENDS-tk = tk->=8.5,<8.6:x11/tk/8.5 \
  60. devel/gmp \
  61. lang/ruby/${REV},-main>=${VERSION},<${NEXTVER}
  62. RUN_DEPENDS-tk =
  63. .endif
  64. .if ${BUILD_PACKAGES:M-ri_docs}
  65. ALL_TARGET += rdoc
  66. INSTALL_TARGET += install-doc
  67. .endif
  68. SUBST_VARS += RUBYLIBREV
  69. TEST_DEPENDS = ${FULLPKGNAME-main}:${BUILD_PKGPATH}
  70. post-extract:
  71. rm -rf ${WRKSRC}/ext/fiddle/libffi-*
  72. pre-install:
  73. find ${WRKSRC} -name '*.orig' -print0 | xargs -0r rm
  74. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ruby \
  75. ${PREFIX}/lib/ruby/gems/${RUBYLIBREV}/extensions/${SUB} \
  76. ${PREFIX}/lib/ruby/gems/${RUBYLIBREV}/extensions/${SUB}/${RUBYLIBREV}
  77. post-install:
  78. ${FIX_RBCONFIG}
  79. do-test:
  80. -cd ${WRKSRC} && make test-sample
  81. -cd ${WRKSRC} && make btest-ruby
  82. cd ${WRKSRC} && make test-all TESTOPTS="-v -q -x test/ruby/test_io.rb \
  83. -x test/net/http/test_http.rb"
  84. .include <bsd.port.mk>