aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authormva <mva@FreeBSD.org>2012-12-28 19:21:31 +0800
committermva <mva@FreeBSD.org>2012-12-28 19:21:31 +0800
commitf29cd52be68ff281513b36d57faf2f2b55b38f07 (patch)
tree1b17adadc8ba9caba64bd303b26ad61f7d1d6fac /audio
parent93aca7a0cb8a9e1f90bb62f1dcb11c380f78f6f0 (diff)
downloadfreebsd-ports-gnome-f29cd52be68ff281513b36d57faf2f2b55b38f07.tar.gz
freebsd-ports-gnome-f29cd52be68ff281513b36d57faf2f2b55b38f07.tar.zst
freebsd-ports-gnome-f29cd52be68ff281513b36d57faf2f2b55b38f07.zip
- Fix MIDI support for Timidity and Timidity++
- Convert to OptionsNG framework - Trim Makefile headers PR: ports/174097 Submitted by: Green Dog <fiziologus@gmail.com>
Diffstat (limited to 'audio')
-rw-r--r--audio/sdl_mixer/Makefile71
-rw-r--r--audio/sdl_mixer/files/patch-timidity-config.h11
2 files changed, 50 insertions, 32 deletions
diff --git a/audio/sdl_mixer/Makefile b/audio/sdl_mixer/Makefile
index 71cb9f6dbeab..3834ad287481 100644
--- a/audio/sdl_mixer/Makefile
+++ b/audio/sdl_mixer/Makefile
@@ -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>
diff --git a/audio/sdl_mixer/files/patch-timidity-config.h b/audio/sdl_mixer/files/patch-timidity-config.h
new file mode 100644
index 000000000000..f5161bf1e10e
--- /dev/null
+++ b/audio/sdl_mixer/files/patch-timidity-config.h
@@ -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