Add support for ELIXIR_HIDDEN, a regular expression that matches
applications in Elixir's lib and hides them from the actual code path. It will be used by ports to hide their own (already installed) files in lib/ during the builds, and avoid unnecessary warnings.
This commit is contained in:
parent
ece696bef0
commit
beaf5ddfc8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=391075
2 changed files with 21 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
PORTNAME= elixir
|
||||
PORTVERSION= 1.0.5
|
||||
DISTVERSIONPREFIX= v
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= lang
|
||||
|
||||
MAINTAINER= olgeni@FreeBSD.org
|
||||
|
|
20
lang/elixir/files/patch-bin_elixir
Normal file
20
lang/elixir/files/patch-bin_elixir
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- bin/elixir.orig 2015-06-29 07:56:28 UTC
|
||||
+++ bin/elixir
|
||||
@@ -97,4 +97,16 @@ if [ -z "$ERL_PATH" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
-exec "$ERL_PATH" -pa "$SCRIPT_PATH"/../lib/*/ebin $ELIXIR_ERL_OPTIONS $ERL -extra "$@"
|
||||
+if [ -n "$ELIXIR_HIDDEN" ]; then
|
||||
+ CODE_PATH=""
|
||||
+
|
||||
+ for lib in $(cd "$SCRIPT_PATH"/../lib/ && ls); do
|
||||
+ if ! (echo "$lib" | grep -E "$ELIXIR_HIDDEN" >/dev/null 2>&1); then
|
||||
+ CODE_PATH="$CODE_PATH "$SCRIPT_PATH"/../lib/$lib/ebin"
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
+ exec "$ERL_PATH" -pa $CODE_PATH $ELIXIR_ERL_OPTIONS $ERL -extra "$@"
|
||||
+else
|
||||
+ exec "$ERL_PATH" -pa "$SCRIPT_PATH"/../lib/*/ebin $ELIXIR_ERL_OPTIONS $ERL -extra "$@"
|
||||
+fi
|
Loading…
Reference in a new issue