yetus-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sek...@apache.org
Subject yetus git commit: YETUS-403. hadoop personality needs better handling of homebrew
Date Wed, 01 Jun 2016 01:32:12 GMT
Repository: yetus
Updated Branches:
  refs/heads/master 3d983b367 -> ef0e1c058


YETUS-403. hadoop personality needs better handling of homebrew

Signed-off-by: Allen Wittenauer <aw@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/ef0e1c05
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/ef0e1c05
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/ef0e1c05

Branch: refs/heads/master
Commit: ef0e1c0583e38958a782293015c63210305062ec
Parents: 3d983b3
Author: Kengo Seki <sekikn@apache.org>
Authored: Tue May 31 09:49:42 2016 +0900
Committer: Kengo Seki <sekikn@apache.org>
Committed: Wed Jun 1 01:31:36 2016 +0000

----------------------------------------------------------------------
 precommit/personality/hadoop.sh | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/ef0e1c05/precommit/personality/hadoop.sh
----------------------------------------------------------------------
diff --git a/precommit/personality/hadoop.sh b/precommit/personality/hadoop.sh
index 2bbfd0e..c86a9df 100755
--- a/precommit/personality/hadoop.sh
+++ b/precommit/personality/hadoop.sh
@@ -35,6 +35,11 @@ function personality_globals
   GITHUB_REPO="apache/hadoop"
   #shellcheck disable=SC2034
   PYLINT_OPTIONS="--indent-string='  '"
+
+  HADOOP_HOMEBREW_DIR=${HADOOP_HOMEBREW_DIR:-$(brew --prefix 2>/dev/null)}
+  if [[ -z "${HADOOP_HOMEBREW_DIR}" ]]; then
+    HADOOP_HOMEBREW_DIR=/usr/local
+  fi
 }
 
 ## @description  Calculate the actual module ordering
@@ -136,16 +141,16 @@ function hadoop_native_flags
         -Drequire.test.libhadoop
     ;;
     Darwin)
-      JANSSON_INCLUDE_DIR=/usr/local/opt/jansson/include
-      JANSSON_LIBRARY=/usr/local/opt/jansson/lib
+      JANSSON_INCLUDE_DIR="${HADOOP_HOMEBREW_DIR}/opt/jansson/include"
+      JANSSON_LIBRARY="${HADOOP_HOMEBREW_DIR}/opt/jansson/lib"
       export JANSSON_LIBRARY JANSSON_INCLUDE_DIR
       # shellcheck disable=SC2086
       echo \
       -Pnative -Drequire.snappy  \
       -Drequire.openssl \
-        -Dopenssl.prefix=/usr/local/opt/openssl/ \
-        -Dopenssl.include=/usr/local/opt/openssl/include \
-        -Dopenssl.lib=/usr/local/opt/openssl/lib \
+        -Dopenssl.prefix=${HADOOP_HOMEBREW_DIR}/opt/openssl/ \
+        -Dopenssl.include=${HADOOP_HOMEBREW_DIR}/opt/openssl/include \
+        -Dopenssl.lib=${HADOOP_HOMEBREW_DIR}/opt/openssl/lib \
       -Drequire.libwebhdfs -Drequire.test.libhadoop
     ;;
     *)


Mime
View raw message