opengl 0.7.0.pre1-x86-mingw32 → 0.7.0.pre2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. data/.autotest +29 -0
  2. data/.gitignore +5 -8
  3. data/History.rdoc +33 -0
  4. data/Manifest.txt +72 -57
  5. data/README.rdoc +72 -25
  6. data/Rakefile +60 -72
  7. data/Rakefile.cross +5 -2
  8. data/{doc → docs}/build_install.txt +0 -0
  9. data/{doc → docs}/extensions.txt.in +0 -0
  10. data/{doc → docs}/history.txt +0 -0
  11. data/{doc → docs}/requirements_and_design.txt +0 -0
  12. data/{doc → docs}/roadmap.txt +0 -0
  13. data/{doc → docs}/scientific_use.txt +0 -0
  14. data/{doc → docs}/supplies/page_template.html +0 -0
  15. data/{doc → docs}/thanks.txt +0 -0
  16. data/{doc → docs}/tutorial.txt +0 -0
  17. data/examples/NeHe/NeHe.png +0 -0
  18. data/examples/NeHe/crate.png +0 -0
  19. data/examples/NeHe/glass.png +0 -0
  20. data/examples/NeHe/nehe_lesson02.rb +82 -83
  21. data/examples/NeHe/nehe_lesson03.rb +88 -88
  22. data/examples/NeHe/nehe_lesson04.rb +93 -96
  23. data/examples/NeHe/nehe_lesson05.rb +137 -144
  24. data/examples/NeHe/nehe_lesson06.rb +183 -0
  25. data/examples/NeHe/nehe_lesson07.rb +237 -0
  26. data/examples/NeHe/nehe_lesson08.rb +252 -0
  27. data/examples/NeHe/nehe_lesson09.rb +199 -0
  28. data/examples/NeHe/nehe_lesson11.rb +173 -0
  29. data/examples/NeHe/nehe_lesson12.rb +200 -0
  30. data/examples/NeHe/nehe_lesson16.rb +208 -0
  31. data/examples/NeHe/nehe_lesson19.rb +206 -0
  32. data/examples/NeHe/particle.png +0 -0
  33. data/examples/NeHe/star.png +0 -0
  34. data/examples/NeHe/tim.png +0 -0
  35. data/examples/RedBook/light.rb +154 -0
  36. data/examples/misc/OGLBench.rb +2 -2
  37. data/examples/misc/trislam.rb +2 -2
  38. data/ext/{common → opengl}/common.h +2 -11
  39. data/ext/{common → opengl}/conv.h +43 -31
  40. data/ext/{glut → opengl}/extconf.rb +14 -7
  41. data/ext/{common → opengl}/funcdef.h +155 -125
  42. data/ext/{gl → opengl}/gl-1.0-1.1.c +426 -162
  43. data/ext/{gl → opengl}/gl-1.2.c +70 -66
  44. data/ext/{gl → opengl}/gl-1.3.c +19 -19
  45. data/ext/{gl → opengl}/gl-1.4.c +23 -23
  46. data/ext/{gl → opengl}/gl-1.5.c +46 -47
  47. data/ext/{gl → opengl}/gl-2.0.c +66 -60
  48. data/ext/{gl → opengl}/gl-2.1.c +4 -4
  49. data/ext/{gl → opengl}/gl-enums.c +2 -1
  50. data/ext/{common → opengl}/gl-enums.h +0 -0
  51. data/ext/{gl → opengl}/gl-error.c +12 -4
  52. data/ext/{common → opengl}/gl-error.h +7 -2
  53. data/ext/{gl → opengl}/gl-ext-3dfx.c +1 -1
  54. data/ext/{gl → opengl}/gl-ext-arb.c +75 -70
  55. data/ext/{gl → opengl}/gl-ext-ati.c +3 -3
  56. data/ext/{gl → opengl}/gl-ext-ext.c +54 -54
  57. data/ext/{gl → opengl}/gl-ext-gremedy.c +3 -3
  58. data/ext/{gl → opengl}/gl-ext-nv.c +49 -48
  59. data/ext/{common → opengl}/gl-types.h +0 -0
  60. data/ext/{gl → opengl}/gl.c +8 -10
  61. data/ext/{glu → opengl}/glu-enums.c +1 -1
  62. data/ext/{common → opengl}/glu-enums.h +0 -0
  63. data/ext/{glu → opengl}/glu.c +7 -3
  64. data/ext/{glut → opengl}/glut.c +98 -48
  65. data/ext/opengl/opengl.c +11 -0
  66. data/lib/gl.rb +1 -0
  67. data/lib/glu.rb +1 -0
  68. data/lib/glut.rb +1 -0
  69. data/lib/opengl.rb +13 -14
  70. data/lib/opengl/opengl.so +0 -0
  71. data/lib/opengl/test_case.rb +87 -0
  72. data/test/{tc_misc.rb → test_gl.rb} +2 -14
  73. data/test/test_gl_10_11.rb +1363 -0
  74. data/test/test_gl_12.rb +182 -0
  75. data/test/{tc_func_13.rb → test_gl_13.rb} +14 -14
  76. data/test/test_gl_14.rb +221 -0
  77. data/test/test_gl_15.rb +260 -0
  78. data/test/test_gl_20.rb +430 -0
  79. data/test/test_gl_21.rb +553 -0
  80. data/test/test_gl_ext_arb.rb +526 -0
  81. data/test/{tc_ext_ati.rb → test_gl_ext_ati.rb} +11 -14
  82. data/test/test_gl_ext_ext.rb +608 -0
  83. data/test/{tc_ext_gremedy.rb → test_gl_ext_gremedy.rb} +6 -6
  84. data/test/test_gl_ext_nv.rb +352 -0
  85. data/test/test_glu.rb +309 -0
  86. metadata +159 -102
  87. data/History.txt +0 -36
  88. data/ext/gl/extconf.rb +0 -43
  89. data/ext/glu/extconf.rb +0 -51
  90. data/test/README +0 -10
  91. data/test/tc_common.rb +0 -98
  92. data/test/tc_ext_arb.rb +0 -467
  93. data/test/tc_ext_ext.rb +0 -551
  94. data/test/tc_ext_nv.rb +0 -357
  95. data/test/tc_func_10_11.rb +0 -1281
  96. data/test/tc_func_12.rb +0 -186
  97. data/test/tc_func_14.rb +0 -197
  98. data/test/tc_func_15.rb +0 -270
  99. data/test/tc_func_20.rb +0 -346
  100. data/test/tc_func_21.rb +0 -541
  101. data/test/tc_glu.rb +0 -310
  102. data/test/tc_include_gl.rb +0 -35
  103. data/test/tc_require_gl.rb +0 -34
