pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc devel/hex: fix build.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5b24ef08a4f4
branches:  trunk
changeset: 388165:5b24ef08a4f4
user:      nikita <nikita%pkgsrc.org@localhost>
date:      Mon Nov 14 17:48:14 2022 +0000

description:
devel/hex: fix build.

diffstat:

 devel/hex/Makefile |   4 +++-
 lang/elixir/mix.mk |  16 +++++++++++++---
 2 files changed, 16 insertions(+), 4 deletions(-)

diffs (61 lines):

diff -r 0bada72e2adc -r 5b24ef08a4f4 devel/hex/Makefile
--- a/devel/hex/Makefile        Mon Nov 14 17:24:46 2022 +0000
+++ b/devel/hex/Makefile        Mon Nov 14 17:48:14 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2022/11/10 14:23:53 nikita Exp $
+# $NetBSD: Makefile,v 1.3 2022/11/14 17:48:14 nikita Exp $
 
 DISTNAME=      hex-2.0.0
 PKGREVISION=   1
@@ -14,6 +14,8 @@
 LICENSE=       apache-2.0
 
 ELIXIR_APP_NAME=       hex
+# does this pull in dependencies over the network?
+MIX_TARGET=            local.hex --force
 
 .include "../../lang/elixir/mix.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 0bada72e2adc -r 5b24ef08a4f4 lang/elixir/mix.mk
--- a/lang/elixir/mix.mk        Mon Nov 14 17:24:46 2022 +0000
+++ b/lang/elixir/mix.mk        Mon Nov 14 17:48:14 2022 +0000
@@ -1,10 +1,11 @@
-# $NetBSD: mix.mk,v 1.1 2022/11/10 14:23:15 nikita Exp $
+# $NetBSD: mix.mk,v 1.2 2022/11/14 17:48:14 nikita Exp $
 #
 # Common logic that can be used by packages that use mix as a build tool.
 #
 # Inspired by elixir.mk from FreeBSD ports.
 #
 # It is not yet fully tested.
+# Should packages set HEX_HOME and HOME on their own?
 # See devel/hex for an example.
 
 DEPENDS+=              elixir>=1.14.0:../../lang/elixir
@@ -22,6 +23,9 @@
 MIX_DOC_DIRS?=
 MIX_DOC_FILES?=
 MIX_ENV?=
+MIX_ENV+=              HEX_OFFLINE="1"
+MIX_ENV+=              HEX_HOME="${WRKSRC}/.home"
+MIX_ENV+=              HOME=${WRKSRC}/_build
 MIX_ENV_NAME?=         prod
 MIX_BUILD_NAME?=       prod
 MIX_TARGET?=           compile
@@ -51,8 +55,14 @@
        ${MKDIR} ${ELIXIR_APP_ROOT}/lib
        cd ${WRKSRC}/lib && ${CP} -R * ${ELIXIR_APP_ROOT}/lib
        ${MKDIR} ${ELIXIR_APP_ROOT}/ebin
-       ${INSTALL_DATA} ${WRKSRC}/_build/${MIX_BUILD_NAME}/lib/${ELIXIR_APP_NAME}/ebin/* \
-               ${ELIXIR_APP_ROOT}/ebin
+       if test -d ${WRKSRC}/_build/.mix/archives; then \
+               ${INSTALL_DATA} ${WRKSRC}/_build/.mix/archives/${ELIXIR_APP_NAME}-${PKGVERSION_NOREV}/${ELIXIR_APP_NAME}-${PKGVERSION_NOREV}/ebin/* \
+                       ${ELIXIR_APP_ROOT}/ebin; \
+       fi
+       if test -d ${WRKSRC}/_build/${MIX_BUILD_NAME}; then \
+               ${INSTALL_DATA} ${WRKSRC}/_build/${MIX_BUILD_NAME}/lib/${ELIXIR_APP_NAME}/ebin/* \
+                       ${ELIXIR_APP_ROOT}/ebin; \
+       fi
        if test -d ${WRKSRC}/priv; then \
                ${MKDIR} ${ELIXIR_APP_ROOT}/priv; \
                cd ${WRKSRC}/priv && ${CP} -R * ${ELIXIR_APP_ROOT}/priv; \



Home | Main Index | Thread Index | Old Index