1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-18 09:00:07 +02:00
audacity/lib-src/lv2/configure
lllucius@gmail.com 49ce8fd212 2nd attempt to Add the ability to build without trashing the source tree
In r13510 I had neglected to build with all local libraries and some of
them needed attention.

So, I also took the opportunity to work out the locale directory and
how to keep it unmolested as well.  As a result, all locales are rebuilt
as expected, but into the "build" directory.

As a bonus you may now test Audacity from the "build" directory and have
Nyquist plugins and message catalogs available (so you can test other 
languages again without havint to install).

So, again:

mkdir buildme
cd buildme
../configure
make
./audacity
2014-10-27 23:13:03 +00:00

75 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
srcdir=.
while [ $# -gt 0 ]
do
if [[ "$1" =~ --srcdir=.* ]]
then
srcdir=${1#*=}
break
fi
shift
done
function waf
{
pkg="$1"
shift
mkdir -p ${pkg}
pushd >/dev/null ${pkg}
for f in "../${srcdir}/${pkg}"/*
do
if [ ! -e "${f##*/}" ]
then
ln -s "${f}"
fi
done
$(which python python2 | tail -1) waf --prefix="." --include="." $@ configure || exit 1
popd >/dev/null
if [ "${pkg}" == "lv2" ]
then
eval $(sed -e "/^VERSION/!d;s/ //g;s/.*VERSION/version/" ${pkg}/wscript)
major=""
else
eval $(sed -e "/^[A-Z]*_VERSION/!d;s/ //g;s/.*VERSION/version/" ${pkg}/wscript)
major="-${version%%.*}"
fi
cat <<EOF >${pkg}/build/${pkg}${major}.pc
prefix=$(pwd)/${pkg}
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=.
Name: ${pkg}
Version: ${version}
Description: Temporary fake config file
Libs: -L\${libdir} -l${pkg}${major} -ldl
Cflags: -I\${includedir}/${pkg}${major}
EOF
export PKG_CONFIG_PATH="$(pwd)/${pkg}/build:${PKG_CONFIG_PATH}"
export CFLAGS="-I$(pwd)/${pkg} ${CFLAGS}"
export LDFLAGS="-L$(pwd)/${pkg} -l${pkg}-${major} ${LDFLAGS}"
ln -s ../${pkg}/${pkg} include
}
rm -rf include
mkdir -p include
[ ! -e Makefile ] && ln -s "${srcdir}/Makefile"
[ ! -e build ] && ln -s "${srcdir}/build"
echo >srcdir.mk "srcdir = ${srcdir}"
waf lv2 --no-plugins
waf serd --no-utils --static --no-shared
waf sord --no-utils --static --no-shared
waf sratom --static --no-shared
waf lilv --no-utils --static --no-shared
exit 0