@@ -0,0 +1,29 @@
1
+ require 'autotest/restart'
2
+
3
+ Autotest.add_hook :initialize do |at|
4
+ at.add_exception /\.git/
5
+ at.add_exception /doc/
6
+ at.add_exception /examples/
7
+ at.add_exception /utils/
8
+ at.add_exception /website/
9
+
10
+ at.add_mapping(/^lib\/.*(\.bundle|so|dll)$/) do |filename, match|
11
+ possible = File.basename(filename, match[1])
12
+ at.files_matching %r%^test/test_#{possible}%
13
+ end
14
+
15
+ def at.path_to_classname s
16
+ sep = File::SEPARATOR
17
+ n = s.sub(/^test#{sep}test_(.*)\.rb/, '\1')
18
+ c = if n =~ /^(glu?)_?(.*)/ then
19
+ "#{$1.capitalize}#{$2.split(/_|(\d+)/).map { |seg| seg.capitalize }.join}"
20
+ end
21
+
22
+ "Test#{c}"
23
+ end
24
+ end
25
+
26
+ Autotest.add_hook :run_command do |at|
27
+ at.unit_diff = 'cat'
28
+ system Gem.ruby, Gem.bin_path('rake', 'rake'), 'compile'
29
+ end
data/.gitignore CHANGED
@@ -1,8 +1,5 @@
1
- *.o
2
- *.log
3
- *.bundle
4
- *.so
5
- pkg/
6
-
7
- # generate Rakefiles
8
- ext/*/Rakefile
1
+ *.swp
2
+ /TAGS
3
+ /lib/opengl/opengl.bundle
4
+ /pkg
5
+ /tmp
@@ -0,0 +1,33 @@
1
+ === 0.8 / master HEAD
2
+
3
+ * drop support for Ruby 1.8
4
+
5
+ === 0.60.1 / 2009-02-16
6
+
7
+ * Bugfixes
8
+ * Proper support for ruby 1.9/1.9.1+
9
+ * Updated OpenGL enumerators in preparation for OpenGL 3.0
10
+
11
+ === 0.60.0 / 2008-01-06
12
+
13
+ * Automatic error checking for GL/GLU calls, enabled by default (see
14
+ doc/tutorial)
15
+ * Added support for many more OpenGL extensions
16
+ * Support for Ruby 1.9.0+ (requires mkrf 0.2.3)
17
+ * Ton of bugfixes.
18
+
19
+ * API Changes:
20
+ * Boolean functions/parameters was changed to ruby true/false instead of
21
+ GL_TRUE / GL_FALSE, which remains for compatibility
22
+ * glGet\* functions now returns +x+ instead of <code>[x]</code> when
23
+ returning only one value
24
+ * Functions operating on packed strings (glTexture, glPointer etc.) now
25
+ also accepts ruby arrays directly
26
+ * Matrix handling functions now also accepts instances of Matrix class, or
27
+ any class that can be converted to array
28
+ * glUniform*v and glUniformmatrix*v now does not require 'count'
29
+ parameter, they will calculate it from length of passed array
30
+ * glCallLists needs type specifier (previously was forced to GL_BYTE)
31
+ * On ruby 1.9, glut keyboard callback returns char ("x") instead of integer
32
+ so using 'if key == ?x' works on both 1.8 and 1.9
33
+
@@ -1,25 +1,40 @@
1
+ .autotest
1
2
  .gemtest
2
3
  .gitignore
3
- History.txt
4
+ History.rdoc
4
5
  MIT-LICENSE
5
6
  Manifest.txt
6
7
  README.rdoc
7
8
  Rakefile
8
9
  Rakefile.cross
9
- doc/build_install.txt
10
- doc/extensions.txt.in
11
- doc/history.txt
12
- doc/requirements_and_design.txt
13
- doc/roadmap.txt
14
- doc/scientific_use.txt
15
- doc/supplies/page_template.html
16
- doc/thanks.txt
17
- doc/tutorial.txt
10
+ docs/build_install.txt
11
+ docs/extensions.txt.in
12
+ docs/history.txt
13
+ docs/requirements_and_design.txt
14
+ docs/roadmap.txt
15
+ docs/scientific_use.txt
16
+ docs/supplies/page_template.html
17
+ docs/thanks.txt
18
+ docs/tutorial.txt
19
+ examples/NeHe/NeHe.png
20
+ examples/NeHe/crate.png
21
+ examples/NeHe/glass.png
18
22
  examples/NeHe/nehe_lesson02.rb
19
23
  examples/NeHe/nehe_lesson03.rb
20
24
  examples/NeHe/nehe_lesson04.rb
21
25
  examples/NeHe/nehe_lesson05.rb
26
+ examples/NeHe/nehe_lesson06.rb
27
+ examples/NeHe/nehe_lesson07.rb
28
+ examples/NeHe/nehe_lesson08.rb
29
+ examples/NeHe/nehe_lesson09.rb
30
+ examples/NeHe/nehe_lesson11.rb
31
+ examples/NeHe/nehe_lesson12.rb
32
+ examples/NeHe/nehe_lesson16.rb
33
+ examples/NeHe/nehe_lesson19.rb
22
34
  examples/NeHe/nehe_lesson36.rb
35
+ examples/NeHe/particle.png
36
+ examples/NeHe/star.png
37
+ examples/NeHe/tim.png
23
38
  examples/OrangeBook/3Dlabs-License.txt
24
39
  examples/OrangeBook/brick.frag
25
40
  examples/OrangeBook/brick.rb
@@ -50,6 +65,7 @@ examples/RedBook/font.rb
50
65
  examples/RedBook/hello.rb
51
66
  examples/RedBook/image.rb
52
67
  examples/RedBook/jitter.rb
68
+ examples/RedBook/light.rb
53
69
  examples/RedBook/lines.rb
54
70
  examples/RedBook/list.rb
55
71
  examples/RedBook/material.rb
@@ -82,54 +98,53 @@ examples/misc/plane.rb
82
98
  examples/misc/readpixel.rb
83
99
  examples/misc/sdltest.rb
84
100
  examples/misc/trislam.rb
85
- ext/common/common.h
86
- ext/common/conv.h
87
- ext/common/funcdef.h
88
- ext/common/gl-enums.h
89
- ext/common/gl-error.h
90
- ext/common/gl-types.h
91
- ext/common/glu-enums.h
92
- ext/gl/extconf.rb
93
- ext/gl/gl-1.0-1.1.c
94
- ext/gl/gl-1.2.c
95
- ext/gl/gl-1.3.c
96
- ext/gl/gl-1.4.c
97
- ext/gl/gl-1.5.c
98
- ext/gl/gl-2.0.c
99
- ext/gl/gl-2.1.c
100
- ext/gl/gl-enums.c
101
- ext/gl/gl-error.c
102
- ext/gl/gl-ext-3dfx.c
103
- ext/gl/gl-ext-arb.c
104
- ext/gl/gl-ext-ati.c
105
- ext/gl/gl-ext-ext.c
106
- ext/gl/gl-ext-gremedy.c
107
- ext/gl/gl-ext-nv.c
108
- ext/gl/gl.c
109
- ext/glu/extconf.rb
110
- ext/glu/glu-enums.c
111
- ext/glu/glu.c
112
- ext/glut/extconf.rb
113
- ext/glut/glut.c
101
+ ext/opengl/common.h
102
+ ext/opengl/conv.h
103
+ ext/opengl/extconf.rb
104
+ ext/opengl/funcdef.h
105
+ ext/opengl/gl-1.0-1.1.c
106
+ ext/opengl/gl-1.2.c
107
+ ext/opengl/gl-1.3.c
108
+ ext/opengl/gl-1.4.c
109
+ ext/opengl/gl-1.5.c
110
+ ext/opengl/gl-2.0.c
111
+ ext/opengl/gl-2.1.c
112
+ ext/opengl/gl-enums.c
113
+ ext/opengl/gl-enums.h
114
+ ext/opengl/gl-error.c
115
+ ext/opengl/gl-error.h
116
+ ext/opengl/gl-ext-3dfx.c
117
+ ext/opengl/gl-ext-arb.c
118
+ ext/opengl/gl-ext-ati.c
119
+ ext/opengl/gl-ext-ext.c
120
+ ext/opengl/gl-ext-gremedy.c
121
+ ext/opengl/gl-ext-nv.c
122
+ ext/opengl/gl-types.h
123
+ ext/opengl/gl.c
124
+ ext/opengl/glu-enums.c
125
+ ext/opengl/glu-enums.h
126
+ ext/opengl/glu.c
127
+ ext/opengl/glut.c
128
+ ext/opengl/opengl.c
129
+ lib/gl.rb
130
+ lib/glu.rb
131
+ lib/glut.rb
114
132
  lib/opengl.rb
115
- test/README
116
- test/tc_common.rb
117
- test/tc_ext_arb.rb
118
- test/tc_ext_ati.rb
119
- test/tc_ext_ext.rb
120
- test/tc_ext_gremedy.rb
121
- test/tc_ext_nv.rb
122
- test/tc_func_10_11.rb
123
- test/tc_func_12.rb
124
- test/tc_func_13.rb
125
- test/tc_func_14.rb
126
- test/tc_func_15.rb
127
- test/tc_func_20.rb
128
- test/tc_func_21.rb
129
- test/tc_glu.rb
130
- test/tc_include_gl.rb
131
- test/tc_misc.rb
132
- test/tc_require_gl.rb
133
+ lib/opengl/test_case.rb
134
+ test/test_gl.rb
135
+ test/test_gl_10_11.rb
136
+ test/test_gl_12.rb
137
+ test/test_gl_13.rb
138
+ test/test_gl_14.rb
139
+ test/test_gl_15.rb
140
+ test/test_gl_20.rb
141
+ test/test_gl_21.rb
142
+ test/test_gl_ext_arb.rb
143
+ test/test_gl_ext_ati.rb
144
+ test/test_gl_ext_ext.rb
145
+ test/test_gl_ext_gremedy.rb
146
+ test/test_gl_ext_nv.rb
147
+ test/test_glu.rb
133
148
  utils/README
134
149
  utils/enumgen.rb
135
150
  utils/extlistgen.rb
@@ -1,51 +1,98 @@
1
- = Ruby-OpenGL
1
+ = opengl
2
2
 
3
- * http://github.com/larskanis
3
+ source :: https://github.com/larskanis/opengl/tree/0.7
4
+ docs :: http://ruby-opengl.rubyforge.org
5
+ bugs :: https://github.com/drbrain/opengl/issues
6
+ email :: mailto:ruby-opengl-devel@rubyforge.org
4
7
 
5
- == DESCRIPTION:
8
+ == Description
6
9
 
7
- Ruby-OpenGL consists of Ruby extension modules that are bindings for
8
- the OpenGL, GLU, and GLUT libraries.
10
+ An OpenGL wrapper for Ruby. ruby-opengl contains bindings for OpenGL and the
11
+ GLU and GLUT libraries.
9
12
 
13
+ * This branch is for compatibility with Ruby 1.8. Latest development is for
14
+ Ruby 1.9.2+ only, on master branch: https://github.com/larskanis/opengl
10
15
 
11
- == FEATURES/PROBLEMS:
16
+ == Features and Problems
12
17
 
13
18
  * available for Windows, Linux, OS-X
14
- * supports Ruby MRI 1.8/1.9 and Rubinius
15
19
 
16
- == SYNOPSIS:
20
+ == Synopsis
17
21
 
18
22
  require 'opengl'
23
+ FIX (code sample of usage)
19
24
 
25
+ == Requirements
20
26
 
21
- == REQUIREMENTS:
22
-
27
+ * Ruby 1.8.7+
23
28
  * proper OpenGL, GLU and (free-)GLUT development files installed
24
29
 
25
- == INSTALL:
30
+ == Install
31
+
32
+ gem install opengl -v "~>0.7.0" --pre
33
+
34
+ == Developers
35
+
36
+ After checking out the source, run:
37
+
38
+ $ rake newb
39
+
40
+ This task will install any missing dependencies, run the tests/specs,
41
+ and generate the RDoc.
42
+
43
+ == Cross compiling for Windows
44
+
45
+ Using rake-compiler a cross compiled opengl gem can be build on a Linux or MacOS X
46
+ host for the win32 platform. The generated gem is statically linked against
47
+ libfreeglut. Freeglut is downloaded and compiled from the sources.
48
+ There are no runtime dependencies to any but the standard Windows
49
+ DLLs.
50
+
51
+ Install mingw32 or w64 using the instructions in rake-compiler's README.
52
+ For Debian/Ubuntu it is <tt>apt-get install gcc-mingw-w64</tt> .
53
+
54
+ Download and cross compile ruby 1.9 for win32 with:
55
+
56
+ rake-compiler cross-ruby VERSION=1.9.3-p0
57
+
58
+ Download and cross compile opengl for win32:
26
59
 
27
- * gem install opengl
60
+ rake cross native gem
28
61
 
29
- == LICENSE:
62
+ or with custom versions:
30
63
 
31
- The MIT License
64
+ rake cross native gem RUBY_CC_VERSION=1.9.3 LIBFREEGLUT_VERSION=2.8.0
32
65
 
33
- ruby-opengl
34
- ===========
66
+ If everything works, there should be ruby-opengl-VERSION-x86-mingw32.gem in the pkg
67
+ directory.
35
68
 
36
- [ruby-opengl][] consists of Ruby extension modules that are bindings for
37
- the [OpenGL][], GLU, and [GLUT][] libraries. It is intended to be a
38
- replacement for -- and uses the code from -- [Yoshi's ruby-opengl][].
39
69
 
40
- It's licensed under the MIT license. Please see the included MIT-LICENSE
41
- file for the terms of the license.
70
+ == License
42
71
 
72
+ (The MIT License)
43
73
 
44
- [ruby-opengl]: http://rubyforge.org/projects/ruby-opengl/
45
- [OpenGL]: http://www.opengl.org/
46
- [GLUT]: http://www.opengl.org/documentation/specs/glut/spec3/spec3.html
74
+ Copyright (c) Eric Hodel (current maintainer)
75
+ Copyright (c) Alain Hoang (previous maintainer)
76
+ Copyright (c) Jan Dvorak (contributor)
77
+ Copyright (c) Minh Thu Vo (contributor)
78
+ Copyright (c) James Adam (contributor)
47
79
 
80
+ Permission is hereby granted, free of charge, to any person obtaining
81
+ a copy of this software and associated documentation files (the
82
+ 'Software'), to deal in the Software without restriction, including
83
+ without limitation the rights to use, copy, modify, merge, publish,
84
+ distribute, sublicense, and/or sell copies of the Software, and to
85
+ permit persons to whom the Software is furnished to do so, subject to
86
+ the following conditions:
48
87
 
49
- [Yoshi's ruby-opengl]: http://www2.giganet.net/~yoshi/
88
+ The above copyright notice and this permission notice shall be
89
+ included in all copies or substantial portions of the Software.
50
90
 
91
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
92
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
93
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
94
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
95
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
96
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
97
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
51
98
 
data/Rakefile CHANGED
@@ -1,6 +1,7 @@
1
1
  #-*-ruby-*-
2
2
  #
3
3
  # Copyright (C) 2006 John M. Gabriele <jmg3000@gmail.com>
4
+ # Copyright (C) Eric Hodel <drbrain@segment7.net>
4
5
  #
5
6
  # This program is distributed under the terms of the MIT license.
6
7
  # See the included MIT-LICENSE file for the terms of this license.
@@ -15,115 +16,102 @@
15
16
 
16
17
  require 'rubygems'
17
18
 
18
- require 'rake'
19
- require 'rake/extensiontask'
20
- require 'rake/clean'
21
- require 'rubygems/package_task'
22
- require 'rake/testtask'
23
19
  require 'hoe'
20
+ require 'rake/extensiontask'
24
21
  load 'Rakefile.cross'
25
22
 
23
+ hoe = Hoe.spec 'opengl' do
24
+ developer 'Eric Hodel', 'drbrain@segment7.net'
25
+ developer 'Alain Hoang', ''
26
+ developer 'Jan Dvorak', ''
27
+ developer 'Minh Thu Vo', ''
28
+ developer 'James Adam', ''
29
+
30
+ self.readme_file = 'README.rdoc'
31
+ self.history_file = 'History.rdoc'
32
+ self.extra_rdoc_files = FileList['*.rdoc']
33
+
34
+ extra_dev_deps << ['rake-compiler', '~> 0.7', '>= 0.7.9']
35
+ extra_dev_deps << ['minitest', '~> 3.0']
36
+
37
+ self.spec_extras = {
38
+ :extensions => %w[ext/opengl/extconf.rb],
39
+ :required_ruby_version => '>= 1.8.7',
40
+ }
41
+ end
42
+
43
+ Rake::ExtensionTask.new 'opengl', hoe.spec do |ext|
44
+ ext.lib_dir = 'lib/opengl'
45
+
46
+ ext.cross_compile = true
47
+ ext.cross_platform = ['i386-mingw32']
48
+ ext.cross_config_options += [
49
+ "--with-installed-dir=#{STATIC_INSTALLDIR}",
50
+ ]
51
+ end
52
+
53
+ task :test => :compile
54
+
26
55
  # Generate html docs from the markdown source and upload to the site.
27
56
  # All doc files that are destined for the website have filenames that
28
57
  # end in .txt.
29
58
 
30
- WEBSITE_MKDN = FileList['./doc/*.txt'] << 'README.txt'
59
+ WEBSITE_MKDN = FileList['./docs/*.txt'] << 'README.txt'
31
60
  NICE_HTML_DOCS = WEBSITE_MKDN.ext('html')
32
61
 
33
62
  # defines columns in the HTML extension list
34
- GLEXT_VERSIONS = ["svn","0.60","0.50"]
35
-
36
- CLEAN.include("ext/gl*/Rakefile", "ext/*/mkrf.log", "ext/*/*.so",
37
- "ext/**/*.bundle", "lib/*.so", "lib/*.bundle", "ext/*/*.o{,bj}",
38
- "ext/*/*.lib", "ext/*/*.exp", "ext/*/*.pdb",
39
- "pkg")
40
- CLOBBER.include("*.plain", "doc/*.plain", "doc/*.snip", "*.html",
41
- "doc/*.html", "website/*.html", "website/images/*")
42
- # Make sure these files aren't deleted in a clobber op
43
- CLOBBER.exclude("website/images/tab_bottom.gif")
44
- CLOBBER.exclude("website/images/*.jpg")
63
+ GLEXT_VERSIONS = %w[svn 0.60 0.50]
45
64
 
