Bug 76258

Summary: games/scummvm: WITH_MPEG2 needs WITH_VORBIS to compile
Product: Ports & Packages Reporter: freebsd
Component: Individual Port(s)Assignee: Volker Stolz <vs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description freebsd 2005-01-15 01:20:14 UTC
As of 0.7.0, games/scummvm cannot be compiled with MPEG2 support if Vorbis support is not enabled as well. The problem is the file sword1/animation.cpp. When WITH_MPEG2 is set, in line 121 of this file, makeVorbisStream is called unconditionally. Unfortunately, this is a Vorbis library function and is not defined if WITH_VORBIS is not set as well.


 is called no matter wheter USE_VORBIS is set or not.

Fix: 

The simplest fix would be to make WITH_MPEG2 depend on WITH_VORBIS. 

Another way of fixing this would be to change the source code, but from looking at the code it seems that the Vorbis support is necessary for the relevant code section to perform its intended job.
How-To-Repeat: [make sure to remove /var/db/ports/scummvm/options]

cd /usr/ports/games/scummvm
make WITH_MPEG2=yes

[wait for compiler error]
Comment 1 Volker Stolz freebsd_committer freebsd_triage 2005-01-21 15:27:30 UTC
Dear maintainer, please look into this issue!

Volker
Comment 2 Volker Stolz freebsd_committer freebsd_triage 2005-01-21 15:27:42 UTC
State Changed
From-To: open->feedback

Forwarded PR to maintainer
Comment 3 Alex Trull 2005-01-21 15:32:32 UTC
* Volker Stolz <vs@freebsd.org> [2005-01-21 16:27:30 +0100]:

> Dear maintainer, please look into this issue!
> 
> Volker

I'll take a look this weekend. Thank you for alerting me.

Regards,
Alex Trull

C +44 (0)7966 203990
@ alex@trull.org
Comment 4 freebsd.alex 2005-01-24 02:37:56 UTC
The following patch forces vorbis if mpeg2 is defined. With a maintainer address update and bumped revision (perhaps unnecessary)

Cheers,
Alex

--- scummvm-orig/Makefile       Mon Jan 10 00:17:44 2005
+++ scummvm/Makefile    Mon Jan 24 02:29:47 2005
@@ -7,11 +7,12 @@
 
 PORTNAME=      scummvm
 PORTVERSION=   0.7.0
+PORTREVISION=  1
 CATEGORIES=    games emulators
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=    ${PORTNAME}
 
-MAINTAINER=    alexander@trull.com
+MAINTAINER=    freebsd.alex@trull.org
 COMMENT=       Graphical Adventure Game Virtual Machine
 
 USE_BZIP2=     yes
@@ -32,6 +33,10 @@
 MAN6=          scummvm.6
 
 DOCS=          NEWS README TODO
+
+.if defined(WITH_MPEG2)
+WITH_VORBIS=    yes         
+.endif
 
 .include <bsd.port.pre.mk>
Comment 5 Volker Stolz freebsd_committer freebsd_triage 2005-02-11 13:08:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->vs

Hm, this doesn't seem to work. Try setting MPEG2 with 'make config', 
then make -V WITH_VORBIS: It remains unset.
Comment 6 Florent Thoumie freebsd_committer freebsd_triage 2005-04-14 14:56:55 UTC
State Changed
From-To: feedback->closed

Committed, thanks! 
Note: When playing with OPTIONS, nothing is set before 
bsd.port.pre.mk inclusion, since it does process your OPTIONS.