Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Mar 2019 15:30:04 +0000 (UTC)
From:      Jimmy Olgeni <olgeni@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r496070 - in head/devel: rebar3 relx
Message-ID:  <201903171530.x2HFU4XV036870@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: olgeni
Date: Sun Mar 17 15:30:04 2019
New Revision: 496070
URL: https://svnweb.freebsd.org/changeset/ports/496070

Log:
  Reduce diff between devel/relx and devel/rebar3.
  
  - Modernize devel/rebar3.
  - Use port version number in cache file names.

Modified:
  head/devel/rebar3/Makefile
  head/devel/rebar3/distinfo
  head/devel/relx/Makefile
  head/devel/relx/distinfo

Modified: head/devel/rebar3/Makefile
==============================================================================
--- head/devel/rebar3/Makefile	Sun Mar 17 15:11:31 2019	(r496069)
+++ head/devel/rebar3/Makefile	Sun Mar 17 15:30:04 2019	(r496070)
@@ -3,13 +3,14 @@
 PORTNAME=	rebar3
 PORTVERSION=	3.9.1
 PORTEPOCH=	1
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES+=	LOCAL/olgeni:deps \
 		http://olgeni.olgeni.com/~olgeni/distfiles/:deps \
 		https://repo.hex.pm/tarballs/:hex
-DISTFILES=	rebar3-cache-${CACHE_VERSION}${EXTRACT_SUFX}:deps
+DISTFILES=	rebar3-cache-${PORTVERSION}${EXTRACT_SUFX}:deps
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX} \
-		rebar3-cache-${CACHE_VERSION}${EXTRACT_SUFX}
+		rebar3-cache-${PORTVERSION}${EXTRACT_SUFX}
 
 MAINTAINER=	olgeni@FreeBSD.org
 COMMENT=	Build tool for Erlang
@@ -31,7 +32,6 @@ PORTEXAMPLES=	rebar.config.sample
 BASH_PLIST_FILES=	share/bash-completion/completions/rebar3
 ZSH_PLIST_FILES=	share/zsh/site-functions/_rebar3
 
-CACHE_VERSION=	22
 # from rebar.config
 REBAR_DEPS=	bbmustache-1.6.0 \
 		certifi-2.3.1 \
@@ -49,14 +49,12 @@ REBAR_DEPS=	bbmustache-1.6.0 \
 DISTFILES+=	${_dep}.tar:hex
 .endfor
 
-.include <bsd.port.options.mk>
-
 # convenience target to rebuild the rebar3 cache file
 build-cache:
-	cd ${WRKDIR} && ${TAR} -c -v -z -f rebar3-cache-${CACHE_VERSION}${EXTRACT_SUFX} .cache
+	cd ${WRKDIR} && ${TAR} -c -v -z -f rebar3-cache-${PORTVERSION}${EXTRACT_SUFX} .cache
 
 post-extract:
-	@${REINPLACE_CMD} -e 's/{vsn, "git"}/{vsn, "${GH_TAGNAME}"}/' ${WRKSRC}/src/rebar.app.src
+	@${REINPLACE_CMD} -e 's/{ *vsn,.*}/{vsn, "${PORTVERSION}"}/' ${WRKSRC}/src/*.app.src
 .for _dep in ${REBAR_DEPS}
 	${MKDIR} ${WRKSRC}/_build/default/lib/${_dep:C/-.*//}
 	${TAR} xOf ${DISTDIR}/${_dep}.tar contents.tar.gz |\
@@ -67,7 +65,6 @@ post-extract:
 	${TAR} xOf ${DISTDIR}/${_dep}.tar contents.tar.gz |\
 		${TAR} xfz - -C ${WRKSRC}/_build/default/plugins/${_dep:C/-.*//}
 .endfor
-
 	@${MKDIR} ${WRKSRC}/_build/bootstrap/lib
 	@${MKDIR} ${WRKSRC}/_build/bootstrap/plugins
 .for _dep in ${REBAR_DEPS}
@@ -83,16 +80,18 @@ do-build:
 
 do-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
-.if ${PORT_OPTIONS:MBASH}
+
+do-install-BASH-on:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions
 	${INSTALL_DATA} ${WRKSRC}/priv/shell-completion/bash/rebar3 \
 		${STAGEDIR}${PREFIX}/share/bash-completion/completions/rebar3
-.endif
-.if ${PORT_OPTIONS:MZSH}
+
+do-install-ZSH-on:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
 	${INSTALL_DATA} ${WRKSRC}/priv/shell-completion/zsh/_rebar3 \
 		${STAGEDIR}${PREFIX}/share/zsh/site-functions/
-.endif
+
+post-install-EXAMPLES-on:
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 	${INSTALL_DATA} ${WRKSRC}/rebar.config.sample ${STAGEDIR}${EXAMPLESDIR}
 

Modified: head/devel/rebar3/distinfo
==============================================================================
--- head/devel/rebar3/distinfo	Sun Mar 17 15:11:31 2019	(r496069)
+++ head/devel/rebar3/distinfo	Sun Mar 17 15:30:04 2019	(r496070)
@@ -1,6 +1,6 @@
-TIMESTAMP = 1552732753
-SHA256 (rebar3-cache-22.tar.gz) = 86afa24c82e4b472a5443ebb62615508bf97160723218fa9fd0d44e3ee0bdc97
-SIZE (rebar3-cache-22.tar.gz) = 3483012
+TIMESTAMP = 1552738297
+SHA256 (rebar3-cache-3.9.1.tar.gz) = 13d50077d2105aecddcb4ee2ba2ec358dcf5154d898d3b003bb3429bb9d7dbda
+SIZE (rebar3-cache-3.9.1.tar.gz) = 8066
 SHA256 (bbmustache-1.6.0.tar) = 53e02d296512a57be03a98c91541b34d2ca64930268030b2d12364a0332015df
 SIZE (bbmustache-1.6.0.tar) = 15360
 SHA256 (certifi-2.3.1.tar) = e12d667d042c11d130594bae2b0097e63836fe8b1e6d6b2cc48f8bb7a2cf7d68

Modified: head/devel/relx/Makefile
==============================================================================
--- head/devel/relx/Makefile	Sun Mar 17 15:11:31 2019	(r496069)
+++ head/devel/relx/Makefile	Sun Mar 17 15:30:04 2019	(r496070)
@@ -3,13 +3,14 @@
 PORTNAME=	relx
 PORTVERSION=	3.29.0
 DISTVERSIONPREFIX=	v
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES+=	LOCAL/olgeni:deps \
 		http://olgeni.olgeni.com/~olgeni/distfiles/:deps \
 		https://repo.hex.pm/tarballs/:hex
-DISTFILES=	relx-cache-${CACHE_VERSION}${EXTRACT_SUFX}:deps
+DISTFILES=	relx-cache-${PORTVERSION}${EXTRACT_SUFX}:deps
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX} \
-		relx-cache-${CACHE_VERSION}${EXTRACT_SUFX}
+		relx-cache-${PORTVERSION}${EXTRACT_SUFX}
 
 MAINTAINER=	olgeni@FreeBSD.org
 COMMENT=	Sane, simple release creation for Erlang
