Browse Source

Split all scripts

Signed-off-by: falkTX <falktx@falktx.com>
tags/v1.0
falkTX 2 years ago
parent
commit
47f91bb216
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
8 changed files with 352 additions and 227 deletions
  1. +1
    -2
      .travis.yml
  2. +36
    -0
      bootstrap-carla.sh
  3. +92
    -0
      bootstrap-common.sh
  4. +3
    -125
      bootstrap-jack2.sh
  5. +26
    -98
      bootstrap-plugins.sh
  6. +20
    -2
      bootstrap-qt.sh
  7. +113
    -0
      build-jack2.sh
  8. +61
    -0
      pack-jack2.sh

+ 1
- 2
.travis.yml View File

@@ -57,8 +57,7 @@ install:
- bash ${TRAVIS_BUILD_DIR}/.travis/install.sh

script:
- bash ${TRAVIS_BUILD_DIR}/bootstrap.sh ${TARGET}
- bash ${TRAVIS_BUILD_DIR}/build-jack.sh ${TARGET}
- bash ${TRAVIS_BUILD_DIR}/bootstrap-plugins.sh ${TARGET}
- bash ${TRAVIS_BUILD_DIR}/build-plugins.sh ${TARGET} ${PLUGINS}

before_deploy:


+ 36
- 0
bootstrap-carla.sh View File

@@ -0,0 +1,36 @@
#!/bin/bash

set -e

cd $(dirname ${0})
PAWPAW_ROOT="${PWD}"

# ---------------------------------------------------------------------------------------------------------------------

target="${1}"

if [ -z "${target}" ]; then
echo "usage: ${0} <target>"
exit 1
fi

./bootstrap-common.sh "${target}"
./bootstrap-plugins.sh "${target}"
./bootstrap-qt.sh "${target}"

# ---------------------------------------------------------------------------------------------------------------------

source setup/check_target.sh
source setup/env.sh
source setup/functions.sh
source setup/versions.sh

# ---------------------------------------------------------------------------------------------------------------------
# file/magic (posix only)

# if [ "${WIN32}" -eq 0 ]; then
# download file "${FILE_VERSION}" "ftp://ftp.astron.com/pub/file"
# build_autoconf file "${FILE_VERSION}"
# fi

# ---------------------------------------------------------------------------------------------------------------------

+ 92
- 0
bootstrap-common.sh View File

@@ -0,0 +1,92 @@
#!/bin/bash

set -e

cd $(dirname ${0})
PAWPAW_ROOT="${PWD}"

# ---------------------------------------------------------------------------------------------------------------------

target="${1}"

if [ -z "${target}" ]; then
echo "usage: ${0} <target>"
exit 1
fi

# ---------------------------------------------------------------------------------------------------------------------

# TODO check for depedencies:
# - curl
# - cmake
# - make
# - jq
# - patch
# - python (waf, meson)
# - sed
# - tar

source setup/check_target.sh
source setup/env.sh
source setup/functions.sh
source setup/versions.sh

mkdir -p "${PAWPAW_BUILDDIR}"
mkdir -p "${PAWPAW_DOWNLOADDIR}"
mkdir -p "${PAWPAW_PREFIX}"
mkdir -p "${PAWPAW_TMPDIR}"

# ---------------------------------------------------------------------------------------------------------------------
# let's use native glib for linux builds

if [ "${LINUX}" -eq 1 ] && [ ! -e "${TARGET_PKG_CONFIG_PATH}/glib-2.0.pc" ]; then
mkdir -p ${TARGET_PKG_CONFIG_PATH}
ln -s $(pkg-config --variable=pcfiledir glib-2.0)/g{io,lib,module,object,thread}-2.0.pc ${TARGET_PKG_CONFIG_PATH}/
ln -s $(pkg-config --variable=pcfiledir libpcre)/libpcre.pc ${TARGET_PKG_CONFIG_PATH}/
fi

# ---------------------------------------------------------------------------------------------------------------------
# pkgconfig

download pkg-config "${PKG_CONFIG_VERSION}" "https://pkg-config.freedesktop.org/releases"
build_host_autoconf pkg-config "${PKG_CONFIG_VERSION}" "--enable-indirect-deps --with-internal-glib --with-pc-path=${TARGET_PKG_CONFIG_PATH}"

# ---------------------------------------------------------------------------------------------------------------------
# libogg

download libogg "${LIBOGG_VERSION}" "https://ftp.osuosl.org/pub/xiph/releases/ogg"
patch_file libogg "${LIBOGG_VERSION}" "include/ogg/os_types.h" 's/__MACH__/__MACH_SKIP__/'
build_autoconf libogg "${LIBOGG_VERSION}"

# ---------------------------------------------------------------------------------------------------------------------
# libvorbis

download libvorbis "${LIBVORBIS_VERSION}" "https://ftp.osuosl.org/pub/xiph/releases/vorbis"
build_autoconf libvorbis "${LIBVORBIS_VERSION}" "--disable-examples"

# ---------------------------------------------------------------------------------------------------------------------
# flac

FLAC_EXTRAFLAGS="--disable-doxygen-docs --disable-examples --disable-thorough-tests"

if [ "${MACOS_OLD}" -eq 1 ]; then
FLAC_EXTRAFLAGS="${FLAC_EXTRAFLAGS} --disable-asm-optimizations"
fi

download flac "${FLAC_VERSION}" "https://ftp.osuosl.org/pub/xiph/releases/flac" "tar.xz"
build_autoconf flac "${FLAC_VERSION}" "${FLAC_EXTRAFLAGS}"

# ---------------------------------------------------------------------------------------------------------------------
# libsamplerate

download libsamplerate "${LIBSAMPLERATE_VERSION}" "http://www.mega-nerd.com/SRC"
build_autoconf libsamplerate "${LIBSAMPLERATE_VERSION}" "--disable-fftw --disable-sndfile"

# ---------------------------------------------------------------------------------------------------------------------
# libsndfile

download libsndfile "${LIBSNDFILE_VERSION}" "http://www.mega-nerd.com/libsndfile/files"
patch_file libsndfile "${LIBSNDFILE_VERSION}" "configure" 's/ -Wvla//'
build_autoconf libsndfile "${LIBSNDFILE_VERSION}" "--disable-full-suite --disable-alsa --disable-sqlite"

# ---------------------------------------------------------------------------------------------------------------------

build-jack.sh → bootstrap-jack2.sh View File

@@ -17,13 +17,11 @@ if [ -z "${target}" ]; then
exit 1
fi

if [ -n "${2}" ]; then
PACKAGING_BUILD="y"
fi

# ---------------------------------------------------------------------------------------------------------------------

# TODO check that bootstrap.sh has been run
./bootstrap-common.sh "${target}"

# ---------------------------------------------------------------------------------------------------------------------

source setup/check_target.sh
source setup/env.sh
@@ -146,123 +144,3 @@ if [ "${WIN32}" -eq 1 ]; then
fi

# ---------------------------------------------------------------------------------------------------------------------
# stop here if CI test build

if [ -n "${TRAVIS_BUILD_DIR}" ]; then
exit 0
fi

# ---------------------------------------------------------------------------------------------------------------------
# and finally jack2

jack2_repo="https://github.com/jackaudio/jack2.git"
jack2_prefix="${PAWPAW_PREFIX}-jack2"

jack2_args="--prefix=${jack2_prefix}"
# if [ "${MACOS_OLD}" -eq 1 ] || [ "${WIN64}" -eq 1 ]; then
# jack2_args="${jack2_args} --mixed"
# fi
if [ "${CROSS_COMPILING}" -eq 1 ]; then
if [ "${LINUX}" -eq 1 ]; then
jack2_args+=" --platform=linux"
elif [ "${MACOS}" -eq 1 ]; then
jack2_args+=" --platform=darwin"
elif [ "${WIN32}" -eq 1 ]; then
jack2_args+=" --platform=win32"
fi
fi
if [ "${MACOS}" -eq 1 ]; then
jack2_extra_prefix="/usr/local"
jack2_args+=" --prefix=${jack2_extra_prefix}"
jack2_args+=" --destdir="${jack2_prefix}""
fi

if [ "${MACOS_OLD}" -eq 1 ]; then
patch_file jack2 "git" "wscript" '/-std=gnu++11/d'
patch_file jack2 "git" "wscript" '/-Wno-deprecated-register/d'
fi

