aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorolgeni <olgeni@FreeBSD.org>2015-06-30 04:48:54 +0800
committerolgeni <olgeni@FreeBSD.org>2015-06-30 04:48:54 +0800
commit53ef32060cd7a8dc3c67cdb4f6b9cae9d2ffafd4 (patch)
treed2784e6416875dde5ad34ac403717bc21cff56c8 /devel
parentc93d8d93095d7bee9baa5128cff29718748df8d3 (diff)
downloadfreebsd-ports-gnome-53ef32060cd7a8dc3c67cdb4f6b9cae9d2ffafd4.tar.gz
freebsd-ports-gnome-53ef32060cd7a8dc3c67cdb4f6b9cae9d2ffafd4.tar.zst
freebsd-ports-gnome-53ef32060cd7a8dc3c67cdb4f6b9cae9d2ffafd4.zip
Rebuild devel/relx using port dependencies rather than the dependency
tarball. We also use rebar3 from ports. This gets us the full relx Erlang app, with its own beam files that can be used elsewhere.
Diffstat (limited to 'devel')
-rw-r--r--devel/relx/Makefile49
-rw-r--r--devel/relx/distinfo2
-rw-r--r--devel/relx/pkg-plist60
3 files changed, 98 insertions, 13 deletions
diff --git a/devel/relx/Makefile b/devel/relx/Makefile
index 09525d4827c7..e354936b2139 100644
--- a/devel/relx/Makefile
+++ b/devel/relx/Makefile
@@ -2,12 +2,12 @@
PORTNAME= relx
PORTVERSION= 3.0.0
+PORTREVISION= 1
DISTVERSIONPREFIX=v
CATEGORIES= devel
MASTER_SITES+= http://olgeni.olgeni.com/~olgeni/distfiles/:deps \
LOCAL/olgeni:deps
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
- relx-deps-2.tar.gz:deps \
relx-cache-2.tar.gz:deps
MAINTAINER= olgeni@FreeBSD.org
@@ -15,30 +15,57 @@ COMMENT= Sane, simple release creation for Erlang
LICENSE= APACHE20
-BUILD_DEPENDS= ${LOCALBASE}/bin/erl:${PORTSDIR}/lang/erlang
-RUN_DEPENDS= ${LOCALBASE}/bin/erl:${PORTSDIR}/lang/erlang
+BUILD_DEPENDS= ${LOCALBASE}/bin/erl:${PORTSDIR}/lang/erlang \
+ rebar3>=0:${PORTSDIR}/devel/rebar3 \
+ erlang-bbmustache>=0:${PORTSDIR}/devel/erlang-bbmustache \
+ erlang-erlware_commons>=0:${PORTSDIR}/devel/erlang-erlware_commons \
+ erlang-getopt>=0:${PORTSDIR}/devel/erlang-getopt \
+ erlang-providers>=0:${PORTSDIR}/devel/erlang-providers \
+ erlang-jsx>=0:${PORTSDIR}/devel/erlang-jsx \
+ erlang-rebar3_hex>=0:${PORTSDIR}/devel/erlang-rebar3_hex \
+ erlang-ssl_verify_hostname>=0:${PORTSDIR}/devel/erlang-ssl_verify_hostname
+RUN_DEPENDS:= ${BUILD_DEPENDS}
+
+PLIST_SUB= VERSION="${PORTVERSION}"
USE_GITHUB= yes
GH_ACCOUNT= erlware
-PLIST_FILES= bin/${PORTNAME}
-
# 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:
- @${CP} -R ${WRKDIR}/_build ${WRKSRC}/
@${LN} -s cache ${WRKDIR}/.cache
-post-patch:
- @${REINPLACE_CMD} -e "s/%%PORTVERSION%%/${PORTVERSION}/" ${WRKSRC}/src/relx.app.src
- @${RM} ${WRKSRC}/src/*.bak ${WRKSRC}/src/*.orig
+pre-build:
+ @${MKDIR} ${WRKSRC}/_build/default/lib
+ @${MKDIR} ${WRKSRC}/_build/default/plugins
+.for lib in bbmustache erlware_commons getopt providers
+ @${LN} -s ${PREFIX}/lib/erlang/lib/$(lib)-* ${WRKSRC}/_build/default/lib/$(lib)
+.endfor
+.for plugin in jsx rebar3_hex ssl_verify_hostname
+ @${LN} -s ${PREFIX}/lib/erlang/lib/$(plugin)-* ${WRKSRC}/_build/default/plugins/$(plugin)
+.endfor
do-build:
- @cd ${WRKSRC} && HOME=${WRKDIR} ./rebar3 escriptize
+ @${RM} ${WRKSRC}/rebar.lock
+ @cd ${WRKSRC} && HOME=${WRKDIR} rebar3 compile
+ @${RM} ${WRKSRC}/rebar.lock
+ @cd ${WRKSRC} && HOME=${WRKDIR} rebar3 escriptize
do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/_build/default/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/ebin
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/include
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/priv
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/src
+ ${INSTALL_DATA} ${WRKSRC}/include/* ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/include
+ ${INSTALL_DATA} ${WRKSRC}/src/* ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/src
+ ${INSTALL_DATA} ${WRKSRC}/_build/default/lib/relx/ebin/* ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/ebin
+ cd ${WRKSRC}/priv && ${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/priv
+ ${INSTALL_SCRIPT} ${WRKSRC}/_build/default/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>
diff --git a/devel/relx/distinfo b/devel/relx/distinfo
index 0abd91740134..8875f9560233 100644
--- a/devel/relx/distinfo
+++ b/devel/relx/distinfo
@@ -1,6 +1,4 @@
SHA256 (erlware-relx-v3.0.0_GH0.tar.gz) = 5742ea33a221f54fa975291705b51d779347b4bd0a0040f0745f4faf9c29c084
SIZE (erlware-relx-v3.0.0_GH0.tar.gz) = 443282
-SHA256 (relx-deps-2.tar.gz) = b86212e1c4dc7dbf545c0eceaa9f3fd6a3cbc123a9b62d657ceb07f6b9695913
-SIZE (relx-deps-2.tar.gz) = 680754
SHA256 (relx-cache-2.tar.gz) = fdacd15a5decddc2d2ce1b0f5b8d7aa592b4c1c5a5f4eddef9cf6234a796f6fe
SIZE (relx-cache-2.tar.gz) = 213517
diff --git a/devel/relx/pkg-plist b/devel/relx/pkg-plist
new file mode 100644
index 000000000000..b43b5f405a5e
--- /dev/null
+++ b/devel/relx/pkg-plist
@@ -0,0 +1,60 @@
+bin/relx
+lib/erlang/lib/relx-%%VERSION%%/ebin/relx.app
+lib/erlang/lib/relx-%%VERSION%%/ebin/relx.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_app_discovery.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_app_info.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_cmd_args.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_config.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_depsolver.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_depsolver_culprit.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_dscv_util.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_goal.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_goal_utils.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_prv_app_discover.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_prv_archive.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_prv_assembler.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_prv_overlay.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_prv_rel_discover.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_prv_release.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_prv_relup.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_rel_discovery.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_release.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_state.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_topo.beam
+lib/erlang/lib/relx-%%VERSION%%/ebin/rlx_util.beam
+lib/erlang/lib/relx-%%VERSION%%/include/relx.hrl
+lib/erlang/lib/relx-%%VERSION%%/priv/templates/bin
+lib/erlang/lib/relx-%%VERSION%%/priv/templates/bin_windows
+lib/erlang/lib/relx-%%VERSION%%/priv/templates/erl_ini
+lib/erlang/lib/relx-%%VERSION%%/priv/templates/erl_script
+lib/erlang/lib/relx-%%VERSION%%/priv/templates/extended_bin
+lib/erlang/lib/relx-%%VERSION%%/priv/templates/extended_bin_windows
+lib/erlang/lib/relx-%%VERSION%%/priv/templates/install_upgrade_escript
+lib/erlang/lib/relx-%%VERSION%%/priv/templates/nodetool
+lib/erlang/lib/relx-%%VERSION%%/priv/templates/sys_config
+lib/erlang/lib/relx-%%VERSION%%/priv/templates/vm_args
+lib/erlang/lib/relx-%%VERSION%%/src/relx.app.src
+lib/erlang/lib/relx-%%VERSION%%/src/relx.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_app_discovery.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_app_info.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_cmd_args.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_config.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_depsolver.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_depsolver_culprit.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_dscv_util.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_goal.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_goal.peg
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_goal_utils.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_prv_app_discover.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_prv_archive.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_prv_assembler.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_prv_overlay.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_prv_rel_discover.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_prv_release.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_prv_relup.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_rel_discovery.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_release.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_state.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_topo.erl
+lib/erlang/lib/relx-%%VERSION%%/src/rlx_util.erl
+%%PORTDOCS%%%%DOCSDIR%%/README.md