@@ -20,6 +21,8 @@ BUILD_DEPENDS=	${LOCALBASE}/bin/erl:lang/erlang \
 		rebar3>=0:devel/rebar3
 RUN_DEPENDS:=	${BUILD_DEPENDS}
 
+OPTIONS_DEFINE=	DOCS EXAMPLES
+
 PLIST_SUB=	VERSION="${PORTVERSION}"
 
 # Use either erlware or tsloughter, depending on who actually
@@ -27,7 +30,6 @@ PLIST_SUB=	VERSION="${PORTVERSION}"
 USE_GITHUB=	yes
 GH_ACCOUNT=	erlware
 
-CACHE_VERSION=	22
 # from rebar.config
 REBAR_DEPS=	bbmustache-1.6.1 \
 		cf-0.3.1 \
@@ -39,27 +41,22 @@ REBAR_DEPS=	bbmustache-1.6.1 \
 DISTFILES+=	${_dep}.tar:hex
 .endfor
 
-OPTIONS_DEFINE=	DOCS EXAMPLES
-
 # convenience target to rebuild the relx cache file
 build-cache:
-	cd ${WRKDIR} && ${TAR} -c -v -z -f relx-cache-${CACHE_VERSION}${EXTRACT_SUFX} .cache
+	cd ${WRKDIR} && ${TAR} -c -v -z -f relx-cache-${PORTVERSION}${EXTRACT_SUFX} .cache
 
 # rebar3 insists on downloading dependencies, and some kind of package
 # index into the user's HOME. We need to trick it into behaving by
 # providing both before building.
 
 post-extract:
+	@${REINPLACE_CMD} -e 's/{ *vsn,.*}/{vsn, "${PORTVERSION}"}/' ${WRKSRC}/src/*.app.src
 .for _dep in ${REBAR_DEPS}
-	@${MKDIR} ${WRKSRC}/_build/default/lib/${_dep:C/-.*//}
-	@${TAR} xOf ${DISTDIR}/${_dep}.tar contents.tar.gz |\
+	${MKDIR} ${WRKSRC}/_build/default/lib/${_dep:C/-.*//}
+	${TAR} xOf ${DISTDIR}/${_dep}.tar contents.tar.gz |\
 		${TAR} xfz - -C ${WRKSRC}/_build/default/lib/${_dep:C/-.*//}
 .endfor
 
-post-patch:
-	@${REINPLACE_CMD} -i '' -e 's/{ *vsn,.*}/{vsn, "${PORTVERSION}"}/' \
-		${WRKSRC}/src/${PORTNAME}.app.src
-
 do-build:
 	@${RM} ${WRKSRC}/rebar.lock
 	@cd ${WRKSRC} && HOME=${WRKDIR} rebar3 compile
@@ -84,6 +81,7 @@ do-install:
 post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+
 post-install-EXAMPLES-on:
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 	${INSTALL_DATA} ${WRKSRC}/examples/* ${STAGEDIR}${EXAMPLESDIR}

Modified: head/devel/relx/distinfo
==============================================================================
--- head/devel/relx/distinfo	Sun Mar 17 15:11:31 2019	(r496069)
+++ head/devel/relx/distinfo	Sun Mar 17 15:30:04 2019	(r496070)
@@ -1,6 +1,6 @@
-TIMESTAMP = 1552732427
-SHA256 (relx-cache-22.tar.gz) = 862d2ac871955552d75e2a9a3528dc9676204e503d8a539e1701d918003c8c98
-SIZE (relx-cache-22.tar.gz) = 3214611
+TIMESTAMP = 1552739223
+SHA256 (relx-cache-3.29.0.tar.gz) = 65b7c3051faf570b2090b8f1dcc8d6e704df732d8e37b5bc527dd2c38b92de56
+SIZE (relx-cache-3.29.0.tar.gz) = 2961
 SHA256 (bbmustache-1.6.1.tar) = 238ba8df312869782abde3e9474e94b5704fb6bbb990c03f1afefdc8a4ad3a49
 SIZE (bbmustache-1.6.1.tar) = 15360
 SHA256 (cf-0.3.1.tar) = 315e8d447d3a4b02bcdbfa397ad03bbb988a6e0aa6f44d3add0f4e3c3bf97672



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903171530.x2HFU4XV036870>