46
65
  desc 'Show contents of some variables related to website doc generation.'
47
66
  task :explain_website do
48
- puts "WEBSITE_MKDN:"
49
- WEBSITE_MKDN.each do |doc|
50
- puts "\t#{doc}"
51
- end
52
- puts "NICE_HTML_DOCS:"
53
- NICE_HTML_DOCS.each do |doc|
54
- puts "\t#{doc}"
55
- end
67
+ puts "WEBSITE_MKDN:"
68
+ WEBSITE_MKDN.each do |doc|
69
+ puts "\t#{doc}"
70
+ end
71
+
72
+ puts "NICE_HTML_DOCS:"
73
+ NICE_HTML_DOCS.each do |doc|
74
+ puts "\t#{doc}"
75
+ end
56
76
  end
57
77
 
58
78
  desc 'Generate supported extension list.'
59
79
  task :gen_glext_list do
60
- sh "./utils/extlistgen.rb doc/extensions.txt.in doc/extensions.txt " + GLEXT_VERSIONS.join(" ")
80
+ sh "./utils/extlistgen.rb", "doc/extensions.txt.in", "doc/extensions.txt", *GLEXT_VERSIONS
61
81
  end
62
82
 
63
83
  desc 'Generate website html.'
64
84
  task :gen_website => [:gen_glext_list] + NICE_HTML_DOCS do
