Browse Source

Continue tests for building audacity

Signed-off-by: falkTX <falktx@falktx.com>
pull/10/head
falkTX 4 years ago
parent
commit
a482678c05
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
6 changed files with 160 additions and 26 deletions
  1. +38
    -2
      bootstrap-audacity.sh
  2. +8
    -0
      bootstrap-common.sh
  3. +0
    -8
      bootstrap-plugins.sh
  4. +53
    -13
      build-audacity.sh
  5. +55
    -0
      patches/audacity/01_build-fix-pt2.patch
  6. +6
    -3
      setup/functions.sh

+ 38
- 2
bootstrap-audacity.sh View File

@@ -19,7 +19,7 @@ fi
# run bootstrap dependencies

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

# ---------------------------------------------------------------------------------------------------------------------
# source setup code
@@ -32,7 +32,43 @@ source setup/versions.sh
# ---------------------------------------------------------------------------------------------------------------------
# wxwidgets

# wxwidgets_args+=" -DwxWidgets_USE_REL_AND_DBG=no"
# wxwidgets_args+=" -Daudacity_use_pch=no"

# override PawPaw default
wxwidgets_args="-DBUILD_SHARED_LIBS=ON"

# win32
wxwidgets_args+=" -DwxUSE_ACCESSIBILITY=YES"
wxwidgets_args+=" -DwxBUILD_PRECOMP=YES"

wxwidgets_args+=" -DwxBUILD_CXX_STANDARD=14"
wxwidgets_args+=" -DwxUSE_EXPAT=builtin"
wxwidgets_args+=" -DwxUSE_LIBJPEG=builtin"
wxwidgets_args+=" -DwxUSE_LIBPNG=builtin"
wxwidgets_args+=" -DwxUSE_LIBTIFF=builtin"
wxwidgets_args+=" -DwxUSE_REGEX=builtin"
wxwidgets_args+=" -DwxUSE_ZLIB=builtin"
# wxwidgets_args+=" -D"

# custom wxwidgets flags
# wxwidgets_args+=" -DwxBUILD_MONOLITHIC=ON"
# wxwidgets_args+=" -DwxBUILD_PRECOMP=OFF"
# wxwidgets_args+=" -DwxBUILD_OPTIMISE=ON"
wxwidgets_args+=" -DwxBUILD_SHARED=ON"
# win32 only
wxwidgets_args+=" -DwxUSE_WINSOCK2=yes"

# set(wxSOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
# set(wxBINARY_DIR ${CMAKE_BINARY_DIR})
# set(wxOUTPUT_DIR ${wxBINARY_DIR}/lib)
# set(wxVERSION 3.1.3)
# set(wxCOPYRIGHT "1992-2019 wxWidgets")

win32_target=_WIN32_WINNT_WIN7
export EXTRA_CXXFLAGS="-DWINVER=${win32_target} -D_WIN32_WINNT=${win32_target} -D_WIN32_IE=${win32_target}"

download wxWidgets "audacity-fixes-3.1.3" "https://github.com/audacity/wxWidgets.git" "" "git"
build_cmake wxWidgets "audacity-fixes-3.1.3"
build_cmake wxWidgets "audacity-fixes-3.1.3" "${wxwidgets_args}"

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

+ 8
- 0
bootstrap-common.sh View File

@@ -117,3 +117,11 @@ patch_file libsndfile "${LIBSNDFILE_VERSION}" "configure" 's/ -Wvla//'
build_autoconf libsndfile "${LIBSNDFILE_VERSION}" "--disable-alsa --disable-full-suite --disable-sqlite"

# ---------------------------------------------------------------------------------------------------------------------
# zlib (skipped on macOS)

if [ "${MACOS}" -eq 0 ]; then
download zlib ${ZLIB_VERSION} "https://github.com/madler/zlib/archive"
build_conf zlib ${ZLIB_VERSION} "--static --prefix=${PAWPAW_PREFIX}"
fi

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

+ 0
- 8
bootstrap-plugins.sh View File

@@ -212,14 +212,6 @@ fi
download mxml ${MXML_VERSION} "https://github.com/michaelrsweet/mxml/archive"
build_autoconf mxml ${MXML_VERSION}

# ---------------------------------------------------------------------------------------------------------------------
# zlib

if [ "${MACOS}" -eq 0 ]; then
download zlib ${ZLIB_VERSION} "https://github.com/madler/zlib/archive"
build_conf zlib ${ZLIB_VERSION} "--static --prefix=${PAWPAW_PREFIX}"
fi

