1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

- Resurrect `audio/rezound' as the days of gcc/libstdc++ mess are gone

(at least on tier-1 architectures)
- Update to version 0.13.1beta which includes many C++ related fixes
  (unfortunately, a number of issues still remain to be patched)
- Let the compiler handle template instantiation of ``TPoolFile'' [1]
- Use native atomics instead of pulling Boost header
- Convert few remaining sed(1) in-place editing to patch files
- Bump FOX toolkit version being used (1.4 -> 1.6)
- Get rid of absolute port origins when specifying dependencies
- Unbreak NLS option (and enable it back by default)

[1] http://bugs.gentoo.org/334797
This commit is contained in:
Alexey Dokuchaev 2017-03-03 16:22:28 +00:00
parent bebf3178ae
commit 44b1e2aafe
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=435350
19 changed files with 304 additions and 0 deletions

View File

@ -668,6 +668,7 @@
SUBDIR += rem
SUBDIR += resid
SUBDIR += rexima
SUBDIR += rezound
SUBDIR += rhythmbox
SUBDIR += rio500
SUBDIR += rioutil

85
audio/rezound/Makefile Normal file
View File

@ -0,0 +1,85 @@
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
# $FreeBSD$
PORTNAME= rezound
DISTVERSION= 0.13.1beta
CATEGORIES= audio
MASTER_SITES= SF/${PORTNAME}/ReZound/${DISTVERSION}
MAINTAINER= danfe@FreeBSD.org
COMMENT= Graphical audio file editor
LICENSE= GPLv2
LIB_DEPENDS= libFOX-1.6.so:x11-toolkits/fox16
USES= bison pkgconfig
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-alsa
MAKE_JOBS_UNSAFE= yes
OPTIONS_DEFINE= LARGEFILE JACK AUDIOFILE PORTAUDIO OGG VORBIS FLAC FFTW \
SOUNDTOUCH LADSPA LAME CDRDAO DOCS NLS
OPTIONS_DEFAULT= AUDIOFILE PORTAUDIO OGG VORBIS FLAC SOUNDTOUCH \
LADSPA LAME
LARGEFILE_DESC= Use 64-bit file I/O
FFTW_DESC= Use fast Fourier transform routines
CDRDAO_DESC= Burning audio files to CD support
LARGEFILE_CONFIGURE_ON= --enable-largefile
JACK_LIB_DEPENDS= libjack.so:audio/jack
AUDIOFILE_LIB_DEPENDS= libaudiofile.so:audio/libaudiofile
PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio
OGG_LIB_DEPENDS= libogg.so:audio/libogg
VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis
FLAC_LIB_DEPENDS= libFLAC.so:audio/flac
FFTW_LIB_DEPENDS= libfftw.so:math/fftw
SOUNDTOUCH_LIB_DEPENDS= libSoundTouch.so:audio/soundtouch
LADSPA_RUN_DEPENDS= ${LOCALBASE}/lib/ladspa/amp.so:audio/ladspa
LADSPA_CONFIGURE_OFF= --disable-ladspa
LAME_RUN_DEPENDS= lame:audio/lame
CDRDAO_RUN_DEPENDS= cdrdao:sysutils/cdrdao
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MNLS}
USES+= gettext
CPPFLAGS+= -I${LOCALBASE}/include
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= NLS="@comment "
.endif
post-patch: .SILENT
${REINPLACE_CMD} -E '/atoll|round|nearbyint/d' \
${WRKSRC}/config/platform/bsd.h
${REINPLACE_CMD} -E 's,(_nl_expand_alias \()\),\1...), ; \
/^C(XX)?FLAGS=/d ; /CXXFLAGS="\$$CXXFLAGS -[gW]/d ; \
/^return /s,\(int\)( n?gettext),(long)\1, ; \
/boost header not found/d' \
${WRKSRC}/configure
${REINPLACE_CMD} -e 's,$$(prefix)/doc,$$(datadir)/doc,' \
${WRKSRC}/config/am_include.mk ${WRKSRC}/Makefile.in \
${WRKSRC}/src/Makefile.in ${WRKSRC}/src/misc/Makefile.in \
${WRKSRC}/src/misc/CNestedDataFile/Makefile.in \
${WRKSRC}/src/PoolFile/Makefile.in \
${WRKSRC}/src/backend/DSP/Makefile.in \
${WRKSRC}/src/backend/Makefile.in \
${WRKSRC}/src/backend/File/Makefile.in \
${WRKSRC}/src/backend/Edits/Makefile.in \
${WRKSRC}/src/backend/Effects/Makefile.in \
${WRKSRC}/src/backend/Filters/Makefile.in \
${WRKSRC}/src/backend/Looping/Makefile.in \
${WRKSRC}/src/backend/Generate/Makefile.in \
${WRKSRC}/src/backend/Remaster/Makefile.in \
${WRKSRC}/src/backend/LADSPA/Makefile.in \
${WRKSRC}/src/frontend_fox/Makefile.in
.if ${PORT_OPTIONS:MDOCS}
${REINPLACE_CMD} -e '/AUTHORS/d; /COPYING/d' ${WRKSRC}/Makefile.in
.else
${REINPLACE_CMD} -e 's/ install-pkgdocDATA$$//' ${WRKSRC}/Makefile.in
.endif
.include <bsd.port.mk>

3
audio/rezound/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1388350369
SHA256 (rezound-0.13.1beta.tar.gz) = 9adc3450caae0d22996082fe0f184cdd5314362a212420eb9afdbfd869dd9223
SIZE (rezound-0.13.1beta.tar.gz) = 1895578

View File

@ -0,0 +1,23 @@
--- src/PoolFile/TPoolFile.cpp.orig 2013-02-10 06:35:02 UTC
+++ src/PoolFile/TPoolFile.cpp
@@ -20,11 +20,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-/* this would be needed if I were utilizing gcc's implicit instantiation for TPoolFile
#ifndef __TPoolFile_H__CPP
#error this file must be included through TPoolFile.h NOT compiled on its own
#endif
-*/
/* ???
* There are places that I have to do: container.erase(container.begin+index);
@@ -575,7 +573,7 @@ template<class l_addr_t,class p_addr_t>
invalidateAllCachedBlocks(false,poolId);
// remove poolName with poolId of the parameter
- for(map<string,poolId_t>::const_iterator t=poolNames.begin();t!=poolNames.end();t++)
+ for(map<const string,poolId_t>::const_iterator t=poolNames.begin();t!=poolNames.end();t++)
{
if(t->second==poolId)
{

View File

@ -0,0 +1,13 @@
--- src/PoolFile/TPoolFile.h.orig 2013-02-10 06:35:02 UTC
+++ src/PoolFile/TPoolFile.h
@@ -399,10 +399,8 @@ private:
};
-/* this would be needed if I were utilizing gcc's implicit instantiation for TPoolFile
#define __TPoolFile_H__CPP
#include "TPoolFile.cpp"
#undef __TPoolFile_H__CPP
-*/
#endif

View File

@ -0,0 +1,11 @@
--- src/backend/CPortAudioSoundPlayer.cpp.orig 2013-12-27 03:56:49 UTC
+++ src/backend/CPortAudioSoundPlayer.cpp
@@ -73,7 +73,7 @@ void CPortAudioSoundPlayer::initialize()
// open a PortAudio stream
#ifdef ENABLE_PORTAUDIO_V19
PaStreamParameters output = { gPortAudioOutputDevice,
- gDesiredOutputChannelCount,
+ static_cast<int>(gDesiredOutputChannelCount),
sampleFormat,
Pa_GetDeviceInfo(gPortAudioOutputDevice)->defaultLowOutputLatency ,
NULL};

View File

@ -0,0 +1,11 @@
--- src/backend/CPortAudioSoundRecorder.cpp.orig 2013-12-27 03:57:19 UTC
+++ src/backend/CPortAudioSoundRecorder.cpp
@@ -70,7 +70,7 @@ void CPortAudioSoundRecorder::initialize
#ifdef ENABLE_PORTAUDIO_V19
PaStreamParameters input = {
gPortAudioOutputDevice,
- sound->getChannelCount(),
+ static_cast<int>(sound->getChannelCount()),
sampleFormat,
Pa_GetDeviceInfo(gPortAudioOutputDevice)->defaultLowInputLatency ,
NULL};

View File

@ -0,0 +1,11 @@
--- src/backend/CSound.cpp.orig 2010-02-28 06:32:54 UTC
+++ src/backend/CSound.cpp
@@ -2289,7 +2289,7 @@ void CSound::setUserNotes(const string &
// this is the explicit instantiation of the TPoolFile for CSound's purposes
-#include <TPoolFile.cpp>
+// #include <TPoolFile.cpp>
template class TPoolFile<sample_pos_t,uint64_t>;
// Some explicit template method instantiations (not sure why some are necessary and some aren't)

View File

@ -0,0 +1,13 @@
--- src/backend/CSound_defs.h.orig 2004-06-18 10:45:47.000000000 +0800
+++ src/backend/CSound_defs.h 2012-07-06 14:10:05.000000000 +0800
@@ -50,6 +50,10 @@
#define MAX_LENGTH (0x7fffffffffffffffLL-(1024LL*1024LL))
#include <math.h>
+ extern "C" {
+ long double logl(long double);
+ long double expl(long double);
+ }
#define sample_fpos_floor(a) (floorl(a))
#define sample_fpos_ceil(a) (ceill(a))
#define sample_fpos_round(a) (nearbyintl(a))

View File

@ -0,0 +1,10 @@
--- src/backend/CTrigger.h.orig 2008-09-22 02:37:14 UTC
+++ src/backend/CTrigger.h
@@ -27,6 +27,7 @@
#include <stddef.h>
#include <stdexcept>
+#include <string>
#include <vector>
#include <CMutex.h>

View File

@ -0,0 +1,11 @@
--- src/backend/CrezSoundTranslator.cpp.orig 2013-02-10 06:35:01 UTC
+++ src/backend/CrezSoundTranslator.cpp
@@ -43,7 +43,7 @@ CrezSoundTranslator::~CrezSoundTranslato
// need to include this I use some of the template *methods* for types that are no where else
// so the explicit instantation at the bottom of CSound.cpp doesn't instantiate everything
-#include <TPoolFile.cpp>
+// #include <TPoolFile.cpp>
struct RFormatInfo1
{

View File

@ -0,0 +1,26 @@
--- src/frontend_fox/convert_images.sh.orig 2012-04-14 05:41:31 UTC
+++ src/frontend_fox/convert_images.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# probably should go with something more generic like /bin/sh
# to change to something other than gif, replace .gif and FXGIFIcon throughout the script
@@ -58,7 +58,7 @@ echo >> $H_FILE
# this function encodes filenames with spaces or other non-printable characters into something that will be a valid C-variable name
-function filenameToVarname # $1 is a [path/]filename.ext
+filenameToVarname() # $1 is a [path/]filename.ext
{
# remove path and extension and translate chars
basename "${1%\.*}" | tr ' [],-' '_____'
@@ -81,7 +81,7 @@ echo "#endif" >> $H_FILE
# only overwrite the h file if it needs to be so it won't cause a whole bunch of things to unnecessarily recompile
-if [ -a ${H_FILE%\.tmp} ]
+if [ -e ${H_FILE%\.tmp} ]
then
diff $H_FILE ${H_FILE%\.tmp} >/dev/null
if [ $? -ne 0 ]

View File

@ -0,0 +1,11 @@
--- src/misc/AThread.cpp.orig 2013-02-10 06:35:02 UTC
+++ src/misc/AThread.cpp
@@ -416,7 +416,7 @@ using namespace std;
abort();
} catch(...) {
// linux will abort, Mac will not so it will crash with unhandled exception and generate a crash report
- fprintf(stderr,"unhandled exception was thrown within thread -- ID: %s:(%x); aborting\n", getThreadName().c_str(), (unsigned)thread->mThreadID);fflush(stderr);
+ fprintf(stderr,"unhandled exception was thrown within thread -- ID: %s:(%x); aborting\n", getThreadName().c_str(), thread->mThreadID);fflush(stderr);
// we only abort all the time with linux code
abort();

View File

@ -0,0 +1,11 @@
--- src/misc/CAtomicCounter.h.orig 2013-02-10 06:35:02 UTC
+++ src/misc/CAtomicCounter.h
@@ -28,7 +28,7 @@
#define LINUX_ATOMIX
#include <asm/atomic.h>
-#elif defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 405 && defined(__GXX_EXPERIMENTAL_CXX0X__)/*for now detect --std=c++0x.. will be removed later*/
+#elif defined(__clang__) || defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 405 && defined(__GXX_EXPERIMENTAL_CXX0X__)/*for now detect --std=c++0x.. will be removed later*/
// gcc-4.5 uses the atomic header (c++v0)
#define STL_ATOMIX

View File

@ -0,0 +1,11 @@
--- src/misc/CNestedDataFile/anytype.h.orig 2013-02-10 06:35:02 UTC
+++ src/misc/CNestedDataFile/anytype.h
@@ -159,7 +159,7 @@ template<class Type> STATIC_TPL const st
{
// leaving type in case it's not able to deduce aruments and chooses the default template implemenation
// if I knew how to constrain the original definition of the template, I would make it fully constrained
- s+=anytype_to_string(any[t]);
+ s+=anytype_to_string<Type>(any[t]);
if(t!=(l-1))
s+=",";
}

View File

@ -0,0 +1,10 @@
--- src/misc/TMemoryPipe.h.orig 2013-03-29 17:15:58 UTC
+++ src/misc/TMemoryPipe.h
@@ -24,6 +24,7 @@
#include "../../config/common.h"
#include <stdexcept>
+#include <string>
#include "CMutex.h"
#include "CConditionVariable.h"

View File

@ -0,0 +1,23 @@
--- src/misc/clocks.cpp.orig 2013-02-10 06:35:02 UTC
+++ src/misc/clocks.cpp
@@ -304,18 +304,8 @@ int get_timezone_offset()
#ifdef __APPLE__
int ret = [[NSTimeZone localTimeZone] secondsFromGMT];
#else
- tzset();
-
- // ::timezone's manpage says "Seconds West of GMT", but I found this not to be the case
- // ::timezone is in the range [-12*3600, 12*3600], but it's sign is opposite what we expect:
- // Central Time is +6 hours
- // We want to return -6 hours for Central, so we translate the range and ensure it's min and max value
-
-
- int ret = ::timezone;
-
- // invert sign for our purposes
- ret = -ret;
+ time_t date = time(NULL);
+ int ret = localtime(&date)->tm_gmtoff;
#endif
// "clamp-and-shift" to convert values outside the appropriate

4
audio/rezound/pkg-descr Normal file
View File

@ -0,0 +1,4 @@
ReZound aims to be a stable, open source, and graphical audio file editor
primarily for but not limited to the Linux operating system.
WWW: http://rezound.sourceforge.net/

16
audio/rezound/pkg-plist Normal file
View File

@ -0,0 +1,16 @@
bin/rezound
%%DATADIR%%/icon_logo_32.gif
%%DATADIR%%/impulse_hall1.wav
%%DATADIR%%/key_bindings.dat
%%DATADIR%%/menu.dat
%%DATADIR%%/presets.dat
%%NLS%%share/locale/cs/LC_MESSAGES/rezound.mo
%%NLS%%share/locale/de/LC_MESSAGES/rezound.mo
%%NLS%%share/locale/es/LC_MESSAGES/rezound.mo
%%NLS%%share/locale/fi/LC_MESSAGES/rezound.mo
%%NLS%%share/locale/fr/LC_MESSAGES/rezound.mo
%%NLS%%share/locale/ru/LC_MESSAGES/rezound.mo
%%PORTDOCS%%%%DOCSDIR%%/Features.txt
%%PORTDOCS%%%%DOCSDIR%%/FrontendFoxFeatures.txt
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/README