fix build for buster
This commit is contained in:
@@ -17,14 +17,12 @@ if test "$(uname -s)" != "Darwin"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ${0%/*}
|
||||
|
||||
project=${2:-$(sed -n 's/ *m4_define *( *x_package_name, *\(.*\) *).*/\1/p' $(pwd)/configure.ac)}
|
||||
apptarget=${1:-${project}.app}
|
||||
sources=${3:-$(pwd)/usr}
|
||||
sources=${3:-$(pwd)/tmp}
|
||||
! test -e "$apptarget" || rm -rf "$apptarget"
|
||||
test -n "$project"
|
||||
test -d "$sources"
|
||||
! test -e "$apptarget" || rm -rf "$apptarget"
|
||||
target="$(pwd)/${apptarget}/Contents/MacOS"
|
||||
|
||||
echo "Creating $apptarget for $project from $sources"
|
||||
@@ -32,7 +30,9 @@ echo "Creating $apptarget for $project from $sources"
|
||||
# Step 1: create and fill app directory structure
|
||||
mkdir -p ${apptarget}/Contents/{Resources,MacOS}
|
||||
! test -d ${sources}/bin || \
|
||||
find ${sources}/bin -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/MacOS/ \;
|
||||
find ${sources}/bin -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/MacOS/ \;
|
||||
! test -d ${sources}/scripts || \
|
||||
find ${sources}/scripts -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/MacOS/ \;
|
||||
executablefile=${apptarget}/Contents/MacOS/${project}
|
||||
test -x $executablefile || executablefile=$(ls -1 ${apptarget}/Contents/MacOS/ | head -1)
|
||||
! test -d ${sources}/lib || \
|
||||
@@ -40,9 +40,9 @@ test -x $executablefile || executablefile=$(ls -1 ${apptarget}/Contents/MacOS/ |
|
||||
! test -d ${sources}/share/${project} || \
|
||||
find ${sources}/share/${project} -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/Resources/ \;
|
||||
! test -d ${sources}/share || \
|
||||
find ${sources}/share -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/Resources/ \;
|
||||
find ${sources}/share -mindepth 1 -maxdepth 1 -name ${project} -prune -o -exec cp -a {} ${apptarget}/Contents/Resources/ \;
|
||||
! test -d ${sources} || \
|
||||
find ${sources} -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/Resources/ \;
|
||||
find ${sources} -mindepth 1 -maxdepth 1 -name share -o -name bin -o -name lib -o -name scripts -prune -o -exec cp -a {} ${apptarget}/Contents/Resources/ \;
|
||||
|
||||
# Step 2: copy qt plugins, if necessary
|
||||
for f in ${QT_PLUGINS}; do
|
||||
@@ -59,7 +59,7 @@ while [ $found -ne 0 ]; do
|
||||
cd "${target}"
|
||||
for file in $(find . -type f); do
|
||||
for lib in $(otool -L ${file} | tail -n +2 \
|
||||
| egrep '/opt/local/|'"${HOME}" \
|
||||
| egrep '/usr/local/|/opt/local/|'"${HOME}" \
|
||||
| grep -v $file | awk '{print $1}'); do
|
||||
found=1
|
||||
test -f ${lib##*/} \
|
||||
|
||||
Reference in New Issue
Block a user