Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # $OpenBSD: Makefile,v 1.17 2017/04/07 21:14:17 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.3.4
  7. RUBYLIBREV = 2.3
  8. DISTNAME = ruby-${VERSION}
  9. SHARED_LIBS = ruby23 1.0
  10. PKGNAME-main = ruby-${VERSION}
  11. PKGNAME-gdbm = ruby23-gdbm-${VERSION}
  12. PKGNAME-tk = ruby23-tk-${VERSION}
  13. PKGNAME-ri_docs = ruby23-ri_docs-${VERSION}
  14. PKG_ARCH-ri_docs = *
  15. WANTLIB-ri_docs = # empty
  16. NEXTVER = 2.4
  17. PKGSPEC-main = ruby->=${RUBYLIBREV},<${NEXTVER}
  18. CONFIGURE_ARGS = --program-suffix=23 \
  19. --with-soname=ruby23 \
  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 = LIBruby23_VERSION=${LIBruby23_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 ruby23
  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 ruby23 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-* ${WRKSRC}/tool/downloader.rb
  72. # cc(1) uses too much ram to build ext/ripper/ripper.c
  73. # XXX remove arch if vmparam.h + login.conf give more than 1024M to pbuild
  74. .if ${MACHINE_ARCH:Malpha} || ${MACHINE_ARCH:Marm} || ${MACHINE_ARCH:Mhppa}
  75. CFLAGS_OVERRIDE = -O1
  76. .endif
  77. pre-configure:
  78. sed -i 's/%%CFLAGS_OVERRIDE%%/${CFLAGS_OVERRIDE}/g' \
  79. ${WRKSRC}/ext/ripper/depend
  80. pre-install:
  81. find ${WRKSRC} -name '*.orig' -print0 | xargs -0r rm
  82. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ruby \
  83. ${PREFIX}/lib/ruby/gems/${RUBYLIBREV}/extensions/${SUB} \
  84. ${PREFIX}/lib/ruby/gems/${RUBYLIBREV}/extensions/${SUB}/${RUBYLIBREV}
  85. post-install:
  86. ${FIX_RBCONFIG}
  87. chmod 444 ${PREFIX}/lib/ruby/gems/${RUBYLIBREV}/{cache,specifications}/*.gem*
  88. # 16021 tests, 2256593 assertions, 3 failures, 5 errors, 127 skips
  89. do-test:
  90. -cd ${WRKSRC} && make test-sample
  91. -cd ${WRKSRC} && make btest-ruby
  92. cd ${WRKSRC} && make test-all TESTOPTS="-v -q"
  93. .include <bsd.port.mk>