aboutsummaryrefslogtreecommitdiff
path: root/externals/gridflow
diff options
context:
space:
mode:
Diffstat (limited to 'externals/gridflow')
-rw-r--r--externals/gridflow/COPYING340
-rw-r--r--externals/gridflow/ChangeLog469
-rw-r--r--externals/gridflow/Makefile.gf161
-rw-r--r--externals/gridflow/README46
-rw-r--r--externals/gridflow/TODO486
-rwxr-xr-xexternals/gridflow/configure1277
6 files changed, 0 insertions, 2779 deletions
diff --git a/externals/gridflow/COPYING b/externals/gridflow/COPYING
deleted file mode 100644
index eeb586b3..00000000
--- a/externals/gridflow/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program 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 program 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/externals/gridflow/ChangeLog b/externals/gridflow/ChangeLog
deleted file mode 100644
index dcaf9bbc..00000000
--- a/externals/gridflow/ChangeLog
+++ /dev/null
@@ -1,469 +0,0 @@
-/* $Id: ChangeLog,v 1.2 2006-03-15 04:48:08 matju Exp $ */
-
-version 0.8.1 (2006.02.20):
-
- * [ls] now supports wildcards: ? [] * **
- * [#color] has new method: delegate
- * added [regsub], [memstat], [listfind], [sendgui]
- * x11: removed methods: draw,autodraw; added: use_shm,title
- * examples : added markov.pd, bounce.pd, doodle.pd, mechanics.pd
- * [#pack],[#unpack] now default to 2 values
- * new numops: clip+,clip-
- * fix for shared memory bug in [#out x11]
- * added [#out tk]
- * added [#out opengl] (using GLUT, hackishly)
- * [unix_time] behaviour changed. (see manual)
-
-version 0.8.0 (2005.06.06):
-
- * removed support for jMax 2.5 and jMax 4.1
- * added GCC 3.4 support
- * added AMD64 support
- * added support for puredata "datastructure" pointers (aka gpointer)
- * changing the @-prefix for a #-prefix, where the old prefix still works
- (the old syntax is backwards-compatible,
- the new syntax is forwards-compatible)
- * 13 object-classes rewritten from Ruby to Pd abstractions
- * merged [@],[@!] -> [#] and added message "op"
- * removed all one-input ops (see next...)
- * new two-input ops: abs- sq- avg hypot sqrt rand
- * [#fold],[#scan]: removed seed arg and right outlet; added msgs "op" and "seed"
- * [#inner],[#convolve] : added msgs "op" and "seed"
- * [#inner],[#convolve] : removed three first args (usually * + 0)
- * [#inner] : removed middle inlet
- * major changes to the bridge API (Ruby<->PureData)
- * project "Linux Devices For Ruby" got merged in, as devices4ruby/
- * source code cleanup
- * internals: split Grid into Grid+GridPtr
- * internals: GridObject no longer manages GridOutlet
- * internals: added classes P,PtrGrid,...
- * internals: beginning to use C++'s Standard Template Library (sometimes)
- * [gridflow] now has "formats" msg (to list available formats)
- * [#store] added msg "op"
- * [#out x11] removed flag "verbose"
- * some spaces may now be omitted in gf-lists. e.g.:
- ( ( 2 1 ) ( ) ) ( 3 4 ( 5 ) ) can be shortened to: ((2 1) ()) (3 4 (5))
- * new object classes:
- [display], [#reverse], [#unpack], [#centroid2], [ls], [renamefile], [unix_time],
- [exec], [plotter_control], [#text_to_image], [#hueshift], [rubyarray]
- * in pd_examples added Alx's epicycloid.pd, scratch_video.pd, threshold.pd
- and Matju's goop.pd
- * some new/updated help files by Stéphanie Brodeur & Darsha Hewitt
-
-version 0.7.7 (2004.08.24):
-
- * GridFlow runs on MacOS 10.2 with PureData 0.37
- * updated drag_rectangle.pd, nervous_video.pd, fire.pd, color_correction.pd
- * updated feedback_fractal.pd (added morphing)
- * added pd_examples/waves.pd, pd_examples/sand.pd
- * added pd_examples/color_detect.pd (supersedes chroma_key.pd)
- * added pd_examples/spectrogram.pd, pd_examples/photo_pianoroll.pd
- * removed [rtmetro] (obsolete)
- * [@store]: added methods: put_at, reassign
- * [pingpong]: added $1
- * [demux] renamed to [shunt] and extra optional arg added (for initial value)
- * new object classes:
- [range], [#mouse], [#pack], [#color], [bindpatcher],
- [#camera], [#fade_lin], [#peephole]
- * videodev: added method "get"
- * [@out quartz] now works properly
- * [@downscale_by] accepts any number of channels
- * [@inner2] removed; instead use [@transpose] with [@inner]
- * videodev: "transfer" message allows to change the queue's length
- * quicktime(hw): added messages "parameter", "framerate", "size"
- * quicktime(hw): fixed encoding bug
- * png: fixed memory leak
- * ./configure --lite disables float32 float64 int64
- * ./configure --verbose prints useless details
- * doc: rewrote installation instructions
- * x11: fixed memory leak in resizing window
- * on MacOS 10 [@out window] now defaults to [@out quartz]
- * doc: added credits section
-
-version 0.7.6 (2004.03.22):
-
- * GridFlow runs on MacOS 10.2 (only with jMax 2.5)
- * [@out quartz] makes a native MacOS (Cocoa+Quartz) window (warning: very buggy)
- * support for Apple QuickTime movie decoding (format/quicktimeapple.c)
- * file suffix detector is now extensible
- * added: Ruby interface for libUSB (base/usb.c)
- * x11: now emits "keypress" and "keyrelease" messages
- * [@downscale_by] now supports 4 channels (therefore [peephole] does too)
- * fixed bugs in: x11, @draw_image, @import, @export, ...
- * "open x11" now allows any DISPLAY spec
- * now includes the pictures used in the examples
- (not a separate download anymore)
- * [@out x11 here override_redirect] (override window manager; be careful with this)
- * [pd_netsocket] does like [netsend]/[netreceive] but two-way
- (warning: not complete yet)
- * support for nested lists in incoming messages
- * new object classes:
- [delcom_usb]: support for Delcom USB I/O controller
- [joystick_port]: support for linux joystick drivers
- [foreach], [rubysprintf], [listflatten]
- [messageprepend], [messageappend], [@transpose]
- [@fade], [@centroid]
- jMax emulation: [listmake], [listlength], [listelement], [listsublist]
- jMax emulation: [listprepend], [listappend], [listreverse], [oneshot]
- jMax emulation: [inv+], [inv*]
- * Pd main window: adding GridFlow menu, Ruby/Tcl evaluators (with command-history)
- * added bin/jmax2pd (converts .jmax files to .pd files)
- * ported all .jmax examples to .pd (using jmax2pd) (20 out of 20)
- * support for variable number of inlets/outlets (only with PureData)
-
-version 0.7.5 (2003.09.28):
-
- * type aliases: int32,i32,i; int16,i16,s; uint8,u8,b; float32,f32,f
- * added support for float64 (alias f64, d)
- * added support for int64 (alias i64, l)
- * doc: added number type table
- * @convolve: supports even-sized grids
- * fixed bug: puredata gf clock ran way too fast
- * rewrote the profiler subsystem (and removed bugs)
- * @scale_by: now works with any number of channels
- * renamed samples/ to jmax_examples/
- * Algebraic Properties Descriptions (internal, used for accelerations)
- * @convolve,@outer,@for,@inner,@draw_polygon: much faster
- * quicktime: support for pluggable codecs (eg: dv, divx, rpza, ...)
- * quicktime: fixed more bugs
- * quicktime: major speed increase
- * quicktime: added "colorspace" option
- * videodev: fixed bugs
- * videodev: removed obsolete option "noinit"
- * videodev: added option "colormodel" (especially because of new camera drivers)
- * sdl: added automatic resizing of window
- * png: read support
- * jMax bridge: more stable than ever
- * PureData bridge: *much* more stable than ever
- * Operator1, Operator2 renamed to Numop1, Numop2
- * x11: now also called "window", so you can write "@out window", "open window"
- * new object classes:
- @draw_image: picture-in-picture, with alpha blending, etc
- jmax4_udpsend: send to a jMax 4.0.x system via UDP
- jmax4_udpreceive: receive from a jMax 4.0.x system via UDP
- pd_netsend: send to a pd system via UDP
- pd_netreceive: receive from a pd system via UDP
- @eight: (like @four, but with eight of them ;-)
- peephole: like [@out x11] but as inset of a patcher (jMax 2.5 only)
- * support for upcoming jMax 4.1
- * "open file" autodetects how to handle a file, by filename suffix
-
-version 0.7.2 (2003.04.24):
-
- * fixed bugs in: make install, jpeg reading
- * added support for float32
- * added direct .jmax decoding
- * added direct .pd encoding
- * pd examples moved to separate directory
- * ported some .jmax examples to .pd (automated) (8 out of 20)
- * added motion_detect.pd
- * new classes: demux, and more jmax emulations
- * @in,@out: keyword "option" may be omitted
- * configure: added --ruby-prefix
- * adding custom C++ pre-preprocessor
- * better type checking of message arguments (better error reporting too)
- * @print supports 3 dimensions, and msg "base" with arg 2,8,10,16
- * can now write loadbang-messages into an object box using the comma
- * major cleanup of the source code
- * added operator *>>8 (multiplication by value then division by 256)
- * new classes: @rgb_to_yuv, @yuv_to_rgb
- * @rotate now works with multiple axis (can work on 3D points, etc)
-
-version 0.7.1 (2003.03.24):
-
- * fixed important bugs (crashes and such)
- * @store,@ can now receive in inlet 1 while sending from outlet 0.
- * @, when inlet 1 grid size is small but not 1, is now much faster.
- * added memcpy() usage logging (see profiler_dump)
- * added examples: drag_rectangle.jmax, plot.jmax, eclipse.jmax
- * added example: cellular_1d.pd
- * added classes: fork, jmax_udpsend, jmax_udpreceive
- * added classes: @rotate, @remap_image, @type
- * added operators: gcd,lcm (common divisors/multiples)
- * quicktime: added encoding, added seek, fixed bugs
- * @in inlet 1 tells frame number (int), end-of-file (bang)
- * @in: added: set, option loop (controlling auto-rewind)
- * updated cross_fade.jmax (much faster)
- * @two,@three,@four allow inlet 0 bang trigger
- * configure: simpler config for jMax 2.5
- * PD help patches (by Uli Berthold)
- * PD: "make install" takes care of help patches and library
- * CVS web interface on artengine.ca (thanks to Alex)
-
-version 0.7.0 (2003.02.01):
-
- * new classes: @cast, @join, @ravel, @grade, @perspective
- * new grid protocol supports several number types (added uint8,int16)
- * added number type support in most classes
- * added "option cast" for @in in some formats
- * can now specify number types in grid literals
- * added some MMX support (accelerates by 0%..40%)
- * @import: added optional 2nd arg specifying type.
- * @import: can convert symbols to grids of their ascii codes.
- * new [@import per_message] yields one grid per incoming message
- * [fps]: added options "user" "system" "cpu" for selecting clock
- * aalib: added options autodraw, draw, dump
- * aalib: added raw input (two channels: characters, attributes)
- * x11: added support for 256-color mode using a private colormap.
- * x11: added "use_stripes" for alternate 256-color rendering.
- * fixed problems with earlier versions of Ruby (like 1.6.2)
- * new samples: polygon.jmax
- * videodev_effects.jmax: added sort-effects, centre-of-gravity-tracking
- * the time profiler is back to working !!!
- * @scale_by, @downscale_by: added right inlet, for configuration
- * @store is a bit faster
- * ppm: accelerated by large amount
- * @outer,@inner,@inner2,@fold accelerated by obscene amount
-
-version 0.6.5 (2003.01.10):
-
- * can now encode Targa-24, Targa-32, JPEG-24
- * can now output through aalib (ascii art library)
- * fixed problems with libruby.a
- * tested with the new version of Ruby (1.8)
- * new classes:
- fps, @rgb_to_greyscale, @greyscale_to_rgb, @solarize,
- @complex_sq, @export_symbol, @draw_polygon,
- @apply_colormap_channelwise
- * new class FPatcher, a ruby patcher/abstraction system
- * @scale_to,@contrast,@spread,@posterize now available in
- PureData & Ruby; they also now accept arguments.
- * [@scale_to]: back to working; inlets "height" and "width" merged
- * [route grid_begin] replaced by [route grid]
- * [route grid_end] replaced by [@finished]
- * Most everything is 10-50% faster
- * changes in the internal transmission of grids
- * new two-input operators: div, swapdiv, put, ignore
- * compilable on MacOS 10
-
-version 0.6.4 (2002.12.23):
-
- * can now decode JPEG (using libjpeg.so)
- * many bugs fixed (especially in file formats)
- * operators: log* added; tanh renamed to tanh*
- * @two,@three,@four are no longer specific to the jMax side
- * format grid: option headerless for reading any kind of file
- * format grid: option headerful (revert to actual .grid format mode)
- * fixed problems with GNU C++ version 3
- * format ppm: accelerated writing
- * format modifier gzfile: gzip support also works with [@out]
- * format x11: the "here" specifier is now optional
- * added @checkers
- * [@scale_by {y x}] for different y,x scale factors
- * [@in blah blah] means "open blah blah" -> [@in] (and same with @out)
- * added @downscale_by with or without smoothing
- * format targa: can now decode 32 bit RGBA
- * @layer: combines RGBA foreground with RGB background, yielding RGB.
- * format grid options: endian big, endian little, endian same
- * formats ppm,grid: use 'option rewind' to overwrite same file
- (by default, rewind is no longer done after each frame)
- ('option rewind' also rewinds on reading)
-
-version 0.6.3 (2002.12.06):
-
- * removing the custom leak detector ("Valgrind" program used instead)
- * removed all (?) memory leaks
- * videodev: new options: frequency, transfer [read|mmap], noinit
- * profiler summary code rewritten
- * profiler wrapper code removed
- * x11: option setcursor <0-63>, option hidecursor
- * x11: outlet 0 tells cursor position / button state
- * more C++ification of the code
- * many bugs fixed (especially crashes)
-
-version 0.6.2 (2002.09.17):
-
- * jMax objects written in (or using) Ruby now can work in PureData too.
- * new format: SDL (portable output to window)
- * can now compile bridges without libruby.so
- * changed grid-protocol: added direct object-to-object streaming.
- * bug: gridflow's clock tick back to a decent value (sorry)
- * all inlets supporting grids also convert int/float as 0-D grids
- * @fold and @scan now accept grids in right inlet and constructor
- * @convolve is 2-3 times faster
- * %,swap% are now called rem,swaprem; new %,swap% is the true modulo.
- * @for now allows vectorial from/to/step values
- * @identity_transform removed, change to eg: [@for{0 0}{240 320}{1 1}]
- * PD users: grid literals are written like:
- [@for ( 0 0 ) ( 240 320 ) ( 1 1 )] with all those spaces
- * @inner,@inner2,@convolve can take right inlet grid as 4th argument
- * re-enabled and improved the memory leak detector (use --debug)
- * fixed many bugs and leaks
- * fixed bugs in @store
- * added sample: zoom.pd
-
-version 0.6.1 (2002.08.29):
-
- * now compiling GridFlow as C++ (replacing C)
- * now you can use Ruby 1.7, which is faster
- note: if you do so, make sure your version is dated 2002
- * new objects: rubyprint, printargs, @print, @scan, @inner
- * new format: apple quicktime (using libquicktime.so)
- * @in gzip support (example: "open ppm gzfile teapot.ppm.gz")
- also works with targa and grid
- * BitPacking now supports 1 to 4 channels instead of just 3
- * using mkmf.rb makefile generation; some MSWindows support thru Cygwin
- * added geiger counter simulator in [rtmetro]
- * libruby.so is only needed when using GridFlow through jMax
- * now can do grid literals in @ and @outer, like [@ + {0 1}]
- * syntax of @redim,@import changed from [@redim 2 3] to [@redim {2 3}]
- * "3 3 # 1 0 0 1" into inlet does automatic @redim, for all objects
- * grid literals accept {2 3 # 1 4 5} as an implicit [@redim {2 3}]
- * objects rewritten in Ruby language: @in, @out
- * updated samples, templates, documentation.
- * fixed bugs
-
-version 0.6.0 (2002.07.31):
-
- * THIS IS AN EXPERIMENTAL BRANCH (VERY BUGGY)
- REAL PROJECTS SHOULD USE VERSION 0.5.0 INSTEAD
- * GridFlow rewritten as a plugin for Ruby instead of jMax.
- * GridFlow now includes a Ruby-for-jMax bridge.
- * you need Ruby 1.6.6 (including libruby.so) or compatible
- * you don't need GNU Bash anymore (configurator is now a Ruby program)
- * format handlers for .ppm, .tga, .grid rewritten in Ruby
- * merged all Makefiles together, etc.
- * sources are in base/ and format/ instead of c/src/
- * many bugs removed, many bugs added.
- * will read ~/.gridflow_startup if it exists
-
-version 0.5.0 (2002.06.08):
-
- * big changes to the internals (especially use of macros)
- * can compile without X11; added --no-x11 in ./configure
- * removed support for jMax 2.4
- * auto-detects jMax 2.5 and jMax 3.0
- * @inner renamed to @inner2 (new, proper @inner coming soon)
- * faster unary operators
- * added unary operator: sq (faster squaring)
- * further separation of GridFlow from jMax
- * major format API changes (added Stream class)
- * format "grid" now supports 8 bits per value
- * support for HeroineWarrior's LibMPEG3 (reading + seeking)
- * libmpeg.so (Greg Ward's) now also looked up as "libwardsmpeg.so"
- * added objects: rtmetro, pingpong
- * Moved CVS repository from Hostname.2y.net to Artengine.ca
- * updated samples
-
-version 0.4.1 (2002.01.02):
-
- * cvs repository now has public access
- * now can run configure without jmax/fts being present
- * standalone version now works on Silicon Graphics and Corel Netwinder.
- * MPEG format readonly (single file at a time; mpeg video layer only)
- * grid TCP: non-blocking read
- * fixed all known memory leaks
- * X11 Shared Memory now disables itself properly on remote display
- * updated help files
- * updated help screenshots in the manual
- * fixed profiler bugs
- * fts emulation moved to c/src/ and tests moved to tests/
-
-version 0.4.0 (2001.11.28):
-
- * package name changed from "video4jmax" to "gridflow"
- * documentation *rewritten*, more precise, more structured
- * documentation format is now XML (includes HTMLized version)
- * can now compile without jmax/fts (if you need quicker testing...)
- * added format "grid" for storing any kind of grid to disk.
- * added TCP client/server socket support (with format "grid" only)
- * added (timewise) profiler
- * @convolve now takes up to three arguments
- * Format API changes again
- * "connect" merged into "open"
- * "size" merged into "option"
- * @video_out merged into @out
- * format videodev can now do full framerate (instead of just half)
- * added X11 Shared Memory support (faster image transfer locally)
- * added @scale_by for quick scaling by integer factors.
- * @identity_transform, @scale_to are much faster.
- * many other accelerations
-
-version 0.3.0 (2001.11.04):
-
- * reworked File Format API
- * grid objects now all accept lists of integers (auto-convert to 1D grid)
- * many accelerations (incl large speedup on chains of binary operations)
- * transformed @video_out (X11) into a "File Format" (really) and:
- * allows multiple displays
- * auto-resizing window
- * can set output as wallpaper
- * can read from the screen (screenshot)
- * @video_out now a backward-compatibility wrapper
- * format videodev now uses double buffer mmap (somewhat faster)
- * @video_in_file, @video_out_file renamed to @in, @out (with aliases)
- * new objects:
- @convolve, @inner, @for
- * more samples: Fire, Ripple, Game of Life, Chroma Key, Convolve, Saturation
- * much improved samples: Color Correction, Linear Transform.
- * use [@store uint8] for low-ram storage of values 0-255.
- * videodev: added option norm 0=pal 1=ntsc 2=secam 3=auto
-
-version 0.2.2 (2001.08.15):
-
- * @video_out auto-updates on X11 ExposeEvent
- * updated documentation and help
- * fixed installation/config of help and summary
- * split BitPacking module from @video_out
- * added support for BTTV input (that is, using mmap() command)
- * new videodev options: channel,tuner,contrast,hue,etc.
- * now with 30 binary operators, and 3 unary operators
- * added many new samples
- * new objects:
- @!, @fold, @outer, @dim, @redim,
- @posterize, @contrast, @two, @three,
- @identity_transform, @scale_to, @spread
-
-version 0.2.1 (2001.08.01):
-
- * added private CVS repository on hostname.2y.net
- * added configuration script (detects video4linux 1.x)
- * added documentation in HTML format
- * added File Format API
- * format "ppm": PPM P6 RGB24 support read-write
- * format "targa": Targa RGB24 support read-only
- * format "videodev": Video4linux read (using read() command only)
- * @store no longer slowing down its downstream
- * many other accelerations
- * Tuple changed to Dim; Index removed
- * Grid element type is typedef Number
- * @ supports grids in right inlet
- * now there are 20 binary operators
-
-version 0.2.0 (2001.05.05):
-
- * package name changed from "video" to "video4jmax"
- * new kind of post() cancels repetitive log entries
- * major modifications to existing objects
- * new "grid transmission system"
- (Tuple,Index,GridInlet,GridOutlet,GridObject)
- * vout -> @video_out
- * vin_file -> @video_in_file
- * vout_file -> @video_out_file
- * added @import, @export
- * added @, @store
-
-version 0.1.1 (2001.04.03):
-
- * removed vout's grab
- * vout width and height parameters swapped
- * vout_file class is mostly like vout but writes to a file in PPM format.
-
-version 0.1.0 (2001.03.14):
-
- * fixed the bits_per_pixel bug
- * merged in some other variations on the main sample
- * included Christian's makefiles for jmax 2.5
-
-version 0.0.7 (2001.03.08):
-
- * vout should support most types of RGB visuals now
- * autodraw now works: 0=none; 1=page; 2=line; 3=pixel
- * less global variables
- * putting all of this under the GPL
-
-version 0.0.5 (2001.03.05):
-
- * vout class, two params: width, height; 24-bit BGR only; refresh by
-finishing scanline or sending bang; "grab" (hack); "reset" for resetting
-the pixel pointer.
diff --git a/externals/gridflow/Makefile.gf b/externals/gridflow/Makefile.gf
deleted file mode 100644
index 371929e7..00000000
--- a/externals/gridflow/Makefile.gf
+++ /dev/null
@@ -1,161 +0,0 @@
-# $Id: Makefile.gf,v 1.3 2006-03-15 04:56:39 matju Exp $
-# This is an annex that covers what is not covered by the generated Makefile
-
-SYSTEM = $(shell uname -s | sed -e 's/^MINGW.*/NT/')
-INSTALL_DATA = install -m 644
-INSTALL_LIB = $(INSTALL_DATA)
-INSTALL_DIR = mkdir -p
-
-all2:: gridflow-for-puredata # doc-all
-
-# suffixes (not properly used)
-ifeq (1,1) # Linux, MSWindows with Cygnus, etc
-OSUF = .o
-LSUF = .so
-ESUF =
-else # MSWindows without Cygnus (not supported yet)
-OSUF = .OBJ
-LSUF = .DLL
-ESUF = .EXE
-endif
-
-#----------------------------------------------------------------#
-
-CFLAGS += -Wall # for cleanliness
-# but it's normal to have unused parameters
-#ifeq ($(HAVE_GCC3),yes)
-#CFLAGS += -Wno-unused-parameter
-#else
-CFLAGS += -Wno-unused
-#endif
-
-ifeq ($(HAVE_DEBUG),yes)
- CFLAGS += -O0 # debuggability
-else
- CFLAGS += -O3 -funroll-loops # speed
-endif
-
-CFLAGS += -fno-omit-frame-pointer
-CFLAGS += -g # gdb info
-CFLAGS += -fPIC # some OSes/machines need that for .so files
-
-#----------------------------------------------------------------#
-
-cpu/mmx.asm cpu/mmx_loader.c: cpu/mmx.rb
- $(RUBY_INSTALL_NAME) cpu/mmx.rb cpu/mmx.asm cpu/mmx_loader.c
-
-cpu/mmx.o: cpu/mmx.asm
- nasm -f elf cpu/mmx.asm -o cpu/mmx.o
-
-clean2::
- rm -f $(OBJS) base/*.fcs format/*.fcs cpu/*.fcs
-
-install2:: ruby-install puredata-install
- (cd devices4ruby; make install)
-
-uninstall:: ruby-uninstall
- # add uninstallation of other files here.
-
-unskew::
- find . -mtime -0 -ls -exec touch '{}' ';'
-
-kloc::
- wc base/*.[ch] format/*.[cm] bridge/*.c optional/*.c 2>/dev/null
- wc base/*.rb format/*.rb bridge/*.rb devices4ruby/*.rb \
- optional/*.rb configure extra/*.rb 2>/dev/null
-
-edit::
- (nedit base/grid.[ch] base/number.c base/flow_objects.c \
- base/flow_objects.rb base/main.c \
- */main.rb base/test.rb &)
-
-CONF = config.make config.h Makefile
-BACKTRACE = ([ -f core ] && gdb `which ruby` core)
-TEST = base/test.rb math
-
-test::
- rm -f core
- ($(RUBY_INSTALL_NAME) -w $(TEST)) || $(BACKTRACE)
-
-VALG = NO_MMX=1 valgrind --suppressions=extra/gf.valgrind2 -v
-VALG += --num-callers=8
-VALG += --show-reachable=yes
-# VALG += --gdb-attach=yes
-
-vtest::
- rm -f core
- ($(VALG) $(RUBY_INSTALL_NAME) -w $(TEST) &> gf-valgrind) || $(BACKTRACE)
- less gf-valgrind
-
-vvtest::
- rm -f core
- ($(VALG) --leak-check=yes $(RUBY_INSTALL_NAME) -w $(TEST) &> gf-valgrind) || $(BACKTRACE)
- less gf-valgrind
-
-testpd::
- rm -f gridflow.pd_linux && make && \
- rm -f /opt/lib/ruby/site_ruby/1.7/i586-linux/gridflow.so && \
- make && make install && \
- (pd -path . -lib gridflow test.pd || gdb `which pd` core)
-
-munchies::
- $(RUBY_INSTALL_NAME) base/test.rb munchies
-
-foo::
- @echo "LDSOFLAGS = $(LDSOFLAGS)"
-
-#----------------------------------------------------------------#
-
-ifeq ($(HAVE_PUREDATA),yes)
-# pd_linux pd_nt pd_irix5 pd_irix6
-
-ifeq (${SYSTEM},Darwin)
- OS = DARWIN
- PDSUF = .pd_darwin
- PDBUNDLEFLAGS = -bundle -undefined suppress
-else
- ifeq (${SYSTEM},NT)
- OS = NT
- PDSUF = .dll
- PDBUNDLEFLAGS = -shared -I$(PUREDATA_PATH)/src
- PDLIB = -L/usr/local/lib $(LIBRUBYARG_SHARED) $(PUREDATA_PATH)/bin/pd.dll
- else
- OS = LINUX
- PDSUF = .pd_linux
- endif
-endif
-
-PD_LIB = gridflow$(PDSUF)
-
-$(PD_LIB): bridge/puredata.c.fcs base/grid.h $(CONF)
- $(CXX) -Ibundled/pd $(LDSOFLAGS) $(BRIDGE_LDFLAGS) $(CFLAGS) $(PDBUNDLEFLAGS) \
- $< -xnone -o $@
-
-gridflow-for-puredata:: $(PD_LIB)
-
-DOK = $(PUREDATA_PATH)/doc/5.reference/gridflow
-
-puredata-install::
- mkdir -p $(DOK)/flow_classes
- cp pd_help/*.pd $(DOK)
- cp doc/*.html $(DOK)
- cp doc/flow_classes/*.p* $(DOK)/flow_classes
- cp -r images/ $(PUREDATA_PATH)/extra/gridflow
- cp $(PD_LIB) pd_abstractions/*.pd $(PUREDATA_PATH)/extra
- for z in camera_control motion_detection color mouse centre_of_gravity fade \
- apply_colormap_channelwise checkers contrast posterize ravel remap_image solarize spread \
- rgb_to_greyscale greyscale_to_rgb rgb_to_yuv yuv_to_rgb; do \
- cp pd_abstractions/\#$$z.pd $(PUREDATA_PATH)/extra/\@$$z.pd; done
-
-else
-
-gridflow-for-puredata::
- @#nothing
-
-puredata-install::
- @#nothing
-
-endif # HAVE_PUREDATA
-
-beep::
- @for z in 1 2 3 4 5; do echo -ne '\a'; sleep 1; done
diff --git a/externals/gridflow/README b/externals/gridflow/README
deleted file mode 100644
index 25de6ca9..00000000
--- a/externals/gridflow/README
+++ /dev/null
@@ -1,46 +0,0 @@
-,-o----o----o----o-.
-| GridFlow 0.8.0 |
-`-o--------------o-'
- |
-.----------------------------------------------------------------
-| Directory layout
-
- ./base ............. object classes written in C++ and Ruby
- ./bin .............. programs startable as applications
- ./bridge ........... connectors between Ruby and PureData/etc
- ./bundled .......... files from other packages, bundled here for convenience
- ./cpu .............. cpu-specific code
- ./CVSROOT .......... project information for version control
- (not in official releases)
- ./format ........... format handlers written in C++ and Ruby (optional)
- ./devices4ruby ..... misc Ruby plugins for hardware interfaces
- ./doc .............. complete documentation in HTML, with XML source
- ./doc/images ....... images that go with the HTML doc
- ./extra ............ useful small programs (mostly in Ruby)
- ./images ........... sample images shared by ./samples, ./help, ./doc
- ./optional ......... optional classes but not format handlers
- ./pd_abstractions .. Pd object classes written in Pd
- ./pd_help .......... Pd-style help (old; the new goes in ./doc)
- ./pd_examples ...... more complex Pd programs showing off more practical uses.
-
-
-
-Legalese
-
- This program 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.
-
- This program 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.
-
- See file COPYING for further informations on licensing terms.
-
-
-
-CVS
-
- $Id: README,v 1.2 2006-03-15 04:48:05 matju Exp $
diff --git a/externals/gridflow/TODO b/externals/gridflow/TODO
deleted file mode 100644
index 820511ae..00000000
--- a/externals/gridflow/TODO
+++ /dev/null
@@ -1,486 +0,0 @@
-/* $Id: TODO,v 1.2 2006-03-15 04:48:05 matju Exp $ */
-
-[ ] SWIG: try -fcompact -fvirtual
-
-ClaudiusMaximus matju: [#draw_image] inlet 0 method "op <opname>" is undocumented, but very useful :)
-ClaudiusMaximus matju: [unix_time] is maldocumented, outlet 0 is a grid Dim[28](uint8), not a symbol
-
-
-[ ] pd_examples -> examples
-[ ] update doc
-[ ] 0.8.1
-[ ] make good use of the R type (automatic Ruby/C++ convs)
-[ ] ditch xml, switch to docstrings or whatever
-[ ] ...
-claude wants http://en.wikipedia.org/wiki/Graham_scan
-
-X Error of failed request: BadValue (integer parameter out of range for operation)
-error=0x2
-request=0x91 (MIT-SHM)
-minor=0x3 (X_ShmPutImage)
-value in failed request: 0x04b008 == 240*320*4+8 (matju)
-
-invalid read of size 1 (main.c.fcs:438)
-malloc alignment = 4 mod 8 (en utilisant valgrind)
-
-ClaudiusMaximus matju: feature request: [#store4], behaves like store but accepts grids
-of floats as coordinates and interpolate using 4-point interpolation, eg, right inlet ->
-(3 3 f # 0 0 0 1 1 1 2 4 8), left inlet -> (1 # 0.5) outputs (0.5 0.5 0.5)
-(or whatever the interpolation would really be), left inlet (2 # 1.5 1.5) outputs (3)
-
-AMD64 diffs: long 4->8, void * 4->8
-
-<ClaudiusMaximus> hmm, sending a [reassign( message to the right inlet of a [#store] segfaults Pd
-<ClaudiusMaximus> hmmm, i get a segfault with a simple patch sending "reassign, put_at ( 0 0 ), reassign" to the right inlet of [#store ( 3 3 # 0 )]
-<alx1> matju: for the ./configure, I often get an error from aalib since common installs do not put the headers
-<alx1> matju: would it be possible to make it a user defined choice like --with-aalib and turn it off by default?
-<alx1> matju: not noticing that configure returns an error leads to an error when compiling
-<alx1> back to the [display] object, it lingers for a moment after deletion
-<alx1> and returns a 'pd_activate' error after I move it
-<alx1> matju: once I delete it, unlike the other gui objects, it takes about one second before it dissapears, maybe a difference in tcl versions?
-
-http://oprofile.sourceforge.net/about/
-for 0.8.0:
-
-drag_rectangle.pd is fucked (x11 error)
-FObject#send_out2 : bself is NULL, rself=4097cbe8
-[gf] ruby: ObjectSpace._id2ref(0x4097cbe8/2)
-[gf] returns: #<GridFlow::FormatX11 [FormatX11 out]>
-
-[ ] FIX LIBQUICKTIME CODE: #include <lqt/*> instead of <quicktime/*>
-[ ] try removing or modifying -falign on PPC/OSX
-[ ] c++ typecasting is nuts (see class Pt<T>)
-[ ] make c++ refcount and ruby gc to cooperate.
-[ ] encoding of quicktime RGBA only works with [#cast b].
-[ ] add classmethod support to source filter
-[ ] document the source filter
-[ ] make example on separable convkernels
-[ ] add concepts of hot inlet and conf inlet at the code level
-[ ] [display] should use clocks to update tk less often
-[ ] [display] leaks in server ?
-[ ] optional args don't work in source_filter.rb
-[ ] deprecation warnings
-[ ] Add a video latency patch (in examples)
-[ ] can't have FPatcher and GridObject behaviour at once ??
-[ ] Numop: warn on misalignment
-[ ] wrap Dim (?)
-[ ] wrap GridInlet (?)
-[ ] wrap GridOutlet (?)
-[ ] wrap Grid (?)
-[ ] wrap Numop
-[ ] remove GridInlet* ?
-[ ] configure chokes if GCC3 doesn't have the C++ plugin
-[ ] [#change]
-[ ] [#import~]
-[ ] [#export~]
-[ ] [#expr]
-[ ] 8-align STACK_ARRAY and ARRAY_NEW ?
-[ ] #: option swap
-[ ] consider including [mysql] [renamefile] [ls] [shell]
-[ ] re-enable int64,float64
-[ ] added #matrix_solve, #slice
-[ ] Copy-on-Write (COW)
-[ ] < 10 bugs in buglist
-[ ] Fully hyperlinked manual
-[ ] internals documentation
-[ ] internal grid protocol redesigned
-[ ] raise limit of in/outlets from 10 to 100 or unlimited.
-[ ] unbork make test and plain ruby mode.
-[ ] add support for "anything" methods (def _0_(sel,*a))
-[ ] look into -ftree-vectorize
-[ ] should STACK_ARRAY remain at all?
-
-for 0.8.1:
-
- * wrap Pd API completely.
- * test.rb should become much more serious. (the @pack bug really sucked)
-
-Bugs (High Priority) (!!! Fix all of these before 0.8.0 !!!)
-
-pick a number: [149]
-
-[147] [#store] blows up in nervous_video (reassign)
-[146] [#peephole] resize problem
-[145] "list -1"->[@import] only tells error message once every other time
-[144] small leak remaining in x11. may have to do with non-use of XDestroyImage.
-[141] shouldn't be able to call Pd from a non-main Ruby thread.
-[140] is [@convolve] actually cross-convolution?
- that is, convolves with a mirror image of the convolution matrix.
-[139] [#peephole]
- <mis> matju: BUG-ALERT - peephole does not delete until a screen refresh
- <mis> matju: I was just about to do that
- <mis> matju: it works... almost
- <mis> matju: if you try to move the GOPed abstraction the peepholes don't move along
- <mis> he :) better yet, the abstraction's bounding box's lower right corner will not move up or to the left of the low right corner of the peephole it contains. Instead it will resize itself as you move it around.
-[138] [#peephole] crash
-[137] [gf] peeperr: problem with set_geometry, wrong size.
-[136] fix C_INCLUDE_PATH vs CPLUS_INCLUDE_PATH
-[134] #import with zero size crashes?
-[133] numop ** can freeze GF
-[129] jmax2pd: [display] should not be translated
-[128] jmax2pd(?): loadbang-messages (comma) don't get translated to .pd ??
-[118] error messages can be unclear (eg. file not open... is it #in's, or #out's?)
-[117] osx: [#store] crash instead of raising
-[112] Pt<T>: some casts aren't done properly
-[107] MMX computations may be done misaligned, which may be bad.
-[105] when file not found, mpeg error messages are wrong, they say the filename is "".
-[102] osx: error: shmget failed (cannot allocate memory) in X11, for regular pictures
-[100] osx: libgridflow.so installs in wrong directory (of course)
-[090] doesn't check whether ruby/version.h matches .so / .a
-[027] tcp test is broken
-[089] is LINK TO="..." not properly handled? see part of install.xml that uses it.
-[088] FIX MOULINETTE.RB ! <attr name type default>
-[078] "unsupported codec" bogus errors.
-[097] bin/backtrace does not detect scripts
-[005] can't open "": Success; loading a nonquicktime file using quicktime
-[006] #in#open problem with String argument.
-[010] separate bridge makefiles from other makefiles!!!
-[011] research bugs in nonblock IO with Ruby. (eg. serial port)
-[025] format_grid: write test for other bpv's
-[026] latency is not that good. (GC ?)
-[030] FormatGrid: not properly tested (crashes sometimes)
-[031] stdout should be redirected if bridge is present
-[032] error handling sometimes leads to crash
-[033] error handling shows inanely useless messages (sometimes)
-[034] format/mpeg3.c,quicktime.c might cause lockup on exit
-[038] some seeds aren't typechecked
-[039] jpeg file cat crashes on second file (jpeglib buffering?)
-[040] GRID_FINISH triggered while backstore ???
-
-Bugs (Low Priority)
-[079] can trap segfaults in codecs of libquicktime.
-[090] http://poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC30
-[076] EINTR not handled properly in a lot of code?
-[041] what would be a way to make GF work well with Pd's idea of a list?
-[043] TCP server socket busy even after kill
-[045] write unit tests about required functionality
-[046] write unit tests about error checking
-[047] make system to ensure everything is working before a release.
-[048] potential issues between fork() and X11 ?
-[051] remove the crap given by -w of ruby
-[054] it's possible to crash by sending data in two inlets of a same object at once
-[059] mess with options in format grid
-[060] look for "!@#$" in source
-[029] #join on small chunks is way too slow
-[009] T_DATA #dup #clone ???
-
---- make the development process more test-driven:
- * file every feature request and bug report into base/test.rb so
- that gridflow fails those tests;
- * THEN make gridflow pass those tests.
-
-===================
-
-Community
-[ ] put new examples on website
-
-Distribution
-[ ] should now plan which features are pre-1.0 and which are post-1.0
-[ ] review all documentation
-[ ] review all examples
-[ ] make CDs
-
-Installation
-[ ] make the installer help the user more:
- * .h was found
- * compiled with .h correctly
- * .so|.a was found
- * linked with .so|.a correctly
-[ ] installable doc
-[ ] installable includes ?
-[ ] produce linux binaries ("static")
-[ ] produce cygwin32 or mingw32 binaries
-[ ] produce macosx binaries
-[ ] produce linux rpm/deb
-[ ] less compile-time checks and more run-time checks
-[ ] should GridFlow be bundled with some of its own dependencies?
-[ ] reintroduce --puredata-dist-dir ?
-[ ] --prefix (pour ruby)
-[ ] install vs site-install mess
-[ ] bridge should check that the gridflow.so file matches.
-[ ] make uninstall
-[ ] have option for gprof
-[ ] cross-compile:
- http://www.libsdl.org/extras/win32/cross/
- http://rooster.stanford.edu/~ben/linux/cross.php
-
-Documentation
-[ ] make a short feature list as a promo
-[ ] add credits
-[ ] indiquer comment faire un rapport à propos d'une carte v4l ou d'un mode x11 non-supporté
-[ ] project_policy.xml
-[ ] specify policy for <help>, <icon>, etc.
-[ ] things you type verbatim are all in KBD blocks
-[ ] placeholders for your own values are all in I blocks
-[ ] document our own release procedures, how our CVS works
-[ ] document how to report bugs, basic troubleshooting
-[ ] document our distribution of the archives
-[ ] ascii conventions: [foo] vs "foo", etc.
-[ ] document internals
-[ ] describe indexmap in doc
-[ ] document backward compatibility issues
-[ ] typical uses: <typical></typical>
-[ ] architecture: class->type/shape->use->role
-[ ] it should be indicated whether an object is supported by pd/ruby/c++
-[ ] heavily hyperlink documentation
-[ ] automate more parts of the documentation
-[ ] benchmarks (especially: simple video i/o)
-[ ] mimic [pdp_help_input] [pdp_help_output]: they are convenient
---- remember to keep doc/help/screenshots/examples up to date
-[ ] <jtm_> the suggestion would be to add a link at the end of each section leading to the next section
-
-Source Filter
-[ ] add \ruby \end blocks (multiline inlined rubyscripts)
-[ ] \attr
-
-Architecture
-[0.8] <pat> aussi les erreurs que donne gf c'est beaucoup de ligne pour juste un file not found ;)
-[0.8] reentrancy of objects (to allow true recursion)
-[0.8] inlet-variables (variables associated to inlets)
-[ ] eliminate the Dim class, replacing by Grid itself (?).
-[ ] pull mode (functional-style)
-[ ] bidirectional messages (constraint/relational-style)
-[ ] send-reply messages (imperative-style)
-[ ] add reflection (#global:classes, #global:methods, ...)
-[ ] use MétaRuby typing to make things friendlier.
-[ ] transmitting grids by diffs?
-[0.8] dispatch on _n_-prefixed methods (one selector any inlet)
- and _#{i}_-named methods (any selector one inlet)
-[0.8] generalize the backstore
-[ ] Outlet#buffer should harmonise with the lcm of its corresponding Inlet#factor's.
-[ ] lazy grids: Grid#operator Pt<T> makes sure all the grid is received
- and Grid#range(int start, int n, T bogus) makes sure the
- specified part of the grid is received.
-[0.8] accounting: grids messages packets numbers bytes copybytes
-[0.8] memory profiling
-[0.8] compare Ruby API with both flext/pyext
-[ ] add a "query" class for debugging other objects?
- (would be able to extract extra info from each object/class)
-[ ] add a GridFlow::LaterException or something
- (which tells to retry later with the same packet because another
- grid reception is not completed yet.)
-[ ] interpret nested lists as n-dimensional.
-[0.8] MMX memcpy() ?
-[0.8] MMX _runtime_ autodetection
-
-Operators
-[ ] User-defined operators; compound operators... e.g. [# {{* 7} + {>> 3}}]
-[ ] n-ary operators... make [#] variable-inlet
-[ ] binary ops to replace unaries : rand -> ???, sqrt -> ???
-[ ] trinary ops? eg. */ *>> *+ ?: minmax &<< >>&
-[ ] numop2: rol, ror
-[ ] numop1: weight (in bits)
-
-Bridge
-[ ] UnknownAtom class
-[ ] Pd bridge should support list-literals inside messages
-[ ] GFBridge object visible from Ruby
-
-Computation Objects
-[ ] #counter (similar to #for)
-[ ] #inner inlet 2 -> 1, and other incompatibilities i wanted to introduce
-[ ] #for "step" argument should have default {1...}
-[ ] zero option in #convolve (?)
-[ ] #convolve2 (simpler)
-[ ] #convolve rewritten as combination of #convolve2+#border ?
-[ ] #convolve(2): should allow n-D convolution
-[ ] #complex_sq is backwards
-[ ] #store: option zero (?)
-[ ] #import~, #export~
-[ ] #fold, #scan: option reverse (right-to-left)
-[ ] #join: option swap
-[ ] #matrix_inverse, #matrix_solve
-[ ] #reverse (on given dimension number)
-[ ] #timeline (or rtmetro): sequencing of events from grid
-[ ] #replace_if, #random_select, #markov_chain, #unpack, #sort, #slice, #splice
-[ ] #polygon_perimeter, #polygon_area, #draw_polygon smoothly
-[ ] fuzzy #store (interpolate)
-[ ] write a complete benchmark script
-[ ] spatial biquads (ask Tom)
-[ ] string operations to compensate for the feebleness of PD in that area.
- this includes [#sprintf].
-[ ] #pack should become type-conscious (cast option, like #import)
---- see also APL/J/NArray/PDL/Aplus/Yorick/IPOW reference
-
-Effects
-[ ] #mosaic
-[ ] #gaussian_blur, #sobel, #pixelize, #despeckle (median)
-[ ] #dither, #draw_lines, #draw_points, #fire, #border, #queue
-[ ] #chroma_key: i0=RGBpicture i1=RGBcolor i2=tolerance o0=RGBApicture
- with fuzzy flag; (don't call it #chroma_key though)
- maybe #mask...
-[ ] turtle (logo style)
-[ ] effectv
-[ ] create abstractions for usage patterns (eg: like @remap_image)
-[ ] see gimp for ideas
-[ ] kaleidoscopes
-[ ] FFTW
-[ ] bilinear interpolation a+(b-a)*x+(c-a)*y+(a-b-c+d)*x*y (#scale_by smoothly?)
-[ ] #scale_by/#downscale_by fractional values
-[ ] bicubic interpolation
-[ ] multilinear interpolation (n-dimensional?)
-[ ] #daltonism
-[ ] #perlin ?
-
-Input/Output
-[ ] replace "open <driver> <source> <filename>" by "open <driver> <mrl>"
-[ ] videodev: is it possible to reach 60 fps ?
-[ ] a #store that is persistent (saved in .pd) ?
-[ ] Grid: support storage in all six types
-[ ] Grid: bpv 1,2,4 uint
-[ ] Grid: text version of the format
-[ ] Gimp, GStreamer, ffmpeg, xine, mplayer, GEM, PDP, OSC
-[ ] RubyX11 0.6
-[ ] support for output inside of a GUI app (Tk/Gtk/Qt/...)
-[ ] get subtitling of tv channels
-[ ] add messages "load", "save" as open,bang,close combos. (?)
-[ ] use 1.8.0's IO#read(Integer,String)->String
-[ ] SDL: should support multiple windows
-[ ] x11,sdl,aalib: use buffering to synchronise frames at a constant rate.
-[ ] x11: sync with the actual vsync of the monitor
-[ ] x11: maybe vram-to-vram copy using X11's Pixmap remote-objects
-[ ] shell object?
-[ ] #import, 'grid tcp': option: sudden vs gradual transmission through gridflow.
-[ ] HPGL, [unixtime]
-[ ] [parallel_port], [serial_port], [usb_mouse]
-
-Format
-[ ] remaining number type support in formats
-[ ] all: possibly get rid of the "format" notion ?
-[ ] PNM: P1,P2,P3,P4,P5 support
-[ ] XBM, XPM, GIF support
-[ ] fork: pseudoformat for launching format handler as separate process
-[ ] put_at/reassign in x11/sdl/quartz
-[ ] /dev/dsp, /dev/mixer
-[ ] Generic SHM/MMAP Drivers
-[ ] "open grid pipe" and such.
-[ ] TCP: non-blocking write
-[ ] TCP: buffer n grids
-[ ] multi: multi-file (by glob pattern, e.g.: foo*.ppm)
-[ ] AVI
-[ ] format grid: "headerless until 10" (text files)
-
-User Interface
-[ ] color picker
-[ ] gridbox (akin to intbox) or grid edition dialog, etc.
-[ ] peephole:
- [ ] works without x11 (for osx...)
- [ ] does it really work with something other than 3 channels ?
- [ ] add a popup menu that makes sense
-[ ] make ruby/tcl evaluator boxes retractable
-[ ] vector slider (n parallel sliders in one, Dim(n))
-[ ] 2d slider
-[ ] radial slider (angle chooser)
-[ ] drag-and-drop palette of object construction
-[ ] object construction menu specialized for each class
- (generated from class reflection/metadata)
-
-Extra/Examples/Etc
-[ ] make demo app(s) in Ruby/Tk: bin/playmovie
-[ ] .pd: read; write better
-[ ] examples/generique.pd
-[ ] add examples from the workshop, etc
-
-how about creating aliases like "open window" = "open x11 here" (or arbitrary
-user-defined sequence of messages settable in ~/.gridflow_startup) and "open
-videodev" -> "open videodev /dev/video0, option channel 1, option size 240 320"
-maybe there should be a separate ~/.gridflow_config that would be saveable from
-gridflow, and ~/.gridflow_startup would be edited only by the user but
-~/.gridflow_config would still be a text file. i say that
-because the startup is a ruby script so gridflow couldn't just do
-search-and-replace in there, because the option could be inside a "if"
-expression and such... at most, gridflow could _append_ text to
-.gridflow_startup, to be non-intrusive...
-
-Feature Requests
-
-From: Dave Bergevin <dabergevin@eisa.com>
- [ ] synchronized audio with the video when using mpeg1 & 2
- [ ] full screen mode (without the menu bars or frames)
-From: Alexandre Castonguay <acastonguay@artengine.ca>
- [ ] server side pd to handle multiple incoming commands, audio + video streams
- [ ] support for audio in the mpeg streams
-
-<matju> alx:
- le tab completion ne donnerait pas seulement les noms possibles pour le
-prochain argument dans le objectbox; il donnerait aussi une description de
-l'argument (surtout dans le cas où l'argument a beaucoup de valeurs
-possibles)
- je pense que le help de Pd est une bonne idée (le concept hands-on)
-mais ça pourrait aller plus loin.
- j'ai pensé intégrer le manuel de référence de gridflow directement dans
-le programme, disponible au runtime, dans l'éventualité d'un GUI qui
-saurait en tirer avantage. sinon on pourrait faire des hacks cool genre un
-message "help" au inlet 0 enverrait une description de la classe dans le log.
- (sauf que dans ce cas: [rubyprint] est tenu d'afficher directement tout
-ce qu'il reçoit. alors doit-il écrire "help" ou écrire le help ?
-
-alx1->matju: détection de plusieurs personnes; détection avec deux caméras
-(?); détecter les formes; détecter les couleurs; support mpeg4; hotspots
-
-> http://redshift.sourceforge.net/debugging-GC/ [ruby-talk:53835]
-> You might also want to search the web for "malloc debugger".
-
-... I am Jack's Overwritten Stack Pointer...
-
-<ircbridge> <GPS> Tcl_GetObjResult Tcl_GetErrorInfo ...
-<ircbridge> <GPS> Tcl_GetStringResult may also be helpful. (note I can't
-seem to find Tcl_GetErrorInfo (maybe I dreamed it up))
-<ircbridge> <GPS> matju: BTW CatchObjCmd might help too
-<ircbridge> <GPS> I see that the new Tcl_Dict commands have taken over the HEAD's CatchObjCmd
-
-ClaudiusMaximus reports that allocating a 197M grid causes a crash (turns out C++
-throws exception, can't allocate, signal ABRT)
-
-ClaudiusMaximus says: I want to be able to send output from Pd+Gridflow to a video4linux
-loopback device so that other v4l programs can access the stream.
-I found the video loopback device here: http://motion.sourceforge.net/vloopback/
-
-<alx2> matju: iSight on linux :
-http://episteme.arstechnica.com/6/ubb.x?a=tpc&s=50009562&f=8300945231&m=40110681
-<alx2> matju: apparently it needs something called 'coriander'...I'm checking into it
-<alx2> matju: the person who got it working mentions libdc1394
-<alx2> matju: ah coriander is a GUI for firewire
-<alx2> matju: on this page :
-http://www.tele.ucl.ac.be/PEOPLE/DOUXCHAMPS/ieee1394/cameras/index.html
-<alx2> matju: I learn that the iSight is compliant with version 1.30 of IIDC
-<alx2> matju: the docs for coriander mention that the author needed to create a major and minor device for the camera.
-<alx2> matju: retyping (damn pdf's) -> there are two devices to create: raw1394 and video1394
-<alx2> matju: raw1394 has major 171 and minor 0 while video1394 had major 171 and minor 16
-<matju> thanks
-<alx2> matju: any useful info?
-<matju> i'll see, doing something else at the moment
-<alx2> matju: having a camera like the iSight supported could be fantastic for video capture/detection on a laptop. Not to mention that the bttv cards are getting harder to locate
-
--mfpmath=sse2
-
-<MiS> <matju> alx2: btw you cannot set helpfiles explicitly on _abstractions_...
-<MiS> yes you can
-<MiS> and specify -helppath to add a path to help. So selecting 'Help'
- in the pop-up on an abstraction will open a help fiel for that abstraction
-
-"Bangs in a geiger counter have a l*dt probability of occuring
- in a dt time interval. Therefore the time till the next event
- follows a Exp(l) law, for which:
- f(t) = l*exp(-l*t)
- F(t) = integral of l*exp(-l*t)*dt = 1-exp(-l*t)
- F^-1(p) = -log(1-p)/l
- //return (uint64)(1000LL*ms*-log(1-drand()));"
-matju 2002
-
-
-remember to check for volatile VALUEs if GC problems ever occur
-
-ruby -ve '[30,31,62,63].each {|x| printf "%d bits: %s\n",x,(1<<(x-1)).class }'
-
-linx:
- http://cast.rubyforge.org (parsing C code)
- http://ruby-contract.rubyforge.org/doc/
-
-
-sand.pd differential mode, 0.8:
-fps min med max avg stdev
-17.57 54.82 55.81 78.00 56.89 3.93 : before
-after ...
-
-
diff --git a/externals/gridflow/configure b/externals/gridflow/configure
deleted file mode 100755
index 1cfed471..00000000
--- a/externals/gridflow/configure
+++ /dev/null
@@ -1,1277 +0,0 @@
-#!/usr/bin/env ruby
-# $Id: configure,v 1.2 2006-03-15 04:48:05 matju Exp $
-=begin
- GridFlow
- Copyright (c) 2001,2002,2003,2004,2005,2006 by Mathieu Bouchard
-
- This program 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.
-
- See file ./COPYING for further informations on licensing terms.
-
- This program 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, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-=end
-
-require "rbconfig"
-require "mkmf"
-require "ftools"
-include Config
-OSX = !!( CONFIG["arch"] =~ /darwin/ )
-
-require "win32/process" if CONFIG["arch"] =~ /mingw/
-LOG = File.open "./config.log", "w"
-
-Red = "\e[0;1;31m"
-Green = "\e[0;1;32m"
-Light = "\e[0m"
-Dark = "\e[0;1;30m"
-Yellow = "\e[0;1;33;44m"
-
-$verbose=false
-LOG.puts "-"*64
-LOG.puts "Environment Variables: "
-ENV.each {|k,v| LOG.puts "#{k}=#{v}" }
-LOG.puts "-"*64
-
-puts
-if not File.exist?("./configure")
- puts "Run me from the right directory please."
- exit 1
-end
-
-begin
- Dir.mkdir "tmp"
-rescue Errno::EEXIST
-end
-
-#----------------------------------------------------------------#
-
-class Or
- attr_reader :a
- class<<self; alias [] new end
- def initialize(*a) @a=a end
- def to_s; @a.join " or "; end
-end
-
-def launch2(log,*command)
- log << command.join(" ") << "\n"
- r,w = IO.pipe
- child = launch(nil,w,w,*command)
- w.close
- log << r.readlines.join << "\n"
- ret = join_pid(child)
- ret = ret.to_int if RUBY_VERSION > "1.7"
- log << "error \##{ret}\n" if ret>0
- return ret<=0
-end
-
-$conf={
- :LDSOFLAGS => ["-lm"],
- :BRIDGE_LDFLAGS => ["-lm"],
- :FEATURES => {},
- :OPTIONS => [],
- :DEFINES => {
-# :RUBY_PREFIX => CONFIG['prefix'],
- :RUBY_PREFIX => nil,
- :PREFIX => "/usr/local",
- :CPU => nil,
- :RUBY_ARCH => CONFIG['arch'],
- :GEM_SOURCE => "../Gem/src",
- },
- :CC => "g++",
- :OBJS => [],
-}
-
-def launch stdin,stdout,stderr,*command # -> returncode
- child = fork
- if not child then
- STDIN .reopen stdin if stdin
- STDOUT.reopen stdout if stdout
- STDERR.reopen stderr if stderr
- exec *command
- #!@#$ what happens with exception upon exec ?
- end
- child
-end
-
-def join_pid pid
- Process.waitpid2(pid)[1]
-end
-
-module Future; end
-
-class Feature
- $features = []
- def self.add(*a,&b) $features << Feature.new(*a,&b) end
- def initialize(&b) instance_eval(&b) end
- def self.attr2(sym,&b)
- eval "def #{sym}(*args,&b)
- raise args.inspect if args.length>1
- if b then @#{sym}=b.extend Future
- elsif args.length>0 then @#{sym}=args[0]
- else if Future===@#{sym} then @#{sym}.call else @#{sym} end end end"
- end
- attr2 :tag
- attr2 :name
- attr2 :status #!@#$
- attr2 :uses_so
- attr2 :uses_bridge_so
- attr2 :uses_o #!@#$
- attr2 :uses_h
- attr2 :uses_feature
- attr2 :test
- attr2 :options #!@#$
- attr2 :unless_feature #!@#$
- attr2 :action #!@#$
- attr2 :defines #!@#$
-
- def find_h name
- $C_INCLUDE_PATH.find {|x| File.exist?(x+"/"+name)}
- end
-
- def c_test code, link=nil, options=[], feature=nil
- link = (uses_so||[]).dup if not link
- link=link.flatten
- ldlpath = ENV["LD_LIBRARY_PATH"]
- uses_h.each {|h|
- find_h h or
- /framework/ =~ (uses_so||[]).join(" ") or
- raise "where is #{h} ?"
- } if uses_h
- ENV["LD_LIBRARY_PATH"] = ldlpath ? "./tmp:#{ldlpath}" : "./tmp"
- link[0,0]=$conf[:LDSOFLAGS].find_all {|x| String===x and /^-L/ =~ x }.flatten
- code=code.gsub(/#include#/) {
- uses_h.map {|inc| "#include <#{inc}>\n" }.join""
- }
- log = ""
- log << code << "\n"
- binname = "tmp/#{$$}"
- sourcename = binname+".cpp"
- File.open(sourcename,"w") {|f| f.puts code }
- command = ["/usr/bin/env", $conf[:CC]] +
- $CFLAGS.split(/ /).reject{|x| x.length==0 }
- if not launch2 log,*(command+options+[sourcename,
- "-o", binname, *link])
- pat = Regexp.new("^"+Regexp.quote(sourcename)+":\\d+: ")
- errs = log.split("\n").find_all {|l| pat =~ l }
- raise "gcc compilation error" if not errs or
- errs.length==0
- errs = errs[0].gsub(pat,"")
- raise "gcc: #{errs}"
- end
- if not launch2 log,"tmp/#{$$}"
- raise "runtime error"
- end
- return true
- ensure
- LOG.puts log
- ENV["LD_LIBRARY_PATH"] = ldlpath if ldlpath
- end
-
- def asm_test code, *link
- log = ""
- log << code << "\n"
- File.open("tmp/#{$$}.asm","w") {|f| f.puts code }
- command = ["/usr/bin/env", "nasm",
- "tmp/#{$$}.asm", "-f", "elf", "-o", "tmp/#{$$}.o"]
- launch2 log,*command or return false
- command = ["#{$conf[:CC]}","-o","tmp/#{$$}","tmp/#{$$}.o",*link]
- launch2 log,*command or return false
- command = ["tmp/#{$$}"]
- launch2 log,*command or return false
- true
- ensure
- LOG.puts log
- end
-end
-
-#----------------------------------------------------------------#
-
-def make_expand(x)
- y=x.gsub(/\$\(([^\)]*)\)/) {CONFIG[$1]}
- if x!=y then make_expand y else y end
-end
-
-def read_ld_so_conf
- return [] unless File.exist?("/etc/ld.so.conf")
- x = File.open("/etc/ld.so.conf"){|f| f.read }.split("\s")
- x.delete_if { x.length==0 }
- x
-end
-
-def epath x; (ENV[x]||"").split(":") end
-
-$C_INCLUDE_PATH = (
- epath("CPLUS_INCLUDE_PATH") +
- epath("C_INCLUDE_PATH") +
- ["/usr/include"]).uniq
-
-$LIBRARY_PATH = (
- epath("LIBRARY_PATH") +
- ["/usr/lib","/lib"]).uniq
-
-$LD_LIBRARY_PATH = (
- epath("LD_LIBRARY_PATH") +
- read_ld_so_conf +
- ["/usr/lib","/lib"]).uniq
-$LIBX11DIR = ["-L/usr/X11R6/lib"]
-$LIBX11 = ["-L/usr/X11R6/lib","-lX11"]
-
-# making it easier for everybody I hope:
-def prepend_path base
- bl = base+"/lib"
- bi = base+"/include"
- if not $LD_LIBRARY_PATH.include? bl and
- not $LIBRARY_PATH.include? bl then
- $conf[:LDSOFLAGS].unshift "-L"+bl
- $LD_LIBRARY_PATH.unshift bl
- $LIBRARY_PATH.unshift bl
- end
- #and not $CPLUS_INCLUDE_PATH.include? bi
- if not $C_INCLUDE_PATH.include? bi then
- $CFLAGS += " -I"+bi
- $C_INCLUDE_PATH.unshift bi
- end
-end
-prepend_path "/Applications/Pd.app/Contents/Resources" if OSX
-prepend_path "/sw" if OSX
-prepend_path "/usr/local"
-prepend_path ENV["HOME"]
-# prepend_path "."
-
-for var in [:$C_INCLUDE_PATH, :$LIBRARY_PATH, :$LD_LIBRARY_PATH] do
- LOG.puts "#{var}: #{eval(var.to_s).inspect}"
-end
-
-$conf[:BINDIR] = make_expand CONFIG['bindir']
-
-LOG.puts "-"*64
-
-$CFLAGS += " -xc++ -fno-operator-names -fno-omit-frame-pointer"
-$CFLAGS += " -I/usr/X11R6/include"
-$C_INCLUDE_PATH.unshift "/usr/X11R6/include"
-
-ruby16a = "#{CONFIG['libdir']}/ruby/#{CONFIG['MAJOR']}.#{CONFIG['MINOR']}/"\
-"#{CONFIG['arch']}/#{CONFIG['LIBRUBY_A']}"
-ruby18a = "#{CONFIG['libdir']}/#{CONFIG['LIBRUBY_A']}"
-for x in [ruby16a,ruby18a] do
- $LIBRUBY_A = make_expand x
- break if File.exist? $LIBRUBY_A
-end
-
-FILES = [
- [:directory, "base/",
- [:ruby, "main.rb"],
- [:ruby, "flow_objects.rb"],
- [:ruby, "test.rb"],
- [:ruby, "source_filter.rb"],
- ],
- [:directory, "bridge/",
- [:ruby, "puredata.rb"],
- [:ruby, "placebo.rb"],
- ],
- [:directory, "format/",
- [:ruby, "main.rb"],
- ],
- [:directory, "optional/",
- [:ruby, "usb.rb"],
- [:ruby, "lti.rb"],
- ],
- [:directory, "extra/",
- [:ruby, "smpte.rb"],
- [:ruby, "server_2.rb"],
- [:ruby, "server_1_grid.rb"],
- [:ruby, "server_1_ppm.rb"],
- [:ruby, "jmax_format.rb"],
- [:ruby, "puredata_format.rb"],
- ],
-]
-
-#----------------------------------------------------------------#
-Feature.add {
- tag :gcc3
- name "GNU C++ Compiler 3"
- options ["HAVE_GCC3"]
-=begin
- test proc {
- pi=File.popen "#{$conf[:CC]} -v 2>&1", "r"
- vline = pi.readlines.find {|l| /gcc version ([\d\.]+)/.match l }
- version = $1
- pi.close
- if version < "3" then raise "version #{version} < 3" end
- true
- }
-=end
- test proc {
- c_test %{
- #include <stdio.h>
- int main () {
- printf("GCC_VERSION %d.%d.%d\\n", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
- return !(__GNUC__>=3);
- }}
- }
- defines :GCC_VERSION => proc {
- m = /GCC_VERSION\s+(.*)/.match(File.popen("tmp/#{$$}","r"){|f| f.read })
- m[1]
- }
-
-}
-Feature.add {
- tag :stl
- name "C++ Standard Template Library"
- test proc {
- c_test %{
- #include <vector>
- int main () {
- std::vector<int> foo;
- }}
- }
-}
-Feature.add {
- tag :gcc64
- name "GNU C++ in 64-bit mode"
- options ["GCC64"]
- test proc {
- c_test %{
- #include <stdio.h>
- #include <stdlib.h>
- #include <cstddef>
- #define T(a) printf("%s:%ld; ",#a,(long)sizeof(a));
- int main () {
- T(void *)T(ptrdiff_t)T(off_t)T(size_t)puts("");
- T(char)T(short)T(int)T(long)T(long long)puts("");
- T(float)T(double)puts("");
- return !( sizeof(void*)==8 );
- }}
- }
-}
-
-#----------------------------------------------------------------#
-
-Feature.add {
- tag :libc_stack_end
- name "Stack end defined by LibC"
- status :disabled
- test proc { c_test '
- #include <stdio.h>
- extern void *__libc_stack_end;
- int main () {
- printf("#define STACK_END 0x%0*lx",sizeof(long)*2,__libc_stack_end);
- return 0;
- }
- ', uses_bridge_so }
- defines :HAVE_LIBC_STACK_END
- defines :STACK_END => proc {
- m = /STACK_END\s+(.*)/.match(File.popen("tmp/#{$$}","r"){|f| f.read })
- m[1]
- }
-}
-Feature.add {
- tag :segv_stack_end
- name "Stack end probed"
- test proc { c_test %`
- /* the segfault trick (by Mathieu Bouchard) */
- #ifndef STACK_GROW_DIRECTION
- #define STACK_GROW_DIRECTION -1
- #endif
- #include <stdio.h>
- #include <signal.h>
- #include <setjmp.h>
- static volatile long bogus = 0; // to force *bp to be read in memory
- static sigjmp_buf rescue_segfault;
- static void trap_segfault (int patate) { siglongjmp(rescue_segfault,11); }
- int main () {
- // get any stack address
- volatile long * volatile bp = (volatile long *)&bp;
- void (*oldsegv)(int) = signal(SIGSEGV,trap_segfault);
- void (*oldbus)(int) = signal(SIGBUS, trap_segfault);
- if (!sigsetjmp(rescue_segfault,0)) for (;;bp-=STACK_GROW_DIRECTION) bogus += *bp;
- printf("#define STACK_END 0x%0*lx\\n",sizeof(long)*2,(long)(bp+STACK_GROW_DIRECTION));
- return 0;
- }
- `, uses_bridge_so }
- defines :HAVE_LIBC_STACK_END
- defines :STACK_END => proc {
- m = /STACK_END\s+(.*)/.match(File.popen("tmp/#{$$}","r"){|f| f.read })
- m[1]
- }
-}
-Feature.add {
- tag :wild_stack_end
- name "Stack end wild guess"
- unless_feature [:libc_stack_end,:segv_stack_end]
- test proc { c_test '
- #include <stdio.h>
- int main () {
- void *bp;
- printf("#define STACK_END 0x%0*lx",sizeof(long)*2,(long)&bp);
- return 0;
- }
- ', uses_bridge_so }
- defines :STACK_END => proc {
- m = /STACK_END\s+(.*)/.match(File.popen("tmp/#{$$}","r"){|f| f.read })
- m[1]
- }
-}
-Feature.add {
- tag :libruby
- name "Ruby as a dynamic library"
- uses_bridge_so ["-lruby"]
- #uses_h ["ruby.h"] # is in special directory
- test proc { c_test "#include <ruby.h>
- int main () { return rb_rescue==0; }", uses_bridge_so }
-}
-Feature.add {
- tag :librubystatic
- unless_feature [:libruby]
- name "Ruby as a static library"
- #uses_h ["ruby.h"] # is in special directory
- uses_bridge_so {
- lib = " #{$LIBRUBY_A} #{CONFIG['LIBS']} "
- lib = "-Wl,--whole-archive"+lib+"-Wl,--no-whole-archive" unless OSX
- [lib]
- }
- test proc { c_test "#include <ruby.h>
- int main () { return rb_rescue==0; }",
- ["-xnone", $LIBRUBY_A, *(CONFIG['LIBS'].split)] }
- options ["HAVE_STATIC_RUBY"] #!@#$ useless?
-}
-#----------------------------------------------------------------#
-Feature.add {
- tag :pentium
- name "Pentium-compatible CPU"
- action proc { $conf[:DEFINES][:CPU] ||= "pentium" }
- test proc {
- (CONFIG["arch"] =~ /(i\d86|x86_64)/) or raise "#{CONFIG["arch"]} instead"
- c_test '
- #include <stdio.h>
- char get_cpuid[]={
- 96,49,192,15,162,139,124,36,36,137,31,
- 137,87,4,137,79,8,137,71,12,97,195};
- main() {
- char result[16];
- int code;
- ((void(*)(char*))get_cpuid)(result);
- code = ((int*)result)[3];
- result[12]=0;
- fprintf(stderr,"cpuid: name=\"%12s\", flags=0x%08x\n",
- result,code);
- return 0;}'
- }
- options ["HAVE_PENTIUM"]
-}
-Feature.add {
- tag :mmx
- uses_feature [:pentium]
- uses_o ["cpu/mmx.o","cpu/mmx_loader.o"]
- name "MMX-compatible CPU (using NASM)"
- test proc {
- asm_test '
- global main
- extern exit
- align 16
- SECTION .data
- foo: dd 42,0
- SECTION .text
- main:
- lea esi,[foo]
- movq mm0,qword[esi]
- paddd mm0,qword[esi]
- movq qword [esi],mm0
- emms
- cmp dword [foo], 84
- je yes
- push long 1
- call exit
- yes:
- push long 0
- call exit
- ', '-lc'
- }
- options ["HAVE_MMX"]
-}
-Feature.add {
- tag :simd
- uses_feature [:pentium]
- name "SIMD (MMX/SSE/Altivec) (using GCC)"
- test proc {
- c_test '
- #include <stdio.h>
- typedef int v8qi __attribute__ ((mode(V8QI)));
- union vv8qi { v8qi v; char c[8]; };
- int main () { return 0; }',nil,["-mmmx"]
- }
- options ["HAVE_SIMD"]
-}
-Feature.add {
- tag :profiler
- name "profiler (speed measurements)"
- uses_feature [:pentium]
- options ["HAVE_TSC_PROFILING"]
-}
-#----------------------------------------------------------------#
-Feature.add {
- tag :usb
- name "USB Library"
- uses_h ["usb.h"]
- uses_o ["optional/usb.o"]
- uses_so ["-lusb"]
- test proc {
- c_test "
- #include#
- int main () {return usb_open==0 || usb_get_busses==0;}
- "
- }
- options ["HAVE_USB"]
-}
-#----------------------------------------------------------------#
-Feature.add {
- tag :ieee1394
- name "IEEE1394 Libraries for Linux (raw1394/dc1394)"
- status :disabled
- uses_o ["optional/ieee1394.o"]
- uses_so ["-lraw1394","-ldc1394_control"]
- uses_h ["libraw1394/raw1394.h","libdc1394/dc1394_control.h"]
- test proc {
- c_test "
- #include#
- int main () {return raw1394_get_libversion==0 || dc1394_get_camera_info==0;}
- "
- }
- options ["HAVE_1394"]
- uses_o ["format/dc1394.o"]
-}
-Feature.add {
- tag :x11
- name "X11 Display Protocol"
- uses_so $LIBX11
- uses_h ["X11/Xlib.h"]
- test proc {
- c_test "
- #include#
- int main () {return XSetErrorHandler==0;}
- "
- }
- uses_o ["format/x11.o"]
-}
-Feature.add {
- tag :x11_shm
- name "X11 acceleration by shared memory (XSHM plugin)"
- uses_feature [:x11]
- uses_so $LIBX11+["-lXext"]
- uses_h ["X11/Xlib.h","sys/shm.h","X11/extensions/XShm.h"]
- test proc {
- c_test "
- #include#
- #include <X11/Xutil.h>
- #include <X11/StringDefs.h>
- #include <sys/ipc.h>
- int main () {return XShmPutImage==0;}
- "
- }
- options ["HAVE_X11_SHARED_MEMORY"]
-}
-Feature.add {
- tag :x11_xv
- status :disabled
- name "X11 acceleration (XVIDEO plugin)"
- uses_feature [:x11]
- uses_so $LIBX11+["-lXext","-lXv"]
- uses_h ["X11/Xlib.h","X11/extensions/Xv.h"]
- test proc {
- c_test "
- #include#
- int main () {return 0;}
- "
- }
- options ["HAVE_X11_XVIDEO"]
-}
-Feature.add {
- tag :opengl
- name "OpenGL (only as framebuffer)"
- uses_so $LIBX11DIR+["-lglut","-lGL","-lGLU"]
- uses_h ["GL/gl.h","GL/glu.h","GL/glut.h"]
- test proc {
- c_test "
- #include#
- int main () {return glutInit==0;}
- "
- }
- uses_o ["format/opengl.o"]
-}
-Feature.add {
- tag :sdl
- name "Simple Directmedia Layer (experimental support)"
- uses_so {
- a=["-lSDL","-lpthread"]
- a<<"-lobjc" if OSX
- a
- }
- uses_h ["SDL/SDL.h"]
- test proc {
- c_test "
- #include#
- int main () {return SDL_MapRGB==0;}
- "
- }
- uses_o ["format/sdl.o"]
-}
-Feature.add {
- tag :objcpp
- name "GNU/Apple ObjectiveC++ Compiler"
- uses_h ["objc/Object.h"]
- uses_so ["-lobjc"]
- test proc {
- c_test "
- #include#
- int main () { [[Object alloc] init]; }
- ", nil, ["-xobjective-c++"]
- }
-}
-Feature.add {
- tag :quartz
- name "Apple Quartz/Cocoa Display"
- uses_so ["-lobjc",["-framework","Cocoa"]]
- uses_feature [:objcpp]
- uses_h ["objc/Object.h","Cocoa/Cocoa.h"]
- test proc {
- c_test "
- #include#
- int main () {return CGImageRelease==0;}
- ", nil, ["-xobjective-c++"]
- }
- uses_o ["format/quartz.o"]
-}
-Feature.add {
- tag :aalib
- name "Ascii Art Library"
- uses_so ["-laa"]
- uses_h ["aalib.h"]
- test proc {
- c_test "
- #define aa_hardwareparams aa_hardware_params
- extern \"C\" {
- #include#
- };
- int main () {return aa_init==0;}
- "
- }
- uses_o ["format/aalib.o"]
-}
-Feature.add {
- tag :jpeg
- name "JPEG Library"
- uses_so ["-ljpeg"]
- uses_h ["jpeglib.h"]
- test proc {
- c_test "
- extern \"C\" {
- #include <stdio.h>
- #include#
- };
- int main () {
- return jpeg_write_scanlines==0;}
- "
- }
- uses_o ["format/jpeg.o"]
-}
-Feature.add {
- tag :png
- name "PNG Library"
- uses_so ["-lpng","-lz"]
- uses_h Or[["libpng12/png.h"],["png.h"]]
- test proc {|f|
- f.c_test %`
- extern "C" {
- #include <stdio.h>
- #include#
- };
- int main () {
- #define T(a) printf("%s:%d; ",#a,sizeof(a));
- T(png_uint_32)T(long)puts("");
- if (!png_check_sig) return 1;
- return 0;}
- `
- }
- uses_o ["format/png.o"]
-}
-#------------------------------------------------#
-Feature.add {
- tag :videodev
- name "Video4linux Digitizer Driver Interface"
- uses_h ["linux/videodev.h"]
- test proc {
- c_test "
- #include <stdlib.h>
- #include#
- int main () { struct video_window foo; return 0; }"
- }
- uses_o ["format/videodev.o"]
-}
-Feature.add {
- tag :mpeg3
- name "HeroineWarrior LibMPEG3"
- uses_so $LIBX11DIR+["-lmpeg3","-lpthread","-lm"]
- uses_h Or["libmpeg3/libmpeg3.h","libmpeg3.h"]
- test proc {|f|
- f.c_test "
- #include#
- int main () { return mpeg3_open==0; }
- "
- }
- uses_o ["format/mpeg3.o"]
-}
-Feature.add {
- tag :quicktimeapple
- name "Apple's QuickTime"
- uses_so [["-framework","Quicktime"]]
- uses_h ["Quicktime/quicktime.h","Quicktime/movies.h"]
- test proc {
- c_test "
- #include#
- int main () { return EnterMovies==0; }
- "
- }
- uses_o ["format/quicktimeapple.o"]
-}
-Feature.add {
- tag :quicktimehw
- unless_feature :quicktimeapple
- name "Plaum's LibQuickTime"
- uses_so Or[
- ["-lquicktime","-lpthread","-lpng","-ldl","-lglib","-lz"],
- ["-lquicktime","-lpthread","-lpng","-ldl","-lglib-1.2","-lz"]]
- f = ["quicktime.h","colormodels.h","lqt.h","lqt_version.h","lqt_codecinfo.h"]
- uses_h Or[
- f.map{|x| "quicktime/"+x },
- f.map{|x| "lqt/"+x }]
- test proc {|f|
- f.c_test %`
- #include <stdio.h>
- #include#
- int main () {
- fprintf(stderr,"LQT_VERSION = %s\\n",
- #ifdef LQT_VERSION
- LQT_VERSION
- #else
- "(undefined)"
- #endif
- ); return quicktime_open==0; }
- `
- }
- uses_o ["format/quicktimehw.o"]
-}
-Feature.add {
- tag :xine
- name "Xine movie decoder"
- uses_so ["-lxine"]
- uses_h ["xine.h"]
- status :disabled
- test proc {|f|
- f.c_test %`
- #include <stdio.h>
- #include#
- int main () {
- fprintf(stderr,"Xine version = %d.%d.%d (%s)\\n",
- XINE_MAJOR_VERSION, XINE_MINOR_VERSION,
- XINE_SUB_VERSION, XINE_VERSION);
- return xine_new==0; }`
- }
- uses_o ["format/xine.o"]
-}
-#Feature.add {
-# tag :example
-# name "example (example file optional/example.c)"
-# uses_o ["optional/example.o"]
-# test proc {|f|
-# c_test %`
-# #include <stdio.h>
-# int main () {
-# return 0 /* 0=ok, nonzero=bad */; }`
-# }
-#}
-#----------------------------------------------------------------#
-Feature.add {
- tag :puredata
- name "Miller Puckette's Pure Data"
- uses_feature [Or[:libruby,:librubystatic]]
- options ["HAVE_PUREDATA"]
- defines {
- path = $C_INCLUDE_PATH.find {|x| File.exist?(x+"/m_pd.h")}
- m = /PD_VERSION_INT\s+(.*)/.match(File.popen("tmp/#{$$}","r"){|f| f.read })
- {:PUREDATA_PATH => File.dirname(path)+"/lib/pd", :PD_VERSION_INT => m[1].to_i}
- }
- uses_h ["m_pd.h"]
- test proc {
- c_test %`
- #include#
- #include <stdio.h>
- int main () {
- printf("#define PD_VERSION_INT %d\\n",
- #ifdef PD_MAJOR_VERSION
- (int)(PD_MAJOR_VERSION*100+PD_MINOR_VERSION));
- #else
- (int)(PD_VERSION*100));
- #endif
- return 0;
- }
- `
- }
-}
-#--------------------------------#
-Feature.add {
- tag :gem
- name "PureData GEM (source code)"
-# uses_h [$conf[:DEFINES][:GEM_SOURCE]+"/src/Base/GemBase.h"]
- uses_feature [:puredata]
- uses_o ["optional/gem.o"]
- test proc {
- # hack
- $C_INCLUDE_PATH.unshift $conf[:DEFINES][ :GEM_SOURCE]
- $CFLAGS += " -I"+$conf[:DEFINES][ :GEM_SOURCE]
- c_test %`
- #include "Base/GemBase.h"
- int main () {
- return 0;
- }
- `
- }
-}
-#--------------------------------#
-
-$features_h = {}
-$features.each {|f| $features_h[f.tag]=f }
-
-
-def usage
- log = ""
- log << "usage: ./configure "
- log << "[--use-compiler compiler] [--use-compiler-option option]* "
- log << "[--use-cpu cpu] [--lite] [--debug] [--debug-harder]"
- log << "[--ruby-prefix directory] [--gem-source directory]"
- # [--puredata-prefix directory] "
- $features_h.keys.map {|k| k.to_s }.sort.each {|k| log << "[--no-#{k}] " }
- $features_h.keys.map {|k| k.to_s }.sort.each {|k| log << "[--force-#{k}] " }
- puts
- while log.length>0 do puts log.slice!(/^.{1,70} /) end
-end
-
-while ARGV.length>0 do
- arg=ARGV.shift
- case arg
- when /=/
- i=arg.index '='
- ARGV.unshift arg[0..i-1], arg[i+1..-1]
- when /^--no-/
- name = arg[5..-1].intern
- puts "there is no feature called #{name}" if not $features_h[name]
- puts "--no: won't check for feature #{name}"
- $features_h.delete name
- when /^--force-/
- name = arg[8..-1].intern
- puts "there is no feature called #{name}" if not $features_h[name]
- puts "--force: assuming #{name} is there"
- $features_h[name].test nil
- when "--static" # experimental
- $conf[:STATIC]=true
- $conf[:LDSOFLAGS] << "-static"
-# ARGV.unshift "--no-libruby"
- when "--debug"
- puts "Debug Mode (more error checking; less speed)"
- $conf[:OPTIONS].push :HAVE_DEBUG
- $CFLAGS += " -fno-inline"
- when "--debug-harder"
- puts "Debug Harder Mode (even more error checking; even less speed)"
- $conf[:OPTIONS].push :HAVE_DEBUG
- $conf[:OPTIONS].push :HAVE_DEBUG_HARDER
- $CFLAGS += " -fno-inline"
- when "--lite"
- puts "Lite Mode (no float, no int64)"
- $conf[:OPTIONS].push :HAVE_LITE
- when "--help"; usage; exit 0
-
- when "--prefix", "--ruby-prefix" : $conf[:DEFINES][:RUBY_PREFIX]=ARGV.shift
- when "--pd-prefix", "--puredata-prefix": $conf[:DEFINES][ :PD_PREFIX]=ARGV.shift
- when "--gem-source" : $conf[:DEFINES][ :GEM_SOURCE]=ARGV.shift
-
- when "--use-compiler"
- $conf[:CC] = ARGV.shift
- when "--use-compiler-option"
- $CFLAGS += " "+ARGV.shift
- when "--use-cpu"
- $conf[:DEFINES][:CPU] = ARGV.shift
- when "--verbose"
- $verbose=true
- when "--bindir"
- $conf[:BINDIR] = ARGV.shift
- else puts "unknown option \"#{arg}\""; usage; exit 1
- end
-end
-
-# the ||= lines are patches for old versions of ruby.
-CONFIG["ruby_version"] ||= "$(MAJOR).$(MINOR)"
-CONFIG["rubylibdir"] ||= "$(libdir)/ruby/$(ruby_version)"
-CONFIG["archdir"] ||= CONFIG["rubylibdir"] + "/" + CONFIG["arch"]
-$CFLAGS += " -I" + (make_expand CONFIG["archdir"])
-
-#--------------------------------#
-
-DUAL = Object.new
-DUAL.instance_eval {
- def self.print x
- LOG .puts x; LOG .flush
- STDERR.print x; STDERR.flush
- end
- def self.puts x
- self.print x+"\n"
- end
-}
-
-def try feature
-
- if Or===feature.uses_so
- k=1
- feature.uses_so.a.each {|i|
- e=feature.dup; e.uses_so i; e.name(e.name+" (try \##{k})")
- r=try e; return r if r
- k+=1
- }
- return false
- end
- if Or===feature.uses_h
- feature.uses_h.a.each {|i|
- e=feature.dup; e.uses_h i; e.name(e.name+" <#{i.to_a[0]}>")
- r=try e; return r if r
- }
- return false
- end
- LOG.puts "", "-"*64
- line = "[#{feature.tag}] #{feature.name}: "
- DUAL.print Light + "[#{Yellow}#{feature.tag}#{Light}] #{feature.name}: "
- arrow = "-"*([78-line.length,0].max)+ "> "
- #DUAL.print Dark + arrow +Red
- (feature.uses_feature||[]).find {|f|
- if not (
- if Or===f then f.a.find {|x| $conf[:FEATURES][x] } else $conf[:FEATURES][f] end
- ) then
- DUAL.puts Red+arrow+"disabled (would need #{f})"
- return
- end
- }
- if feature.status==:disabled then DUAL.puts Dark+arrow+"disabled (by author)"; return end
- if not $features_h[feature.tag] then DUAL.puts Dark+arrow+"disabled (by user)"; return end
- fu = feature.unless_feature || []
- fu = [fu] if not Array===fu
- for f in fu || [] do
- if $conf[:FEATURES][f] then
- DUAL.puts Dark+arrow+"disabled (using #{f} instead)"
- return
- end
- end
-
- if feature.test
- begin
- tresult = feature.test.call(feature)
- rescue StandardError => e
- end
- if tresult
- DUAL.puts Green+arrow+"found "+(if tresult!=true
- then " (#{tresult})"
- else "" end)
- if tresult == "static"
- feature.uses_so.map! {|x|
- "-Wl,--whole-archive #{x} -Wl,--no-whole-archive"
- } if feature.uses_so
- feature.uses_bridge_so.map! {|x|
- "-Wl,--whole-archive #{x} -Wl,--no-whole-archive"
- } if feature.uses_bridge_so
- end
- else
- DUAL.puts Red+arrow+"missing "+(if e
- then (if $verbose
- then "(#{e} @ #{e.backtrace.join', '})"
- else "(#{e})" end)
- else "(return false)" end)
- if e
- LOG.puts e.inspect
- LOG.puts e.backtrace
- end
- return false
- end
- else
- puts Green+arrow+"enabled"
- $conf[:FEATURES][feature.tag] = feature
- feature.action.call if feature.action
- end
- feature.action.call if feature.action
- $conf[:FEATURES][feature.tag] = feature
- $conf[:LDSOFLAGS].concat(feature.uses_so||[])
- $conf[:BRIDGE_LDFLAGS].concat(feature.uses_bridge_so||[])
- $conf[:OBJS].concat(feature.uses_o||[])
- $conf[:OPTIONS].concat(feature.options||[])
- for k,v in feature.defines||{} do
- $conf[:DEFINES][k]=(if Proc===v then v[] else v end)
- end
- true
-end
-
-DUAL.puts "This is the GridFlow 0.8.1 configurator within Ruby version #{RUBY_VERSION}"
-
-begin
- $features.each {|feature| try feature }
-ensure
- #!@#$ note: see END{} (duplication)
- system "/bin/rm -f tmp/#{$$} tmp/#{$$}.c tmp/#{$$}.o tmp/#{$$}.asm"
-end
-
-puts Light
-
-$conf[:LDSOFLAGS].uniq!
-$conf[:BRIDGE_LDFLAGS].uniq!
-
-$CFLAGS += " -falign-functions=16" if $conf[:FEATURES][:gcc3]
-
-#if not $conf[:FEATURES][:gcc3]
-# puts "You should install gcc 3.x; gcc 2.9.x is no longer supported"
-# puts "(you might use --force-gcc3 to pretend at your own risk)"
-# exit 1
-#end
-
-#--------------------------------#
-
-LOG.puts "-"*64
-for z in [:BRIDGE_LDFLAGS, :LDSOFLAGS, :OPTIONS, :DEFINES, :OBJS] do
- LOG.puts "#{z}: #{$conf[z].inspect}"
-end
-LOG.puts "-"*64
-RUBY = "$(RUBY_INSTALL_NAME)"
-
-def my_install_files(f,base,entries,obase="$(sitelibdir)/gridflow/#{base}")
- entries.each {|type,name,*rest|
- if Array===name then name,oname=name else oname=name end
- case type
- when :ruby
- f.puts "\t$(INSTALL_DATA) #{base+name} #{obase}/#{oname}"
- when :directory
- if oname[0,1]!="/" then oname="#{obase}/#{oname}" end
- f.puts "\t$(INSTALL_DIR) #{oname}"
- my_install_files(f,base+name,rest,oname)
- end
- }
-end
-
-def my_uninstall_files(f,base,entries,obase="$(sitelibdir)/gridflow/#{base}")
- entries.each {|type,name,*rest|
- if Array===name then name,oname=name else oname=name end
- case type
- when :ruby
- f.puts "\trm #{obase}/#{oname}"
- when :directory
- my_uninstall_files(f,base+name,rest)
- end
- }
-end
-
-def make_makefile f
- puts ""
- f.puts "RUBY = #{RUBY}"
- f.puts "ruby-all::", ""
- f.puts "ruby-install::"
- my_install_files(f,"",FILES)
- f.puts "\tcp bin/jmax2pd $(gfbindir); chmod 755 $(gfbindir)/jmax2pd\n"
- f.puts
- f.puts "ruby-uninstall::"
- my_uninstall_files(f,"",FILES)
- f.puts
-end
-
-puts "generating ./config.make"
-
-File.open("./config.make","w") {|f| f.puts "
-
-RUBYARCH=#{CONFIG['arch']}
-"
-
-f.puts "BRIDGE_LDFLAGS = " + $conf[:BRIDGE_LDFLAGS].flatten.join(" ") + " " + $LDFLAGS
-
-if OSX then
- f.puts "BRIDGE_LDFLAGS += -bundle -flat_namespace"
-else
- f.puts "BRIDGE_LDFLAGS += -rdynamic -shared"
-end
-$CFLAGS += " -mtune=$(CPU)" if $conf[:DEFINES][:CPU]
-$CFLAGS += " -march=$(CPU)" if $conf[:DEFINES][:CPU]
-#$CFLAGS += " -fforce-addr"
-#$CFLAGS += " -fprefetch-loop-arrays"
-#$CFLAGS += " -falign-jumps=4"
-#$CFLAGS += " -falign-loops=4"
-$CFLAGS += " -DMACOSX" if OSX
-f.puts "CFLAGS += " + $CFLAGS
-
-for k in $conf[:OPTIONS] do f.puts "#{k}=yes" end
-for k,v in $conf[:DEFINES] do f.puts "#{k}=#{v}" end
-
-$sources = %w(
-base/grid.c base/main.c base/number.c base/bitpacking.c
-base/flow_objects.c
-base/flow_objects_for_image.c
-base/flow_objects_for_matrix.c
-)
-
-#for o in $conf[:OBJS] do
-# o=o.downcase.chomp(".o")
-# x = o.downcase+".c"
-# x = o.downcase+".m" if not File.exist?(x)
-# #raise "woops, missing file #{o.downcase}.*" if not File.exist?(x) and
-# # o!="cpu/mmx"
-# $sources << x
-#end
-
-f.puts "SOURCES = #{$sources.join(" ")} \\"
-f.puts ""
-} # end open config.make
-
-#--------------------------------#
-puts "generating config.h"
-File.open("config.h","w") {|f| f.puts "
-\#ifndef __CONFIG_H
-\#define __CONFIG_H
-/* this file was auto-generated by gridflow/configure */
-
-"
-f.puts "#define STARTUP_LIST(PRE) \\"
-f.puts $conf[:OBJS].map {|o| "PRE startup_#{File.basename(o,'.o')}();" }.join("\\\n")
-for k in $conf[:OPTIONS] do f.puts "\#define #{k}" end
-for k,v in $conf[:DEFINES] do f.puts "\#define #{k} "+v.inspect end
-
-def include_here(f,a,b)
- return unless $conf[:FEATURES][b]
- f.puts "\#ifdef #{a}_INCLUDE_HERE"
- for inc in $conf[:FEATURES][b].uses_h.to_a do
- f.puts "\#include <#{inc}>"
- end
- f.puts "\#endif"
-end
-
-include_here f,"LIBMPEG", :mpeg3
-include_here f,"QUICKTIMEHW",:quicktimehw
-
-f.puts "
-\#define RUBY_BINDIR #{make_expand(CONFIG['bindir']).inspect}
-\#endif /* __CONFIG_H */"
-}
-
-#--------------------------------#
-#puts "generating config.rb"
-#File.open("config.rb","w") {|f| f.puts %{
-#\# this file was auto-generated by gridflow/configure
-#}}
-#----------------------------------------------------------------#
-# Some fairly nontrivial abuse of black magic.
-
-$LOCAL_LIBS = $conf[:LDSOFLAGS].flatten.join(" ")
-
-$objs = $sources.collect{|i| i.sub(/.[cm]$/,".o") }
-$objs[$objs.index("base/number.o"),1] = (1..3).map {|i| "base/number.#{i}.o" }
-dir_config("gridflow")
-create_makefile("gridflow")
-mf = File.readlines("Makefile").join""
-
-common_deps1 = "$(COMMON_DEPS)"
-common_deps2 = common_deps1 + " base/grid.h.fcs"
-
-mf.sub!(/^.c.o:\s*\n\t(.*)\n/) {
- comp=$1
- comp.sub!(/\(CC\)/,'(CXX)')
- comp << " -o $@" if not comp =~ /-o\s*\$@/
- comp2 = comp.gsub /-c/,'-xobjective-c++ -c'
-
- "%.h.fcs: %.h #{common_deps1}\n\truby -w base/source_filter.rb $< $@\n\n"+
- "%.c.fcs: %.c #{common_deps2}\n\truby -w base/source_filter.rb $< $@\n\n"+
- "%.m.fcs: %.m #{common_deps2}\n\truby -w base/source_filter.rb $< $@\n\n"+
- "%.o: %.c.fcs #{common_deps2}\n\t#{comp}\n"+
- "%.1.o: %.c.fcs #{common_deps2}\n\t#{comp.gsub /-c/,'-DPASS1 -c'}\n"+
- "%.2.o: %.c.fcs #{common_deps2}\n\t#{comp.gsub /-c/,'-DPASS2 -c'}\n"+
- "%.3.o: %.c.fcs #{common_deps2}\n\t#{comp.gsub /-c/,'-DPASS3 -c'}\n"+
- "%.o: %.m.fcs #{common_deps2}\n\t#{comp2}\n"
-}
-mf.gsub!(/^.SUFFIXES:.*$/, ".SUFFIXES:\n\n") or mf<<".SUFFIXES:\n\n"
-mf << ".PRECIOUS: %.h.fcs %.c.fcs %.m.fcs\n"
-mf.gsub! /DESTDIR/, 'RUBYDESTDIR'
-mf.gsub! /\*\.o/, "*.o */*.o"
-
-# GAAAH!!!
-if RUBY_VERSION >= "1.8" then
- mf.gsub!(/^((site-)?install:.*)/) {$1+" $(RUBYARCHDIR)/$(DLLIB) install2"}
-else
- mf.gsub!(/^((site-)?install:.*)/) {$1+" install2"}
-end
-
-mf.gsub!(/^install:.*/) {"install:site-install"} # should i keep this line?
-mf.sub!(/^all:(.*)$/) { "all: #{$1} all2" }
-mf.sub! /^clean:/,"clean: clean2 "
-mf.sub! /CC = gcc\n/, "CC = gcc\nCXX = #{$conf[:CC]}\n"
-mf.sub! /^(OBJS = .*)$/, "\\1 #{$conf[:OBJS].join' '}"
-mf[0,0] = "COMMON_DEPS = config.make Makefile Makefile.gf base/source_filter.rb\n"+
- "gfbindir = #{$conf[:BINDIR]}\n"
-mf.sub!(/^site-install:\s*install/,"site-install: ")
-
-rp=$conf[:DEFINES][:RUBY_PREFIX]
-if rp
- mf.sub! /^prefix\s*=.*$/, "prefix = " + make_expand(rp)
- mf.sub! /^sitedir\s*=.*$/, "sitedir = " + make_expand(rp)
-end
-
-mf.sub! /^LDSHARED = g?cc/, "LDSHARED = $(CXX)"
-# Adam Lindsay's Mac attempts.
-mf.sub! /-no-precomp/, "-no-cpp-precomp"
-# for proper operation on Cygwin
-mf.sub! /--driver-name=gcc/, "--driver-name=#{$conf[:CC]}"
-# remove gcc3.2 warning about -I/usr/include
-mf.sub!(/^CPPFLAGS = (.*)$/) {
- cpp = "CPPFLAGS = " +
- make_expand($1).sub(%r"-I\s*/usr/include","")
-}
-
-f = File.open("Makefile","w")
-f.puts "include config.make"
-f.puts mf
-f.puts "include Makefile.gf"
-make_makefile f
-f.close
-
-#--------------------------------#
-
-puts "delegating to: devices4ruby/extconf.rb"
-r=$conf[:DEFINES][:RUBY_PREFIX]
-a=[]
-a<<"--prefix"<<r if r
-Dir.chdir "devices4ruby"
-system "/usr/bin/env", "ruby", "extconf.rb", *a
-Dir.chdir ".."
-puts "(back)"
-
-#--------------------------------#
-
-puts "",
-"\e[1mSee ./config.log if you want the details of the configuration tests.\e[0m",
-"\e[1mIf you are satisfied with that configuration, you may go on,\e[0m",
-"\e[1m and do \"make\" and then \"make install\".\e[0m",
-"\e[1mIf you get stuck, you could contact the author about it,\e[0m",
-"\e[1m but first make sure you read \"doc/install.html\". \e[0m",
-""
-
-#--------------------------------#
-
-END {
- system "/bin/rm -f tmp/#{$$} tmp/#{$$}.c tmp/#{$$}.o tmp/#{$$}.asm"
-}