From nobody@FreeBSD.org  Mon Dec  3 21:11:00 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 6E8A743C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  3 Dec 2012 21:11:00 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 55A9B8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  3 Dec 2012 21:11:00 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qB3LB0uv038942
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 3 Dec 2012 21:11:00 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id qB3LB0S6038941;
	Mon, 3 Dec 2012 21:11:00 GMT
	(envelope-from nobody)
Message-Id: <201212032111.qB3LB0S6038941@red.freebsd.org>
Date: Mon, 3 Dec 2012 21:11:00 GMT
From: Green Dog <fiziologus@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [audio/sdl_mixer] fix midi support
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         174097
>Category:       ports
>Synopsis:       audio/sdl_mixer: fix midi support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mva
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 03 21:20:00 UTC 2012
>Closed-Date:    Fri Dec 28 11:23:21 UTC 2012
>Last-Modified:  Fri Dec 28 11:30:01 UTC 2012
>Originator:     Green Dog
>Release:        FreeBSD-9.0
>Organization:
>Environment:
>Description:
[audio/sdl_mixer]

fix midi support (location timidity.cfg)

OptionNg
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN sdl_mixer.orig/Makefile sdl_mixer/Makefile
--- sdl_mixer.orig/Makefile	2012-12-03 05:46:53.000000000 +0400
+++ sdl_mixer/Makefile	2012-12-04 00:56:04.000000000 +0400
@@ -7,7 +7,7 @@
 
 PORTNAME=	sdl_mixer
 PORTVERSION=	1.2.12
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	audio
 MASTER_SITES=	http://www.libsdl.org/projects/SDL_mixer/release/
 DISTNAME=	SDL_mixer-${PORTVERSION}
@@ -20,52 +20,62 @@
 USE_GNOME=	pkgconfig gnomehack
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
+CONFIGURE_ARGS+=	--enable-music-wave --enable-music-midi
 LDFLAGS+=	-L${LOCALBASE}/lib
 CPPFLAGS+=	-I${LOCALBASE}/include
 #CPPFLAGS+=	-DCONFIG_FILE_ETC_TIMIDITY=\"${LOCALBASE}/etc/timidity.cfg\"
-CPPFLAGS+=     -DCONFIG_FILE_ETC_TIMIDITY=\"${LOCALBASE}/share/timidity/timidity.cfg\"
+#CPPFLAGS+=     -DCONFIG_FILE_ETC_TIMIDITY=\"${LOCALBASE}/share/timidity/timidity.cfg\"
 USE_LDCONFIG=	yes
 
-OPTIONS=	MIKMOD		"Enable MOD music via libMikMod"	On \
-		SMPEG		"Enable MP3 music via SMPEG"		On \
-		FLAC		"Enable FLAC encoding support via flac"	On \
-		VORBIS		"Enable Ogg Vorbis music"		On \
-		TIMIDITYPLUS	"Use Timidity++ instead of Timidity"	Off
+OPTIONS_DEFINE=	MIKMOD SMPEG FLAC VORBIS TIMIDITYPLUS
+OPTIONS_DEFAULT=	MIKMOD SMPEG FLAC VORBIS
+
+MIKMOD_DESC=	Enable MOD music via libMikMod
+SMPEG_DESC=	Enable MP3 music via SMPEG
+FLAC_DESC=	Enable FLAC encoding support via flac
+VORBIS_DESC=	Enable Ogg Vorbis music
+TIMIDITYPLUS_DESC=	Use Timidity++ instead of Timidity (soundfont)
 
 .include <bsd.port.pre.mk>
 
-.if defined(WITHOUT_MIKMOD)
-CONFIGURE_ARGS+=--disable-music-mod
-.else
-LIB_DEPENDS+=	mikmod.2:${PORTSDIR}/audio/libmikmod
+.if ${PORT_OPTIONS:MMIKMOD}
+LIB_DEPENDS+=   mikmod.2:${PORTSDIR}/audio/libmikmod
 CONFIGURE_ARGS+=--enable-music-mod
