From cac451c83ec98fdf3d5a5d446476b08d0b85cba7 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Wed, 24 Feb 2016 20:54:34 +0100 Subject: [PATCH] Add needed changes to make mc buildable using make under FreeBSD --- buildscripts/checkdeps.sh | 5 ++++- buildscripts/checkgopath.sh | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/buildscripts/checkdeps.sh b/buildscripts/checkdeps.sh index faf11b83..eeee0adb 100755 --- a/buildscripts/checkdeps.sh +++ b/buildscripts/checkdeps.sh @@ -150,6 +150,9 @@ is_supported_os() { "SunOS") supported=1 ;; + "FreeBSD") + supported=1 + ;; "*") supported=0 ;; @@ -163,7 +166,7 @@ is_supported_os() { is_supported_arch() { local supported case ${UNAME##* } in - "x86_64") + "x86_64" | "amd64") supported=1 ;; "arm"*) diff --git a/buildscripts/checkgopath.sh b/buildscripts/checkgopath.sh index 49815f14..167be6bd 100644 --- a/buildscripts/checkgopath.sh +++ b/buildscripts/checkgopath.sh @@ -19,8 +19,9 @@ _init() { shopt -s extglob - PWD=$(env pwd) - GOPATH=$(go env GOPATH) + # Fetch real paths instead of symlinks before comparing them + PWD=$(env pwd -P) + GOPATH=$(realpath $(go env GOPATH)) } main() {