Makefile.inc 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # $OpenBSD: Makefile.inc,v 1.13 2017/05/30 08:08:15 espie Exp $
  2. COMMENT ?= real-time, concurrent and distributed functional language
  3. CATEGORIES = lang
  4. # Erlang 16/17: Erlang Public License
  5. # http://www.erlang.org/EPLICENSE
  6. # Erlang 18: Apachev2
  7. PERMIT_PACKAGE_CDROM = Yes
  8. HOMEPAGE = http://www.erlang.org/
  9. MASTER_SITES ?= ${HOMEPAGE}download/
  10. DISTFILES ?= ${DISTNAME}.tar.gz \
  11. otp_doc_man_${V}.tar.gz
  12. EXTRACT_ONLY ?= ${DISTNAME}.tar.gz
  13. CONFIGURE_STYLE ?= autoconf no-autoheader
  14. CONFIGURE_ENV ?= LDFLAGS="${LDFLAGS} -pthread"
  15. AUTOCONF_VERSION ?= 2.59
  16. AUTOCONF_DIR ?= ${WRKSRC} \
  17. ${WRKSRC}/erts \
  18. ${WRKSRC}/lib/wx/
  19. MODGNU_CONFIG_GUESS_DIRS ?= ${WRKSRC}/erts/autoconf \
  20. ${WRKSRC}/lib/erl_interface/src/auxdir \
  21. ${WRKSRC}/lib/wx/autoconf
  22. .if ${MACHINE_ARCH} == i386
  23. CONFIGURE_ARGS += --enable-ethread-pre-pentium4-compatibility
  24. .elif ${MACHINE_ARCH} == sparc64
  25. CFLAGS += -fno-pie
  26. LDFLAGS += -nopie
  27. .endif
  28. USE_GMAKE= Yes
  29. MAKE_ENV += DESTDIR=$(DESTDIR)
  30. NO_TEST ?= Yes
  31. .for _n _v in ${ERL_VERSIONS}
  32. ${_n}=${_v}
  33. ${_n:S/_VSN//}=${_n:S/_VSN//:L}-${_v}
  34. SUBST_VARS+=${_n:S/_VSN//}
  35. .endfor
  36. # XXX COMPILER var clashes with the clang selection mechanism
  37. # fortunately erlang doesn't care, so just set CHOSEN_COMPILER to something
  38. # to avoid the mechanism entirely
  39. CHOSEN_COMPILER = irrelevant
  40. SUBST_VARS+=SYSTEM_VSN MAJ_V
  41. # special cases
  42. EI= erl_interface-${EI_VSN}
  43. COSEVENT= cosEvent-${COSEVENT_VSN}
  44. COSEVENTDOMAIN= cosEventDomain-${COSEVENTDOMAIN_VSN}
  45. COSFILETRANSFER=cosFileTransfer-${COSFILETRANSFER_VSN}
  46. COSNOTIFICATION=cosNotification-${COSNOTIFICATION_VSN}
  47. COSPROPERTY= cosProperty-${COSPROPERTY_VSN}
  48. COSTIME= cosTime-${COSTIME_VSN}
  49. COSTRANSACTIONS=cosTransactions-${COSTRANSACTIONS_VSN}
  50. # Special maintainer target, scan through vsn.mk files and build 'ERL_VERSIONS'
  51. # list
  52. gen-versions: extract
  53. @find ${WRKSRC} -name 'vsn.mk' -exec awk '/_VSN +=/ { print $$1"\t"$$3 " \\" }' {} \; | grep -v 'PRE_' | grep -v 'APP_' | sed 's/DOCB_VSN/DOCBUILDER_VSN/' | sort
  54. @find ${WRKSRC} -name 'vsn.mk' -exec awk -F'=' '/_VSN=/ { print $$1"\t"$$2 " \\" }' {} \; | grep -v 'PRE_' | grep -v 'APP_' | sort
  55. @grep VSN ${WRKSRC}/erts/vsn.mk |awk '/^VSN/ { print "ERTS_VSN\t" $$3 }' | sort
  56. pre-configure:
  57. ${SUBST_CMD} ${WRKSRC}/make/install_bin \
  58. ${WRKSRC}/erts/etc/common/escript.c \
  59. ${WRKSRC}/lib/wx/configure.in
  60. post-install:
  61. ln -sf ../lib/erlang${MAJ_V}/lib/${EI}/bin/erl_call ${PREFIX}/bin/erl_call${MAJ_V}
  62. tar zxf ${FULLDISTDIR}/otp_doc_man_${V}.tar.gz -C ${DOC_DIR}
  63. rm -r ${DOC_DIR}/man/man7/*MIB.7
  64. rm -r ${DOC_DIR}/man/man7/*TM.7