if [ "${JACK2_VERSION}" = "git" ]; then
if [ ! -d jack2 ]; then
git clone --recursive "${jack2_repo}"
fi
if [ ! -e "${PAWPAW_BUILDDIR}/jack2-git" ]; then
ln -sf "$(pwd)/jack2" "${PAWPAW_BUILDDIR}/jack2-git"
fi
rm -f "${PAWPAW_BUILDDIR}/jack2-git/.stamp_built"
else
download jack2 "${JACK2_VERSION}" "${jack2_repo}" "" "git"
fi

build_waf jack2 "${JACK2_VERSION}" "${jack2_args}"

# remove useless dbus-specific file
rm -f "${jack2_prefix}${jack2_extra_prefix}/bin/jack_control"

# copy jack pkg-config file to main system, so qjackctl can find it
if [ ! -e "${PAWPAW_PREFIX}/lib/pkgconfig/jack.pc" ]; then
cp -v "${jack2_prefix}${jack2_extra_prefix}/lib/pkgconfig/jack.pc" "${PAWPAW_PREFIX}/lib/pkgconfig/jack.pc"

# patch pkg-config file for static win32 builds in regular prefix
if [ "${WIN32}" -eq 1 ]; then
if [ "${WIN64}" -eq 1 ]; then
s="64"
else
s=""
fi
# FIXME rule that works for server lib too, maybe ignoring suffix even
sed -i -e "s/lib -ljack${s}/lib -Wl,-Bdynamic -ljack${s} -Wl,-Bstatic/" "${PAWPAW_PREFIX}/lib/pkgconfig/jack.pc"
fi
fi

# ---------------------------------------------------------------------------------------------------------------------
# if qt is available, build qjackctl

if [ -f "${PAWPAW_PREFIX}/bin/moc" ]; then
download qjackctl ${QJACKCTL_VERSION} https://download.sourceforge.net/qjackctl

if [ "${WIN64}" -eq 1 ]; then
patch_file qjackctl "${QJACKCTL_VERSION}" "configure" 's/-ljack /-Wl,-Bdynamic -ljack64 -Wl,-Bstatic /'
elif [ "${WIN32}" -eq 1 ]; then
patch_file qjackctl "${QJACKCTL_VERSION}" "configure" 's/-ljack /-Wl,-Bdynamic -ljack -Wl,-Bstatic /'
elif [ "${MACOS}" -eq 1 ]; then
qjackctl_extra_args="--with-jack="${jack2_prefix}${jack2_extra_prefix}""
fi

build_autoconf qjackctl "${QJACKCTL_VERSION}" "--enable-jack-version ${qjackctl_extra_args}"
fi

# ---------------------------------------------------------------------------------------------------------------------