# ---------------------------------------------------------------------------------------------------------------------
# carla (backend only)



+ 53
- 13
build-audacity.sh View File

@@ -5,10 +5,6 @@ set -e
cd $(dirname ${0})
PAWPAW_ROOT="${PWD}"

JACK2_VERSION=${JACK2_VERSION:=git}
JACK_ROUTER_VERSION=${JACK_ROUTER_VERSION:=6c2e532bb05d2ba59ef210bef2fe270d588c2fdf}
QJACKCTL_VERSION=${QJACKCTL_VERSION:=0.9.2}

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

target="${1}"
@@ -21,7 +17,7 @@ fi
# ---------------------------------------------------------------------------------------------------------------------
# run bootstrap dependency

# ./bootstrap-audacity.sh "${target}"
./bootstrap-audacity.sh "${target}"

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

@@ -32,20 +28,64 @@ source setup/versions.sh

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

audacity_repo="https://github.com/jackaudio/jack2.git"
# audacity_repo="https://github.com/jackaudio/jack2.git"
# audacity_prefix="${PAWPAW_PREFIX}-audacity"

audacity_args="-DCMAKE_BUILD_TYPE=Release -DwxWidgets_USE_REL_AND_DBG=no -Daudacity_use_pch=no"

audacity_args+=" -Daudacity_use_wxwidgets=local"
audacity_args=""
audacity_args+=" -DwxWidgets_USE_REL_AND_DBG=no"
audacity_args+=" -Daudacity_use_pch=no"

audacity_args+=" -Daudacity_use_libflac=system"
audacity_args+=" -Daudacity_use_libogg=system"
audacity_args+=" -Daudacity_use_libsndfile=system"
audacity_args+=" -Daudacity_use_libvorbis=system"
audacity_args+=" -Daudacity_use_wxwidgets=system"

# TODO
audacity_args+=" -Daudacity_use_expat=local"
audacity_args+=" -Daudacity_use_lame=local"
audacity_args+=" -Daudacity_use_libsoxr=local"
audacity_args+=" -Daudacity_use_portaudio-v19=local"
audacity_args+=" -Daudacity_use_sqlite=local"
audacity_args+=" -Daudacity_use_libid3tag=local"
audacity_args+=" -Daudacity_use_libmad=local"
audacity_args+=" -Daudacity_use_libnyquist=local"
audacity_args+=" -Daudacity_use_libvamp=local"
audacity_args+=" -Daudacity_use_lv2=local"
audacity_args+=" -Daudacity_use_portmidi=local"
audacity_args+=" -Daudacity_use_portmixer=local"
audacity_args+=" -Daudacity_use_portsmf=local"
audacity_args+=" -Daudacity_use_libsbsms=local"
audacity_args+=" -Daudacity_use_soundtouch=local"
audacity_args+=" -Daudacity_use_twolame=local"

# optional
# audacity_args+=" -Daudacity_use_ffmpeg=local"

# FIXME
audacity_args+=" -Daudacity_use_pa_jack=off"

# audacity_args+=" -DwxWidgets_ROOT_DIR=${PAWPAW_PREFIX}"
# audacity_args+=" -DwxWidgets_LIB_DIR=${PAWPAW_PREFIX}/lib/mswu"
# audacity_args+=" -DwxWidgets_CONFIGURATION=mswu"

# audacity_args+=" -DwxWidgets_FOUND=BOOL:TRUE"
# audacity_args+=" -DwxWidgets_INCLUDE_DIRS=${PAWPAW_PREFIX}/include"
# audacity_args+=" -DwxWidgets_LIBRARIES=${PAWPAW_PREFIX}/lib/mswu"
# audacity_args+=" -DwxWidgets_INCLUDE_DIRS_NO_SYSTEM"

# audacity_args+=" -DwxWidgets_INCLUDE_DIRS=${PAWPAW_PREFIX}/include;${PAWPAW_PREFIX}/lib/gcc_x64_dll/mswu"
# audacity_args+=" -DwxWidgets_LIBRARIES='winmm comctl32 uuid oleacc uxtheme rpcrt4 shlwapi version wsock32'"
# audacity_args+=" -DwxWidgets_LIBRARY_DIRS=${PAWPAW_PREFIX}/lib/gcc_x64_dll"
# audacity_args+=" -Dtoolkit=mswu"
# audacity_args+=" -D"
# audacity_args+=" -D"

