Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Mar 2013 20:11:21 GMT
From:      Green Dog <fiziologus@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/176968: [audio/sdl_mixer] fix depends
Message-ID:  <201303142011.r2EKBLes098842@red.freebsd.org>
Resent-Message-ID: <201303142020.r2EKK0La039948@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         176968
>Category:       ports
>Synopsis:       [audio/sdl_mixer] fix depends
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 14 20:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Green Dog
>Release:        
>Organization:
>Environment:
>Description:
[audio/sdl_mixer]

remove timidity as dependesy (sdl_mixer used internal timidity)
add switch to support MIDI playback
add support MIDI playback via Fluidsynth (default off)
add install sample players: playwave for WAV files and playmus for other (default off)
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN sdl_mixer.orig/Makefile sdl_mixer/Makefile
--- sdl_mixer.orig/Makefile	2012-12-28 15:41:48.000000000 +0400
+++ sdl_mixer/Makefile	2013-03-15 00:02:46.000000000 +0400
@@ -3,7 +3,7 @@
 
 PORTNAME=	sdl_mixer
 PORTVERSION=	1.2.12
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	audio
 MASTER_SITES=	http://www.libsdl.org/projects/SDL_mixer/release/
 DISTNAME=	SDL_mixer-${PORTVERSION}
@@ -23,16 +23,18 @@
 CPPFLAGS+=	-I${LOCALBASE}/include
 USE_LDCONFIG=	yes
 
-OPTIONS_DEFINE=		MIKMOD SMPEG FLAC VORBIS TIMIDITYPLUS
-OPTIONS_DEFAULT=	MIKMOD SMPEG FLAC VORBIS
+OPTIONS_DEFINE=		MIKMOD SMPEG FLAC VORBIS TIMIDITY FLUID BIN
+OPTIONS_DEFAULT=	MIKMOD SMPEG FLAC VORBIS TIMIDITY
 
 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)
+TIMIDITY_DESC=	Enable MIDI playback via Timidity (MIDI patches)
+FLUID_DESC=	Enable MIDI playback via Fluidsynth
+BIN_DESC=	Install sample players (playmus, playwave)
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MMIKMOD}
 LIB_DEPENDS+=	mikmod:${PORTSDIR}/audio/libmikmod
@@ -62,16 +64,48 @@
 CONFIGURE_ARGS+=	--disable-music-ogg
 .endif
 
-.if ${PORT_OPTIONS:MTIMIDITYPLUS}
+.if ${PORT_OPTIONS:MTIMIDITY} || ${PORT_OPTIONS:MFLUID}
+CONFIGURE_ARGS+=	--enable-music-midi
+
+.if ${PORT_OPTIONS:MTIMIDITY}
+# Internal timidity must used guspat and eawpat patches only, not eawplus
 RUN_DEPENDS+=	${LOCALBASE}/share/timidity/timidity.cfg-eawpats:${PORTSDIR}/audio/eawpats
 CONFIG_FILE=	${LOCALBASE}/share/timidity/timidity.cfg-eawpats
+CONFIGURE_ARGS+=	--enable-music-timidity-midi
+.else
+CONFIGURE_ARGS+=	--disable-music-timidity-midi
+.endif
+
+.if ${PORT_OPTIONS:MFLUID}
+LIB_DEPENDS+=	fluidsynth:${PORTSDIR}/audio/fluidsynth
+CONFIGURE_ARGS+=	--enable-music-fluidsynth-midi
 .else
-RUN_DEPENDS+=	${LOCALBASE}/lib/timidity/timidity.cfg:${PORTSDIR}/audio/timidity
-CONFIG_FILE=	${LOCALBASE}/lib/timidity/timidity.cfg
+CONFIGURE_ARGS+=	--disable-music-fluidsynth-midi
+.endif
+
+.else
+CONFIGURE_ARGS+=	--disable-music-midi
+.endif ## ${PORT_OPTIONS:MTIMIDITY} || ${PORT_OPTIONS:MFLUID}
+
+.if ${PORT_OPTIONS:MBIN}
+PLIST_FILES+=	bin/playmus \
+		bin/playwave
 .endif
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|%%CONFIG_FILE%%|${CONFIG_FILE}|g' \
 		${WRKSRC}/timidity/config.h
+.if ${PORT_OPTIONS:MBIN}
+	@${REINPLACE_CMD} -e 's|#install-bin|install-bin|' \
+		${WRKSRC}/Makefile.in
+.endif
+
+post-install:
+.if ${PORT_OPTIONS:MFLUID}
+	@${ECHO_MSG} "SDL_Mixer install with support MIDI playback via Fluidsynth."
+	@${ECHO_MSG} "You need to export the SDL_SOUNDFONTS env var to a list of soundfonts"
+	@${ECHO_MSG} ""
+	@${ECHO_MSG} "SDL_SOUNDFONTS=\"path_to_soundfonts:another_path_to_soundfonts\""
+.endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303142011.r2EKBLes098842>