if [ -n "${PACKAGING_BUILD}" ]; then
if [ "${MACOS}" -eq 1 ]; then
for f in $(ls "${jack2_prefix}${jack2_extra_prefix}/bin"/* \
"${jack2_prefix}${jack2_extra_prefix}/lib"/*.dylib \
"${jack2_prefix}${jack2_extra_prefix}/lib/jack"/*); do
patch_osx_binary_libs "${f}"
done

if [ ! -e jack2 ]; then
ln -s "${PAWPAW_BUILDDIR}/jack2-${JACK2_VERSION}" jack2
fi

./jack2/macosx/generate-pkg.sh "${jack2_prefix}${jack2_extra_prefix}/"

qjackctl_app="${PAWPAW_PREFIX}/bin/qjackctl.app"
qjackctl_dir="${qjackctl_app}/Contents/MacOS"
patch_osx_qtapp qjackctl "${QJACKCTL_VERSION}" "${qjackctl_app}"
patch_osx_binary_libs "${qjackctl_dir}/qjackctl"

rm -rf jack2/macosx/qjackctl.app
cp -rv "${PAWPAW_PREFIX}/bin/qjackctl.app" jack2/macosx/

rm -f jack2-macOS-${JACK2_VERSION}.tar.gz
tar czf jack2-macOS-${JACK2_VERSION}.tar.gz -C jack2/macosx jack2-osx-*.pkg qjackctl.app

elif [ "${WIN32}" -eq 1 ]; then
copy_file qjackctl "${QJACKCTL_VERSION}" "src/release/qjackctl.exe" "${jack2_prefix}/bin/qjackctl.exe"

fi
fi

# ---------------------------------------------------------------------------------------------------------------------

bootstrap.sh → bootstrap-plugins.sh View File

@@ -16,48 +16,46 @@ fi

# ---------------------------------------------------------------------------------------------------------------------

# TODO check for depedencies:
# - curl
# - cmake
# - make
# - jq
# - patch
# - python (waf, meson)
# - sed
# - tar
./bootstrap-common.sh "${target}"

# ---------------------------------------------------------------------------------------------------------------------

source setup/check_target.sh
source setup/env.sh
source setup/functions.sh
source setup/versions.sh

mkdir -p "${PAWPAW_BUILDDIR}"
mkdir -p "${PAWPAW_DOWNLOADDIR}"
mkdir -p "${PAWPAW_PREFIX}"
mkdir -p "${PAWPAW_TMPDIR}"

# ---------------------------------------------------------------------------------------------------------------------
# let's use native glib for linux builds
# fftw

FFTW_EXTRAFLAGS="--enable-sse2 --disable-alloca --disable-fortran --with-our-malloc"

# if [ "${WIN32}" -eq 0 ]; then
# FFTW_EXTRAFLAGS="${FFTW_EXTRAFLAGS} --enable-threads"
# fi

if [ "${LINUX}" -eq 1 ] && [ ! -e "${TARGET_PKG_CONFIG_PATH}/glib-2.0.pc" ]; then
mkdir -p ${TARGET_PKG_CONFIG_PATH}
ln -s $(pkg-config --variable=pcfiledir glib-2.0)/g{io,lib,module,object,thread}-2.0.pc ${TARGET_PKG_CONFIG_PATH}/
ln -s $(pkg-config --variable=pcfiledir libpcre)/libpcre.pc ${TARGET_PKG_CONFIG_PATH}/
download fftw "${FFTW_VERSION}" "http://www.fftw.org"

if [ "${MACOS_OLD}" -eq 1 ]; then
patch_file fftw "${FFTW_VERSION}" "configure" 's/CFLAGS="$CFLAGS -Wl,-no_compact_unwind"/CFLAGS="$CFLAGS"/'
patch_file fftw "${FFTW_VERSION}" "libbench2/timer.c" 's/#if defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_TIMER)/#ifndef HAVE_TIMER/'
fi

build_autoconf fftw "${FFTW_VERSION}" "${FFTW_EXTRAFLAGS}"

# ---------------------------------------------------------------------------------------------------------------------
# pkgconfig
# fftwf

download pkg-config "${PKG_CONFIG_VERSION}" "https://pkg-config.freedesktop.org/releases"
build_host_autoconf pkg-config "${PKG_CONFIG_VERSION}" "--enable-indirect-deps --with-internal-glib --with-pc-path=${TARGET_PKG_CONFIG_PATH}"
FFTWF_EXTRAFLAGS="${FFTW_EXTRAFLAGS} --enable-single"

# ---------------------------------------------------------------------------------------------------------------------
# file/magic (posix only)
copy_download fftw fftwf "${FFTW_VERSION}"

# if [ "${WIN32}" -eq 0 ]; then
# download file "${FILE_VERSION}" "ftp://ftp.astron.com/pub/file"
# build_autoconf file "${FILE_VERSION}"
# fi
if [ "${MACOS_OLD}" -eq 1 ]; then
patch_file fftwf "${FFTW_VERSION}" "configure" 's/CFLAGS="$CFLAGS -Wl,-no_compact_unwind"/CFLAGS="$CFLAGS"/'
patch_file fftwf "${FFTW_VERSION}" "libbench2/timer.c" 's/#if defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_TIMER)/#ifndef HAVE_TIMER/'
fi

build_autoconf fftwf "${FFTW_VERSION}" "${FFTWF_EXTRAFLAGS}"

# ---------------------------------------------------------------------------------------------------------------------
# glib
@@ -94,76 +92,6 @@ fi
download liblo "${LIBLO_VERSION}" "http://download.sourceforge.net/liblo"
build_autoconf liblo "${LIBLO_VERSION}" "--enable-threads --disable-examples --disable-tests --disable-tools"

# ---------------------------------------------------------------------------------------------------------------------
# libogg

download libogg "${LIBOGG_VERSION}" "https://ftp.osuosl.org/pub/xiph/releases/ogg"
patch_file libogg "${LIBOGG_VERSION}" "include/ogg/os_types.h" 's/__MACH__/__MACH_SKIP__/'
build_autoconf libogg "${LIBOGG_VERSION}"

# ---------------------------------------------------------------------------------------------------------------------
# libvorbis

download libvorbis "${LIBVORBIS_VERSION}" "https://ftp.osuosl.org/pub/xiph/releases/vorbis"
build_autoconf libvorbis "${LIBVORBIS_VERSION}" "--disable-examples"

# ---------------------------------------------------------------------------------------------------------------------
# flac

FLAC_EXTRAFLAGS="--disable-doxygen-docs --disable-examples --disable-thorough-tests"

if [ "${MACOS_OLD}" -eq 1 ]; then
FLAC_EXTRAFLAGS="${FLAC_EXTRAFLAGS} --disable-asm-optimizations"
fi

download flac "${FLAC_VERSION}" "https://ftp.osuosl.org/pub/xiph/releases/flac" "tar.xz"
build_autoconf flac "${FLAC_VERSION}" "${FLAC_EXTRAFLAGS}"

# ---------------------------------------------------------------------------------------------------------------------
# fftw

FFTW_EXTRAFLAGS="--enable-sse2 --disable-alloca --disable-fortran --with-our-malloc"

# if [ "${WIN32}" -eq 0 ]; then
# FFTW_EXTRAFLAGS="${FFTW_EXTRAFLAGS} --enable-threads"
# fi

download fftw "${FFTW_VERSION}" "http://www.fftw.org"

if [ "${MACOS_OLD}" -eq 1 ]; then
patch_file fftw "${FFTW_VERSION}" "configure" 's/CFLAGS="$CFLAGS -Wl,-no_compact_unwind"/CFLAGS="$CFLAGS"/'
patch_file fftw "${FFTW_VERSION}" "libbench2/timer.c" 's/#if defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_TIMER)/#ifndef HAVE_TIMER/'
fi

build_autoconf fftw "${FFTW_VERSION}" "${FFTW_EXTRAFLAGS}"

# ---------------------------------------------------------------------------------------------------------------------
# fftwf

FFTWF_EXTRAFLAGS="${FFTW_EXTRAFLAGS} --enable-single"

copy_download fftw fftwf "${FFTW_VERSION}"

if [ "${MACOS_OLD}" -eq 1 ]; then
patch_file fftwf "${FFTW_VERSION}" "configure" 's/CFLAGS="$CFLAGS -Wl,-no_compact_unwind"/CFLAGS="$CFLAGS"/'
patch_file fftwf "${FFTW_VERSION}" "libbench2/timer.c" 's/#if defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_TIMER)/#ifndef HAVE_TIMER/'
fi

build_autoconf fftwf "${FFTW_VERSION}" "${FFTWF_EXTRAFLAGS}"

# ---------------------------------------------------------------------------------------------------------------------
# libsamplerate

download libsamplerate "${LIBSAMPLERATE_VERSION}" "http://www.mega-nerd.com/SRC"
build_autoconf libsamplerate "${LIBSAMPLERATE_VERSION}" "--disable-fftw --disable-sndfile"

# ---------------------------------------------------------------------------------------------------------------------
# libsndfile

download libsndfile "${LIBSNDFILE_VERSION}" "http://www.mega-nerd.com/libsndfile/files"
patch_file libsndfile "${LIBSNDFILE_VERSION}" "configure" 's/ -Wvla//'
build_autoconf libsndfile "${LIBSNDFILE_VERSION}" "--disable-full-suite --disable-alsa --disable-sqlite"

# ---------------------------------------------------------------------------------------------------------------------
# lv2


build-qt.sh → bootstrap-qt.sh View File

@@ -16,13 +16,31 @@ fi

# ---------------------------------------------------------------------------------------------------------------------

# TODO check that bootstrap.sh has been run

source setup/check_target.sh
source setup/env.sh
source setup/functions.sh
source setup/versions.sh

mkdir -p "${PAWPAW_BUILDDIR}"
mkdir -p "${PAWPAW_DOWNLOADDIR}"
mkdir -p "${PAWPAW_PREFIX}"
mkdir -p "${PAWPAW_TMPDIR}"

# ---------------------------------------------------------------------------------------------------------------------
# let's use native glib for linux builds

if [ "${LINUX}" -eq 1 ] && [ ! -e "${TARGET_PKG_CONFIG_PATH}/glib-2.0.pc" ]; then
mkdir -p ${TARGET_PKG_CONFIG_PATH}
ln -s $(pkg-config --variable=pcfiledir glib-2.0)/g{io,lib,module,object,thread}-2.0.pc ${TARGET_PKG_CONFIG_PATH}/
ln -s $(pkg-config --variable=pcfiledir libpcre)/libpcre.pc ${TARGET_PKG_CONFIG_PATH}/
fi

# ---------------------------------------------------------------------------------------------------------------------
# pkgconfig

download pkg-config "${PKG_CONFIG_VERSION}" "https://pkg-config.freedesktop.org/releases"
build_host_autoconf pkg-config "${PKG_CONFIG_VERSION}" "--enable-indirect-deps --with-internal-glib --with-pc-path=${TARGET_PKG_CONFIG_PATH}"

# ---------------------------------------------------------------------------------------------------------------------

qtsuffix="-opensource-src"

+ 113
- 0
build-jack2.sh View File

@@ -0,0 +1,113 @@
#!/bin/bash

set -e

cd $(dirname ${0})
PAWPAW_ROOT="${PWD}"

JACK2_VERSION=${JACK2_VERSION:=git}
QJACKCTL_VERSION=${QJACKCTL_VERSION:=0.6.2}

# ---------------------------------------------------------------------------------------------------------------------

target="${1}"

if [ -z "${target}" ]; then
echo "usage: ${0} <target> [package-build?]"
exit 1
fi

# TODO check that bootstrap-jack.sh has been run

# ---------------------------------------------------------------------------------------------------------------------

source setup/check_target.sh
source setup/env.sh
source setup/functions.sh
source setup/versions.sh

# ---------------------------------------------------------------------------------------------------------------------
# jack2

jack2_repo="https://github.com/jackaudio/jack2.git"
jack2_prefix="${PAWPAW_PREFIX}-jack2"

jack2_args="--prefix=${jack2_prefix}"
# if [ "${MACOS_OLD}" -eq 1 ] || [ "${WIN64}" -eq 1 ]; then
# jack2_args="${jack2_args} --mixed"
# fi
if [ "${CROSS_COMPILING}" -eq 1 ]; then
if [ "${LINUX}" -eq 1 ]; then
jack2_args+=" --platform=linux"
elif [ "${MACOS}" -eq 1 ]; then
jack2_args+=" --platform=darwin"
elif [ "${WIN32}" -eq 1 ]; then
jack2_args+=" --platform=win32"
fi
fi
if [ "${MACOS}" -eq 1 ]; then
jack2_extra_prefix="/usr/local"
jack2_args+=" --prefix=${jack2_extra_prefix}"
jack2_args+=" --destdir="${jack2_prefix}""
fi

if [ "${MACOS_OLD}" -eq 1 ]; then
patch_file jack2 "git" "wscript" '/-std=gnu++11/d'
patch_file jack2 "git" "wscript" '/-Wno-deprecated-register/d'
fi

if [ "${JACK2_VERSION}" = "git" ]; then
if [ ! -d jack2 ]; then
git clone --recursive "${jack2_repo}"
fi
if [ ! -e "${PAWPAW_BUILDDIR}/jack2-git" ]; then
ln -sf "$(pwd)/jack2" "${PAWPAW_BUILDDIR}/jack2-git"
fi
rm -f "${PAWPAW_BUILDDIR}/jack2-git/.stamp_built"
else
download jack2 "${JACK2_VERSION}" "${jack2_repo}" "" "git"
fi

build_waf jack2 "${JACK2_VERSION}" "${jack2_args}"

# remove useless dbus-specific file
rm -f "${jack2_prefix}${jack2_extra_prefix}/bin/jack_control"

# copy jack pkg-config file to main system, so qjackctl can find it
if [ ! -e "${PAWPAW_PREFIX}/lib/pkgconfig/jack.pc" ]; then
cp -v "${jack2_prefix}${jack2_extra_prefix}/lib/pkgconfig/jack.pc" "${PAWPAW_PREFIX}/lib/pkgconfig/jack.pc"

# patch pkg-config file for static win32 builds in regular prefix
if [ "${WIN32}" -eq 1 ]; then
if [ "${WIN64}" -eq 1 ]; then
s="64"
else
s=""
fi
# FIXME rule that works for server lib too, maybe ignoring suffix even
sed -i -e "s/lib -ljack${s}/lib -Wl,-Bdynamic -ljack${s} -Wl,-Bstatic/" "${PAWPAW_PREFIX}/lib/pkgconfig/jack.pc"
fi
fi

# ---------------------------------------------------------------------------------------------------------------------
# qjackctl (if qt is available)

if [ -f "${PAWPAW_PREFIX}/bin/moc" ]; then
download qjackctl ${QJACKCTL_VERSION} https://download.sourceforge.net/qjackctl

if [ "${WIN64}" -eq 1 ]; then
patch_file qjackctl "${QJACKCTL_VERSION}" "configure" 's/-ljack /-Wl,-Bdynamic -ljack64 -Wl,-Bstatic /'
elif [ "${WIN32}" -eq 1 ]; then
patch_file qjackctl "${QJACKCTL_VERSION}" "configure" 's/-ljack /-Wl,-Bdynamic -ljack -Wl,-Bstatic /'
elif [ "${MACOS}" -eq 1 ]; then
qjackctl_extra_args="--with-jack="${jack2_prefix}${jack2_extra_prefix}""
fi

build_autoconf qjackctl "${QJACKCTL_VERSION}" "--enable-jack-version ${qjackctl_extra_args}"

if [ "${WIN32}" -eq 1 ]; then
copy_file qjackctl "${QJACKCTL_VERSION}" "src/release/qjackctl.exe" "${jack2_prefix}/bin/qjackctl.exe"
fi
fi

# ---------------------------------------------------------------------------------------------------------------------

+ 61
- 0
pack-jack2.sh View File

@@ -0,0 +1,61 @@
#!/bin/bash

set -e

cd $(dirname ${0})
PAWPAW_ROOT="${PWD}"

JACK2_VERSION=${JACK2_VERSION:=git}
QJACKCTL_VERSION=${QJACKCTL_VERSION:=0.6.2}

# ---------------------------------------------------------------------------------------------------------------------

target="${1}"

if [ -z "${target}" ]; then
echo "usage: ${0} <target> [package-build?]"
exit 1
fi

if [ -n "${2}" ]; then
PACKAGING_BUILD="y"
fi

# TODO check that bootstrap-jack.sh has been run

# ---------------------------------------------------------------------------------------------------------------------

source setup/check_target.sh
source setup/env.sh
source setup/functions.sh
source setup/versions.sh

# ---------------------------------------------------------------------------------------------------------------------
# final steps for packaging, if needed

if [ "${MACOS}" -eq 1 ]; then
for f in $(ls "${jack2_prefix}${jack2_extra_prefix}/bin"/* \
"${jack2_prefix}${jack2_extra_prefix}/lib"/*.dylib \
"${jack2_prefix}${jack2_extra_prefix}/lib/jack"/*); do
patch_osx_binary_libs "${f}"
done

if [ ! -e jack2 ]; then
ln -s "${PAWPAW_BUILDDIR}/jack2-${JACK2_VERSION}" jack2
fi

./jack2/macosx/generate-pkg.sh "${jack2_prefix}${jack2_extra_prefix}/"

qjackctl_app="${PAWPAW_PREFIX}/bin/qjackctl.app"
qjackctl_dir="${qjackctl_app}/Contents/MacOS"
patch_osx_qtapp qjackctl "${QJACKCTL_VERSION}" "${qjackctl_app}"
patch_osx_binary_libs "${qjackctl_dir}/qjackctl"

rm -rf jack2/macosx/qjackctl.app
cp -rv "${PAWPAW_PREFIX}/bin/qjackctl.app" jack2/macosx/

rm -f jack2-macOS-${JACK2_VERSION}.tar.gz
tar czf jack2-macOS-${JACK2_VERSION}.tar.gz -C jack2/macosx jack2-osx-*.pkg qjackctl.app
fi

# ---------------------------------------------------------------------------------------------------------------------

Loading…
Cancel
Save