aboutsummaryrefslogtreecommitdiff
path: root/audio/espeak
diff options
context:
space:
mode:
authorNicola Vitale <nivit@FreeBSD.org>2012-05-04 14:14:45 +0000
committerNicola Vitale <nivit@FreeBSD.org>2012-05-04 14:14:45 +0000
commit548e329135f84b1bdd8a4df09f4b697531569c26 (patch)
treebfd66b4581ef113e8cb3ecc4313eacab09f89a21 /audio/espeak
parent632a9f70e6fec980d6a29321ff6e2a01fd2174c0 (diff)
downloadports-548e329135f84b1bdd8a4df09f4b697531569c26.tar.gz
ports-548e329135f84b1bdd8a4df09f4b697531569c26.zip
Notes
Diffstat (limited to 'audio/espeak')
-rw-r--r--audio/espeak/Makefile23
-rw-r--r--audio/espeak/files/patch-src__Makefile35
2 files changed, 48 insertions, 10 deletions
diff --git a/audio/espeak/Makefile b/audio/espeak/Makefile
index ec06e2a1ccb0..290d1f7ef04d 100644
--- a/audio/espeak/Makefile
+++ b/audio/espeak/Makefile
@@ -7,7 +7,7 @@
PORTNAME= espeak
PORTVERSION= 1.46.02
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= audio
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION:R}
DISTNAME= ${PORTNAME}-${PORTVERSION}-source
@@ -15,13 +15,30 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}-source
MAINTAINER= nivit@FreeBSD.org
COMMENT= A software speech synthesizer
-LIB_DEPENDS= portaudio:${PORTSDIR}/audio/portaudio
+# default is runtime audio detection
+LIB_DEPENDS= ${PORTAUDIOLIB} \
+ ${PULSEAUDIOLIB}
+
+PULSEAUDIOLIB= pulse:${PORTSDIR}/audio/pulseaudio
+PORTAUDIOLIB= portaudio:${PORTSDIR}/audio/portaudio
+
+.if (!defined(WITH_PULSEAUDIO) && !defined(WITH_PORTAUDIO)) || (defined(WITH_PULSEAUDIO) && defined(WITH_PORTAUDIO))
+AUDIO= "runtime"
+.elif defined(WITH_PULSEAUDIO)
+AUDIO= "pulseaudio"
+PORTAUDIOLIB=
+.else
+AUDIO= "portaudio"
+PULSEAUDIOLIB=
+.endif
CONFLICTS= speak-1.[0-9]
MAKE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
- PTHREAD_LIBS="${PTHREAD_LIBS}"
+ PTHREAD_LIBS="${PTHREAD_LIBS}" \
+ AUDIO="${AUDIO}"
+CXXFLAGS+= -I${LOCALBASE}/include
USE_GMAKE= yes
USE_GCC= 4.2+
USE_LDCONFIG= yes
diff --git a/audio/espeak/files/patch-src__Makefile b/audio/espeak/files/patch-src__Makefile
index 2dc66c605eb2..42c87eb7f5c4 100644
--- a/audio/espeak/files/patch-src__Makefile
+++ b/audio/espeak/files/patch-src__Makefile
@@ -1,5 +1,5 @@
---- ./src/Makefile.orig 2011-04-07 15:05:41.000000000 +0200
-+++ ./src/Makefile 2011-04-07 15:08:06.000000000 +0200
+--- ./src/Makefile.orig 2011-11-22 22:46:08.000000000 +0100
++++ ./src/Makefile 2012-05-03 16:00:55.000000000 +0200
@@ -1,8 +1,8 @@
# remove -fno-exceptions if it causes problems with stdio library on some platforms (ARM)
@@ -11,7 +11,28 @@
BINDIR=$(PREFIX)/bin
INCDIR=$(PREFIX)/include/espeak
LIBDIR=$(PREFIX)/lib
-@@ -36,7 +36,7 @@
+@@ -27,7 +27,7 @@
+
+ # 'runtime' uses pulseaudio if it is running, else uses portaudio
+ #AUDIO = runtime
+-AUDIO = portaudio
++AUDIO?= portaudio
+ #AUDIO = portaudio0
+ #AUDIO = portaudio2
+ #AUDIO = pulseaudio
+@@ -35,17 +35,17 @@
+
+ ifeq ($(AUDIO),runtime)
+ WAVE=wave.cpp wave_pulse.cpp
+-LIB_AUDIO=-lpulse -lpulse-simple -lportaudio
++LIB_AUDIO=-L$(LOCALBASE)/lib -lpulse -lpulse-simple -lportaudio
+ USE_AUDIO=-DUSE_PULSEAUDIO -DUSE_PORTAUDIO
+ else
+ ifeq ($(AUDIO),pulseaudio)
+ WAVE=wave_pulse.cpp
+-LIB_AUDIO=-lpulse
++LIB_AUDIO=-L$(LOCALBASE)/lib -lpulse
+ USE_AUDIO=-DUSE_PULSEAUDIO
else
ifeq ($(AUDIO),portaudio)
WAVE=wave.cpp
@@ -19,8 +40,8 @@
+LIB_AUDIO=-L$(LOCALBASE)/lib -lportaudio
USE_AUDIO=-DUSE_PORTAUDIO
else
- ifeq ($(AUDIO),sada)
-@@ -61,23 +61,23 @@
+ ifeq ($(AUDIO),portaudio0)
+@@ -83,23 +83,23 @@
SRCS1=$(speak_SOURCES)
OBJS1=$(patsubst %.cpp,%.o,$(SRCS1))
@@ -49,7 +70,7 @@
$(BIN_NAME): $(OBJS1)
$(CXX) $(LDFLAGS) -o $@ $(OBJS1) $(LIBS1)
-@@ -111,7 +111,7 @@
+@@ -133,7 +133,7 @@
install: all
# Create directories
@@ -58,7 +79,7 @@
$(MKDIR) $(DESTDIR)$(BINDIR)
$(MKDIR) $(DESTDIR)$(LIBDIR)
$(MKDIR) $(DESTDIR)$(INCDIR)
-@@ -127,5 +127,5 @@
+@@ -149,5 +149,5 @@
# Install development headers
$(INSTALL) -pm 644 speak_lib.h $(DESTDIR)$(INCDIR)
# Install data files