[X2Go-Commits] [x2goclient] 34/44: macbuild.sh: add new MACPORTS_PREFIX detection/variable.

git-admin at x2go.org git-admin at x2go.org
Mon Jun 29 23:02:18 CEST 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit fbf5ca76bdf266a221b3fc89dca7055167f8ff19
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sun May 3 23:16:27 2015 +0200

    macbuild.sh: add new MACPORTS_PREFIX detection/variable.
---
 debian/changelog |    1 +
 macbuild.sh      |   14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index a8009b0..2213627 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -124,6 +124,7 @@ x2goclient (4.0.4.1-0x2go1) UNRELEASED; urgency=low
     - compat.h: include QtCore/qglobal.h for Q_OS_... macros.
     - pulsemanager.{cpp,h}: new class for PulseAudio management.
     - x2goclient.pro{,.maemo}: reference new pulsemanager.{cpp,h} files.
+    - macbuild.sh: add new MACPORTS_PREFIX detection/variable.
 
   [ Mike Gabriel ]
   * debian/control:
diff --git a/macbuild.sh b/macbuild.sh
index 097ac91..6c42c44 100755
--- a/macbuild.sh
+++ b/macbuild.sh
@@ -30,6 +30,7 @@ usage() {
 	printf "\tDEBUG\t\t\t\tenables or disables debug builds [boolean]\n\t\t\t\t\tdefault: disabled\n"
 	printf "\tBUNDLE\t\t\t\tenables or disables library bundling and the creation of a .dmg installer [boolean]\n\t\t\t\t\tdefault: enabled\n"
 	printf "\tUNIVERSAL\t\t\tenables or disables x86 support. x86_64 support is always enabled [boolean]\n\t\t\t\t\tdefault: enabled\n"
+	printf "\tMACPORTS_PREFIX\t\t\tsets the (MacPorts) prefix used to detect PulseAudio and nxproxy binaries\n\t\t\t\t\tdefault: /opt/local/\n"
 	printf "\n"
 	printf "Boolean values help:\n"
 	printf "\ta value of ${NO_VAL} will be treated as false\n"
@@ -52,12 +53,25 @@ PROJECT="${TOP_DIR}/${NAME}.pro"
 PKG_DMG="${TOP_DIR}/pkg-dmg"
 
 NXPROXY="$(which nxproxy)"
+# Try to find the MacPorts prefix.
+typeset MACPORTS_PREFIX_SEARCH=""
+if type -P port >/dev/null 2>&1; then
+	MACPORTS_PREFIX_SEARCH="$(type -P port)"
+	MACPORTS_PREFIX_SEARCH="${MACPORTS_PREFIX_SEARCH%%bin/port}"
+else
+	# Port not being part find in ${PATH} doesn't necessarily mean it isn't available.
+	# Try to guess.
+	MACPORTS_PREFIX_SEARCH="/opt/local/"
+fi
 
 : ${SDK:="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"}
 : ${MACOSX_DEPLOYMENT_TARGET:="10.7"}
 : ${DEBUG:="0"}
 : ${BUNDLE:="1"}
 : ${UNIVERSAL:="1"}
+: ${MACPORTS_PREFIX:="${MACPORTS_PREFIX_SEARCH}"}
+
+unset MACPORTS_PREFIX_SEARCH
 
 DEBUG="$(make_boolean "${DEBUG}")"
 BUNDLE="$(make_boolean "${BUNDLE}")"

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list