Skip to content

Commit

Permalink
audio/audacity: Update 2.4.2 -> 3.0.0
Browse files Browse the repository at this point in the history
I also changed the default of LADSPA to OFF and LV2 to ON because LV2 is a new generation of LADSPA.

PR:		254598
Submitted by:	xxjack12xx@gmail.com (maintainer)
  • Loading branch information
yurivict committed Apr 18, 2021
1 parent 52c6d02 commit a2c5d69
Show file tree
Hide file tree
Showing 16 changed files with 157 additions and 75 deletions.
26 changes: 13 additions & 13 deletions audio/audacity/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Created by: Marc van Woerkom <3d@FreeBSD.org>

PORTNAME= audacity
PORTVERSION= 2.4.2
PORTREVISION= 4
DISTVERSIONPREFIX= Audacity-
DISTVERSIONPREFIX= minsrc-
DISTVERSION= 3.0.0
CATEGORIES= audio
MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/Audacity-${PORTVERSION}/

MAINTAINER= xxjack12xx@gmail.com
COMMENT= GUI editor for digital audio waveforms
Expand All @@ -16,11 +16,11 @@ LIB_DEPENDS= libasound.so:audio/alsa-lib \
libexpat.so:textproc/expat2 \
libportaudio.so:audio/portaudio \
libsndfile.so:audio/libsndfile \
libsoxr.so:audio/libsoxr
libsoxr.so:audio/libsoxr \
libsqlite3.so:databases/sqlite3

USES= cmake compiler:c++11-lang cpe desktop-file-utils gettext \
gnome libtool python:build pkgconfig shared-mime-info
USE_GITHUB= yes
USES= cmake compiler:c++14-lang cpe desktop-file-utils gettext \
gnome libtool python:build pkgconfig shared-mime-info tar:xz
USE_GNOME= cairo gtk30
USE_WX= 3.1+
WX_COMPS= wx
Expand All @@ -40,7 +40,7 @@ CMAKE_OFF= audacity_use_pch
OPTIONS_DEFINE= DEBUG DOCS FFMPEG FLAC ID3TAG LADSPA LAME LV2 MAD \
MIDI OGG SBSMS SOUNDTOUCH TWOLAME VAMP \
VORBIS VST
OPTIONS_DEFAULT= FLAC ID3TAG LADSPA MAD MIDI OGG SBSMS \
OPTIONS_DEFAULT= FLAC ID3TAG LV2 MAD MIDI OGG SBSMS \
SOUNDTOUCH TWOLAME VAMP VORBIS VST
OPTIONS_EXCLUDE_i386= SBSMS

Expand Down Expand Up @@ -134,13 +134,13 @@ CMAKE_ARGS+= -DHAVE_MMX:BOOL=OFF \
-DHAVE_SSE2:BOOL=OFF
.endif

post-patch:
@${REINPLACE_CMD} -e 's,Python2,Python${PYTHON_MAJOR_VER}, ; \
/CMAKE_CXX_STANDARD/s,14,11,' ${WRKSRC}/CMakeLists.txt

post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
@cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} \
bin/${PORTNAME} \
share/audacity/modules/mod-script-pipe.so
@${RM} ${STAGEDIR}${DOCSDIR}/LICENSE.txt
# delete empty directories: https://github.com/audacity/audacity/issues/808
@${FIND} ${STAGEDIR} -type d -empty -delete

