[150547] users/mojca/ports/audio/timidity

mojca at macports.org mojca at macports.org
Thu Jul 21 07:12:38 PDT 2016


Revision: 150547
          https://trac.macports.org/changeset/150547
Author:   mojca at macports.org
Date:     2016-07-21 07:12:38 -0700 (Thu, 21 Jul 2016)
Log Message:
-----------
mojca/timidity: properly configure freepats library, support for Tcl/Tk (#51842)

Modified Paths:
--------------
    users/mojca/ports/audio/timidity/Portfile

Added Paths:
-----------
    users/mojca/ports/audio/timidity/files/
    users/mojca/ports/audio/timidity/files/patch-interface-tk_c.c.diff

Modified: users/mojca/ports/audio/timidity/Portfile
===================================================================
--- users/mojca/ports/audio/timidity/Portfile	2016-07-21 14:02:30 UTC (rev 150546)
+++ users/mojca/ports/audio/timidity/Portfile	2016-07-21 14:12:38 UTC (rev 150547)
@@ -8,11 +8,16 @@
 name                timidity
 set realname        TiMidity++
 version             2.14.0
-categories          multimedia
+categories          audio multimedia
 platforms           darwin
 license             GPL2+
 maintainers         mojca openmaintainer
 
+description         TiMidity++ is a software synthesizer for MIDI files
+long_description    TiMidity++ is a software synthesizer that can play MIDI files. \
+                    It can synthesize waveform data from a MIDI file and instrument data in real time \
+                    and either play it or save it into various audio file formats.
+
 homepage            http://timidity.sourceforge.net/
 master_sites        sourceforge:project/timidity/${realname}/${realname}-${version}/
 #                   https://sourceforge.net/p/timidity/git/ci/master/tree/
@@ -23,3 +28,42 @@
 
 checksums           rmd160  7f35165e2b15733dc221b4fde8b7b8c6f158d755 \
                     sha256  abf0c8367959e85c9e635b8fbd5183fc27bd380e0ef5e45de4158784538c86fc
+
+depends_run         port:freepats
+
+patchfiles          patch-interface-tk_c.c.diff
+
+# add support for more formats:
+# - libogg
+# - libvorbis
+# - flac
+# - speex
+# - libao
+configure.args      --enable-audio=darwin,speex,libao
+
+# add support for gui:
+# - ncurses: ncurses interface.
+# - slang: S-Lang interface.
+# - motif: Motif interface.  Motif interface also works under Lestiff.
+# - tcltk: Tcl/Tk interface.
+# - emacs: Emacs front-end.  Type M-x timidity to invoke.
+# - xaw: X Athena Widget interface.
+# - xskin: X skin interface.
+# - gtk: GTK+ interface.
+
+post-destroot {
+    set sharedir ${destroot}${prefix}/share/${name}
+    xinstall -d -m 0755 ${sharedir}
+    ln -sf "../freepats/Drum_000"     ${sharedir}/
+    ln -sf "../freepats/Tone_000"     ${sharedir}/
+    ln -sf "../freepats/freepats.cfg" ${sharedir}/timidity.cfg
+
+    # TODO: compress man pages
+}
+
+variant tcltk description "Build with Tcl/Tk interface" {
+    depends_lib-append      port:tk
+    configure.args-append   --enable-tcltk=yes
+}
+
+default_variants    +tcltk

Added: users/mojca/ports/audio/timidity/files/patch-interface-tk_c.c.diff
===================================================================
--- users/mojca/ports/audio/timidity/files/patch-interface-tk_c.c.diff	                        (rev 0)
+++ users/mojca/ports/audio/timidity/files/patch-interface-tk_c.c.diff	2016-07-21 14:12:38 UTC (rev 150547)
@@ -0,0 +1,17 @@
+# https://www.tcl.tk/man/tcl/TclLib/Interp.htm
+# the source code is incompatible with Tcl/Tk 8.6
+# this is a simple workaround
+#
+# a better way would be to take the upstream patch from git 2014-05-12
+# https://sourceforge.net/p/timidity/git/ci/ffdfb523049900e30fe438625d7e9b807f3e16fe/
+#
+--- interface/tk_c.c.orig
++++ interface/tk_c.c
+@@ -46,6 +46,7 @@
+ #include <sys/ipc.h>
+ #include <sys/shm.h>
+ #include <sys/sem.h>
++#define USE_INTERP_RESULT
+ #include <tcl.h>
+ #include <tk.h>
+ #include <sys/wait.h>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160721/92b5b4ef/attachment.html>


More information about the macports-changes mailing list