+.else
+CONFIGURE_ARGS+=--disable-music-mod
 .endif
 
-.if defined(WITHOUT_FLAC)
-CONFIGURE_ARGS+=--disable-music-flac
-.else
-LIB_DEPENDS+=	FLAC.10:${PORTSDIR}/audio/flac
+.if ${PORT_OPTIONS:MFLAC}
+LIB_DEPENDS+=   FLAC.10:${PORTSDIR}/audio/flac
 CONFIGURE_ARGS+=--enable-music-flac
+.else
+CONFIGURE_ARGS+=--disable-music-flac
 .endif
 
-.if defined(WITHOUT_SMPEG)
-CONFIGURE_ARGS+=--disable-music-mp3
-.else
-LIB_DEPENDS+=	smpeg.1:${PORTSDIR}/multimedia/smpeg
+.if ${PORT_OPTIONS:MSMPEG}
+LIB_DEPENDS+=   smpeg.1:${PORTSDIR}/multimedia/smpeg
 CONFIGURE_ARGS+=--enable-music-mp3
+.else
+CONFIGURE_ARGS+=--disable-music-mp3
 .endif
 
-.if defined(WITHOUT_VORBIS)
+.if ${PORT_OPTIONS:MVORBIS}
+LIB_DEPENDS+=   vorbis.4:${PORTSDIR}/audio/libvorbis
+CONFIGURE_ARGS+=--enable-music-ogg
+.else
 CONFIGURE_ARGS+=--disable-music-ogg
+.endif
+
+.if ${PORT_OPTIONS:MTIMIDITYPLUS}
+RUN_DEPENDS+=	${PREFIX}/share/timidity/timidity.cfg-eawpats:${PORTSDIR}/audio/eawpats
+CONFIG_FILE=	${PREFIX}/share/timidity/timidity.cfg-eawpats
 .else
-LIB_DEPENDS+=	vorbis.4:${PORTSDIR}/audio/libvorbis
-CONFIGURE_ARGS+=--enable-music-ogg
+RUN_DEPENDS+=	${PREFIX}/lib/timidity/timidity.cfg:${PORTSDIR}/audio/timidity
+CONFIG_FILE=	${PREFIX}/lib/timidity/timidity.cfg
 .endif
 
 post-patch:
-.if defined(WITH_TIMIDITYPLUS)
-	@${REINPLACE_CMD} -e 's|"${LOCALBASE}/lib/timidity"|"${LOCALBASE}/share/timidity"|g' \
+	@${REINPLACE_CMD} -e 's|%%CONFIG_FILE%%|${CONFIG_FILE}|g' \
 		${WRKSRC}/timidity/config.h
-.endif
 
 .include <bsd.port.post.mk>
diff -ruN sdl_mixer.orig/files/patch-timidity-config.h sdl_mixer/files/patch-timidity-config.h
--- sdl_mixer.orig/files/patch-timidity-config.h	1970-01-01 03:00:00.000000000 +0300
+++ sdl_mixer/files/patch-timidity-config.h	2012-12-04 00:13:53.000000000 +0400
@@ -0,0 +1,11 @@
+--- timidity/config.h.orig	2012-01-16 02:01:05.000000000 +0400
++++ timidity/config.h	2012-12-04 00:12:31.000000000 +0400
+@@ -161,7 +161,7 @@
+ /* You could specify a complete path, e.g. "/etc/timidity.cfg", and
+    then specify the library directory in the configuration file. */
+ #define CONFIG_FILE	"timidity.cfg"
+-#define CONFIG_FILE_ETC "/etc/timidity.cfg"
++#define CONFIG_FILE_ETC "%%CONFIG_FILE%%"
+ 
+ #if defined(__WIN32__) || defined(__OS2__)
+ #define DEFAULT_PATH	"C:\\TIMIDITY"


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->mva 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Dec 3 21:20:08 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174097 
State-Changed-From-To: open->closed 
State-Changed-By: mva 
State-Changed-When: Fri Dec 28 11:23:20 UTC 2012 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174097 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/174097: commit references a PR
Date: Fri, 28 Dec 2012 11:21:39 +0000 (UTC)

 Author: mva
 Date: Fri Dec 28 11:21:31 2012
 New Revision: 309565
 URL: http://svnweb.freebsd.org/changeset/ports/309565
 
 Log:
   - Fix MIDI support for Timidity and Timidity++
   - Convert to OptionsNG framework
   - Trim Makefile headers
   
   PR:		ports/174097
   Submitted by:	Green Dog <fiziologus@gmail.com>
 
 Added:
   head/audio/sdl_mixer/files/patch-timidity-config.h   (contents, props changed)
 Modified:
   head/audio/sdl_mixer/Makefile   (contents, props changed)
 
 Modified: head/audio/sdl_mixer/Makefile
 ==============================================================================
 --- head/audio/sdl_mixer/Makefile	Fri Dec 28 10:37:15 2012	(r309564)
 +++ head/audio/sdl_mixer/Makefile	Fri Dec 28 11:21:31 2012	(r309565)
 @@ -1,13 +1,9 @@
 -# New ports collection makefile for:	sdl_mixer
 -# Date created:				24 April 2000
 -# Whom:					Maxim Sobolev <sobomax@FreeBSD.org>
 -#
 +# Created by: Maxim Sobolev <sobomax@FreeBSD.org>
  # $FreeBSD$
 -#
  
  PORTNAME=	sdl_mixer
  PORTVERSION=	1.2.12
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	audio
  MASTER_SITES=	http://www.libsdl.org/projects/SDL_mixer/release/
  DISTNAME=	SDL_mixer-${PORTVERSION}
 @@ -15,56 +11,67 @@ DISTNAME=	SDL_mixer-${PORTVERSION}
  MAINTAINER=	mva@FreeBSD.org
  COMMENT=	A sample multi-channel audio mixer library
  
 +LICENSE=	ZLIB
 +
  USE_AUTOTOOLS=	libtool
  USE_SDL=	sdl
 -USE_GNOME=	pkgconfig gnomehack
 +USE_PKGCONFIG=	yes
 +USE_GNOME=	gnomehack
  USE_GMAKE=	yes
  GNU_CONFIGURE=	yes
  LDFLAGS+=	-L${LOCALBASE}/lib
  CPPFLAGS+=	-I${LOCALBASE}/include
 -CPPFLAGS+=	-DCONFIG_FILE_ETC_TIMIDITY=\"${LOCALBASE}/etc/timidity.cfg\"
  USE_LDCONFIG=	yes
  
 -OPTIONS=	MIKMOD		"Enable MOD music via libMikMod"	On \
 -		SMPEG		"Enable MP3 music via SMPEG"		On \
 -		FLAC		"Enable FLAC encoding support via flac"	On \
 -		VORBIS		"Enable Ogg Vorbis music"		On \
 -		TIMIDITYPLUS	"Use Timidity++ instead of Timidity"	Off
 +OPTIONS_DEFINE=		MIKMOD SMPEG FLAC VORBIS TIMIDITYPLUS
 +OPTIONS_DEFAULT=	MIKMOD SMPEG FLAC VORBIS
 +
 +MIKMOD_DESC=	Enable MOD music via libMikMod
 +SMPEG_DESC=	Enable MP3 music via SMPEG
 +FLAC_DESC=	Enable FLAC encoding support via flac
 +VORBIS_DESC=	Enable Ogg Vorbis music
 +TIMIDITYPLUS_DESC=	Use Timidity++ instead of Timidity (soundfont)
  
  .include <bsd.port.pre.mk>
  
 -.if defined(WITHOUT_MIKMOD)
 -CONFIGURE_ARGS+=--disable-music-mod
 +.if ${PORT_OPTIONS:MMIKMOD}
 +LIB_DEPENDS+=	mikmod:${PORTSDIR}/audio/libmikmod
 +CONFIGURE_ARGS+=	--enable-music-mod
 +.else
 +CONFIGURE_ARGS+=	--disable-music-mod
 +.endif
 +
 +.if ${PORT_OPTIONS:MFLAC}
 +LIB_DEPENDS+=	FLAC:${PORTSDIR}/audio/flac
 +CONFIGURE_ARGS+=	--enable-music-flac
  .else
 -LIB_DEPENDS+=	mikmod.2:${PORTSDIR}/audio/libmikmod
 -CONFIGURE_ARGS+=--enable-music-mod
 +CONFIGURE_ARGS+=	--disable-music-flac
  .endif
  
 -.if defined(WITHOUT_FLAC)
 -CONFIGURE_ARGS+=--disable-music-flac
 +.if ${PORT_OPTIONS:MSMPEG}
 +LIB_DEPENDS+=	smpeg:${PORTSDIR}/multimedia/smpeg
 +CONFIGURE_ARGS+=	--enable-music-mp3
  .else
 -LIB_DEPENDS+=	FLAC.10:${PORTSDIR}/audio/flac
 -CONFIGURE_ARGS+=--enable-music-flac
 +CONFIGURE_ARGS+=	--disable-music-mp3
  .endif
  
 -.if defined(WITHOUT_SMPEG)
 -CONFIGURE_ARGS+=--disable-music-mp3
 +.if ${PORT_OPTIONS:MVORBIS}
 +LIB_DEPENDS+=		vorbis:${PORTSDIR}/audio/libvorbis
 +CONFIGURE_ARGS+=	--enable-music-ogg
  .else
 -LIB_DEPENDS+=	smpeg.1:${PORTSDIR}/multimedia/smpeg
 -CONFIGURE_ARGS+=--enable-music-mp3
 +CONFIGURE_ARGS+=	--disable-music-ogg
  .endif
  
 -.if defined(WITHOUT_VORBIS)
 -CONFIGURE_ARGS+=--disable-music-ogg
 +.if ${PORT_OPTIONS:MTIMIDITYPLUS}
 +RUN_DEPENDS+=	${LOCALBASE}/share/timidity/timidity.cfg-eawpats:${PORTSDIR}/audio/eawpats
 +CONFIG_FILE=	${LOCALBASE}/share/timidity/timidity.cfg-eawpats
  .else
 -LIB_DEPENDS+=	vorbis.4:${PORTSDIR}/audio/libvorbis
 -CONFIGURE_ARGS+=--enable-music-ogg
 +RUN_DEPENDS+=	${LOCALBASE}/lib/timidity/timidity.cfg:${PORTSDIR}/audio/timidity
 +CONFIG_FILE=	${LOCALBASE}/lib/timidity/timidity.cfg
  .endif
  
  post-patch:
 -.if defined(WITH_TIMIDITYPLUS)
 -	@${REINPLACE_CMD} -e 's|"${LOCALBASE}/lib/timidity"|"${LOCALBASE}/share/timidity"|g' \
 +	@${REINPLACE_CMD} -e 's|%%CONFIG_FILE%%|${CONFIG_FILE}|g' \
  		${WRKSRC}/timidity/config.h
 -.endif
  
  .include <bsd.port.post.mk>
 
 Added: head/audio/sdl_mixer/files/patch-timidity-config.h
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/audio/sdl_mixer/files/patch-timidity-config.h	Fri Dec 28 11:21:31 2012	(r309565)
 @@ -0,0 +1,11 @@
 +--- timidity/config.h.orig	2012-01-16 02:01:05.000000000 +0400
 ++++ timidity/config.h	2012-12-04 00:12:31.000000000 +0400
 +@@ -161,7 +161,7 @@
 + /* You could specify a complete path, e.g. "/etc/timidity.cfg", and
 +    then specify the library directory in the configuration file. */
 + #define CONFIG_FILE	"timidity.cfg"
 +-#define CONFIG_FILE_ETC "/etc/timidity.cfg"
 ++#define CONFIG_FILE_ETC "%%CONFIG_FILE%%"
 + 
 + #if defined(__WIN32__) || defined(__OS2__)
 + #define DEFAULT_PATH	"C:\\TIMIDITY"
 \ No newline at end of file
 _______________________________________________
 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"
 
>Unformatted:
