diff options
author | Bartek Rutkowski <robak@FreeBSD.org> | 2015-03-08 21:37:41 +0000 |
---|---|---|
committer | Bartek Rutkowski <robak@FreeBSD.org> | 2015-03-08 21:37:41 +0000 |
commit | dbbc11a7c4b917fa9fc8b42b25aed672acb7f589 (patch) | |
tree | a5a03e32c934d528338baaf2a886f15745ddad3a /audio/wildmidi | |
parent | aae263f0e7f5cb678c68e2918a52591d4aa0f854 (diff) | |
download | ports-dbbc11a7c4b917fa9fc8b42b25aed672acb7f589.tar.gz ports-dbbc11a7c4b917fa9fc8b42b25aed672acb7f589.zip |
Notes
Diffstat (limited to 'audio/wildmidi')
-rw-r--r-- | audio/wildmidi/Makefile | 87 | ||||
-rw-r--r-- | audio/wildmidi/distinfo | 4 | ||||
-rw-r--r-- | audio/wildmidi/files/patch-wildmidi.c--typecasting | 27 | ||||
-rw-r--r-- | audio/wildmidi/pkg-descr | 2 | ||||
-rw-r--r-- | audio/wildmidi/pkg-plist | 9 |
5 files changed, 73 insertions, 56 deletions
diff --git a/audio/wildmidi/Makefile b/audio/wildmidi/Makefile index e5e7f2c6bb98..0c81d56630b3 100644 --- a/audio/wildmidi/Makefile +++ b/audio/wildmidi/Makefile @@ -1,39 +1,80 @@ # $FreeBSD$ PORTNAME= wildmidi -PORTVERSION= 0.2.3.5 -PORTREVISION= 2 +PORTVERSION= 0.3.8 CATEGORIES= audio -MASTER_SITES= SF/${PORTNAME}/${PORTNAME} MAINTAINER= liangtai.s16@gmail.com COMMENT= Simple software midi player and core softsynth library # player: GPLv3, library: LGPL3 -LICENSE= GPLv3 LGPL3 -LICENSE_COMB= multi - -MAKE_JOBS_UNSAFE= yes +LICENSE= LGPL3 -USES= compiler gmake libtool +USE_GITHUB= yes +GH_ACCOUNT= Mindwerks +GH_PROJECT= wildmidi +GH_TAGNAME= ${PORTNAME}-${PORTVERSION:R} +GH_COMMIT= de35d7f +USES= gmake cmake:outsource USE_LDCONFIG= yes -GNU_CONFIGURE= yes -.include <bsd.port.pre.mk> +OPTIONS_SUB= yes +OPTIONS_SINGLE= BACKEND +OPTIONS_SINGLE_BACKEND= ALSA OSS OPENAL OPENALSOFT +OPTIONS_DEFINE= PLAYER PLAYERSTATIC STATIC +OPTIONS_DEFAULT= ALSA PLAYER + +STATIC_CMAKE_ON= -DWANT_STATIC:BOOL=ON +STATIC_CMAKE_OFF= -DWANT_STATIC:BOOL=OFF + +PLAYER_DESC= Simple player +PLAYERSTATIC_DESC= Simple player using STATIC libWildMidi +BACKEND_DESC= Sound system PLAYER and PLAYERSTATIC uses +PLAYER_CMAKE_ON= -DWANT_PLAYER:BOOL=ON +PLAYER_CMAKE_OFF= -DWANT_PLAYER:BOOL=OFF +PLAYERSTATIC_CMAKE_ON= -DWANT_PLAYERSTATIC:BOOL=ON +PLAYERSTATIC_CMAKE_OFF= -DWANT_PLAYERSTATIC:BOOL=OFF +ALSA_CMAKE_ON= -DWANT_ALSA:BOOL=ON +ALSA_CMAKE_OFF= -DWANT_ALSA:BOOL=OFF +OSS_CMAKE_ON= -DWANT_OSS:BOOL=ON +OSS_CMAKE_OFF= -DWANT_OSS:BOOL=OFF +OPENALSOFT_DESC= OpenAL support -.if ${COMPILER_TYPE} == clang -CONFIGURE_ARGS+= --disable-optimize +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MPLAYER} || ${PORT_OPTIONS:MPLAYERSTATIC} +LICENSE+= GPLv3 +LICENSE_COMB= multi +CMAKE_ARGS+= -DWANT_OPENAL:BOOL=OFF +. if ${PORT_OPTIONS:MALSA} +LIB_DEPENDS+= libasound.so:${PORTSDIR}/audio/alsa-lib +. elif ${PORT_OPTIONS:MOPENALSOFT} +LIB_DEPENDS+= libopenal.so:${PORTSDIR}/audio/openal-soft +CMAKE_ARGS+= -DWANT_OPENAL:BOOL=ON +. elif ${PORT_OPTIONS:MOPENAL} +LIB_DEPENDS+= libopenal.so:${PORTSDIR}/audio/openal +CMAKE_ARGS+= -DWANT_OPENAL:BOOL=ON +. endif .endif post-patch: - @${REINPLACE_CMD} -e 's@/etc/@${DATADIR}/@' \ - ${WRKSRC}/docs/wildmidi.1 \ - ${WRKSRC}/docs/wildmidi.cfg.5 - @${REINPLACE_CMD} -e 's@/usr/local/share/wildmidi/@${DATADIR}/@' \ - -e 's@default_timifityconf@default_wildmidiconf@' \ - -e 's@$${\(.*\)-unset} = unset@x"$${\1}" = x@' \ - ${WRKSRC}/configure - @${REINPLACE_CMD} -e '/WM_MixerOptions/s/ \&\& / \& /' \ - ${WRKSRC}/src/wildmidi_lib.c - -.include <bsd.port.post.mk> + @${GREP} -L ${LOCALBASE} ${WRKSRC}/cfg/wildmidi.cfg | ${XARGS} \ + ${REINPLACE_CMD} -e "/^dir \/usr\/share\//{" \ + -e "s|/usr/share/midi/freepats|${LOCALBASE}/share/freepats|;" \ + -e "h; x; s|^|# |; s|freepats|guspat|; H; s|guspat|eawpats|; H;" \ + -e "s|eawpats|eawplus|; H; x;}" + @${GREP} -L ${LOCALBASE} ${WRKSRC}/docs/man/man1/wildmidi.1 \ + ${WRKSRC}/docs/man/man5/wildmidi.cfg.5 \ + ${WRKSRC}/CMakeLists.txt | ${XARGS} \ + ${REINPLACE_CMD} -e 's@/etc/wildmidi/@${DATADIR}/@' \ + -e 's@/etc/@${DATADIR}/@' + @${GREP} -l share/man ${WRKSRC}/src/CMakeLists.txt | ${XARGS} \ + ${REINPLACE_CMD} '/INSTALL/s@share/man@man@' + +pre-install: + @${RM} -f ${WRKSRC}/docs/man/man1/wildmidi.1${REINPLACE_ARGS:S/-i//} \ + ${WRKSRC}/docs/man/man5/wildmidi.cfg.5${REINPLACE_ARGS:S/-i//} + ${MKDIR} ${STAGEDIR}${DATADIR} ; \ + ${CP} ${WRKSRC}/cfg/wildmidi.cfg ${STAGEDIR}${DATADIR}/wildmidi.cfg.sample + +.include <bsd.port.mk> diff --git a/audio/wildmidi/distinfo b/audio/wildmidi/distinfo index 050d0e448d95..c686f634f70f 100644 --- a/audio/wildmidi/distinfo +++ b/audio/wildmidi/distinfo @@ -1,2 +1,2 @@ -SHA256 (wildmidi-0.2.3.5.tar.gz) = 00642702d3475d134596b19531c9e589043dcac482011494e42b035b4739e554 -SIZE (wildmidi-0.2.3.5.tar.gz) = 375792 +SHA256 (wildmidi-0.3.8.tar.gz) = 2a9f26b97dba4dae5adb2ac3babcc678a34211f066379d1a4a32f5ad141d0e4f +SIZE (wildmidi-0.3.8.tar.gz) = 121699 diff --git a/audio/wildmidi/files/patch-wildmidi.c--typecasting b/audio/wildmidi/files/patch-wildmidi.c--typecasting deleted file mode 100644 index 75cbea2686db..000000000000 --- a/audio/wildmidi/files/patch-wildmidi.c--typecasting +++ /dev/null @@ -1,27 +0,0 @@ ---- src/wildmidi.c.orig 2010-07-30 09:33:46.000000000 +0900 -+++ src/wildmidi.c 2011-05-28 23:13:47.000000000 +0900 -@@ -618,7 +618,7 @@ - return -1; - } - -- buffer = (unsigned char *) mmap(NULL, max_buffer, mmmode, mmflags, audio_fd, 0); -+ buffer = (char *) mmap(NULL, max_buffer, mmmode, mmflags, audio_fd, 0); - if (buffer == MAP_FAILED) { - printf("couldn't mmap %s\r\n",strerror(errno)); - shutdown_output(); -@@ -659,12 +659,13 @@ - shutdown_output(); - return -1; - } -- if ((count.ptr < counter) || (count.ptr >= (counter+4))) { -+ if (((unsigned long int)count.ptr < counter) || -+ ((unsigned long int)count.ptr >= (counter+4))) { - break; - } - usleep(500); - } -- if (count.ptr < counter) { -+ if ((unsigned long int)count.ptr < counter) { - free_size = max_buffer - counter; - } else { - free_size = count.ptr - counter; diff --git a/audio/wildmidi/pkg-descr b/audio/wildmidi/pkg-descr index 1ee69a89a631..2fe5118c3446 100644 --- a/audio/wildmidi/pkg-descr +++ b/audio/wildmidi/pkg-descr @@ -12,4 +12,4 @@ able to use a different patch set for each MIDI file. The wildmidi player is a demonstration program to show the capabilities of libWildMidi. -WWW: http://wildmidi.sourceforge.net/ +WWW: http://www.mindwerks.net/projects/wildmidi/ diff --git a/audio/wildmidi/pkg-plist b/audio/wildmidi/pkg-plist index 7509f62710f1..ca558628032e 100644 --- a/audio/wildmidi/pkg-plist +++ b/audio/wildmidi/pkg-plist @@ -1,8 +1,10 @@ -bin/wildmidi +%%PLAYER%%bin/wildmidi +%%PLAYERSTATIC%%bin/wildmidi-static include/wildmidi_lib.h -lib/libWildMidi.so.1 -lib/libWildMidi.so.1.1.0 +%%STATIC%%lib/libWildMidi.a lib/libWildMidi.so +lib/libWildMidi.so.1 +lib/libWildMidi.so.1.1.2 man/man1/wildmidi.1.gz man/man3/WildMidi_Close.3.gz man/man3/WildMidi_FastSeek.3.gz @@ -16,3 +18,4 @@ man/man3/WildMidi_OpenBuffer.3.gz man/man3/WildMidi_SetOption.3.gz man/man3/WildMidi_Shutdown.3.gz man/man5/wildmidi.cfg.5.gz +%%DATADIR%%/wildmidi.cfg.sample |