65
- # Now that the website docs have been generated, copy them to ./website.
66
- puts
67
- sh "cp README.html website/index.html"
68
- sh "cp doc/*.html website"
85
+ # Now that the website docs have been generated, copy them to ./website.
86
+ cp "README.html", "website/index.html"
87
+ cp "doc/*.html", "ebsite"
69
88
  end
70
89
 
71
90
  # You'll see some intermediate .plain files get generated. These are html,
72
91
  # but don't yet have their code snippets syntax highlighted.
73
92
  rule '.html' => '.plain' do |t|
74
- puts "Turning #{t.source} into #{t.name} ..."
75
- sh "./utils/post-mkdn2html.rb #{t.source} #{t.name}"
93
+ puts "Turning #{t.source} into #{t.name} ..."
94
+ sh "./utils/post-mkdn2html.rb", t.source, t.name
76
95
  end
77
96
 
78
97
  # Process the markdown docs into plain html.
79
98
  rule '.plain' => '.txt' do |t|
80
- puts
81
- puts "Turning #{t.source} into #{t.name} ..."
82
- sh "./utils/mkdn2html.rb #{t.source} #{t.name}"
99
+ puts "Turning #{t.source} into #{t.name} ..."
100
+ sh "./utils/mkdn2html.rb", t.source, t.name
83
101
  end
