[X2Go-Commits] [x2goclient] 41/44: macbuild.sh: define PulseAudio libraries and binaries to be later copied.

git-admin at x2go.org git-admin at x2go.org
Fri May 29 00:01:37 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 d43b53ddeb215181fb679a483da4d30e269047d0
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sun May 3 23:33:59 2015 +0200

    macbuild.sh: define PulseAudio libraries and binaries to be later copied.
    
    Discover them using MACPORTS_PREFIX. Error out if any component was not found.
---
 debian/changelog |    3 +++
 macbuild.sh      |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e3bbc5c..7321588 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -71,6 +71,9 @@ x2goclient (4.0.4.1-0x2go1) UNRELEASED; urgency=low
     - macbuild.sh: refactor nxproxy detection to use MACPORTS_PREFIX.
     - macbuild.sh: add EXE_DIR and FRAMEWORKS_DIR internal variables. Create
       directories based on that. Use them when bundling.
+    - macbuild.sh: define PulseAudio libraries and binaries to be later
+      copied. Discover them using MACPORTS_PREFIX. Error out if any component
+      was not found.
 
  -- X2Go Release Manager <git-admin at x2go.org>  Tue, 26 May 2015 21:42:09 +0200
 
diff --git a/macbuild.sh b/macbuild.sh
index 234cdc0..e7ca22d 100755
--- a/macbuild.sh
+++ b/macbuild.sh
@@ -122,6 +122,13 @@ else
 fi
 
 NXPROXY="nxproxy"
+PULSEAUDIO_BINARIES=( "pulseaudio" "esdcompat" "pacat" "pacmd"      "pactl"
+                      "pamon"      "paplay"    "parec" "parecord"   "pasuspender" )
+PULSEAUDIO_LIBRARIES=( "libpulse-simple.0.dylib"
+                       "libpulse.0.dylib"
+                       "libpulsecore-6.0.dylib"
+                       "pulse-6.0"
+                       "pulseaudio" )
 
 : ${SDK:="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"}
 : ${MACOSX_DEPLOYMENT_TARGET:="10.7"}
@@ -157,6 +164,50 @@ NXPROXY="$(lazy_canonical_path "${MACPORTS_PREFIX}/bin/${NXPROXY}")"
 
 [ -x "${NXPROXY}" ] || dependency_error "nxproxy" "nxproxy" "binary"
 
+typeset -i i
+typeset -i fail
+typeset -a PULSEAUDIO_BINARIES_FULL
+typeset cur_binary
+fail="0"
+for cur_binary in ${PULSEAUDIO_BINARIES[@]}; do
+	cur_binary="$(lazy_canonical_path "${MACPORTS_PREFIX}/bin/${cur_binary}")"
+
+	if [ -x "${cur_binary}" ]; then
+		PULSEAUDIO_BINARIES_FULL+=( "${cur_binary}" )
+	else
+		fail="1"
+		break
+	fi
+done
+
+[ "${fail}" -eq "1" ] && dependency_error "${cur_binary##"$(lazy_canonical_path "${MACPORTS_PREFIX}/bin/")"}" "pulseaudio" "binary"
+
+typeset cur_lib_or_libdir
+typeset -a PULSEAUDIO_LIBRARIES_FULL
+fail="0"
+for cur_lib_or_libdir in ${PULSEAUDIO_LIBRARIES[@]}; do
+	cur_lib_or_libdir="$(lazy_canonical_path "${MACPORTS_PREFIX}/lib/${cur_lib_or_libdir}")"
+
+	if [ -x "${cur_lib_or_libdir}" ]; then
+		PULSEAUDIO_LIBRARIES_FULL+=( "${cur_lib_or_libdir}" )
+	elif [ -d "${cur_lib_or_libdir}" ]; then
+		# That's a directory... more work needed here.
+		typeset entry=""
+		for entry in "${cur_lib_or_libdir}"/*; do
+			typeset TMP_REGEX='^.*\.(so|dylib|bundle)(\.[0-9]+){0,2}$'
+			if [[ "${entry}" =~ ${TMP_REGEX} ]]; then
+				# Filename matched the expected template.
+				PULSEAUDIO_LIBRARIES_FULL+=( "$(lazy_canonical_path "${cur_lib_or_libdir}/${entry}")" )
+			fi
+		done
+	else
+		fail="1"
+		break
+	fi
+done
+
+[ "${fail}" -eq "1" ] && dependency_error "${cur_lib_or_libdir}" "pulseaudio" "library or library directory"
+
 set -e
 
 phase "Cleaning"

--
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