Browse Source

Add build-jack.sh script, move aften in there

tags/v1.0
falkTX 4 years ago
parent
commit
872aabd41d
4 changed files with 107 additions and 15 deletions
  1. +2
    -0
      .gitignore
  2. +0
    -15
      bootstrap.sh
  3. +102
    -0
      build-jack.sh
  4. +3
    -0
      setup/versions.sh

+ 2
- 0
.gitignore View File

@@ -0,0 +1,2 @@
/jack2/


+ 0
- 15
bootstrap.sh View File

@@ -28,8 +28,6 @@ fi

# TODO add these libraries
# - libsamplerate
# - opus (custom)
# - libdb (berkley, 4.8)

source setup/check_target.sh
source setup/env.sh
@@ -132,16 +130,3 @@ fi
build_autoconf fftwf "${FFTW_VERSION}" "${FFTWF_EXTRAFLAGS}"

# ---------------------------------------------------------------------------------------------------------------------
# aften (macos only)

if [ "${MACOS}" -eq 1 ]; then
download aften "${AFTEN_VERSION}" "http://downloads.sourceforge.net/aften" "tar.bz2"
build_cmake aften "${AFTEN_VERSION}"
if [ ! -f "${PAWPAW_BUILDDIR}/aften-${AFTEN_VERSION}/.stamp_installed_libs2" ]; then
cp -v "${PAWPAW_BUILDDIR}/aften-${AFTEN_VERSION}/build/libaften_pcm.a" "${PAWPAW_PREFIX}/lib/libaften_pcm.a"
cp -v "${PAWPAW_BUILDDIR}/aften-${AFTEN_VERSION}/build/libaften_static.a" "${PAWPAW_PREFIX}/lib/libaften.a"
touch "${PAWPAW_BUILDDIR}/aften-${AFTEN_VERSION}/.stamp_installed_libs"
fi
fi

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

+ 102
- 0
build-jack.sh View File

@@ -0,0 +1,102 @@
#!/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 that bootstrap.sh has been run

# TODO add these libraries
# - opus (custom)

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

# ---------------------------------------------------------------------------------------------------------------------
# aften (macos only)

if [ "${MACOS}" -eq 1 ]; then
download aften "${AFTEN_VERSION}" "http://downloads.sourceforge.net/aften" "tar.bz2"
build_cmake aften "${AFTEN_VERSION}"
if [ ! -f "${PAWPAW_BUILDDIR}/aften-${AFTEN_VERSION}/.stamp_installed_libs" ]; then
cp -v "${PAWPAW_BUILDDIR}/aften-${AFTEN_VERSION}/build/libaften_pcm.a" "${PAWPAW_PREFIX}/lib/libaften_pcm.a"
cp -v "${PAWPAW_BUILDDIR}/aften-${AFTEN_VERSION}/build/libaften_static.a" "${PAWPAW_PREFIX}/lib/libaften.a"
touch "${PAWPAW_BUILDDIR}/aften-${AFTEN_VERSION}/.stamp_installed_libs"
fi
fi

# ---------------------------------------------------------------------------------------------------------------------
# db

download db "${DB_VERSION}" "https://download.oracle.com/berkeley-db"

# based on build_autoconf
function build_custom_db() {
local name="${1}"
local version="${2}"
local extraconfrules="${3}"

local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"

if [ "${CROSS_COMPILING}" -eq 1 ]; then
extraconfrules="--host=${TOOLCHAIN_PREFIX} ${extraconfrules}"
fi

_prebuild "${name}" "${pkgdir}"

if [ ! -f "${pkgdir}/.stamp_configured" ]; then
pushd "${pkgdir}/build_unix"
../dist/configure --enable-static --disable-shared --disable-maintainer-mode --prefix="${PAWPAW_PREFIX}" ${extraconfrules}
touch ../.stamp_configured
popd
fi

if [ ! -f "${pkgdir}/.stamp_built" ]; then
pushd "${pkgdir}/build_unix"
make ${MAKE_ARGS}
touch ../.stamp_built
popd
fi

if [ ! -f "${pkgdir}/.stamp_installed" ]; then
pushd "${pkgdir}/build_unix"
make ${MAKE_ARGS} install
touch ../.stamp_installed
popd
fi

_postbuild
}

patch_file db "${DB_VERSION}" "src/dbinc/atomic.h" 's/__atomic_compare_exchange/__db_atomic_compare_exchange/'
build_custom_db db "${DB_VERSION}" --disable-java --disable-sql --disable-tcl

# --enable-posixmutexes --enable-compat185 --enable-cxx --enable-dbm --enable-stl
# make LIBSO_LIBS=-lpthread

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

if [ ! -d jack2 ]; then
git clone --recursive git@github.com:jackaudio/jack2.git
fi

ln -sf "$(pwd)/jack2" "${PAWPAW_BUILDDIR}/jack2-git"
rm -f "${PAWPAW_BUILDDIR}/jack2-git/.stamp_built"
build_waf jack2 "git"
# "--lv2dir=${PAWPAW_PREFIX}/lib/lv2"

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

+ 3
- 0
setup/versions.sh View File

@@ -10,7 +10,10 @@ FLAC_VERSION=1.3.2
LIBSNDFILE_VERSION=1.0.28
LV2_VERSION=1.18.0
FFTW_VERSION=3.3.8

# jack builds only
AFTEN_VERSION=0.0.8
DB_VERSION=5.3.28

# GLIB_VERSION=2.44.1
# GLIB_MVERSION=2.44


Loading…
Cancel
Save