post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
Expand Down
6 changes: 3 additions & 3 deletions audio/audacity/distinfo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TIMESTAMP = 1593304211
SHA256 (audacity-audacity-Audacity-2.4.2_GH0.tar.gz) = cdb4800c8e9d1d4ca19964caf8d24000f80286ebd8a4db566c2622449744c099
SIZE (audacity-audacity-Audacity-2.4.2_GH0.tar.gz) = 61248430
TIMESTAMP = 1616886054
SHA256 (audacity-minsrc-3.0.0.tar.xz) = d3bb1358b930ea4ef935ed83cc5a0f47006565762c5667c2fb376c6535876a6a
SIZE (audacity-minsrc-3.0.0.tar.xz) = 13308836
4 changes: 2 additions & 2 deletions audio/audacity/files/patch-cmake-proxies_CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--- cmake-proxies/CMakeLists.txt.orig 2020-06-19 15:16:47 UTC
--- cmake-proxies/CMakeLists.txt.orig 2021-02-04 18:52:51 UTC
+++ cmake-proxies/CMakeLists.txt
@@ -132,7 +132,7 @@ addlib( expat expat EXPAT YES
addlib( lame lame LAME YES YES "lame >= 3.100" )
addlib( libsndfile sndfile SNDFILE YES YES "sndfile >= 1.0.28" )
addlib( libsoxr soxr SOXR YES YES "soxr >= 0.1.1" )
-addlib( portaudio-v19 portaudio PORTAUDIO YES YES "" )
+addlib( portaudio-v19 portaudio PORTAUDIO YES YES "portaudio-2.0 >= 19" )
addlib( sqlite sqlite SQLITE YES YES "sqlite3 >= 3.32.0" )

# Optional libraries
#
20 changes: 20 additions & 0 deletions audio/audacity/files/patch-cmake-proxies_wxWidgets_CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- cmake-proxies/wxWidgets/CMakeLists.txt.orig 2020-08-05 16:32:53 UTC
+++ cmake-proxies/wxWidgets/CMakeLists.txt
@@ -237,17 +237,6 @@ file(
"^#define +wxVERSION_STRING +"
)

-string( REGEX MATCHALL "\".+(Audacity).+\"" ours "${output}")
-if( NOT ours )
- message( FATAL_ERROR
- "\n########################################################################\n"
- "Audacity version 3.0.0 or higher requires use of a customized version of "
- "wxWidgets. For details:\n"
- " https://wiki.audacityteam.org/wiki/Building_for_Distros\n"
- "########################################################################\n"
- )
-endif()
-
target_include_directories( ${TARGET} INTERFACE ${INCLUDES} )
target_compile_definitions( ${TARGET} INTERFACE ${DEFINES} )
target_compile_options( ${TARGET} INTERFACE ${COPTS} )
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--- lib-src/libnyquist/nyquist/cmt/cext.h.orig 2018-10-01 14:07:33 UTC
--- lib-src/libnyquist/nyquist/cmt/cext.h.orig 2021-02-04 18:52:51 UTC
+++ lib-src/libnyquist/nyquist/cmt/cext.h
@@ -61,7 +61,7 @@ EXIT(n) -- calls exit(n) after shutting down/dealloca
#include <malloc.h>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- lib-src/libnyquist/nyquist/xlisp/xlfio.c.orig 2021-02-04 18:52:51 UTC
+++ lib-src/libnyquist/nyquist/xlisp/xlfio.c
@@ -19,8 +19,7 @@
/* do some sanity checking: */
#ifndef XL_BIG_ENDIAN
#ifndef XL_LITTLE_ENDIAN
-#error configuration error -- either XL_BIG_ or XL_LITTLE_ENDIAN must be defined
-in xlisp.h
+#error configuration error -- either XL_BIG_ or XL_LITTLE_ENDIAN must be defined in xlisp.h
#endif
#endif
#ifdef XL_BIG_ENDIAN
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- lib-src/libnyquist/nyquist/xlisp/xlisp.h.orig 2016-07-26 13:34:06 UTC
--- lib-src/libnyquist/nyquist/xlisp/xlisp.h.orig 2021-02-04 18:52:51 UTC
+++ lib-src/libnyquist/nyquist/xlisp/xlisp.h
@@ -161,6 +161,15 @@ extern long ptrtoabs();
@@ -172,6 +172,15 @@ extern long ptrtoabs();
#endif
#endif

Expand All @@ -13,6 +13,6 @@
+#endif
+#endif
+
/* Apple CC */
/* Apple CC (xcode, macOS, macintosh) */
#ifdef __APPLE__
#define NNODES 2000
10 changes: 0 additions & 10 deletions audio/audacity/files/patch-lib-src_portsmf_allegro.h

This file was deleted.

4 changes: 2 additions & 2 deletions audio/audacity/files/patch-src_AudioIO.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
--- src/AudioIO.cpp.orig 2020-06-19 15:16:47 UTC
+++ src/AudioIO.cpp
@@ -491,7 +491,6 @@ time warp info and AudioIOListener and whether the pla
@@ -490,7 +490,6 @@ time warp info and AudioIOListener and whether the pla
#define ROUND(x) (int) ((x)+0.5)
//#include <string.h>
// #include "../lib-src/portmidi/pm_common/portmidi.h"
- #include "../lib-src/portaudio-v19/src/common/pa_util.h"
#include "NoteTrack.h"
#endif

@@ -815,13 +814,22 @@ struct AudioIoCallback::ScrubState (private)
@@ -814,13 +813,22 @@ struct AudioIoCallback::ScrubState (private)
// return the system time as a double
static double streamStartTime = 0; // bias system time to small number

Expand Down
29 changes: 0 additions & 29 deletions audio/audacity/files/patch-src_FFmpeg.h

This file was deleted.

60 changes: 60 additions & 0 deletions audio/audacity/files/patch-src_ProjectSerializer.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
--- src/ProjectSerializer.cpp.orig 2021-02-04 18:52:51 UTC
+++ src/ProjectSerializer.cpp
@@ -206,9 +206,9 @@ ProjectSerializer::ProjectSerializer(size_t allocSize)
std::call_once(flag, []{
// Just once per run, store header information in the unique static
// dictionary that will be written into each project that is saved.
- // Store the size of "wxChar" so we can convert during recovery in
- // case the file is used on a system with a different character size.
- char size = sizeof(wxChar);
+ // Store the size of "wxStringCharType" so we can convert during recovery
+ // in case the file is used on a system with a different character size.
+ char size = sizeof(wxStringCharType);
mDict.AppendByte(FT_CharSize);
mDict.AppendData(&size, 1);
});
@@ -242,7 +242,7 @@ void ProjectSerializer::WriteAttr(const wxString & nam
mBuffer.AppendByte(FT_String);
WriteName(name);

- const Length len = value.length() * sizeof(wxChar);
+ const Length len = value.length() * sizeof(wxStringCharType);
WriteLength( mBuffer, len );
mBuffer.AppendData(value.wx_str(), len);
}
@@ -309,7 +309,7 @@ void ProjectSerializer::WriteData(const wxString & val
{
mBuffer.AppendByte(FT_Data);

- Length len = value.length() * sizeof(wxChar);
+ Length len = value.length() * sizeof(wxStringCharType);
WriteLength( mBuffer, len );
mBuffer.AppendData(value.wx_str(), len);
}
@@ -317,7 +317,7 @@ void ProjectSerializer::WriteData(const wxString & val
void ProjectSerializer::Write(const wxString & value)
{
mBuffer.AppendByte(FT_Raw);
- Length len = value.length() * sizeof(wxChar);
+ Length len = value.length() * sizeof(wxStringCharType);
WriteLength( mBuffer, len );
mBuffer.AppendData(value.wx_str(), len);
}
@@ -334,7 +334,7 @@ void ProjectSerializer::WriteSubTree(const ProjectSeri

void ProjectSerializer::WriteName(const wxString & name)
{
- wxASSERT(name.length() * sizeof(wxChar) <= SHRT_MAX);
+ wxASSERT(name.length() * sizeof(wxStringCharType) <= SHRT_MAX);
UShort id;

auto nameiter = mNames.find(name);
@@ -346,7 +346,7 @@ void ProjectSerializer::WriteName(const wxString & nam
{
// mNames is static. This appends each name to static mDict only once
// in each run.
- UShort len = name.length() * sizeof(wxChar);
+ UShort len = name.length() * sizeof(wxStringCharType);

id = mNames.size();
mNames[name] = id;
16 changes: 16 additions & 0 deletions audio/audacity/files/patch-src_import_Import.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--- src/import/Import.cpp.orig 2021-02-04 18:52:51 UTC
+++ src/import/Import.cpp
@@ -803,9 +803,11 @@ bool Importer::Import( AudacityProject &project,
/* i18n-hint: %s will be the filename */
"Audacity did not recognize the type of the file '%s'.\n\n%sFor uncompressed files, also try File > Import > Raw Data.")
.Format( fName,
+#if defined(USE_FFMPEG)
!FFmpegLibsInst()
- ? XO("Try installing FFmpeg.\n\n")
- : XO("") );
+ ? XO("Try installing FFmpeg.\n\n") :
+#endif
+ Verbatim("") );
}
else
{
11 changes: 11 additions & 0 deletions audio/audacity/files/patch-src_widgets_FileConfig.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- src/widgets/FileConfig.cpp.orig 2021-02-04 18:52:51 UTC
+++ src/widgets/FileConfig.cpp
@@ -10,6 +10,8 @@

#include "../Audacity.h"

+#include <errno.h>
+
#include <wx/defs.h>
#include <wx/app.h>
#include <wx/bmpbuttn.h>
11 changes: 11 additions & 0 deletions audio/audacity/files/patch-src_widgets_Grid.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- src/widgets/Grid.cpp.orig 2021-02-04 18:52:51 UTC
+++ src/widgets/Grid.cpp
@@ -572,7 +572,7 @@ void Grid::OnKeyDown(wxKeyEvent &event)
{
wxTextDataObject *data = safenew wxTextDataObject(GetCellValue(crow, ccol));
wxClipboard::Get()->SetData(data);
- SetCellValue(crow, ccol, {});
+ SetCellValue(crow, ccol, "");
return;
}
break;
5 changes: 3 additions & 2 deletions audio/audacity/pkg-plist
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ share/applications/audacity.desktop
%%DATADIR%%/nyquist/velocity.lsp
%%DATADIR%%/nyquist/xlinit.lsp
%%DATADIR%%/nyquist/xm.lsp
%%DATADIR%%/plug-ins/SilenceMarker.ny
%%DATADIR%%/plug-ins/SoundFinder.ny
%%DATADIR%%/plug-ins/SpectralEditMulti.ny
%%DATADIR%%/plug-ins/SpectralEditParametricEQ.ny
%%DATADIR%%/plug-ins/SpectralEditShelves.ny
Expand All @@ -64,6 +62,7 @@ share/applications/audacity.desktop
%%DATADIR%%/plug-ins/eq-xml-to-txt-converter.ny
%%DATADIR%%/plug-ins/equalabel.ny
%%DATADIR%%/plug-ins/highpass.ny
%%DATADIR%%/plug-ins/label-sounds.ny
%%DATADIR%%/plug-ins/limiter.ny
%%DATADIR%%/plug-ins/lowpass.ny
%%DATADIR%%/plug-ins/noisegate.ny
Expand Down Expand Up @@ -93,6 +92,7 @@ share/icons/hicolor/scalable/apps/audacity.svg
%%NLS%%share/locale/bs/LC_MESSAGES/audacity.mo
%%NLS%%share/locale/ca/LC_MESSAGES/audacity.mo
%%NLS%%share/locale/ca_ES@valencia/LC_MESSAGES/audacity.mo
%%NLS%%share/locale/co/LC_MESSAGES/audacity.mo
%%NLS%%share/locale/cs/LC_MESSAGES/audacity.mo
%%NLS%%share/locale/cy/LC_MESSAGES/audacity.mo
%%NLS%%share/locale/da/LC_MESSAGES/audacity.mo
Expand All @@ -119,6 +119,7 @@ share/icons/hicolor/scalable/apps/audacity.svg
%%NLS%%share/locale/ko/LC_MESSAGES/audacity.mo
%%NLS%%share/locale/lt/LC_MESSAGES/audacity.mo
%%NLS%%share/locale/mk/LC_MESSAGES/audacity.mo
%%NLS%%share/locale/mr/LC_MESSAGES/audacity.mo
%%NLS%%share/locale/my/LC_MESSAGES/audacity.mo
%%NLS%%share/locale/nb/LC_MESSAGES/audacity.mo
%%NLS%%share/locale/nl/LC_MESSAGES/audacity.mo
Expand Down

0 comments on commit a2c5d69

Please sign in to comment.