hornetseye-xorg 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -7,15 +7,15 @@ require 'rake/loaders/makefile'
7
7
  require 'rbconfig'
8
8
 
9
9
  PKG_NAME = 'hornetseye-xorg'
10
- PKG_VERSION = '0.3.0'
10
+ PKG_VERSION = '0.3.1'
11
+ CFG = RbConfig::CONFIG
11
12
  CXX = ENV[ 'CXX' ] || 'g++'
12
- STRIP = ENV[ 'STRIP' ] || 'strip'
13
13
  RB_FILES = FileList[ 'lib/**/*.rb' ]
14
14
  CC_FILES = FileList[ 'ext/*.cc' ]
15
15
  HH_FILES = FileList[ 'ext/*.hh' ] + FileList[ 'ext/*.tcc' ]
16
16
  TC_FILES = FileList[ 'test/tc_*.rb' ]
17
17
  TS_FILES = FileList[ 'test/ts_*.rb' ]
18
- SO_FILE = "ext/#{PKG_NAME.tr '\-', '_'}.so"
18
+ SO_FILE = "ext/#{PKG_NAME.tr '\-', '_'}.#{CFG[ 'DLEXT' ]}"
19
19
  PKG_FILES = [ 'Rakefile', 'README.md', 'COPYING', '.document' ] +
20
20
  RB_FILES + CC_FILES + HH_FILES + TS_FILES + TC_FILES
21
21
  BIN_FILES = [ 'README.md', 'COPYING', '.document', SO_FILE ] +
@@ -27,17 +27,18 @@ EMAIL = %q{jan@wedesoft.de}
27
27
  HOMEPAGE = %q{http://wedesoft.github.com/hornetseye-xorg/}
28
28
 
29
29
  OBJ = CC_FILES.ext 'o'
30
- $CXXFLAGS = ENV[ 'CXXFLAGS' ] || ''
31
- $CXXFLAGS = "#{$CXXFLAGS} -fPIC -DNDEBUG"
32
- if RbConfig::CONFIG[ 'rubyhdrdir' ]
33
- $CXXFLAGS = "#{$CXXFLAGS} -I#{RbConfig::CONFIG[ 'rubyhdrdir' ]} " +
34
- "-I#{RbConfig::CONFIG[ 'rubyhdrdir' ]}/#{RbConfig::CONFIG[ 'arch' ]}"
30
+ $CXXFLAGS = "-DNDEBUG #{CFG[ 'CPPFLAGS' ]} #{CFG[ 'CFLAGS' ]}"
31
+ if CFG[ 'rubyhdrdir' ]
32
+ $CXXFLAGS = "#{$CXXFLAGS} -I#{CFG[ 'rubyhdrdir' ]} " +
33
+ "-I#{CFG[ 'rubyhdrdir' ]}/#{CFG[ 'arch' ]}"
35
34
  else
36
- $CXXFLAGS = "#{$CXXFLAGS} -I#{RbConfig::CONFIG[ 'archdir' ]}"
35
+ $CXXFLAGS = "#{$CXXFLAGS} -I#{CFG[ 'archdir' ]}"
37
36
  end
38
- $LIBRUBYARG = RbConfig::CONFIG[ 'LIBRUBYARG' ]
39
- $SITELIBDIR = RbConfig::CONFIG[ 'sitelibdir' ]
40
- $SITEARCHDIR = RbConfig::CONFIG[ 'sitearchdir' ]
37
+ $LIBRUBYARG = "-L#{CFG[ 'libdir' ]} #{CFG[ 'LIBRUBYARG' ]} #{CFG[ 'LDFLAGS' ]} " +
38
+ "#{CFG[ 'SOLIBS' ]} #{CFG[ 'DLDLIBS' ]}"
39
+ $SITELIBDIR = CFG[ 'sitelibdir' ]
40
+ $SITEARCHDIR = CFG[ 'sitearchdir' ]
41
+ $LDSHARED = CFG[ 'LDSHARED' ][ CFG[ 'LDSHARED' ].index( ' ' ) .. -1 ]
41
42
 
42
43
  task :default => :all
43
44
 
@@ -45,8 +46,7 @@ desc 'Compile Ruby extension (default)'
45
46
  task :all => [ SO_FILE ]
46
47
 
47
48
  file SO_FILE => OBJ do |t|
48
- sh "#{CXX} -shared -o #{t.name} #{OBJ} -lGLU -lGL -lX11 -lXv #{$LIBRUBYARG}"
49
- # sh "#{STRIP} --strip-all #{t.name}"
49
+ sh "#{CXX} -shared -o #{t.name} #{OBJ} -lGLU -lGL -lX11 -lXv -lXpm #{$LIBRUBYARG}"
50
50
  end
51
51
 
52
52
  task :test => [ SO_FILE ]
@@ -171,7 +171,7 @@ rule '.o' => '.cc' do |t|
171
171
  end
172
172
 
173
173
  file ".depends.mf" do |t|
174
- sh "g++ -MM #{$CXXFLAGS} #{CC_FILES.join ' '} | " +
174
+ sh "g++ -MM #{CC_FILES.join ' '} | " +
175
175
  "sed -e :a -e N -e 's/\\n/\\$/g' -e ta | " +
176
176
  "sed -e 's/ *\\\\\\$ */ /g' -e 's/\\$/\\n/g' | sed -e 's/^/ext\\//' > #{t.name}"
177
177
  end
data/ext/x11window.cc CHANGED
@@ -260,7 +260,6 @@ X11Window::X11Window( X11DisplayPtr display, X11PainterPtr painter,
260
260
  wmProtocols = XInternAtom( display->get(), "WM_PROTOCOLS", False );
261
261
  wmDeleteWindow = XInternAtom( display->get(), "WM_DELETE_WINDOW", False );
262
262
  XSetWMProtocols( display->get(), m_window, &wmDeleteWindow, 1 );
263
- #ifdef HAVE_XPM
264
263
  XWMHints wmHints;
265
264
  XpmCreatePixmapFromData( display->get(), m_window,
266
265
  (char **)hornetseye_xpm,
@@ -269,7 +268,6 @@ X11Window::X11Window( X11DisplayPtr display, X11PainterPtr painter,
269
268
  0 );
270
269
  wmHints.flags = IconPixmapHint | IconMaskHint;
271
270
  XSetWMHints( display->get(), m_window, &wmHints );
272
- #endif
273
271
 
274
272
  try {
275
273
 
@@ -76,7 +76,7 @@ module Hornetseye
76
76
  ensure
77
77
  window.close
78
78
  end
79
- display
79
+ result
80
80
  end
81
81
  end
82
82
 
@@ -14,7 +14,6 @@
14
14
  # You should have received a copy of the GNU General Public License
15
15
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
 
17
- require 'hornetseye_frame'
18
17
  require 'hornetseye-xorg/x11display'
19
18
  require 'hornetseye-xorg/x11output'
20
19
  require 'hornetseye-xorg/ximageoutput'
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 0
9
- version: 0.3.0
8
+ - 1
9
+ version: 0.3.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jan Wedekind
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-12 00:00:00 +01:00
17
+ date: 2010-11-12 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency