[sdljava] Fix building with ruby 1.9

Hans de Goede jwrdegoede at fedoraproject.org
Thu Jul 26 11:09:12 UTC 2012


commit c06f3fabc732a32ebb812dbbbd96c9e9082f4fb3
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Thu Jul 26 13:13:13 2012 +0200

    Fix building with ruby 1.9
    
    - Rebuilt for new GLEW

 sdljava-0.9.1-ruby19.patch |   32 ++++++++++++++++++++++++++++++++
 sdljava.spec               |    8 +++++++-
 2 files changed, 39 insertions(+), 1 deletions(-)
---
diff --git a/sdljava-0.9.1-ruby19.patch b/sdljava-0.9.1-ruby19.patch
new file mode 100644
index 0000000..1e72407
--- /dev/null
+++ b/sdljava-0.9.1-ruby19.patch
@@ -0,0 +1,32 @@
+--- sdljava-0.9.1/src/org/gljava/opengl/native/ftgl/post-process.rb~	2005-02-20 23:19:13.000000000 +0100
++++ sdljava-0.9.1/src/org/gljava/opengl/native/ftgl/post-process.rb	2012-07-26 12:45:18.738168697 +0200
+@@ -1,7 +1,7 @@
+ #!/usr/bin/ruby -w
+ 
+ require "find"
+-require "ftools"
++require "fileutils"
+ 
+ # temporary hack until I can figure out a better way to do this
+ #    process the given files, change the methods names to start
+@@ -101,16 +101,16 @@ Find.find(".") do |path|
+ 
+   f = File.new("#{path}.tmp", "w+")
+   
+-  f << lines
++  f.puts(lines)
+   
+-  f << post if not post == nil
++  f.puts(post) if not post == nil
+ 
+-  f << "\n}"
++  f.puts("\n}")
+ 
+   f.close
+ 
+   # move it to the actual file now
+-  File.move("#{path}.tmp", path)
++  FileUtils.move("#{path}.tmp", path)
+ end
+ 
+ 
diff --git a/sdljava.spec b/sdljava.spec
index b102e11..be4ac7e 100644
--- a/sdljava.spec
+++ b/sdljava.spec
@@ -7,7 +7,7 @@
 
 Name:           sdljava
 Version:        0.9.1
-Release:        18%{?dist}
+Release:        19%{?dist}
 Summary:        Java binding to the SDL API
 Group:          System Environment/Libraries
 License:        LGPLv2+
@@ -18,6 +18,7 @@ Source0:        %{name}-%{version}.tar.gz
 Source1:        %{name}-runtest.sh
 Patch0:         sdljava-0.9.1-regen.patch
 Patch1:         sdljava-0.9.1-ftgl213.patch
+Patch2:         sdljava-0.9.1-ruby19.patch
 BuildRequires:  ftgl-devel glew-devel SDL-devel SDL_gfx-devel SDL_image-devel
 BuildRequires:  SDL_mixer-devel SDL_ttf-devel java-devel jpackage-utils
 BuildRequires:  java-javadoc ant xml-commons-apis swig bsh jdom ruby
@@ -60,6 +61,7 @@ Demonstrations and samples for %{name}.
 %setup -q
 %patch0 -p1 -z .regen
 %patch1 -p1
+%patch2 -p1
 # Newer ftgl no longer exports the FTFace class
 rm src/org/gljava/opengl/ftgl/FTFace.java
 iconv -f ISO_8859-2 -t UTF8 docs/CHANGES_0_9_1 > docs/CHANGES_0_9_1.tmp
@@ -192,6 +194,10 @@ ln -s ../../fonts/dejavu/DejaVuSans-BoldOblique.ttf \
 
 
 %changelog
+* Thu Jul 26 2012 Hans de Goede <hdegoede at redhat.com> - 0.9.1-19
+- Fix building with ruby 1.9
+- Rebuilt for new GLEW
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.1-18
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list