Bug 184829 - audio/alienwah: Fix build on -current
Summary: audio/alienwah: Fix build on -current
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pawel Pekala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-16 18:10 UTC by tkato432
Modified: 2013-12-20 08:10 UTC (History)
0 users

See Also:


Attachments
file.diff (4.96 KB, patch)
2013-12-16 18:10 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-12-16 18:10:07 UTC
- Fix build on -current
- Add LICENSE
Comment 1 Pawel Pekala freebsd_committer freebsd_triage 2013-12-19 19:19:37 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pawel

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-12-19 19:27:28 UTC
Author: pawel
Date: Thu Dec 19 19:27:21 2013
New Revision: 336949
URL: http://svnweb.freebsd.org/changeset/ports/336949

Log:
  - Fix build on -current
  - Add LICENSE
  
  PR:		ports/184829
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Modified:
  head/audio/alienwah/Makefile   (contents, props changed)
  head/audio/alienwah/files/patch-aw.cpp   (contents, props changed)

Modified: head/audio/alienwah/Makefile
==============================================================================
--- head/audio/alienwah/Makefile	Thu Dec 19 19:16:55 2013	(r336948)
+++ head/audio/alienwah/Makefile	Thu Dec 19 19:27:21 2013	(r336949)
@@ -8,15 +8,17 @@ CATEGORIES=	audio
 MASTER_SITES=	http://plugin.org.uk/releases/alienwah/
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	Paul Nasca's AlienWah LADSPA Plugin
+COMMENT=	Paul Nasca's AlienWah LADSPA plugin
+
+LICENSE=	GPLv2
 
 BUILD_DEPENDS=	${LOCALBASE}/include/ladspa.h:${PORTSDIR}/audio/ladspa
 
 USES=		gmake
 MAKE_ARGS=	CPP="${CXX}" CXXFLAGS="${CXXFLAGS} -I${LOCALBASE}/include -fPIC"
 
-PLIST_DIRSTRY=	lib/ladspa
 PLIST_FILES=	lib/ladspa/aw.so
+PLIST_DIRSTRY=	lib/ladspa
 
 do-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/ladspa

Modified: head/audio/alienwah/files/patch-aw.cpp
==============================================================================
--- head/audio/alienwah/files/patch-aw.cpp	Thu Dec 19 19:16:55 2013	(r336948)
+++ head/audio/alienwah/files/patch-aw.cpp	Thu Dec 19 19:27:21 2013	(r336949)
@@ -1,5 +1,22 @@
---- aw.cpp.orig	Sat Jan 26 02:51:03 2002
-+++ aw.cpp	Sat May 26 22:33:51 2007
+--- aw.cpp.orig	2002-01-26 02:51:03.000000000 +0900
++++ aw.cpp	2013-12-04 04:50:18.000000000 +0900
+@@ -62,11 +62,11 @@
+ 
+ /*****************************************************************************/
+ 
+-#include <math.h>
+-#include <complex.h>
+-#include <stdlib.h>
+-#include <string.h>
+-#include <stdio.h>
++#include <cmath>
++#include <complex>
++#include <cstdlib>
++#include <cstring>
++#include <cstdio>
+ 
+ /*****************************************************************************/
+ 
 @@ -85,6 +85,8 @@
  #define AW_INPUT2     6
  #define AW_OUTPUT2    7