84
102
 
103
+ RUBYFORGE = "rubyforge.org:/var/www/gforge-projects/ruby-opengl"
104
+
85
105
  desc 'Upload the newly-built site to RubyForge.'
86
106
  task :upload_website => [:gen_website] do
87
- sh "scp website/*.html hoanga@rubyforge.org:/var/www/gforge-projects/ruby-opengl"
88
- sh "scp website/images/* hoanga@rubyforge.org:/var/www/gforge-projects/ruby-opengl/images/"
107
+ sh "scp", "website/*.html", RUBYFORGE
108
+ sh "scp", "website/images/*", "#{RUBYFORGE}/images/"
89
109
  end
90
110
 
91
111
  desc 'Upload entire site, including stylesheet and the images directory.'
92
112
  task :upload_entire_website => [:gen_website] do
93
- sh "scp website/*.html hoanga@rubyforge.org:/var/www/gforge-projects/ruby-opengl"
94
- sh "scp website/*.css hoanga@rubyforge.org:/var/www/gforge-projects/ruby-opengl"
95
- sh "scp -r website/images hoanga@rubyforge.org:/var/www/gforge-projects/ruby-opengl"
96
- end
97
-
98
-
99
-
100
-
101
- ############# gems #############
102
-
103
-
104
- hoe = Hoe.spec "opengl" do
105
- self.author = [ "Alain Hoang", "Jan Dvorak", "Minh Thu Vo", "James Adam" ]
106
- self.email = "ruby-opengl-devel@rubyforge.org"
107
- self.url = "http://ruby-opengl.rubyforge.org"
108
- self.rubyforge_name = 'ruby-opengl'
109
- self.version = IO.read("ext/gl/gl.c")[/VERSION += +([\"\'])([\d][\w\.]+)\1/] && $2
110
- self.local_rdoc_dir = 'rdoc'
111
- self.readme_file = 'README.rdoc'
112
- self.extra_rdoc_files << self.readme_file
113
-
114
- spec_extras[:extensions] = ['ext/gl/extconf.rb', 'ext/glu/extconf.rb', 'ext/glut/extconf.rb']
115
- extra_dev_deps << ['rake-compiler', '>= 0.8']
116
- end
117
-
118
-
119
- ext_block = proc do |ext|
120
- ext.cross_compile = true
121
- ext.cross_platform = ['i386-mingw32']
122
- ext.cross_config_options += [
123
- "--with-installed-dir=#{STATIC_INSTALLDIR}",
124
- ]
113
+ sh "scp", "website/*.html", RUBYFORGE
114
+ sh "scp", "website/*.css", RUBYFORGE
115
+ sh "scp", "-r", "website", "images", RUBYFORGE
125
116
  end
126
117
 
127
- Rake::ExtensionTask.new 'gl', hoe.spec, &ext_block
128
- Rake::ExtensionTask.new 'glu', hoe.spec, &ext_block
129
- Rake::ExtensionTask.new 'glut', hoe.spec, &ext_block