pkgsrc-Changes archive

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

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   nikita
Date:           Mon Nov 14 17:48:15 UTC 2022

Modified Files:
        pkgsrc/devel/hex: Makefile
        pkgsrc/lang/elixir: mix.mk

Log Message:
devel/hex: fix build.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/hex/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/elixir/mix.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/hex/Makefile
diff -u pkgsrc/devel/hex/Makefile:1.2 pkgsrc/devel/hex/Makefile:1.3
--- pkgsrc/devel/hex/Makefile:1.2       Thu Nov 10 14:23:53 2022
+++ pkgsrc/devel/hex/Makefile   Mon Nov 14 17:48:14 2022
@@ -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 @@ COMMENT=      Package manager for the Erlang 
 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"

Index: pkgsrc/lang/elixir/mix.mk
diff -u pkgsrc/lang/elixir/mix.mk:1.1 pkgsrc/lang/elixir/mix.mk:1.2
--- pkgsrc/lang/elixir/mix.mk:1.1       Thu Nov 10 14:23:15 2022
+++ pkgsrc/lang/elixir/mix.mk   Mon Nov 14 17:48:14 2022
@@ -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_RUN_DEPS?=
 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 @@ do-mix-install:
        ${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