@@ -9,8 +26,29 @@
  /*****************************************************************************/
  /* Make number of samples represented by 'delay' proportional to
   * the sample rate, such that delay=1 is 1 sample buffer at
-@@ -139,21 +141,57 @@
- 	c2(float_complex(0,0)) {
+@@ -118,10 +120,10 @@
+ unsigned long t2;              //??
+ unsigned long k;               // index for delaybuf
+ unsigned long k2;              // index for delaybuf2
+-float_complex * delaybuf;
+-float_complex * delaybuf2;
+-float_complex c;               //??
+-float_complex c2;              //??
++std::complex<float> * delaybuf;
++std::complex<float> * delaybuf2;
++std::complex<float> c;               //??
++std::complex<float> c2;              //??
+ float freq;
+ float startphase;
+ float feedback;
+@@ -135,25 +137,61 @@
+ 	samplerate(lSampleRate),
+ 	t(0), t2(0),
+ 	k(0), k2(0),
+-	c(float_complex(0,0)),
+-	c2(float_complex(0,0)) {
++	c(std::complex<float>(0,0)),
++	c2(std::complex<float>(0,0)) {
  }
  
 +friend LADSPA_Handle instantiateAW(const LADSPA_Descriptor *,
@@ -40,12 +78,12 @@
 +printf("delay %d\n", delay);
 +	if (delay < 1) delay = 1;
 +	if (delay > MAX_DELAY) delay = MAX_DELAY;
-+	delaybuf = new float_complex[delay];
++	delaybuf = new std::complex<float>[delay];
 +	if (chans == 2) {
-+		delaybuf2 = new float_complex[MAX_DELAY+1];
++		delaybuf2 = new std::complex<float>[MAX_DELAY+1];
 +	}
 +	for (unsigned int i =0; i<delay; ++i) {
-+		delaybuf[i] = float_complex(0,0);
++		delaybuf[i] = std::complex<float>(0,0);
 +	}
 +}
  
@@ -73,7 +111,7 @@
  	switch (port) {
  	case AW_FREQ:
  		((AW *)instance)->lfreq = *datalocation;
-@@ -182,38 +220,16 @@
+@@ -182,41 +220,19 @@
   * connect_port may be called before of after here, so we
   * cannot rely upon port data for initialization
   */
