From f5340e004590d3775157b335efa8a1525605a55c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 10 Jul 2020 17:48:06 +0200 Subject: gnu: Add tao. * gnu/packages/patches/tao-add-missing-headers.patch, gnu/packages/patches/tao-fix-parser-types.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/audio.scm (tao): New variable. --- gnu/local.mk | 2 + gnu/packages/audio.scm | 71 ++++++++++++++ gnu/packages/patches/tao-add-missing-headers.patch | 102 +++++++++++++++++++++ gnu/packages/patches/tao-fix-parser-types.patch | 26 ++++++ 4 files changed, 201 insertions(+) create mode 100644 gnu/packages/patches/tao-add-missing-headers.patch create mode 100644 gnu/packages/patches/tao-fix-parser-types.patch diff --git a/gnu/local.mk b/gnu/local.mk index 7ed634a7a8..f7c6036ee7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1548,6 +1548,8 @@ dist_patch_DATA = \ %D%/packages/patches/t1lib-CVE-2011-0764.patch \ %D%/packages/patches/t1lib-CVE-2011-1552+.patch \ %D%/packages/patches/t4k-common-libpng16.patch \ + %D%/packages/patches/tao-add-missing-headers.patch \ + %D%/packages/patches/tao-fix-parser-types.patch \ %D%/packages/patches/tar-remove-wholesparse-check.patch \ %D%/packages/patches/tar-skip-unreliable-tests.patch \ %D%/packages/patches/tcc-boot-0.9.27.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 736b934d79..e3085b8a7f 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -70,6 +70,7 @@ #:use-module (gnu packages fontutils) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) + #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gnunet) ; libmicrohttpd @@ -861,6 +862,76 @@ flanger), ringmodulator, distortion, filters, pitchshift, oscillators, emulation (valve, tape), bit fiddling (decimator, pointer-cast), etc.") (license license:gpl3+))) +(define-public tao + (package + (name "tao") + (version "1.0-beta-10May2006") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/taopm/Tao/" + "tao-" version "/" + "tao-" version ".tar.gz")) + (sha256 + (base32 + "156py3g6mmglldfd0j76bn7n242hdwf49diaprjpj7crp8vgf2pz")) + (patches + (search-patches "tao-add-missing-headers.patch" + "tao-fix-parser-types.patch")) + (modules '((guix build utils))) + (snippet + '(begin + (substitute* "configure" + (("SHELL=/bin/sh") "")) + #t)))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags '("TAO_RELEASE=-beta") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-references + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "user-scripts/tao.in" + (("taoparse") + (string-append (assoc-ref outputs "out") "/bin/taoparse")) + (("grep") (which "grep")) + (("sed -f \\$distdir/user-scripts/") + (string-append (which "sed") " -f $distdir/")) + (("distdir=.*") + (string-append "distdir=" + (assoc-ref outputs "out") "/share/tao"))) + #t)) + (add-after 'install 'install-extra-files + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/share/tao/")) + (inc (string-append out "/include/tao/"))) + (mkdir-p share) + (mkdir-p inc) + (install-file "user-scripts/error.parse" share) + (copy-recursively "examples" (string-append share "examples")) + (for-each (lambda (file) (install-file file inc)) + (find-files "include" "\\.h")) + #t)))))) + (inputs + `(("audiofile" ,audiofile) + ("libxi" ,libxi) + ("libxmu" ,libxmu) + ("mesa" ,mesa) + ("glut" ,freeglut) + ("flex" ,flex) + ("bison" ,bison) + ("sed" ,sed) + ("grep" ,grep))) + (home-page "http://taopm.sourceforge.net/") + (synopsis "Sound Synthesis with Physical Models") + (description "Tao is a software package for sound synthesis using physical +models. It provides a virtual acoustic material constructed from masses and +springs which can be used as the basis for building quite complex virtual +musical instruments. Tao comes with a synthesis language for creating and +playing instruments and a C++ API for those who would like to use it as an +object library.") + (license license:gpl2+))) + (define-public csound (package (name "csound") diff --git a/gnu/packages/patches/tao-add-missing-headers.patch b/gnu/packages/patches/tao-add-missing-headers.patch new file mode 100644 index 0000000000..f117281993 --- /dev/null +++ b/gnu/packages/patches/tao-add-missing-headers.patch @@ -0,0 +1,102 @@ +Taken from Debian: +https://salsa.debian.org/multimedia-team/taopm/-/raw/master/debian/patches/01-add-missing-headers.diff + +Description: Adding missing headers +Author: Tiago Bortoletto Vaz +Last-Update: 2013-04-17 +--- a/libtao/Tao.cc ++++ b/libtao/Tao.cc +@@ -18,6 +18,7 @@ + + #include "Tao.h" + #include ++#include + + extern Tao tao; + float &Time = tao.synthesisEngine.time; +--- a/libtao/TaoDevice.cc ++++ b/libtao/TaoDevice.cc +@@ -20,6 +20,7 @@ + #include "Tao.h" + #include "TaoAccessPoint.h" + #include "TaoInstrument.h" ++#include + + TaoDevice::TaoDevice() + { +--- a/libtao/TaoInstrument.cc ++++ b/libtao/TaoInstrument.cc +@@ -23,6 +23,7 @@ + //#include + #include + #include ++#include + + float TaoInstrument::defaultMass=3.5; // Set to optimum value for + // frequency response of +--- a/libtao/TaoOutput.cc ++++ b/libtao/TaoOutput.cc +@@ -24,6 +24,7 @@ + #include + #include "TaoOutput.h" + #include "Tao.h" ++#include + + extern Tao tao; + +--- a/libtao/TaoPitch.cc ++++ b/libtao/TaoPitch.cc +@@ -30,6 +30,7 @@ + #include "TaoPitch.h" + #include + #include ++#include + + // This class allows pitches and frequencies to be specified in a number of + // different formats including the following: +--- a/taoparse/taoparser.yy ++++ b/taoparse/taoparser.yy +@@ -19,7 +19,8 @@ + + #include + #include +-#include ++#include ++#include + #include "taoparserdefs.h" + + int yyerror(char *s); +--- a/libtao/TaoGraphicsEngine.cc ++++ b/libtao/TaoGraphicsEngine.cc +@@ -27,7 +27,8 @@ + #include "TaoInstrument.h" + #include "TaoAccessPoint.h" + #include "TaoDevice.h" +-#include ++#include ++#include + + extern Tao tao; + extern void taoMasterTick(); +--- a/tao2aiff/tao2aiff.cc ++++ b/tao2aiff/tao2aiff.cc +@@ -25,6 +25,8 @@ + #include + #include "audiofile.h" + #include "tao2aiff.h" ++#include ++#include + + + main(int argc, char **argv) +--- a/tao2wav/tao2wav.cc ++++ b/tao2wav/tao2wav.cc +@@ -25,6 +25,8 @@ + #include + #include "audiofile.h" + #include "tao2wav.h" ++#include ++#include + + main(int argc, char **argv) + { diff --git a/gnu/packages/patches/tao-fix-parser-types.patch b/gnu/packages/patches/tao-fix-parser-types.patch new file mode 100644 index 0000000000..5dcf3fc2ea --- /dev/null +++ b/gnu/packages/patches/tao-fix-parser-types.patch @@ -0,0 +1,26 @@ +Taken from Debian: +https://salsa.debian.org/multimedia-team/taopm/-/raw/master/debian/patches/02-fix-parser-yyerror.diff + +Description: Use a constant char, dummy comment. +Author: Tiago Bortoletto Vaz +Last-Update: 2013-04-17 +--- a/taoparse/taoparser.yy ++++ b/taoparse/taoparser.yy +@@ -23,7 +23,7 @@ + #include + #include "taoparserdefs.h" + +-int yyerror(char *s); ++int yyerror(const char *s); + + //#ifdef LINUX + int yylex(void); +@@ -2924,7 +2924,7 @@ + } + + +-int yyerror (char *s) ++int yyerror (const char *s) + { + parse_error(what_I_expected_here); + std::cout << "PARSE_FAILED"; -- cgit v1.2.3