retitle 775341 chuck: new upstream version 1.3.5.2 available
tags 775341 patch
thanks

> There is a new upstream version available: 1.3.5.0
> http://chuck.cs.princeton.edu/release/

Now it's already 1.3.5.2 ...

Somebody asked me about the efforts needed to bring chuck to the latest
upstream version in order to benefit from new features. Turns out it's
not *that* difficult. So in order to avoid work is done twice, the diff
on debian/ is attached. For the upstream tarball, use uscan or plain
wget on the upstream server and rename.

While declared a NMU, this diff goes far beyond that:

* Packaging has been modernized in every regard, also the previous
  modifications went upstream, were no longer needed, or could be
  worked around by a .install file.
* Two commits were cherry-picked that fix obvious bugs, reported by gcc.
* Repacking no longer happens as I fail to see why the affected files
  are not dfsg compliant, I might be wrong.
* Support for OSS was removed upstream, so here as well. The Linux
  kernel will drop it soon.
* Support for pulse(audio) was added.
* The examples/ directory is now shipped in a separate -data package as
  suggested by lintian, to avoid huge amounts of arch-independent
  data in a arch-dependent package.

Status: Builds, and the pulse version works fine.

Things to do:

# Blocker

* Review license status of each and every file, update
  debian/copyright where required.

# Upstream

* Ask upstream for license clarification of src/util_sndfile.c and
  some more since it seems the chuck license was prepended
  automatically.
* Ask upstream to fix the FSF address in the license statements.
* Ask upstream to use trusted certificates on their web server, then
  switch to secure URLs in debian/control and elsewhere.
* Bring the typo fixes upstream. There are more in comments.

# Packaging

* Perhaps there are nicer ways to write debian/rules
* Is there really the need for three chuck binaries?
* Are there more applications to build for, see <src/makefile.*>?
* Something else worth to be cherry-picked from upstream git at
  <https://github.com/ccrma/chuck>?

Cheers,

    Christoph