@@ -115,8 +153,21 @@
 +{
  	AW * me = (AW *)instance;
  	float lfo;
- 	float_complex outc;
-@@ -238,7 +254,8 @@
+-	float_complex outc;
++	std::complex<float> outc;
+ 	float lfoskip = me->freq * 2 * PI / me->samplerate;
+ 
+ 	if (! me->inited) me->initState(1);
+@@ -224,7 +240,7 @@
+ 	for(unsigned int i=0; i<samplecount; ++i) {
+ 		if ((me->t++ % LFO_SKIPSAMPLES) == 0) {
+ 			lfo = 1 + cos(me->t * lfoskip + me->startphase);
+-			me->c = float_complex(cos(lfo) * me->feedback,
++			me->c = std::complex<float>(cos(lfo) * me->feedback,
+ 				 sin(lfo) * me->feedback);
+ 		}
+ 		outc = me->c * me->delaybuf[me->k] + (1 - me->feedback) * 
+@@ -238,10 +254,11 @@
  /*
   * Stereo effect?
   */
@@ -125,7 +176,29 @@
 +{
  	AW * me = (AW *)instance;
  	float lfo;
- 	float_complex outc;
+-	float_complex outc;
++	std::complex<float> outc;
+ 	float lfoskip = me->freq * 2 * PI / me->samplerate;
+ 
+ 	if (! me->inited) me->initState(2);
+@@ -249,7 +266,7 @@
+ 	for(unsigned int i=0; i<samplecount; ++i) {
+ 		if ((me->t++ % LFO_SKIPSAMPLES) == 0) {
+ 			lfo = 1 + cos(me->t * lfoskip + me->startphase);
+-			me->c = float_complex(cos(lfo) * me->feedback,
++			me->c = std::complex<float>(cos(lfo) * me->feedback,
+ 				 sin(lfo) * me->feedback);
+ 		}
+ 		outc = me->c * me->delaybuf[me->k] + (1 - me->feedback) * 
+@@ -262,7 +279,7 @@
+ 	for(unsigned int i=0; i<samplecount; ++i) {
+ 		if ((me->t2++ % LFO_SKIPSAMPLES) == 0) {
+ 			lfo = 1 + cos(me->t2 * lfoskip);
+-			me->c2 = float_complex(cos(lfo) * me->feedback,
++			me->c2 = std::complex<float>(cos(lfo) * me->feedback,
+ 				 sin(lfo) * me->feedback);
+ 		}
+ 		outc = me->c2 * me->delaybuf2[me->k2] + (1 - me->feedback) * 
 @@ -273,13 +290,11 @@
  	}
  }
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Pawel Pekala freebsd_committer freebsd_triage 2013-12-19 19:27:36 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-12-20 08:02:39 UTC
Author: bapt
Date: Fri Dec 20 08:02:31 2013
New Revision: 336982
URL: http://svnweb.freebsd.org/changeset/ports/336982

Log:
  MFH: r336949
  
  - Fix build on -current
  - Add LICENSE
  
  PR:		ports/184829
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Modified:
  branches/2014Q1/audio/alienwah/Makefile   (contents, props changed)
  branches/2014Q1/audio/alienwah/files/patch-aw.cpp   (contents, props changed)
Directory Properties:
  branches/2014Q1/   (props changed)

Modified: branches/2014Q1/audio/alienwah/Makefile
==============================================================================
--- branches/2014Q1/audio/alienwah/Makefile	Fri Dec 20 08:01:45 2013	(r336981)
+++ branches/2014Q1/audio/alienwah/Makefile	Fri Dec 20 08:02:31 2013	(r336982)
@@ -8,15 +8,17 @@ CATEGORIES=	audio
 MASTER_SITES=	http://plugin.org.uk/releases/alienwah/
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	Paul Nasca's AlienWah LADSPA Plugin
+COMMENT=	Paul Nasca's AlienWah LADSPA plugin
+
+LICENSE=	GPLv2
 
 BUILD_DEPENDS=	${LOCALBASE}/include/ladspa.h:${PORTSDIR}/audio/ladspa
 
 USES=		gmake
 MAKE_ARGS=	CPP="${CXX}" CXXFLAGS="${CXXFLAGS} -I${LOCALBASE}/include -fPIC"
 
-PLIST_DIRSTRY=	lib/ladspa
 PLIST_FILES=	lib/ladspa/aw.so
+PLIST_DIRSTRY=	lib/ladspa
 
 do-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/ladspa

Modified: branches/2014Q1/audio/alienwah/files/patch-aw.cpp
==============================================================================
--- branches/2014Q1/audio/alienwah/files/patch-aw.cpp	Fri Dec 20 08:01:45 2013	(r336981)
+++ branches/2014Q1/audio/alienwah/files/patch-aw.cpp	Fri Dec 20 08:02:31 2013	(r336982)
@@ -1,5 +1,22 @@
---- aw.cpp.orig	Sat Jan 26 02:51:03 2002
-+++ aw.cpp	Sat May 26 22:33:51 2007
+--- aw.cpp.orig	2002-01-26 02:51:03.000000000 +0900
++++ aw.cpp	2013-12-04 04:50:18.000000000 +0900
+@@ -62,11 +62,11 @@
+ 
+ /*****************************************************************************/
+ 
+-#include <math.h>
+-#include <complex.h>
+-#include <stdlib.h>
+-#include <string.h>
+-#include <stdio.h>
++#include <cmath>
++#include <complex>
++#include <cstdlib>
++#include <cstring>
++#include <cstdio>
+ 
+ /*****************************************************************************/
+ 
 @@ -85,6 +85,8 @@
  #define AW_INPUT2     6
  #define AW_OUTPUT2    7
@@ -9,8 +26,29 @@
  /*****************************************************************************/
  /* Make number of samples represented by 'delay' proportional to
   * the sample rate, such that delay=1 is 1 sample buffer at
-@@ -139,21 +141,57 @@
- 	c2(float_complex(0,0)) {
+@@ -118,10 +120,10 @@
+ unsigned long t2;              //??
+ unsigned long k;               // index for delaybuf
+ unsigned long k2;              // index for delaybuf2
+-float_complex * delaybuf;
+-float_complex * delaybuf2;
+-float_complex c;               //??
+-float_complex c2;              //??
++std::complex<float> * delaybuf;
++std::complex<float> * delaybuf2;
++std::complex<float> c;               //??
++std::complex<float> c2;              //??
+ float freq;
+ float startphase;
+ float feedback;
+@@ -135,25 +137,61 @@
+ 	samplerate(lSampleRate),
+ 	t(0), t2(0),
+ 	k(0), k2(0),
+-	c(float_complex(0,0)),
+-	c2(float_complex(0,0)) {
++	c(std::complex<float>(0,0)),
++	c2(std::complex<float>(0,0)) {
  }
  
 +friend LADSPA_Handle instantiateAW(const LADSPA_Descriptor *,
@@ -40,12 +78,12 @@
 +printf("delay %d\n", delay);
 +	if (delay < 1) delay = 1;
 +	if (delay > MAX_DELAY) delay = MAX_DELAY;
-+	delaybuf = new float_complex[delay];
++	delaybuf = new std::complex<float>[delay];
 +	if (chans == 2) {
-+		delaybuf2 = new float_complex[MAX_DELAY+1];
++		delaybuf2 = new std::complex<float>[MAX_DELAY+1];
 +	}
 +	for (unsigned int i =0; i<delay; ++i) {
-+		delaybuf[i] = float_complex(0,0);
++		delaybuf[i] = std::complex<float>(0,0);
 +	}
 +}
  
@@ -73,7 +111,7 @@
  	switch (port) {
  	case AW_FREQ:
  		((AW *)instance)->lfreq = *datalocation;
-@@ -182,38 +220,16 @@
+@@ -182,41 +220,19 @@
   * connect_port may be called before of after here, so we
   * cannot rely upon port data for initialization
   */
@@ -115,8 +153,21 @@
 +{
  	AW * me = (AW *)instance;
  	float lfo;
- 	float_complex outc;
-@@ -238,7 +254,8 @@
+-	float_complex outc;
++	std::complex<float> outc;
+ 	float lfoskip = me->freq * 2 * PI / me->samplerate;
+ 
+ 	if (! me->inited) me->initState(1);
+@@ -224,7 +240,7 @@
+ 	for(unsigned int i=0; i<samplecount; ++i) {
+ 		if ((me->t++ % LFO_SKIPSAMPLES) == 0) {
+ 			lfo = 1 + cos(me->t * lfoskip + me->startphase);
+-			me->c = float_complex(cos(lfo) * me->feedback,
++			me->c = std::complex<float>(cos(lfo) * me->feedback,
+ 				 sin(lfo) * me->feedback);
+ 		}
+ 		outc = me->c * me->delaybuf[me->k] + (1 - me->feedback) * 
+@@ -238,10 +254,11 @@
  /*
   * Stereo effect?
   */
@@ -125,7 +176,29 @@
 +{
  	AW * me = (AW *)instance;
  	float lfo;
- 	float_complex outc;
+-	float_complex outc;
++	std::complex<float> outc;
+ 	float lfoskip = me->freq * 2 * PI / me->samplerate;
+ 
+ 	if (! me->inited) me->initState(2);
+@@ -249,7 +266,7 @@
+ 	for(unsigned int i=0; i<samplecount; ++i) {
+ 		if ((me->t++ % LFO_SKIPSAMPLES) == 0) {
+ 			lfo = 1 + cos(me->t * lfoskip + me->startphase);
+-			me->c = float_complex(cos(lfo) * me->feedback,
++			me->c = std::complex<float>(cos(lfo) * me->feedback,
+ 				 sin(lfo) * me->feedback);
+ 		}
+ 		outc = me->c * me->delaybuf[me->k] + (1 - me->feedback) * 
+@@ -262,7 +279,7 @@
+ 	for(unsigned int i=0; i<samplecount; ++i) {
+ 		if ((me->t2++ % LFO_SKIPSAMPLES) == 0) {
+ 			lfo = 1 + cos(me->t2 * lfoskip);
+-			me->c2 = float_complex(cos(lfo) * me->feedback,
++			me->c2 = std::complex<float>(cos(lfo) * me->feedback,
+ 				 sin(lfo) * me->feedback);
+ 		}
+ 		outc = me->c2 * me->delaybuf2[me->k2] + (1 - me->feedback) * 
 @@ -273,13 +290,11 @@
  	}
  }
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"