From e2caa73c202f1c2897290037e868e9adb138e658 Mon Sep 17 00:00:00 2001 From: Tee KOBAYASHI Date: Fri, 29 Apr 2022 11:45:39 +0900 Subject: [PATCH] new package: audacity --- x11-packages/audacity/CMakeLists.txt.patch | 18 ++++++++++ x11-packages/audacity/build.sh | 36 +++++++++++++++++++ ...proxies-portaudio-v19-CMakeLists.txt.patch | 29 +++++++++++++++ ...make-proxies-portmidi-CMakeLists.txt.patch | 29 +++++++++++++++ ...ake-proxies-wxWidgets-CMakeLists.txt.patch | 11 ++++++ ...src-libnyquist-nyquist-cmt-midifns.c.patch | 12 +++++++ .../audacity/src-AudacityApp.cpp.patch | 20 +++++++++++ .../audacity/src-AudioIOBase.cpp.patch | 10 ++++++ .../audacity/src-CMakeLists.txt.patch | 15 ++++++++ .../audacity/src-MixerBoard.cpp.patch | 11 ++++++ 10 files changed, 191 insertions(+) create mode 100644 x11-packages/audacity/CMakeLists.txt.patch create mode 100644 x11-packages/audacity/build.sh create mode 100644 x11-packages/audacity/cmake-proxies-portaudio-v19-CMakeLists.txt.patch create mode 100644 x11-packages/audacity/cmake-proxies-portmidi-CMakeLists.txt.patch create mode 100644 x11-packages/audacity/cmake-proxies-wxWidgets-CMakeLists.txt.patch create mode 100644 x11-packages/audacity/lib-src-libnyquist-nyquist-cmt-midifns.c.patch create mode 100644 x11-packages/audacity/src-AudacityApp.cpp.patch create mode 100644 x11-packages/audacity/src-AudioIOBase.cpp.patch create mode 100644 x11-packages/audacity/src-CMakeLists.txt.patch create mode 100644 x11-packages/audacity/src-MixerBoard.cpp.patch diff --git a/x11-packages/audacity/CMakeLists.txt.patch b/x11-packages/audacity/CMakeLists.txt.patch new file mode 100644 index 000000000..6b1755b19 --- /dev/null +++ b/x11-packages/audacity/CMakeLists.txt.patch @@ -0,0 +1,18 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -226,6 +226,7 @@ + message( STATUS "Building for 32-bit target" ) + endif() + ++if( FALSE ) + # Check for compiler flags + if( CMAKE_CXX_COMPILER_ID MATCHES "AppleClang|Clang|GNU" ) + check_cxx_compiler_flag( "-mmmx" HAVE_MMX ) +@@ -255,6 +256,7 @@ + set( SSE2_FLAG "/arch:SSE2" ) + endif() + endif() ++endif( FALSE ) + + check_include_files( "float.h;stdarg.h;stdlib.h;string.h" STDC_HEADERS ) + diff --git a/x11-packages/audacity/build.sh b/x11-packages/audacity/build.sh new file mode 100644 index 000000000..e8dd66cc8 --- /dev/null +++ b/x11-packages/audacity/build.sh @@ -0,0 +1,36 @@ +TERMUX_PKG_HOMEPAGE=https://www.audacityteam.org/ +TERMUX_PKG_DESCRIPTION="An easy-to-use, multi-track audio editor and recorder" +TERMUX_PKG_LICENSE="GPL-2.0" +TERMUX_PKG_MAINTAINER="@termux" +# Version 3.0.0 or higher does not work with vanilla wxWidgets. +TERMUX_PKG_VERSION=2.4.2 +TERMUX_PKG_SRCURL=https://github.com/audacity/audacity/archive/Audacity-${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_SHA256=cdb4800c8e9d1d4ca19964caf8d24000f80286ebd8a4db566c2622449744c099 +TERMUX_PKG_DEPENDS="glib, gtk3, libc++, libexpat, libflac, libmp3lame, libogg, libsndfile, libsoxr, libvorbis, wxwidgets, zlib" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Daudacity_use_wxwidgets=system +-Daudacity_use_expat=system +-Daudacity_use_lame=system +-Daudacity_use_sndfile=system +-Daudacity_use_soxr=system +-Daudacity_use_portaudio=local +-Daudacity_use_ffmpeg=off +-Daudacity_use_id3tag=off +-Daudacity_use_mad=off +-Daudacity_use_nyquist=local +-Daudacity_use_vamp=off +-Daudacity_use_ogg=system +-Daudacity_use_vorbis=system +-Daudacity_use_flac=system +-Daudacity_use_lv2=off +-Daudacity_use_midi=off +-Daudacity_use_portmixer=local +-Daudacity_use_portsmf=off +-Daudacity_use_sbsms=off +-Daudacity_use_soundtouch=off +-Daudacity_use_twolame=off +" + +termux_step_pre_configure() { + CPPFLAGS+=" -Dushort=u_short -Dulong=u_long" +} diff --git a/x11-packages/audacity/cmake-proxies-portaudio-v19-CMakeLists.txt.patch b/x11-packages/audacity/cmake-proxies-portaudio-v19-CMakeLists.txt.patch new file mode 100644 index 000000000..1f45a66af --- /dev/null +++ b/x11-packages/audacity/cmake-proxies-portaudio-v19-CMakeLists.txt.patch @@ -0,0 +1,29 @@ +--- a/cmake-proxies/portaudio-v19/CMakeLists.txt ++++ b/cmake-proxies/portaudio-v19/CMakeLists.txt +@@ -56,7 +56,7 @@ + "Use the portaudio CoreAudio interface if available" + YES + ) +- elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" ) ++ elseif( CMAKE_SYSTEM_NAME MATCHES "Android|Linux|FreeBSD" ) + cmd_option( + ${_OPT}use_pa_alsa + "Use the portaudio ALSA interface if available" +@@ -118,7 +118,7 @@ + ${TARGET_ROOT}/src/hostapi/coreaudio/pa_mac_core_utilities.c + > + +- $<$: ++ $<$: + ${TARGET_ROOT}/src/os/unix/pa_unix_hostapis.c + ${TARGET_ROOT}/src/os/unix/pa_unix_util.c + > +@@ -158,7 +158,7 @@ + ${TARGET_ROOT}/src/os/win + > + +- $<$: ++ $<$: + ${TARGET_ROOT}/src/os/unix + > + diff --git a/x11-packages/audacity/cmake-proxies-portmidi-CMakeLists.txt.patch b/x11-packages/audacity/cmake-proxies-portmidi-CMakeLists.txt.patch new file mode 100644 index 000000000..7a7824997 --- /dev/null +++ b/x11-packages/audacity/cmake-proxies-portmidi-CMakeLists.txt.patch @@ -0,0 +1,29 @@ +--- a/cmake-proxies/portmidi/CMakeLists.txt ++++ b/cmake-proxies/portmidi/CMakeLists.txt +@@ -3,7 +3,7 @@ + + def_vars() + +-if( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" ) ++if( CMAKE_SYSTEM_NAME MATCHES "Android|Linux|FreeBSD" ) + if( ${_OPT}use_pa_alsa ) + find_package( ALSA ) + endif() +@@ -29,7 +29,7 @@ + ${TARGET_ROOT}/porttime/ptmacosx_mach.c + > + +- $<$: ++ $<$: + ${TARGET_ROOT}/pm_linux/finddefault.c + ${TARGET_ROOT}/pm_linux/pmlinux.c + ${TARGET_ROOT}/porttime/ptlinux.c +@@ -53,7 +53,7 @@ + ${TARGET_ROOT}/pm_mac + > + +- $<$: ++ $<$: + ${TARGET_ROOT}/pm_linux + > + ) diff --git a/x11-packages/audacity/cmake-proxies-wxWidgets-CMakeLists.txt.patch b/x11-packages/audacity/cmake-proxies-wxWidgets-CMakeLists.txt.patch new file mode 100644 index 000000000..b97311a6c --- /dev/null +++ b/x11-packages/audacity/cmake-proxies-wxWidgets-CMakeLists.txt.patch @@ -0,0 +1,11 @@ +--- a/cmake-proxies/wxWidgets/CMakeLists.txt ++++ b/cmake-proxies/wxWidgets/CMakeLists.txt +@@ -99,7 +99,7 @@ + + # Causes problems on OSX, so turn it off + set( wxBUILD_PRECOMP NO ) +- elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" ) ++ elseif( CMAKE_SYSTEM_NAME MATCHES "Android|Linux|FreeBSD" ) + # Doesn't yet have accessbility + set( wxUSE_ACCESSIBILITY NO ) + diff --git a/x11-packages/audacity/lib-src-libnyquist-nyquist-cmt-midifns.c.patch b/x11-packages/audacity/lib-src-libnyquist-nyquist-cmt-midifns.c.patch new file mode 100644 index 000000000..e90459b43 --- /dev/null +++ b/x11-packages/audacity/lib-src-libnyquist-nyquist-cmt-midifns.c.patch @@ -0,0 +1,12 @@ +--- a/lib-src/libnyquist/nyquist/cmt/midifns.c ++++ b/lib-src/libnyquist/nyquist/cmt/midifns.c +@@ -118,7 +118,9 @@ + #ifdef UNIX + #ifndef UNIX_IRIX + #include "sys/time.h" ++#ifndef __ANDROID__ + #include "sys/timeb.h" ++#endif + #include "cmtio.h" + #else + #include diff --git a/x11-packages/audacity/src-AudacityApp.cpp.patch b/x11-packages/audacity/src-AudacityApp.cpp.patch new file mode 100644 index 000000000..f74213630 --- /dev/null +++ b/x11-packages/audacity/src-AudacityApp.cpp.patch @@ -0,0 +1,20 @@ +--- a/src/AudacityApp.cpp ++++ b/src/AudacityApp.cpp +@@ -964,7 +964,7 @@ + #define WL(lang,sublang) + #endif + +-#if wxCHECK_VERSION(3, 0, 1) ++#if wxCHECK_VERSION(3, 0, 1) && !defined __ANDROID__ + wxLanguageInfo userLangs[] = + { + // Bosnian is defined in wxWidgets already +@@ -1270,7 +1270,7 @@ + // + // TODO: The whole Language initialization really need to be reworked. + // It's all over the place. +-#if wxCHECK_VERSION(3, 0, 1) ++#if wxCHECK_VERSION(3, 0, 1) && !defined __ANDROID__ + for (size_t i = 0, cnt = WXSIZEOF(userLangs); i < cnt; i++) + { + wxLocale::AddLanguage(userLangs[i]); diff --git a/x11-packages/audacity/src-AudioIOBase.cpp.patch b/x11-packages/audacity/src-AudioIOBase.cpp.patch new file mode 100644 index 000000000..e906655c6 --- /dev/null +++ b/x11-packages/audacity/src-AudioIOBase.cpp.patch @@ -0,0 +1,10 @@ +--- a/src/AudioIOBase.cpp ++++ b/src/AudioIOBase.cpp +@@ -21,6 +21,7 @@ + #include "prefs/RecordingPrefs.h" + #include "widgets/MeterPanelBase.h" + ++#include "portaudio.h" + #if USE_PORTMIXER + #include "portmixer.h" + #endif diff --git a/x11-packages/audacity/src-CMakeLists.txt.patch b/x11-packages/audacity/src-CMakeLists.txt.patch new file mode 100644 index 000000000..f2757f2ba --- /dev/null +++ b/x11-packages/audacity/src-CMakeLists.txt.patch @@ -0,0 +1,15 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1090,9 +1090,9 @@ + $<$:sbsms> + $<$:soundtouch> + $<$:libvamp> +- $<$:PkgConfig::GLIB> +- $<$:PkgConfig::GTK> +- $<$:z> ++ $<$:PkgConfig::GLIB> ++ $<$:PkgConfig::GTK> ++ $<$:z> + $<$:pthread> + ) + diff --git a/x11-packages/audacity/src-MixerBoard.cpp.patch b/x11-packages/audacity/src-MixerBoard.cpp.patch new file mode 100644 index 000000000..3403646c7 --- /dev/null +++ b/x11-packages/audacity/src-MixerBoard.cpp.patch @@ -0,0 +1,11 @@ +--- a/src/MixerBoard.cpp ++++ b/src/MixerBoard.cpp +@@ -1304,7 +1304,7 @@ + wxMemoryDC dc; + + for (const auto &data : table) { +- auto bmp = std::make_unique(data.bitmap,24); ++ auto bmp = std::make_unique(data.bitmap); + dc.SelectObject(*bmp); + AColor::Bevel(dc, false, bev); + mMusicalInstruments.push_back(std::make_unique(