Bug 182522 - [patch] accessibility/gnome-speech: hidden dependencies
Summary: [patch] accessibility/gnome-speech: hidden dependencies
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: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-30 21:10 UTC by Ruslan Makhmatkhanov
Modified: 2013-11-27 11:10 UTC (History)
0 users

See Also:


Attachments
file.diff (466 bytes, patch)
2013-09-30 21:10 UTC, Ruslan Makhmatkhanov
no flags Details | Diff
espeak.patch (371 bytes, patch)
2013-11-27 11:08 UTC, R.Mahmatkhanov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ruslan Makhmatkhanov freebsd_committer 2013-09-30 21:10:00 UTC
1. If ESPEAK option turned off (default), but audio/espeak is installed, port will fail to build, because it needs configure tweaking. The patch adds --without-espeak to the case when espeak wasn't requested by user.
2. If FESTIVAL option is turned off (default), but audio/festival is installed, gnome-speech will build against festival that turn into hidden dependency. Add --without-festival when festival support wasn't explicitly requested by user.

Fix: Patch attached with submission follows:
How-To-Repeat: - install audio/espeak
- try to build accessibility/gnome-speech with default options
Comment 1 Edwin Groothuis freebsd_committer 2013-09-30 21:10:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gnome

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Koop Mast freebsd_committer 2013-11-23 22:47:46 UTC
State Changed
From-To: open->closed

Committed thanks!
Comment 3 dfilter service freebsd_committer 2013-11-23 22:47:47 UTC
Author: kwm
Date: Sat Nov 23 22:47:39 2013
New Revision: 334697
URL: http://svnweb.freebsd.org/changeset/ports/334697

Log:
  Explicitly disable espeak or festival support if we haven't asked for it [1]
  While here stageify.
  
  PR:		ports/182522
  Submitted by:	rm@

Modified:
  head/accessibility/gnome-speech/Makefile
  head/accessibility/gnome-speech/pkg-plist

Modified: head/accessibility/gnome-speech/Makefile
==============================================================================
--- head/accessibility/gnome-speech/Makefile	Sat Nov 23 22:44:00 2013	(r334696)
+++ head/accessibility/gnome-speech/Makefile	Sat Nov 23 22:47:39 2013	(r334697)
@@ -4,6 +4,7 @@
 
 PORTNAME=	gnome-speech
 PORTVERSION=	0.4.25
+PORTREVISION=	1
 CATEGORIES=	accessibility audio gnome
 MASTER_SITES=	GNOME
 DIST_SUBDIR=	gnome2
@@ -11,7 +12,6 @@ DIST_SUBDIR=	gnome2
 MAINTAINER=	gnome@FreeBSD.org
 COMMENT=	GNOME text-to-speech API
 
-NO_STAGE=	yes
 USE_BZIP2=	yes
 USE_GNOME=	gnomeprefix libbonobo
 USES=		gmake pathfix pkgconfig
@@ -28,15 +28,20 @@ FESTIVAL_DESC=	Festival speech synthesis
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MESPEAK}
-LIB_DEPENDS+=	espeak:${PORTSDIR}/audio/espeak
+LIB_DEPENDS+=	libespeak.so:${PORTSDIR}/audio/espeak
 CONFIGURE_ARGS+=--with-espeak-dir=${LOCALBASE}
 PLIST_SUB+=	ESPEAK:=""
 .else
+CONFIGURE_ARGS+=--without-espeak
 PLIST_SUB+=	ESPEAK:="@comment "
 .endif
 
 .if ${PORT_OPTIONS:MFESTIVAL}
 RUN_DEPENDS+=	festival:${PORTSDIR}/audio/festival
+PLIST_SUB+=	FESTIVAL=""
+.else
+CONFIGURE_ARGS+=--without-festival
+PLIST_SUB+=	FESTIVAL="@comment "
 .endif
 
 post-patch:
@@ -51,4 +56,8 @@ post-patch:
 		${WRKSRC}/drivers/loquendo/*.[ch] \
 		${WRKSRC}/drivers/espeak/*.[ch]
 
+post-install:
+	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libgnomespeech.so.7
+	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/orbit-2.0/GNOME_Speech_module.so
+
 .include <bsd.port.mk>

Modified: head/accessibility/gnome-speech/pkg-plist
==============================================================================
--- head/accessibility/gnome-speech/pkg-plist	Sat Nov 23 22:44:00 2013	(r334696)
+++ head/accessibility/gnome-speech/pkg-plist	Sat Nov 23 22:47:39 2013	(r334697)
@@ -1,5 +1,5 @@
 %%ESPEAK:%%bin/espeak-synthesis-driver
-bin/festival-synthesis-driver
+%%FESTIVAL%%bin/festival-synthesis-driver
 bin/test-speech
 include/gnome-speech-1.0/gnome-speech/GNOME_Speech.h
 include/gnome-speech-1.0/gnome-speech/gnome-speech.h
@@ -12,7 +12,7 @@ lib/orbit-2.0/GNOME_Speech_module.a
 lib/orbit-2.0/GNOME_Speech_module.la
 lib/orbit-2.0/GNOME_Speech_module.so
 %%ESPEAK:%%libdata/bonobo/servers/GNOME_Speech_SynthesisDriver_Espeak.server
-libdata/bonobo/servers/GNOME_Speech_SynthesisDriver_Festival.server
+%%FESTIVAL%%libdata/bonobo/servers/GNOME_Speech_SynthesisDriver_Festival.server
 libdata/pkgconfig/gnome-speech-1.0.pc
 share/idl/gnome-speech-1.0/GNOME_Speech.idl
 share/idl/gnome-speech-1.0/GNOME_Speech_Speaker.idl
_______________________________________________
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 4 R.Mahmatkhanov 2013-11-27 11:08:39 UTC
Koop, I'm sorry, but the patch for espeak doesn't work for some reason. 
If I manually execute ./configure --without-espeak, then all is ok, but 
if I do `make configure` in port's dir (with espeak option disabled), 
then it will pick it up anyway.

I checked the configure. There is also check for with-espeak-dir. If 
it's not ``no'', then it will try to build espeak. Dunno, may be this 
configure arg is enabled by default or something. Anyway, I was able to 
fix the breakage like this. Please see the patch attached.

-- 
Regards,
Ruslan

T.O.S. Of Reality