audacity_args+=" -DwxWidgets_FIND_STYLE=win32" # must be forced in the cmake file
audacity_args+=" -DwxWidgets_ROOT_DIR=${PAWPAW_PREFIX}"
audacity_args+=" -DwxWidgets_LIB_DIR=${PAWPAW_PREFIX}/lib/gcc_x64_dll"
audacity_args+=" -DwxWidgets_CONFIGURATION=mswu"
audacity_args+=" -DWX_ROOT_DIR=${PAWPAW_PREFIX}"

win32_target=_WIN32_WINNT_WIN7
export EXTRA_CXXFLAGS="-DWINVER=${win32_target} -D_WIN32_WINNT=${win32_target} -D_WIN32_IE=${win32_target} -std=gnu++14"
# -DwxUSE_UNICODE_WINDOWS_H=1"

download audacity "e93fdd16c50d9d4630bc64595990e2ee0f96bc17" "https://github.com/KXStudio/audacity.git" "" "git"
build_cmake audacity "e93fdd16c50d9d4630bc64595990e2ee0f96bc17" "${audacity_args}"


+ 55
- 0
patches/audacity/01_build-fix-pt2.patch View File

@@ -0,0 +1,55 @@
diff --git a/cmake-proxies/cmake-modules/FindwxWidgets.cmake b/cmake-proxies/cmake-modules/FindwxWidgets.cmake
index 86fc471..cb2f6f6 100644
--- a/cmake-proxies/cmake-modules/FindwxWidgets.cmake
+++ b/cmake-proxies/cmake-modules/FindwxWidgets.cmake
@@ -209,11 +209,7 @@ endif()
#=====================================================================
# Determine whether unix or win32 paths should be used
#=====================================================================
-if(WIN32 AND NOT CYGWIN AND NOT MSYS AND NOT CMAKE_CROSSCOMPILING)
set(wxWidgets_FIND_STYLE "win32")
-else()
- set(wxWidgets_FIND_STYLE "unix")
-endif()
#=====================================================================
# WIN32_FIND_STYLE
diff --git a/include/audacity/Types.h b/include/audacity/Types.h
index 9547b19..994a150 100644
--- a/include/audacity/Types.h
+++ b/include/audacity/Types.h
@@ -844,6 +844,9 @@ using EffectFamilySymbol = ComponentInterfaceSymbol;
#endif
#endif
#endif
+
+ // KXStudio custom build
+ #define AUDACITY_DLL_API __attribute__((visibility("default")))
#endif
#endif // __AUDACITY_TYPES_H__
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 409b34a..79e8f3c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1028,7 +1028,6 @@ audacity_append_common_compiler_options( OPTIONS )
list( APPEND LDFLAGS
PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/MANIFEST:NO>
- $<$<CXX_COMPILER_ID:GNU>:-Wl,--disable-new-dtags>
)
#
diff --git a/src/effects/VST/VSTControlMSW.h b/src/effects/VST/VSTControlMSW.h
index f9477ea..f679a3e 100644
--- a/src/effects/VST/VSTControlMSW.h
+++ b/src/effects/VST/VSTControlMSW.h
@@ -11,7 +11,7 @@
#ifndef AUDACITY_VSTCONTROLMSW_H
#define AUDACITY_VSTCONTROLMSW_H
-#include <Windows.h>
+#include <windows.h>
#include "VSTControl.h"

+ 6
- 3
setup/functions.sh View File

@@ -265,6 +265,9 @@ function build_cmake() {

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

_prebuild "${name}" "${pkgdir}"
mkdir -p "${pkgdir}/build"

if [ "${CROSS_COMPILING}" -eq 1 ]; then
extraconfrules+=" -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}"
fi
@@ -282,9 +285,9 @@ function build_cmake() {
extraconfrules+=" -DCMAKE_OSX_ARCHITECTURES=${OSX_ARCHS}"
extraconfrules+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=${OSX_TARGET}"
fi
_prebuild "${name}" "${pkgdir}"
mkdir -p "${pkgdir}/build"
if [ "${WIN32}" -eq 1 ]; then
extraconfrules+=" -DCMAKE_RC_COMPILER=${WINDRES}"
fi

if [ ! -f "${pkgdir}/.stamp_configured" ]; then
pushd "${pkgdir}/build"


Loading…
Cancel
Save