[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / lang / erlang

File: [cvs.NetBSD.org] / pkgsrc / lang / erlang / Makefile (download)

Revision 1.99, Thu Feb 27 13:46:39 2020 UTC (3 months, 1 week ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2020Q1-base, pkgsrc-2020Q1
Changes since 1.98: +12 -13 lines

erlang*: Update to 22.2.7.

Highlights
==========

erts:
 o The Kernel application's User's Guide now contains a Logger Cookbook
   with common usage patterns.
 o Numerous improvements in the new socket and net modules

Standard libraries:
 o common_test: ct_property_test logging is improved
 o ssl: Correct handling of unordered chains so that it works as expected

Tools:
 o Emacs erlang-mode function that lets the user open the documentation for
   an Erlang/OTP function in an Emacs buffer has been improved.  Users will
   be asked if they want the man pages downloaded if they are not present in
   the system.

# $NetBSD: Makefile,v 1.99 2020/02/27 13:46:39 jperkin Exp $

DISTNAME=	erlang-${DIST_VERSION_MAJOR}.${DIST_VERSION_MINOR}${!empty(DIST_VERSION_PATCH):?.:}${DIST_VERSION_PATCH}
PKGNAME=	${DISTNAME:S/OTP-/erlang-/}
CATEGORIES=	lang
MASTER_SITES=	${MASTER_SITE_GITHUB:=erlang/}
GITHUB_PROJECT=	otp
GITHUB_TAG=	OTP-${PKGVERSION_NOREV}

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://www.erlang.org/
COMMENT=	Concurrent functional programming language
LICENSE=	apache-2.0

EXTRACT_USING=	bsdtar

WRKSRC=		${WRKDIR}/otp-${GITHUB_TAG}
GNU_CONFIGURE=	yes
USE_TOOLS+=	autoconf awk gmake perl:run flex

.include "../../mk/bsd.prefs.mk"

.if !empty(MACHINE_ARCH:M*armv6*) || !empty(MACHINE_ARCH:M*armv7*)
MAKE_FLAGS+=	ARCH=arm
.endif

USE_GNU_CONFIGURE_HOST=	${USE_CROSS_COMPILE}
OVERRIDE_DIRDEPTH=	4

CONFIGURE_ARGS+=	--with-ssl=${BUILDLINK_PREFIX.openssl}

PTHREAD_OPTS+=		require native
CONFIGURE_ARGS+=	--enable-threads

MAKE_ENV+=		DESTDIR=${DESTDIR}

do-configure-post-hook: replace-interpreter

REPLACE_INTERPRETER+=	escript
REPLACE.escript.old=	.*escript
REPLACE.escript.new=	${PREFIX}/bin/escript
REPLACE_FILES.escript+=	lib/diameter/bin/diameterc
REPLACE_FILES.escript+=	lib/erl_docgen/priv/bin/codeline_preprocessing.escript
REPLACE_FILES.escript+=	lib/erl_docgen/priv/bin/xml_from_edoc.escript
REPLACE_FILES.escript+=	lib/reltool/examples/display_args
REPLACE_FILES.escript+=	lib/reltool/examples/mnesia_core_dump_viewer
REPLACE_FILES.escript+=	lib/snmp/src/compile/snmpc.src

SUBST_CLASSES+=		target
SUBST_STAGE.target=	pre-configure
SUBST_FILES.target=	make/target.mk
SUBST_SED.target=	-e "s|=.*config.guess)|= ${MACHINE_GNU_PLATFORM}|"
SUBST_MESSAGE.target=	Fixing target name.

TEST_TARGET=		tests
TEST_MAKE_FLAGS=	ERL_TOP=${WRKSRC}

SMF_NAME=		epmd

CONFIGURE_ARGS.DragonFly+=	--disable-sctp

###
### XXX There may be others here.
###
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "Darwin"
CONFIGURE_ARGS+=	--enable-kernel-poll
.endif

CHECK_RELRO_SKIP+=	lib/erlang/lib/megaco-${VERSION.megaco}/priv/lib/megaco_flex_scanner_drv.so
CHECK_RELRO_SKIP+=	lib/erlang/lib/megaco-${VERSION.megaco}/priv/lib/megaco_flex_scanner_drv_mt.so

.include "options.mk"

pre-configure:
	cd ${WRKSRC} && ./otp_build autoconf

###
### Ensure this gets rebuilt.
###
pre-build:
	${RUN} ${RM} -f ${WRKSRC}/lib/stdlib/ebin/dets_v9.beam

###
### Generate a list of module versions.
###
.PHONY: versions
versions: do-extract
	@${ECHO} "# \$$NetBSD\$$" > ${.CURDIR}/versions.mk
	@${ECHO} "# Do not edit, regenerate using 'make versions'" >> ${.CURDIR}/versions.mk
	${AWK} -F: '/OTP-${PKGVERSION_NOREV} :/{print $$2}' ${WRKSRC}/otp_versions.table | \
		${SED} -e 's/# //g' -e 's/-/ /g' \
		       -e 's,^ ,_VERSIONS=	,' \
		       -e 's, *$$,,' \
			>> ${.CURDIR}/versions.mk

post-install:
	chmod -R go-w ${DESTDIR}${PREFIX}/lib/erlang/lib

.include "Makefile.versions"

.include "../../security/openssl/buildlink3.mk"
.include "../../mk/termcap.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"