diff --git a/debian/changelog b/debian/changelog
index 1029151..0f0f11c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+chuck (1.3.5.2-0.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * New upstream version 1.3.5.2. Closes: #775341
+    - Support for oss was dropped upstream
+    - Support for pulseaudio added
+  * Modernize packaging
+  * Ship examples and data in a separate package
+
+ -- Christoph Biedl <debian.a...@manchmal.in-ulm.de>  Tue, 14 Nov 2017 21:17:43 +0100
+
 chuck (1.2.0.8.dfsg-1.5) unstable; urgency=medium
 
   * Non-maintainer upload.
@@ -58,7 +69,7 @@ chuck (1.2.0.7.dfsg-1) unstable; urgency=low
 
   * New upstream release, update debian/rules accordingly.
   * Removal src/util_opsc.{cpp,h} due to non DFSG compliant license.
-  * Upload to debian (closes: #267626) 
+  * Upload to debian (closes: #267626)
 
  -- Paul Brossier <p...@debian.org>  Thu,  5 Oct 2006 18:44:33 +0200
 
@@ -125,4 +136,3 @@ chuck (1.1.4.3-1) unstable; urgency=low
   * Added missing manpage and watch file.
 
  -- Paul Brossier <p...@altern.org>  Tue, 27 Jul 2004 00:48:01 +0200
-
diff --git a/debian/chuck-data.examples b/debian/chuck-data.examples
new file mode 100644
index 0000000..a99a719
--- /dev/null
+++ b/debian/chuck-data.examples
@@ -0,0 +1,2 @@
+
+examples/*
diff --git a/debian/chuck.docs b/debian/chuck.docs
new file mode 100644
index 0000000..50f33da
--- /dev/null
+++ b/debian/chuck.docs
@@ -0,0 +1,3 @@
+README
+THANKS
+TODO
diff --git a/debian/chuck.install b/debian/chuck.install
new file mode 100644
index 0000000..5d2ee40
--- /dev/null
+++ b/debian/chuck.install
@@ -0,0 +1,4 @@
+
+build/chuck.alsa    usr/bin/
+build/chuck.pulse   usr/bin/
+chuck               usr/bin/
diff --git a/debian/chuck.links b/debian/chuck.links
index 3492ccd..cc2adbc 100644
--- a/debian/chuck.links
+++ b/debian/chuck.links
@@ -1,2 +1,3 @@
-usr/share/man/man1/chuck.1.gz usr/share/man/man1/chuck.oss.1.gz
-usr/share/man/man1/chuck.1.gz usr/share/man/man1/chuck.alsa.1.gz
+
+usr/share/man/man1/chuck.1.gz   usr/share/man/man1/chuck.alsa.1.gz
+usr/share/man/man1/chuck.1.gz   usr/share/man/man1/chuck.pulse.1.gz
diff --git a/debian/chuck.manpages b/debian/chuck.manpages
new file mode 100644
index 0000000..3ef41fc
--- /dev/null
+++ b/debian/chuck.manpages
@@ -0,0 +1 @@
+build/chuck.1
diff --git a/debian/chuck.sgml b/debian/chuck.sgml
index 83e29b2..e8f3fba 100644
--- a/debian/chuck.sgml
+++ b/debian/chuck.sgml
@@ -132,7 +132,7 @@ program is running, without stopping or restarting.</para>
 
     <para>Use <command>&dhpackage;</command> for jack audio interfaces,
     <command>&dhpackage;.alsa</command> to access alsa devices,
-    and <command>&dhpackage;.oss</command> to access oss devices.</para>
+    and <command>&dhpackage;.pulse</command> to access pulse devices.</para>
 
   </refsect1>
   <refsect1>
diff --git a/debian/control b/debian/control
index cbbe6d4..b63f0cf 100644
--- a/debian/control
+++ b/debian/control
@@ -1,15 +1,24 @@
 Source: chuck
-Section: sound
-Priority: optional
 Maintainer: Paul Brossier <p...@debian.org>
-Build-Depends: debhelper (>= 10), bison, flex, libjack-dev, libasound2-dev, libsndfile1-dev, docbook-to-man
-Standards-Version: 3.9.8
 Homepage: http://chuck.cs.princeton.edu
+Standards-Version: 4.1.1
+Build-Depends: debhelper (>= 10~),
+    bison,
+    docbook-to-man,
+    flex,
+    libasound2-dev,
+    libjack-dev,
+    libpulse-dev,
+    libsndfile1-dev,
+Priority: optional
+Section: sound
 
 Package: chuck
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Suggests: jackd
+Depends: ${misc:Depends}, ${shlibs:Depends},
+    chuck-data,
+Suggests:
+    jackd,
 Description: Concurrent, On-the-fly Audio Programming Language
  ChucK is a new audio programming language for real-time synthesis,
  composition, and performance, which runs on commodity operating systems.
@@ -17,4 +26,12 @@ Description: Concurrent, On-the-fly Audio Programming Language
  ChucK presents a new time-based concurrent programming model, which supports
  multiple, simultaneous, dynamic control rates, and the ability to add, remove,
  and modify code, on-the-fly, while the program is running, without stopping or
- restarting. 
+ restarting.
+
+Package: chuck-data
+Architecture: all
+Depends: ${misc:Depends},
+Description: examples and data files for chuck
+ This package provides the examples, documentation and other
+ architecture-independent files for chuk, the concurrent, on-the-fly
+ audio programming language.
diff --git a/debian/copyright b/debian/copyright
index feb59d2..5ac9d74 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,102 +1,165 @@
-This package was debianized by Paul Brossier <p...@altern.org> on
-Tue, 27 Jul 2004 00:29:57 +0200.
-
-It was downloaded from http://chuck.cs.princeton.edu/
-
-Upstream Authors:
-
-    Ge Wang (gew...@cs.princeton.edu)
-    Perry R. Cook (p...@cs.princeton.edu)
-
-    (See also the file THANKS and README)
-
-Lead Design:
-    Ge Wang
-    Perry Cook
-
-Lead Developers:
-    Ge Wang
-    Perry Cook
-    Ari Lazier (alaz...@cs.princeton.edu)
-    Philip Davidson (phil...@alumni.princeton.edu)
-    Ananya Misra (ami...@cs.princeton.edu)
-
-Copyright:
-
-    Copyright (c) 2004 Ge Wang and Perry R. Cook.  All rights reserved.
-
-License:
-
-    You are free to distribute this software under the terms of the GNU General
-    Public License. On Debian systems, the complete text of the GNU General
-    Public License can be found in the file `/usr/share/common-licenses/GPL'.
-
----
-
-Copyright and download locations for the files src/rt{audio,midi,error}.{c,h}
-
-    RtAudio provides a common API (Application Programming Interface)
-    for realtime audio input/output across Linux (native ALSA, Jack,
-    and OSS), SGI, Macintosh OS X (CoreAudio), and Windows
-    (DirectSound and ASIO) operating systems.
-
-    RtAudio WWW site: http://music.mcgill.ca/~gary/rtaudio/
-
-    RtAudio: realtime audio i/o C++ classes
-    Copyright (c) 2001-2005 Gary P. Scavone
-
-    This class implements some common functionality for the realtime
-    MIDI input/output subclasses RtMidiIn and RtMidiOut.
-
-    RtMidi WWW site: http://music.mcgill.ca/~gary/rtmidi/
-
-    RtMidi: realtime MIDI i/o C++ classes
-    Copyright (c) 2003-2005 Gary P. Scavone
-
-License:
-
-    Permission is hereby granted, free of charge, to any person
-    obtaining a copy of this software and associated documentation files
-    (the "Software"), to deal in the Software without restriction,
-    including without limitation the rights to use, copy, modify, merge,
-    publish, distribute, sublicense, and/or sell copies of the Software,
-    and to permit persons to whom the Software is furnished to do so,
-    subject to the following conditions:
-
-    The above copyright notice and this permission notice shall be
-    included in all copies or substantial portions of the Software.
-
-    Any person wishing to distribute modifications to the Software is
-    requested to send the modifications to the original developer so that
-    they can be incorporated into the canonical version.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-    ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-    CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
----
-
-Copyright and download location for the files src/util_sndfile.{c,h}
-
-    libsndfile Copyright (C) 1999-2004 Erik de Castro Lopo <er...@mega-nerd.com>
-
-    Although libsndfile sources are included in chuck upstream sources, the
-    debian package for chuck uses the upstream version of sndfile, contained in
-    the libsndfile-dev package. The upstream version can be found at
-    http://www.mega-nerd.com/libsndfile/ .
-
-License:
-
-    You are free to distribute this software under the terms of the GNU General
-    Public License. On Debian systems, the complete text of the GNU General
-    Public License can be found in the file `/usr/share/common-licenses/LGPL'.
-
----
-
-The files src/util_opsc.{cpp,h} were removed from the debian source package as
-they contain code licensed under terms uncompatible with the Debian Free
-Software Guidelines.
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: chuck
+Source: http://chuck.cs.princeton.edu
+
+Files: *
+Copyright: 2004 Ge Wang and Perry R. Cook.  All rights reserved.
+License: GPL-2.0+
+
+Files:
+ src/rtmidi.*
+Copyright: 2001-2005 Gary P. Scavone
+License: MIT-requested
+
+Files:
+ src/util_sndfile.*
+Copyright: 1999-2004 Erik de Castro Lopo <er...@mega-nerd.com>
+License: LGPL-2.0+
+
+Files:
+ src/util_opsc.*
+Copyright: The Regents of the University of California (Regents)
+License: ISC~UC
+
+Files:
+ src/RtAudio/RtAudio.*
+ src/RtAudio/original/RtAudio.*
+Copyright: 2001-2011 Gary P. Scavone
+License: MIT-asked
+
+Files:
+ src/momu/mo_audio.h
+ src/momu/mo_audio.mm
+ src/momu/mo_def.h
+Copyright: 2010 Nicholas J. Bryan, Jorge Herrera, Jieun Oh, and Ge Wang
+License: MIT-encouraged
+
+License: GPL-2.0+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+License: MIT-requested
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ Any person wishing to distribute modifications to the Software is
+ requested to send the modifications to the original developer so that
+ they can be incorporated into the canonical version.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+Comment: MIT with an additional requesting to send modifications to the
+ original developer.
+
+License: LGPL-2.0+
+ This package is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Lesser General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU Lesser General
+ Public License can be found in "/usr/share/common-licenses/LGPL-2".
+
+License: ISC~UC
+ Permission to use, copy, modify, distribute, and distribute modified versions
+ of this software and its documentation without fee and without a signed
+ licensing agreement, is hereby granted, provided that the above copyright
+ notice, this paragraph and the following two paragraphs appear in all copies,
+ modifications, and distributions.
+ .
+ IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL,
+ INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE
+ USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
+ .
+ REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS
+ PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
+ UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+License: MIT-asked
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ Any person wishing to distribute modifications to the Software is
+ asked to send the modifications to the original developer so that
+ they can be incorporated into the canonical version.  This is,
+ however, not a binding provision of this license.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+Comment: MIT with an additional asking to send modifications to the
+ original developer.
+
+License: MIT-encouraged
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+ .
+ The authors encourage users of MoMu to include this copyright notice,
+ and to let us know that you are using MoMu. Any person wishing to
+ distribute modifications to the Software is encouraged to send the
+ modifications to the original authors so that they can be incorporated
+ into the canonical version.
+ .
+ The Software is provided "as is", WITHOUT ANY WARRANTY, express or implied,
+ including but not limited to the warranties of MERCHANTABILITY, FITNESS
+ FOR A PARTICULAR PURPOSE and NONINFRINGEMENT.  In no event shall the authors
+ or copyright holders by liable for any claim, damages, or other liability,
+ whether in an actino of a contract, tort or otherwise, arising from, out of
+ or in connection with the Software or the use or other dealings in the
+ software.
+Comment: MIT with an additional encouraging to send modifications to the
+ original developer.
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index e772481..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1 +0,0 @@
-usr/bin
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index 937449a..0000000
--- a/debian/docs
+++ /dev/null
@@ -1,4 +0,0 @@
-README
-TODO
-THANKS
-doc/ChucK_manual.pdf
diff --git a/debian/patches/cherry-pick.chuck-1.3.5.2-43-g6adcffa.fix-undefined-behavior-out-of-bounds-write.patch b/debian/patches/cherry-pick.chuck-1.3.5.2-43-g6adcffa.fix-undefined-behavior-out-of-bounds-write.patch
new file mode 100644
index 0000000..2eea196
--- /dev/null
+++ b/debian/patches/cherry-pick.chuck-1.3.5.2-43-g6adcffa.fix-undefined-behavior-out-of-bounds-write.patch
@@ -0,0 +1,16 @@
+Subject: Fix undefined behavior (out of bounds write)
+Origin: chuck-1.3.5.2-43-g6adcffa
+Upstream-Author: Ivan Tarasov <ivan.tara...@gmail.com>
+Date: Sun Mar 13 03:03:20 2016 -0700
+
+--- a/src/ugen_xxx.cpp
++++ b/src/ugen_xxx.cpp
+@@ -2021,7 +2021,7 @@
+         t_CKINT i;
+         
+         for ( i = 0 ; i < bufsize ; i++ ) buffer[i] = 0;
+-        for ( i = 0 ; i < 3 ; i++ ) { acoeff[i] = 0; bcoeff[i] = 0; }
++        for ( i = 0 ; i < 2 ; i++ ) { acoeff[i] = 0; bcoeff[i] = 0; }
+         
+         acoeff[0] = 1.0;
+         acoeff[1] = -.99;
diff --git a/debian/patches/cherry-pick.chuck-1.3.5.2-5-g6810807.fixed-warnings.patch b/debian/patches/cherry-pick.chuck-1.3.5.2-5-g6810807.fixed-warnings.patch
new file mode 100644
index 0000000..ffd77b0
--- /dev/null
+++ b/debian/patches/cherry-pick.chuck-1.3.5.2-5-g6810807.fixed-warnings.patch
@@ -0,0 +1,27 @@
+Subject: Fixed warnings
+Origin: chuck-1.3.5.2-5-g6810807
+Upstream-Author: Ge Wang <g...@smule.com>
+Date: Fri Nov 13 13:02:23 2015 -0800
+
+--- a/src/lo/message.c
++++ b/src/lo/message.c
+@@ -385,7 +385,7 @@
+     if (lo_message_add_typechar(m, LO_MIDI))
+         return -1;
+ 
+-    memcpy(nptr, a, sizeof(a));
++    memcpy(nptr, a, sizeof(uint8_t)*4); // ge: changed uint8_t*4 to avoid ambiguity
+     return 0;
+ }
+ 
+@@ -894,8 +894,8 @@
+     }
+     putchar('\n');
+     if (d != end) {
+-	fprintf(stderr, "liblo warning: type and data do not match (off by %d) in message %p\n",
+-            abs((char*)d - (char*)end), m);
++	fprintf(stderr, "liblo warning: type and data do not match (off by %ld) in message %p\n",
++            labs((char*)d - (char*)end), m); // ge: change to %ld and labs, 2015
+     }
+ }
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1366485
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+cherry-pick.chuck-1.3.5.2-5-g6810807.fixed-warnings.patch
+cherry-pick.chuck-1.3.5.2-43-g6adcffa.fix-undefined-behavior-out-of-bounds-write.patch
+spelling-fixes.patch
diff --git a/debian/patches/spelling-fixes.patch b/debian/patches/spelling-fixes.patch
new file mode 100644
index 0000000..017ee6e
--- /dev/null
+++ b/debian/patches/spelling-fixes.patch
@@ -0,0 +1,126 @@
+Subject: Fix typos
+Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de>
+Date: 2017-11-15
+Forwarded: not-yet
+
+--- a/src/chuck_lang.cpp
++++ b/src/chuck_lang.cpp
+@@ -1120,53 +1120,53 @@
+     // add find()
+     func = make_new_mfun( "int", "find", string_find );
+     func->add_arg( "int", "theChar" );
+-    func->doc = "Return the index of the first occurence of theChar, or -1 if theChar is not found.";
++    func->doc = "Return the index of the first occurrence of theChar, or -1 if theChar is not found.";
+     if( !type_engine_import_mfun( env, func ) ) goto error;
+     
+     // add find()
+     func = make_new_mfun( "int", "find", string_findStart );
+     func->add_arg( "int", "theChar" );
+     func->add_arg( "int", "start" );
+-    func->doc = "Return the index of the first occurence of theChar at or after the start position, or -1 if theChar is not found.";
++    func->doc = "Return the index of the first occurrence of theChar at or after the start position, or -1 if theChar is not found.";
+     if( !type_engine_import_mfun( env, func ) ) goto error;
+     
+     // add find()
+     func = make_new_mfun( "int", "find", string_findStr );
+     func->add_arg( "string", "str" );
+-    func->doc = "Return the index of the first occurence of str, or -1 if str is not found.";
++    func->doc = "Return the index of the first occurrence of str, or -1 if str is not found.";
+     if( !type_engine_import_mfun( env, func ) ) goto error;
+     
+     // add find()
+     func = make_new_mfun( "int", "find", string_findStrStart );
+     func->add_arg( "string", "str" );
+     func->add_arg( "int", "start" );
+-    func->doc = "Return the index of the first occurence of str at or after the start position, or -1 if str is not found.";
++    func->doc = "Return the index of the first occurrence of str at or after the start position, or -1 if str is not found.";
+     if( !type_engine_import_mfun( env, func ) ) goto error;
+     
+     // add rfind()
+     func = make_new_mfun( "int", "rfind", string_rfind );
+     func->add_arg( "int", "theChar" );
+-    func->doc = "Return the index of the last occurence of theChar, or -1 if theChar is not found.";
++    func->doc = "Return the index of the last occurrence of theChar, or -1 if theChar is not found.";
+     if( !type_engine_import_mfun( env, func ) ) goto error;
+     
+     // add rfind()
+     func = make_new_mfun( "int", "rfind", string_rfindStart );
+     func->add_arg( "int", "theChar" );
+     func->add_arg( "int", "start" );
+-    func->doc = "Return the index of the last occurence of theChar at or before the start position, or -1 if theChar is not found.";
++    func->doc = "Return the index of the last occurrence of theChar at or before the start position, or -1 if theChar is not found.";
+     if( !type_engine_import_mfun( env, func ) ) goto error;
+     
+     // add rfind()
+     func = make_new_mfun( "int", "rfind", string_rfindStr );
+     func->add_arg( "string", "str" );
+-    func->doc = "Return the index of the last occurence of str, or -1 if str is not found.";
++    func->doc = "Return the index of the last occurrence of str, or -1 if str is not found.";
+     if( !type_engine_import_mfun( env, func ) ) goto error;
+     
+     // add rfind()
+     func = make_new_mfun( "int", "rfind", string_rfindStrStart );
+     func->add_arg( "string", "str" );
+     func->add_arg( "int", "start" );
+-    func->doc = "Return the index of the last occurence of str at or before the start position, or -1 if str is not found.";
++    func->doc = "Return the index of the last occurrence of str at or before the start position, or -1 if str is not found.";
+     if( !type_engine_import_mfun( env, func ) ) goto error;
+     
+     // add erase()
+--- a/src/chuck_type.cpp
++++ b/src/chuck_type.cpp
+@@ -3554,7 +3554,7 @@
+                     "cannot extend incomplete type '%s'",
+                     t_parent->c_name() );
+                 EM_error2( class_def->ext->linepos,
+-                    "...(note: the parent's declaration must preceed child's)" );
++                    "...(note: the parent's declaration must precede child's)" );
+                 return FALSE;
+             }
+         }
+@@ -6100,7 +6100,7 @@
+             // make sure next char
+             if( *str_lit == '\0' )
+             {
+-                EM_error2( linepos, "invalid: string ends with escape charactor '\\'" );
++                EM_error2( linepos, "invalid: string ends with escape character '\\'" );
+                 return FALSE;
+             }
+             
+--- a/src/chuck_otf.cpp
++++ b/src/chuck_otf.cpp
+@@ -713,9 +713,9 @@
+     "[chuck]: lack of destructors have led to the unrecoverable mass build-up of trash\n"
+     "         the chuck garbage collector will now run, deleting all files (bye.)",
+     "[chuck]: calling machine.crash()...",
+-    "[chuck]: an unknown fatal error has occured.  please restart your computer...",
+-    "[chuck]: an unknown fatal error has occured.  please reinstall your OS...",
+-    "[chuck]: an unknown fatal error has occured.  please update to chuck-3.0",
++    "[chuck]: an unknown fatal error has occurred.  please restart your computer...",
++    "[chuck]: an unknown fatal error has occurred.  please reinstall your OS...",
++    "[chuck]: an unknown fatal error has occurred.  please update to chuck-3.0",
+     "[chuck]: internal error: unknown error",
+     "[chuck]: page fault!!!",
+     "[chuck]: error printing error message.  cannot continue 2#%%HGAFf9a0x"
+--- a/src/chuck_vm.cpp
++++ b/src/chuck_vm.cpp
+@@ -1120,7 +1120,7 @@
+     {
+         t_CKUINT n = m_shreduler->highest();
+         m_shred_id = n;
+-        fprintf( stderr, "[chuck](VM): reseting shred id to %lu...\n", m_shred_id + 1 );
++        fprintf( stderr, "[chuck](VM): resetting shred id to %lu...\n", m_shred_id + 1 );
+     }
+ 
+ done:
+--- a/src/digiio_rtaudio.cpp
++++ b/src/digiio_rtaudio.cpp
+@@ -361,7 +361,7 @@
+     t_CKUINT priority = Chuck_VM::our_priority;
+ 
+     // log
+-    EM_log( CK_LOG_SEVERE, "starting real-time watch dog processs..." );
++    EM_log( CK_LOG_SEVERE, "starting real-time watch dog process..." );
+     // push log
+     EM_pushlog();
+     EM_log( CK_LOG_INFO, "watchdog timeout: %f::second", g_watchdog_timeout );
diff --git a/debian/rules b/debian/rules
index 99c4d3a..2a16aae 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,79 +1,40 @@
 #!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export DEB_BUILD_MAINT_OPTIONS := hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
 
-CFLAGS = -Wall -g -fno-strict-aliasing
+%:
+	dh $@
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	INSTALL_PROGRAM += -s
-endif
-
-configure: configure-stamp
-configure-stamp:
-	dh_testdir
-	find examples src -type f -exec chmod -x {} \;
-	rm -f "examples/event/.#opensound_demo_recv.ck.1.2"
-	touch configure-stamp
-
-build: build-stamp
-
-build-stamp: configure-stamp 
-	dh_testdir
-	cd src && $(MAKE) linux-alsa CFLAGS="$(CFLAGS)" 
-	cp -a src/chuck chuck.alsa
+override_dh_auto_build:
+	mkdir build
+	cd src && $(MAKE) linux-alsa
+	mv src/chuck build/chuck.alsa
 	cd src && $(MAKE) clean
-	cd src && $(MAKE) linux-oss  CFLAGS="$(CFLAGS)" CHUCK_DEBUG=y
-	cp -a src/chuck chuck.oss
+	cd src && $(MAKE) linux-pulse
+	mv src/chuck build/chuck.pulse
 	cd src && $(MAKE) clean
-	cd src && $(MAKE) linux-jack CFLAGS="$(CFLAGS)" CHUCK_DEBUG=y
-	touch build-stamp
+	cd src && $(MAKE) linux-jack CHUCK_DEBUG=y
+	docbook-to-man debian/chuck.sgml > build/chuck.1
 
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
+override_dh_auto_clean:
+	dh_auto_clean
 	cd src && $(MAKE) clean
-	rm -f chuck.oss chuck.alsa debian/chuck.1
-	dh_clean 
+	rm -rf build/
 
-install: build
-	dh_testdir
-	dh_testroot
-	docbook-to-man debian/chuck.sgml > debian/chuck.1
-	dh_clean -k -Xchuck
-	dh_installdirs
-	cd src && $(MAKE) install DESTDIR=$(CURDIR)/debian/chuck
-	dh_install chuck.alsa usr/bin
-	dh_install chuck.oss usr/bin
+override_dh_auto_install:
+	cd src && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
 
-binary-indep: build install
-# We have nothing to do by default.
-
-binary-arch: build install
-	dh_testdir
-	dh_testroot
+override_dh_installchangelogs:
 	dh_installchangelogs VERSIONS
-	dh_installdocs
-	dh_installexamples examples/*
-	dh_installman debian/chuck.1
-	dh_link
-	dh_strip
+
+override_dh_compress:
 	dh_compress -X.wav -X.ck
+
+override_dh_fixperms:
 	dh_fixperms
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
+	find debian/chuck-data/usr/share/doc/chuck-data/examples/ -type f | xargs chmod 644
 
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+override_dh_missing:
+	dh_missing --fail-missing
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)

Attachment: signature.asc
Description: Digital signature

Reply via email to