1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

- Enable runtime detection of pulseaudio, with fallback to portaudio

if pulse is not running. That is useful for the users of KDE speech
  dispatcher system.  [1]
- Bump PORTREVISION (changed lib dependencies)

Suggested by:	Andrew Johnson <daeron at optushome.com.au> (via private email)
This commit is contained in:
Nicola Vitale 2012-05-04 14:14:45 +00:00
parent 632a9f70e6
commit 548e329135
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=296010
2 changed files with 48 additions and 10 deletions

View File

@ -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

View File

@ -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