audacity-2.3.3: new recipe, almost works (#7347)

This commit is contained in:
davidkaroly
2022-11-06 08:23:48 +01:00
committed by GitHub
parent 071435bc75
commit 7fc19354af
2 changed files with 344 additions and 17 deletions

View File

@@ -4,14 +4,13 @@ recording tasks such as making ringtones, mixing stero tracks, transferring \
tapes and records to computer or CD, splitting recordings into separate \
tracks and more."
HOMEPAGE="https://www.audacityteam.org"
COPYRIGHT="1999-2017 by Audacity Team"
COPYRIGHT="1999-2020 by Audacity Team"
LICENSE="GNU GPL v2"
REVISION="3"
# The official site (FossHub) doesn't allow direct downloads, and has been
# hit with really bad malware injections in the past. So use Fedora's mirror.
SOURCE_URI="http://pkgs.fedoraproject.org/lookaside/extras/audacity/audacity-minsrc-2.1.2.tar.xz/2336353377132971fd8e22fc95fd6b83/audacity-minsrc-2.1.2.tar.xz"
CHECKSUM_SHA256="0df79fe0647a4cd68e46ad40d6e73d2f8eaae413b6d8b186ac036be3554d7e44"
SOURCE_DIR="audacity-minsrc-$portVersion"
REVISION="1"
SOURCE_URI="https://github.com/audacity/audacity/archive/refs/tags/Audacity-$portVersion.tar.gz"
CHECKSUM_SHA256="404e6c49693dedc94212fc5525974058d848536025e19da31359ae02babe8bd7"
SOURCE_DIR="audacity-Audacity-$portVersion"
PATCHES="audacity-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
@@ -19,41 +18,54 @@ SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
audacity$secondaryArchSuffix = $portVersion
app:Audacity$secondaryArchSuffix = $portVersion
cmd:audacity$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
wxqt$secondaryArchSuffix
wxgtk$secondaryArchSuffix
lib:libatk_1.0$secondaryArchSuffix
lib:libcairo$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix
lib:libavformat$secondaryArchSuffix
lib:libavutil$secondaryArchSuffix
lib:libexpat$secondaryArchSuffix
lib:libflac$secondaryArchSuffix
lib:libgdk_pixbuf_2.0$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libgtk_3$secondaryArchSuffix
lib:libharfbuzz$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
# lib:libid3tag$secondaryArchSuffix -- missing pkgconfig
lib:libintl$secondaryArchSuffix
# lib:libmad$secondaryArchSuffix -- missing pkgconfig
lib:libogg$secondaryArchSuffix
lib:libpango_1.0$secondaryArchSuffix
lib:libsndfile$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
wxqt${secondaryArchSuffix}_devel
wxgtk${secondaryArchSuffix}_devel
devel:libavcodec$secondaryArchSuffix
devel:libavformat$secondaryArchSuffix
devel:libavutil$secondaryArchSuffix
devel:libexpat$secondaryArchSuffix
devel:libflac$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
devel:libgtk_3$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
# devel:libid3tag$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
# devel:libmad$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libsndfile$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:cmake
cmd:diff
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:gettext$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
@@ -65,22 +77,19 @@ BUILD_PREREQUIRES="
PATCH()
{
# Hack in support for wxWidgets 3.1.
sed -i 's/3.0.\*)/3.1.\*)/g' configure
sed -i 's/3.0.\*)/3.1.\*)/g' lib-src/lib-widget-extra/configure
# pthreads
sed -i 's/-pthread/-lpthread/g' lib-src/portaudio-v19/configure
}
BUILD()
{
runConfigure ./configure --disable-dynamic-loading --without-lv2 \
--without-portmixer --disable-nyquist
mkdir -p build
cd build
runConfigure ../configure --without-lv2 --without-portmixer --disable-nyquist --without-portmidi --without-midi --without-ffmpeg
make $jobArgs
}
INSTALL()
{
make install
make -C build install
}

View File

@@ -0,0 +1,318 @@
From 7025bfb24f470f5147777b0181db70db4f3d3e05 Mon Sep 17 00:00:00 2001
From: Ken Mays <kmays2000@gmail.com>
Date: Sat, 25 Dec 2021 06:19:07 +0200
Subject: Fix OSS detect for Haiku
diff --git a/lib-src/portaudio-v19/configure b/lib-src/portaudio-v19/configure
index 96cd326..9758d06 100755
--- a/lib-src/portaudio-v19/configure
+++ b/lib-src/portaudio-v19/configure
@@ -15361,7 +15361,7 @@ fi
have_libossaudio=no
have_oss=no
if test "x$with_oss" != "xno"; then
- for ac_header in sys/soundcard.h linux/soundcard.h machine/soundcard.h
+ for ac_header in private/audio/soundcard.h sys/soundcard.h linux/soundcard.h machine/soundcard.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
diff --git a/lib-src/portaudio-v19/configure.in b/lib-src/portaudio-v19/configure.in
index 0f90c10..2bd8f62 100644
--- a/lib-src/portaudio-v19/configure.in
+++ b/lib-src/portaudio-v19/configure.in
@@ -127,7 +127,7 @@ fi
have_libossaudio=no
have_oss=no
if test "x$with_oss" != "xno"; then
- AC_CHECK_HEADERS([sys/soundcard.h linux/soundcard.h machine/soundcard.h], [have_oss=yes])
+ AC_CHECK_HEADERS([private/audio/soundcard.h sys/soundcard.h linux/soundcard.h machine/soundcard.h], [have_oss=yes])
if test "x$have_oss" = "xyes"; then
AC_CHECK_LIB(ossaudio, _oss_ioctl, have_libossaudio=yes, have_libossaudio=no)
fi
--
2.37.3
From e274215eb6ece7954ff9a74d24ae448270681031 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Wed, 30 Jul 2014 01:38:19 +0200
Subject: Add a case for Haiku in configure.in
diff --git a/lib-src/portaudio-v19/configure b/lib-src/portaudio-v19/configure
index 9758d06..27f5e2f 100755
--- a/lib-src/portaudio-v19/configure
+++ b/lib-src/portaudio-v19/configure
@@ -16129,6 +16129,21 @@ fi
SHARED_FLAGS=""
;;
+ haiku* )
+
+ printf "%s\n" "#define PA_USE_SKELETON 1" >>confdefs.h
+
+
+ CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
+ # -Werror
+ LIBS="-lmedia"
+
+ SHARED_FLAGS="$LIBS -shared"
+ #CFLAGS="$CFLAGS"
+ OTHER_OBJS="src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o"
+ PADLL="libportaudio.so"
+ ;;
+
*)
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
diff --git a/lib-src/portaudio-v19/configure.in b/lib-src/portaudio-v19/configure.in
index 2bd8f62..3994c4a 100644
--- a/lib-src/portaudio-v19/configure.in
+++ b/lib-src/portaudio-v19/configure.in
@@ -390,6 +390,22 @@ case "${host_os}" in
SHARED_FLAGS=""
;;
+ haiku* )
+ dnl Haiku configuration
+
+ dnl AC_DEFINE(PA_USE_HAIKU,1)
+ AC_DEFINE(PA_USE_SKELETON,1)
+
+ CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
+ # -Werror
+ LIBS="-lmedia"
+
+ SHARED_FLAGS="$LIBS -shared"
+ #CFLAGS="$CFLAGS"
+ OTHER_OBJS="src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o"
+ PADLL="libportaudio.so"
+ ;;
+
*)
dnl Unix configuration
--
2.37.3
From 1dfdea3d18bf25c1236f5e663937c3e0b372d0e5 Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Sun, 30 Oct 2022 13:21:10 +0100
Subject: dont build portmixer
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 2fbcf65..0197230 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -959,7 +959,7 @@ DIST_SUBDIRS = \
# Note: These optional libraries will not be distributed in the source tarball.
SUBDIRS = FileDialog $(am__append_4) $(am__append_11) $(am__append_12) \
- portmixer $(am__append_13) $(am__append_14) $(am__append_15) \
+ $(am__append_13) $(am__append_14) $(am__append_15) \
$(am__append_16) $(am__append_17) $(OPTIONAL_SUBDIRS)
OPTIONAL_SUBDIRS = $(am__append_1) $(am__append_2) $(am__append_3) \
$(am__append_5) $(am__append_6) $(am__append_7) \
--
2.37.3
From 90ad5833a2f7e62480776ffd6015dac2b4b8b12f Mon Sep 17 00:00:00 2001
From: Ian McInerney <ian.s.mcinerney@ieee.org>
Date: Fri, 8 Apr 2022 01:08:12 +0100
Subject: Remove custom languages in wx 3.1.6 and above
Basque was added as a language with identifier "eu" into wx 3.1.6, so
there is no more need to provide custom languages. Additionally, this
struct changed formatting in 3.1.6, meaning it threw a compile error
when included (so it would have to be fixed if still needed).
diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp
index ba4e8fa82..1519eb607 100644
--- a/src/AudacityApp.cpp
+++ b/src/AudacityApp.cpp
@@ -1042,12 +1042,10 @@ locations of the missing files."), missingFileName);
#define WL(lang,sublang)
#endif
-#if wxCHECK_VERSION(3, 0, 1)
+#if wxCHECK_VERSION(3, 0, 1) && !wxCHECK_VERSION(3, 1, 6)
wxLanguageInfo userLangs[] =
{
- // Bosnian is defined in wxWidgets already
-// { wxLANGUAGE_USER_DEFINED, wxT("bs"), WL(0, SUBLANG_DEFAULT) wxT("Bosnian"), wxLayout_LeftToRight },
-
+ // Included upstream in version 3.1.6
{ wxLANGUAGE_USER_DEFINED, wxT("eu"), WL(0, SUBLANG_DEFAULT) wxT("Basque"), wxLayout_LeftToRight },
};
#endif
@@ -1350,7 +1348,7 @@ bool AudacityApp::OnInit()
//
// 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) && !wxCHECK_VERSION(3, 1, 6)
for (size_t i = 0, cnt = WXSIZEOF(userLangs); i < cnt; i++)
{
wxLocale::AddLanguage(userLangs[i]);
--
2.37.3
From f001c4ed033e60f3cbfdb1db92a66b44d2939294 Mon Sep 17 00:00:00 2001
From: Ian McInerney <ian.s.mcinerney@ieee.org>
Date: Fri, 8 Apr 2022 01:27:52 +0100
Subject: Call the proper wxBitmap constructor for XPM data
wxBitmap back to at least 3.0.0 did not have a constructor for an XPM
image that took a size parameter, it would only take the XPM data
itself.
I don't know how this compiled until now, but it doesn't anymore when
the size is included and built against wx 3.1.6 in Fedora.
diff --git a/src/MixerBoard.cpp b/src/MixerBoard.cpp
index 48092e191..6b7803a7a 100644
--- a/src/MixerBoard.cpp
+++ b/src/MixerBoard.cpp
@@ -1301,7 +1301,7 @@ void MixerBoard::LoadMusicalInstruments()
wxMemoryDC dc;
for (const auto &data : table) {
- auto bmp = std::make_unique<wxBitmap>(data.bitmap,24);
+ auto bmp = std::make_unique<wxBitmap>(data.bitmap);
dc.SelectObject(*bmp);
AColor::Bevel(dc, false, bev);
mMusicalInstruments.push_back(std::make_unique<MusicalInstrument>(
--
2.37.3
From 8e9a286e11121720385772d3caf628217c440d8e Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Sun, 30 Oct 2022 14:36:58 +0100
Subject: kludge for ScriptCommandRelay.cpp without nyquist
diff --git a/src/commands/ScriptCommandRelay.cpp b/src/commands/ScriptCommandRelay.cpp
index 2976338..a135d09 100644
--- a/src/commands/ScriptCommandRelay.cpp
+++ b/src/commands/ScriptCommandRelay.cpp
@@ -156,7 +156,8 @@ void * ExecForLisp( char * pIn ){
// We'll be passing it as a non-const unsigned char *
// That 'unsafe' cast is actually safe. nyq_make_opaque_string is just copying the string.
- void * pResult = nyq_reformat_aud_do_response( Str2 );
+ //void * pResult = nyq_reformat_aud_do_response( Str2 );
+ void * pResult = NULL;
return pResult;
};
--
2.37.3
From ccab33f9468760a04785787281ca4a5d3187c3d5 Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Sun, 30 Oct 2022 14:38:21 +0100
Subject: use -export-dynamic instead of -rdynamic
diff --git a/src/Makefile.am b/src/Makefile.am
index 469cead..9b409fe 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -82,7 +82,7 @@ audacity_CPPFLAGS = \
audacity_CXXFLAGS = \
-Wno-unused-local-typedefs
-audacity_LDFLAGS = -rdynamic
+audacity_LDFLAGS = -export-dynamic
audacity_LDADD = \
$(EXPAT_LIBS) \
$(FILEDIALOG_LIBS) \
diff --git a/src/Makefile.in b/src/Makefile.in
index b7cacf1..e120b7f 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1398,7 +1398,7 @@ audacity_CPPFLAGS = -std=c++11 -Wno-deprecated-declarations \
audacity_CXXFLAGS = \
-Wno-unused-local-typedefs
-audacity_LDFLAGS = -rdynamic
+audacity_LDFLAGS = -export-dynamic
audacity_LDADD = $(EXPAT_LIBS) $(FILEDIALOG_LIBS) $(PORTAUDIO_LIBS) \
$(PORTMIXER_LIBS) $(SNDFILE_LIBS) $(SOXR_LIBS) \
$(WIDGETEXTRA_LIBS) $(WX_LIBS) $(NULL) $(am__append_2) \
--
2.37.3
From 11c9ad6fc1694c8444ee597c9df265811f237fb9 Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Mon, 31 Oct 2022 10:38:30 +0100
Subject: enable build with wxWidgets 3.2
diff --git a/configure b/configure
index e9f23be..2c91b4d 100755
--- a/configure
+++ b/configure
@@ -19916,6 +19916,9 @@ wx_version=`${WX_CONFIG} $wxconfigargs --version`
$as_echo "$as_me: Checking that the chosen version of wxWidgets is 3.1.x (or 3.0.x)" >&6;}
case "${wx_version}" in
+ 3.2.*)
+ echo "Using wxWidgets ${wx_version} - experimental build."
+ ;;
3.1.* | 3.0.*)
echo "Great, you're using wxWidgets ${wx_version}!"
;;
diff --git a/configure.ac b/configure.ac
index 40fc326..0081141 100644
--- a/configure.ac
+++ b/configure.ac
@@ -312,6 +312,9 @@ wx_version=`${WX_CONFIG} $wxconfigargs --version`
AC_MSG_NOTICE([Checking that the chosen version of wxWidgets is 3.1.x (or 3.0.x)])
case "${wx_version}" in
+ 3.2.*)
+ echo "Using wxWidgets ${wx_version} - experimental build."
+ ;;
3.1.* | 3.0.*)
echo "Great, you're using wxWidgets ${wx_version}!"
;;
diff --git a/lib-src/lib-widget-extra/configure b/lib-src/lib-widget-extra/configure
index 6026ec0..afbbeb4 100755
--- a/lib-src/lib-widget-extra/configure
+++ b/lib-src/lib-widget-extra/configure
@@ -16633,6 +16633,9 @@ wx_version=`${WX_CONFIG} $wxconfigargs --version`
$as_echo "$as_me: Checking that the chosen version of wxWidgets is 3.1.x (or 3.0.x)" >&6;}
case "${wx_version}" in
+ 3.2.*)
+ echo "Using wxWidgets ${wx_version} - experimental build."
+ ;;
3.1.* | 3.0.*)
echo "Great, you're using wxWidgets ${wx_version}!"
;;
diff --git a/lib-src/lib-widget-extra/configure.ac b/lib-src/lib-widget-extra/configure.ac
index d711457..6a38bea 100644
--- a/lib-src/lib-widget-extra/configure.ac
+++ b/lib-src/lib-widget-extra/configure.ac
@@ -122,6 +122,9 @@ wx_version=`${WX_CONFIG} $wxconfigargs --version`
AC_MSG_NOTICE([Checking that the chosen version of wxWidgets is 3.1.x (or 3.0.x)])
case "${wx_version}" in
+ 3.2.*)
+ echo "Using wxWidgets ${wx_version} - experimental build."
+ ;;
3.1.* | 3.0.*)
echo "Great, you're using wxWidgets ${wx_version}!"
;;
--
2.37.3